Ask Your Question

[Android - Native Camera] Setting ISO (and other camera parameters)

asked 2012-08-20 07:00:40 -0600

Meehow gravatar image

updated 2012-08-20 07:08:32 -0600

sammy gravatar image

Is it possible to set camera parameters, such as the ISO, when using Android OpenCV's Native Camera?

When using the regular Android Camera, I can set the ISO using something like this:

mCamera =;
String[] supportedISOs = mCamera.getParameters().get("iso-values").split(",");

Then later

Parameters params = mCamera.getParameters();
// "choice" reflects the user's choice (ie. menu selection)
params.set("iso", supportedISOs[choice]);  

Though it is a bit of a hack - the ISO isn't exposed in the Android API like for example the WB, but it is still in the camera parameters on most phones. However, when using OpenCV's Native Camera, I don't know of a way to do something similar.

Is it possible? Are there plans to give access to the ISO and other parameters in the Native Camera (like the exposure time / shutter speed)?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2012-08-20 12:39:35 -0600

Rui Marques gravatar image

As far as I know it is currently not possible to do that with Native Camera. I read once someone suggesting a patch to access more camera parameters. Here it is:

According to this, since version 2.4.0, more parameters can be accessed, but by inspecting the code of the patch, ISO it is not one of them.

I think this is the latest information on your problem, maybe you have to submit a feature request or do a patch yourself. If you are thinking about doing a patch, check the link above, it has the code for the patch that you can learn from.

edit flag offensive delete link more

answered 2012-09-03 16:14:52 -0600

Marc J gravatar image

updated 2012-09-03 16:16:03 -0600

I have to test this further, but I'd say the patch is implemented in 2.4.2 even though JavaDoc says for the method VideoCapture.set:

"propId Property identifier. It can be one of the following: * CV_CAP_PROP_FRAME_WIDTH Width of the frames in the video stream. * CV_CAP_PROP_FRAME_HEIGHT Height of the frames in the video stream. value Value of the property."

This made me think at first, only those two values are valid. But it seems you can use all the constants from Highgui e.g.


edit flag offensive delete link more


Yes it is possible that the javadocs have not been updated.

Rui Marques gravatar imageRui Marques ( 2012-09-04 03:23:01 -0600 )edit

answered 2013-07-10 00:07:28 -0600

AnthonyKeane gravatar image

You can get access as you describe, I did an Override of

, then in the


I added my desired settings

edit flag offensive delete link more

Question Tools


Asked: 2012-08-20 07:00:40 -0600

Seen: 6,963 times

Last updated: Jul 10 '13