MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.73k stars 1.65k forks source link

Chapter 6 Annotate not Working #55

Closed chrsp closed 9 years ago

chrsp commented 9 years ago

When I try to run: "sudo ./annotate -m ${MY_MUCT_DIR}/ -d muct/" as described in the readme file for chapter 6, I'm receiving the following error:

OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /tmp/opencv20150506-38415-u2kidu/opencv-2.4.11/modules/highgui/src/window.cpp, line 261 libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv20150506-38415-u2kidu/opencv-2.4.11/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow

Any idea how can I solve this? Thanks

chrsp commented 9 years ago

Hi guys, I discovered the error. My folder with the jpg files was not in the right place, I had only the landmarks folder in the directory. I downloaded the MUCT images (muct-...-jpg-v1.tar.gz), put it on the same folder with the landmarkers and problem is solved now.

Maybe could be added in the code some message more clear just informing the problem, something like "error: images not found".