Android Native Camera Focus Mode With 2.4.3 & Samsung Galaxy S2
Hi, I'm starting to use the native camera through ndk (c++) with the android, and whatever I set the focus mode to doesn't seem to work...
I can see the parameters patch has been added to cap_android.cpp (line 299+) but I cannot see any difference in the focus after applying the property. The code I am using is:
cv::VideoCapture capture(CV_CAP_ANDROID + 0);
capture.set(CV_CAP_PROP_ANDROID_FOCUS_MODE, CV_CAP_ANDROID_FOCUS_MODE_AUTO); capture.set(CV_CAP_PROP_ANDROID_FLASH_MODE, CV_CAP_ANDROID_FLASH_MODE_TORCH);
Which must be working, as I have the flash light coming on.
Btw, I'm using a Samsung S2 and android 4.0.3.
Any pointers to how I can get this to work? Am I doing something wrong?
Also, whenever I set the properties, it resets the camera capture, is this normal?
Thanks in advance.
Mark
Do you have a sample for accessing mobile Camera from NDK using opencv ? thank you