Hi I want to show a rectangle in camera so that when the user takes snap only the region inside the rectangle can be processed. Any idea how can I do it? And the rectangle size can be resized by dragging along the corners.
I am not calling the camera application. I am using the camera API.
Hi I solved the problem using this tutorial, see here
If the link goes missing some day I have kept a pdf here
You can see my open source application http://code.google.com/p/android-palmprint-api , in SVN you can see the source code.
I think you need to draw a rectangle that has size as you desire. Then you just need to set that size for preview frame, and when you get the result return from onPreviewFrame , you will process on that data.
You can refer the ViewfinderView class of Xzing source here
to learn how to draw a rectangle in camera preview.
and refer CameraConfigurationManager,PreviewCallback,CameraManager also in xzing source to learn how to set preview size and process result data return from camera driver.
Hope this help you.