Ask Your Question

Lower resolution with JavaCameraView in Android

asked 2013-03-06 06:11:44 -0500

MysticBE gravatar image

I was wondering how to get a lower resolution when using the JavaCameraView

public List<size> getResolutionList() { return mCamera.getParameters().getSupportedPreviewSizes(); }

public void setResolution(Size resolution) {
    mMaxHeight = resolution.height;
    mMaxWidth = resolution.width;
    connectCamera(getWidth(), getHeight());

public Size getResolution() {
    return mCamera.getParameters().getPreviewSize();

My resolution is now 960x720, but I want to lower it for (hopefully) better performence, but I coulnd't find any solutions on how to solve this

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-03-06 06:58:57 -0500

There is a sample tutorial-3-CameraControl in OpenCV4Android SDK. It shows how to change preview resolution. If you want to scale up image some modifications in CameraBridgeViewBase class is needed (call of canvas.drawBitmap).

edit flag offensive delete link more


Thank you, is there anywhere were I might find some more information about how to modify this exactly, cause I would like the resolution to be spread all over the screen instead of the small area (320x240 for example). In you say that it isn't possible, has anything changed yet or is it still impossible? And what is the difference with fitting in view size?

MysticBE gravatar imageMysticBE ( 2013-03-06 10:39:56 -0500 )edit

Question Tools


Asked: 2013-03-06 06:11:44 -0500

Seen: 5,010 times

Last updated: Mar 06 '13