# Videocapture with Acer Switch 5

I am having trouble setting focus on my new Acer Switch 5 tablet rear camera. This camera is focussable in Windows Camera app. Also, if I do:

pcam->set(CV_CAP_PROP_SETTINGS, 1); // To display the settings


This gets the settings window and focus is on there with a range 100 to 450. If I disable Autofocus I can move this slider but instead of focus, it seems to just be a sharpen/blur filter. Definitely not focus because at 450, distant objects are in focus and near objects are a bit blurred, but at 100 distant objects AND near objects are very blurred.

If I flick autofocus back on on the settings window, with something close to the camera, it does come into focus. However, if I then untick autofocus it immediately goes out of focus.

Repeatedly calling

pcam->get(CV_CAP_PROP_FOCUS)


only ever gives the last value of the manual slider, even when autofocus is clearly moving.

Questions: 1) Should I expect invalid values for focus (get(CV_CAP_PROP_FOCUS) if autofocus is enabled ? I was hoping it could tell me what the current focus was. 2) Could CV_CAP_PROP_FOCUS be incorrectly enumerated for my camera ? It does not seem to be 'focus' on my camera .

I am on Windows using CAP_DSHOW backend, although with auto-backend I get the same result. Opencv 3.4.1

Can anyone help?

edit retag close merge delete