嗨,我想在相机中显示一个矩形,这样当用户拍摄时,只能处理矩形内的区域。知道我该怎么做吗?并且可以通过沿角拖动来调整矩形大小。
我没有调用相机应用程序。我正在使用相机 API。
嗨,我想在相机中显示一个矩形,这样当用户拍摄时,只能处理矩形内的区域。知道我该怎么做吗?并且可以通过沿角拖动来调整矩形大小。
我没有调用相机应用程序。我正在使用相机 API。
你可以看到我的开源应用程序http://code.google.com/p/android-palmprint-api,在 SVN 中你可以看到源代码。
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.