Ask Your Question

Revision history [back]

Camera zoom and tracking

Hi,

I am using the following code to zoom in using the iBall camera connected to my machine via usb.

      com.googlecode.javacv.cpp.opencv_highgui.CvCapture capture = cvCreateCameraCapture(0);

      com.googlecode.javacv.cpp.opencv_highgui.cvSetCaptureProperty(capture
                    , com.googlecode.javacv.cpp.opencv_highgui.CV_CAP_PROP_ZOOM, 25000);

      com.googlecode.javacv.cpp.opencv_highgui.cvQueryFrame(capture);

     img = cvQueryFrame(capture);

The camera takes the image but it never zooms in. I have tried different values for the property CV_CAP_PROP_ZOOM in the call. e.g. 25000 or 10000 etc. Each time the image saved is identical. Is this the right way to do it?

Also after zooming in I need to track left in order to get the image of the entire object. Any suggestions?