3

嗨,我想在相机中显示一个矩形,这样当用户拍摄时,只能处理矩形内的区域。知道我该怎么做吗?并且可以通过沿角拖动来调整矩形大小。

我没有调用相机应用程序。我正在使用相机 API。

4

3 回答 3

7

嗨,我使用本教程解决了问题,请参阅此处 如果有一天链接丢失,我在此处保留了 pdf

于 2012-04-25T18:59:32.020 回答
3

你可以看到我的开源应用程序http://code.google.com/p/android-palmprint-api,在 SVN 中你可以看到源代码。在实时相机图像上绘制 AR 信息

于 2012-04-25T06:37:36.517 回答
1

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.

于 2012-04-19T02:14:34.497 回答