1 | initial version |
Unfortunately there is no convenient way to get supported resolutions list for the particular camera by the opencv API (as it supports so many platforms and so many video capturing backends). Even your code will suffer from this, read the sources of videoio.hpp. But most of the digital video devices supports standard resolutions, you can simply select from them. Another way to get actual list of supported formats is to use 3rd party libraries, for the instance Qt solves this task by the couple of calls.