【声明:】本文是作者(蘑菇v5)原创,版权归作者 蘑菇v5所有,侵权必究。本文首发在简书。如若转发,请注明作者和来源地址!未经授权,严禁私自转载!
解决方法:
修改openCVLibrary
中CameraBridgeViewBase
中的onEnterStartedState()
方法,方法里面 connectCamera(int width, int height)
,参数就是要输出的camera
分辨率大小(长和宽)
connectCamera代码如下:
/**
* This method is invoked shall perform concrete operation to initialize the camera.
* CONTRACT: as a result of this method variables mFrameWidth and mFrameHeight MUST be
* initialized with the size of the Camera frames that will be delivered to external processor.
*
* @param width - the width of this SurfaceView
* @param height - the height of this SurfaceView
*/
protected abstract boolean connectCamera(int width, int height);
网友评论