Google Glass preview image scrambled with new XE10 release

前端 未结 6 1191
情歌与酒
情歌与酒 2020-12-02 17:44

This occurs using a few apks that make use of the camera (e.g., zxing, opencv). It displays a glitched image in the preview but it is still a function of what the camera se

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 18:05

    For anyone using ZXing on their Glass, you can build a version from the source code with the above fix.

    Add the following method into CameraConfigurationManager.java

      public void googleGlassXE10WorkAround(Camera mCamera) {
            Camera.Parameters params = mCamera.getParameters();
            params.setPreviewFpsRange(30000, 30000);
            params.setPreviewSize(640,360);
            mCamera.setParameters(params);
      }
    

    And call this method immediately after anywhere you see Camera.setParameters() in the ZXing code. I just put it in two places in the CameraConfigurationManager and it worked.

    I set the Preview Size to be 640x360 to match the Glass resolution.

提交回复
热议问题