Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to train? #5

Open
Nurgle87 opened this issue Feb 3, 2017 · 3 comments
Open

How to train? #5

Nurgle87 opened this issue Feb 3, 2017 · 3 comments

Comments

@Nurgle87
Copy link

Nurgle87 commented Feb 3, 2017

Hi @gheinrich,

first of all, many thanks for this project :)!

Can you send me the commands you used in order to generate the file "svm-prom1.xml" and specify the set of pictures you used to do it? Can you help me @gheinrich ?

I tried several times to create it with the pictures you provide in the project, but I get this error: OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, file /home/nurgle/Scrivania/opencv-2.4.9/modules/core/src/matrix.cpp, line 323
terminate called after throwing an instance of 'cv::Exception'
what(): /home/nurgle/Scrivania/opencv-2.4.9/modules/core/src/matrix.cpp:323: error: (-215) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function Mat.

I use this command: "../../bibnumber/Debug/bibnumber -train . ." in a folder with the "prom*.jpg" pictures, since I believed you used the "prom*.jpg" pictures to create the aforementioned "*.xml".

Many thanks in advance for your attention.

Best regards,
@Nurgle87

@xc-racer99
Copy link

@Nurgle87
In case you're still interested and for anyone else who might stumble upon this, I believe the error you're getting is because there's currently a test image hard-coded into https://github.com/gheinrich/bibnumber/blob/master/bibnumber/train.cpp#L428 This solved the same issue for me.

@Nurgle87
Copy link
Author

Nurgle87 commented Oct 1, 2017

@xc-racer99
Unfortunately at the moment I am on a different project, but I am really interested in this kind of topics, so I will be back on it :)! Many thanks for your support!

@Yogiraj24
Copy link

thanks @gheinrich for the project . Stuck at the same stage , as @Nurgle87 . The command to train is not working , throwing below exception.

OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, file /build/opencv-ys8xiq/opencv-2.4.9.1+dfsg/modules/core/src/matrix.cpp, line 323
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-ys8xiq/opencv-2.4.9.1+dfsg/modules/core/src/matrix.cpp:323: error: (-215) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function Mat

Appreciate any help on this .

Thanks .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants