Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Android: getting largest prview image possible

The Nexus 4 has a screen res of 1280x768 (with no title bar etc).

According to getResolutionList() the largest preview image from OpenCV (item 0 in the list) is 1280x768, so in onCameraFrame, why does the image always come through at a maximum of 800x480.

Even when I try to force the size to the maximum using setResolution(mResolutionList.get(0)) it sticks at 800x480.

Can anyone give me some clue as to what I'm doing wrong?

Many thanks

Baz

Android: getting largest prview image possible

The Nexus 4 has a screen res of 1280x768 (with no title bar etc).

According to getResolutionList() the largest preview image from OpenCV (item 0 in the list) is 1280x768, so in onCameraFrame, why does the image always come through at a maximum of 800x480.

Even when I try to force the size to the maximum using setResolution(mResolutionList.get(0)) it sticks at 800x480.

Can anyone give me some clue as to what I'm doing wrong?

Many thanks

Baz

EDIT: ps I'm using 2.4.4 on Android 4.2.

Android: getting largest prview preview image possible

The Nexus 4 has a screen res of 1280x768 (with no title bar etc).

According to getResolutionList() the largest preview image from OpenCV (item 0 in the list) is 1280x768, so in onCameraFrame, why does the image always come through at a maximum of 800x480.

Even when I try to force the size to the maximum using setResolution(mResolutionList.get(0)) it sticks at 800x480.

Can anyone give me some clue as to what I'm doing wrong?

Many thanks

Baz

EDIT: ps I'm using 2.4.4 on Android 4.2.

Android: getting largest preview image possible

The Nexus 4 has a screen res of 1280x768 (with no title bar etc).

According to getResolutionList() the largest preview image from OpenCV (item 0 in the list) is 1280x768, 1280x720, so in onCameraFrame, why does the image always come through at a maximum of 800x480.

Even when I try to force the size to the maximum using setResolution(mResolutionList.get(0)) it sticks at 800x480.

Can anyone give me some clue as to what I'm doing wrong?

Many thanks

Baz

EDIT: ps I'm using 2.4.4 on Android 4.2.

Android: getting largest preview image possible

The Nexus 4 has a screen res of 1280x768 (with no title bar etc).

According to getResolutionList() the largest preview image from OpenCV (item 0 in the list) is 1280x720, so in onCameraFrame, why does the image always come through at a maximum of 800x480.

Even when I try to force the size to the maximum using setResolution(mResolutionList.get(0)) it sticks at 800x480.

Can anyone give me some clue as to what I'm doing wrong?

Many thanks

Baz

EDIT: ps I'm using 2.4.4 on Android 4.2.

EDIT: To add some explanation about the answer, here's a picture:

image description

The total screen res on the Nexus is 1280x768, but that includes the buttons on the right, so the total screen I have to play with is 1196x768 (the red dotted line). The largest preview image reported by getResolutionList is 1280x720, but that won't fit, so despite being listed as available... it isn't really.

Next job: Work out how to scale up the largest preview which will fit (800x480 - the blue dotted line) to fill the screen without slamming performance.