1 | initial version |
capture.open( -1 );
you could use the URL of the image: capture.open( "/path/to/my/image.png" );
This will use VideoCapture
to read the image (but according to the following code it will close rapidly...). And it is not really recommended to use VideoCapture
for image reading (different results possible from the usual image reading due to the codec used).VideoCapture
usage by a simple imread
call. But if you wonder how to do that, I suggest you have a look at the beginner tutorial of OpenCV (complete list).