How to use camera flash in NativeCameraView android
I have to turn on camera flash using openCV. I need to use NativeCameraView but it doesn't work.
What can I do?
I tried :
VideoCapture mCamera;
mCamera.set(Highgui.CV_CAP_PROP_ANDROID_FLASH_MODE, Highgui.CV_CAP_ANDROID_FLASH_MODE_ON);
Please, in the future, try to focus on using tags without the hashtags. These hashtags create tons of double tags, which is not interesting if you want to apply filtering on topics. I have removed them and formatted your code a bit more correctly.
thank you
Maybe try
I dont know if its just a typo, but you try to set the focus, not flash mode
i tried flash_mote too
What are you actually trying to do? Do you want to use it like a flashlight or as a real flash?
as a real flash
I think the problem is that VideoCapture actually has no real photo functionality. Its just a camera/video stream and you have the possibility to retrieve a frame from it, but you actually dont take a real picture. So the flash wont work. At least this is how I imagine it.
In my app I do videos. I have to keep the flash on during the recording of the video.
mCamera.set(Highgui.CV_CAP_PROP_ANDROID_FLASH_MODE, Highhui.CV_CAP_ANDROID_FLASH_MODE_TORCH);
this worked for me
it works. thank you