opencv_annotation outputs the following error message and quits:
The image folder given does not exist. Please check again!
...even though it's been passed an absolute path to an existing directory with images as its --images argument.
I used the following command:
$ opencv_annotation --images /home/taras/Projects/OpenCV/resources/images/goban_empty/ --annotations /home/taras/Projects/OpenCV/resources/data/goban_empty_annotations.txt
The folder, specified for --images argument, does exist. I tried removing the trailing slash from the path - this had no effect. I also tried paths to other existing folders, such as /home - still same result, the same error message is printed.
cv::CommandlineParser uses args in the --key=value form (you're missing the =), so, unless you use it like:
$ opencv_annotation --images=/home/taras/Projects/OpenCV/resources/images/goban_empty/ --annotations=/home/taras/Projects/OpenCV/resources/data/goban_empty_annotations.txt
, it will just _ignore_ any path you give it.
@berak Thank you! Yes, indeed it works with =. My mistake.
Please re-open this issue. I stumbled upon the exact same issue of not using the = for the parameter. Its fine for me the = is needed but in my opinion not using the = must yield some kind of error. Calling
$ opencv_annotation -i /home/user/images/ -a /home/user/annotations.txt
(without =) results in neither --images nor --annotations being set, correct? The problem is there currently is no kind of error message as https://github.com/opencv/opencv/blob/master/apps/annotation/opencv_annotation.cpp#L238 does not seem to be triggered, there simply is this output on the commandline with no window opening:
* mark rectangles with the left mouse button,
* press 'c' to accept a selection,
* press 'd' to delete the latest selection,
* press 'n' to proceed with next image,
* press 'esc' to stop.
Most helpful comment
cv::CommandlineParser uses args in the
--key=valueform (you're missing the=), so, unless you use it like:, it will just _ignore_ any path you give it.