JayVDiyk
JayVDiyk

Reputation: 4487

Android Camera Set Zoom and Performance

I uses the Android Camera to do some live image processing.

I am wondering if I set the camera zoom level to higher level would impact on better performance?

Of course preview size is the same preview size.

So lets say the preview size is 1280 x 720

Scenario 1:

CameraParameters.setZoom(0);

Scenario 2:

CameraParameters.setZoom(3);

Will the second scenario provide a better and faster performance?

Upvotes: 2

Views: 2228

Answers (1)

Fabin Paul
Fabin Paul

Reputation: 1711

From what I understood I don't think it would improve performance on live image processing. Suppose when your camera preview is 1280x720, 100 pixels may represent a dot on the preview. But when you apply zoom, more than 100 pixels will represent the same dot on preview. But the camera preview is still 1280x720.

I investigated further and found that when camera preview is 960x720 and preview format is YUV 420, byte array size on Preview Callback is 1036800 i.e

1036800 = ( 960 * 720 * 6 ) / 2

(YUV420p 6 bytes per 4 pixels).

on changing zoom level, Preview Callback still returned byte array of size 1036800.

So image processing on byte array of same size wouldn't yield any performance difference.

I hope it would be of help...

Upvotes: 1

Related Questions