美文网首页
Android Opencv修改Camera 输出分辨率

Android Opencv修改Camera 输出分辨率

作者: 蘑菇v5 | 来源:发表于2019-03-07 10:12 被阅读1次

【声明:】本文是作者(蘑菇v5)原创,版权归作者 蘑菇v5所有,侵权必究。本文首发在简书。如若转发,请注明作者和来源地址!未经授权,严禁私自转载!

解决方法:

修改openCVLibraryCameraBridgeViewBase中的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);

相关文章

网友评论

      本文标题:Android Opencv修改Camera 输出分辨率

      本文链接:https://www.haomeiwen.com/subject/xhzpeqtx.html