Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV with camera feed issues

Hello,

I am currently trying to execute the Android application with:

  • Android 4.4.2
  • Google Glass
  • OpenCV 2.4.9

I am able to run the application with a launcher but the screen is glitched as shown below. You can see the ceiling's florescent lights at the top of the image. Searching have indicated this to be an issue due to encoding mismatch.

image description

A suggested solution was to try to set the FPS preview range in Camera.Parameters. However, the sample code in camera-preview and face-detection indicates that org.opencv.android.CameraBridgeViewBase is being used rather than android.hardware.Camera that was suggested.

I have attempted to do this by first detecting the number of cameras, followed by Camera.Open(0) and Camera.setParameters(). Unfortunately, I get an error that I have failed to connect to the camera service when I attempt to open the camera.

Is there a way to solve this issue? I welcome any that can help on existing camera-preview/face-detection code, or to perform this in a relatively new way instead too.

Thank you very much.

OpenCV with camera feed issues

Hello,

I am currently trying to execute the Android application with:

  • Android 4.4.2
  • Google Glass
  • OpenCV 2.4.9

I am able to run the application with a launcher but the screen is glitched as shown below. You can see the ceiling's florescent lights at the top of the image. Searching have indicated this to be an issue due to encoding mismatch.

image description

A suggested solution was to try to set the FPS preview range in Camera.Parameters. However, the sample code in camera-preview and face-detection indicates that org.opencv.android.CameraBridgeViewBase is being used rather than android.hardware.Camera that was suggested.

I have attempted to do this by first detecting the number of cameras, followed by Camera.Open(0) and Camera.setParameters(). Unfortunately, I get an error that I have failed to connect to the camera service when I attempt to open the camera.

Is there a way to solve this issue? I welcome any that can help on existing camera-preview/face-detection code, or to perform this in a relatively new way instead too.

Thank you very much.