Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between zoom and smooth zoom in android camera?

what is the difference between zoom and smooth zoom in android camera?

Does the device have to support zoom and smooth zoom to zoom?

How to zoom in android camera?

I use the HTC HD, I found isZoomSupported()=true and isSmoothZoomSupported()=false.

When I call mParameters.setZoom(index) there is no change.

like image 360
Judy Avatar asked Jun 15 '11 08:06

Judy


1 Answers

In smooth zoom the tranistion to the required zoom value will happen in steps. Say for example - if the camera supports 3 levels of zooming and you want to zoom to the 3rd level. By using the smoothzoom the camera zooms to the first level and then second and finally the third, this when looking through the preview gives it a fluid motion.

If a device doesn't support smooth zoom then it directly zooms the required zoom value. The 3rd level in the above example.

In android you can zoom in two ways (as you already have found out)

  1. SmoothZoom

    In this case you use the API - startSmoothZoom()

  2. Zoom

    In this case you use the setZoom() API on the camera parameter object. Then reset the parameter object onto the camera device, since one of the camera parameters has changed(In this case zoom), so use the API setParameters()

In either case it is ideal to check if either of the zooming methods is supported using the APIs isZoomSupported() and isSmoothZoomSupported() before actually using the zoom APIs.

like image 83
bluefalcon Avatar answered Sep 18 '22 16:09

bluefalcon