Hi, I'm new with OpenCV and my problem is this:
I'm trying to change the default camera orientation, after search i found the solution.
I added this lines to the JavaCameraView.java file that including in the OpenCV 2.4.6 library:
setDisplayOrientation(mCamera, 90);
mCamera.setPreviewDisplay(getHolder());
while setDisplayOrientation implemented like this:
protected void setDisplayOrientation(Camera camera, int angle){
Method downPolymorphic;
try
{
downPolymorphic = camera.getClass().getMethod("setDisplayOrientation", new Class[] { int.class });
if (downPolymorphic != null)
downPolymorphic.invoke(camera, new Object[] { angle });
}
catch (Exception e1)
{
}
}
My problem now is that the call to "mCamera.setPreviewDisplay" method ruin all the other settings of the camera, so now i can't play with this settings (Like change the camera priview to gray, change size, distance etc...)
What can i do to fix this?
Thanks!