Ask Your Question
0

opencv_annotation error

asked 2017-09-07 02:14:35 -0600

hyder gravatar image

Hello,

I am trying to annotate 10 images (named img1.jpg, ... , img10.jpg) using opencv_annotation tool in Windows openCV 3.1.0. I have placed these 10 images in a folder named p and placed that folder in /build/bin/Debug.

I have built only the Debug version of the library, so I am running the opencv_annotationd.exe from folder /build/bin/Debug with the following command line

opencv_annotationd --annotations=/p/file.txt --images=/p/

But I am getting the following error

The path for the output file contains an error and could not be opened. Please check again!

What might be the issue?

Thanks.

edit retag flag offensive close merge delete

Comments

This is actually normal. You just specified it to look for a root folder, which is Linux style, but does not work in windows. Start with an absolute path to your folder, and something simple like C:\\p\\. Also notice the double backslashes, because windows sees that as escape chars.

StevenPuttemans gravatar imageStevenPuttemans ( 2017-09-07 02:22:30 -0600 )edit

I have tried your suggestion. Placed the folder p in Local Disk C and ran the following command line from inside the build/bin/Debug folder

opencv_annotationd.exe --annotations=C:\\p\\file.txt --images=C:\\p\\

Still same error.

hyder gravatar imagehyder ( 2017-09-07 02:49:59 -0600 )edit

Strange ... got it working on Ubuntu, just verified like this ... not sure and not around a windows PC to check why it goes wrong ...

StevenPuttemans gravatar imageStevenPuttemans ( 2017-09-07 03:17:57 -0600 )edit

I have also tried it on Linux with the following:

opencv_annotation --annotations=/home/haider/Desktop/images/file.txt --images=/home/haider/Dekstop/images/

Same error.

hyder gravatar imagehyder ( 2017-09-07 03:18:38 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-09-07 04:16:32 -0600

updated 2017-09-07 04:17:15 -0600

So the reason it does not work is because you running 3.1.0 which is a version that does not contain the update cmdlineparser interface for handling arguments, as you can see here,

To solve this either go to version 3.2 at least OR use the following command

opencv_annotation -annotations /home/haider/Desktop/images/file.txt -images /home/haider/Dekstop/images/

which is still the old form of handling arguments.

edit flag offensive delete link more

Comments

Working now. Thanks.

hyder gravatar imagehyder ( 2017-09-10 04:31:37 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-09-07 02:14:35 -0600

Seen: 1,863 times

Last updated: Sep 07 '17