Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ANDROID: Use autofocus with CameraBridgeViewBase?

hello there. im writing an android app and im using the CameraBridgeViewBase just like in the facedetection-example that comes with openCV.

private CameraBridgeViewBase mOpenCvCameraView;

protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_main);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
}

everything works fine, except that the pictures it takes are blurry and not sharp. i wanted to use something like auotfocus, but i found that the CameraBridgeViewBase class does not support that.

is there a way to use any type of focus with this class? or is there any other way to capture sharper pictures with the CameraBridgeViewBase?

thanks in advance :)

ANDROID: Use autofocus with CameraBridgeViewBase?

hello there. im writing an android app and im using the CameraBridgeViewBase just like in the facedetection-example that comes with openCV.openCV. Here is a part of my code, just basic initialisation:

private CameraBridgeViewBase mOpenCvCameraView;

protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_main);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
}

everything works fine, except that the pictures it takes are blurry and not sharp. i wanted to use something like auotfocus, but i found that the CameraBridgeViewBase class does not support that.

is there a way to use any type of focus with this class? or is there any other way to capture sharper pictures with the CameraBridgeViewBase?

thanks in advance :)

ANDROID: Use autofocus with CameraBridgeViewBase?

hello there. im writing an android app and im using the CameraBridgeViewBase just like in the facedetection-example that comes with openCV. Here is a part of my code, just basic initialisation:

private CameraBridgeViewBase mOpenCvCameraView;

protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_main);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
}

everything works fine, except that the pictures frames it takes are blurry and not sharp. i wanted to use something like auotfocus, but i found that the CameraBridgeViewBase class does not support that.

is there a way to use any type of focus with this class? or is there any other way to capture sharper pictures frames with the CameraBridgeViewBase?

thanks in advance :)

ANDROID: Use autofocus with CameraBridgeViewBase?

hello there. im writing an android app and im using the CameraBridgeViewBase just like in the facedetection-example that comes with openCV. Here is a part of my code, just basic initialisation:

private CameraBridgeViewBase mOpenCvCameraView;

protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_main);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
}

everything works fine, except that the frames it takes are blurry and not sharp. i wanted to use something like auotfocus, but i found that the CameraBridgeViewBase class does not support offer that.

is there a way to use any type of focus with this class? or is there any other way to capture sharper frames with the CameraBridgeViewBase?

thanks in advance :)