MasteringOpenCV / code

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

Chapter 6 not working #36

Open nqthiep opened 10 years ago

nqthiep commented 10 years ago

When i create project with code of chapter 6.

Please help me.

theradioboy commented 10 years ago

I also have a simiar problem with visualize_face_detector: OpenCV Error: Parsing error (hitchens.ogv(0): Too long string or a last string w/o newline) in icvXMLSkipSpaces, file /build/buildd/opencv-2.4.5+dfsg/modules/core/src/persistence.cpp, line 1844 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.4.5+dfsg/modules/core/src/persistence.cpp:1844: error: (-212) hitchens.ogv(0): Too long string or a last string w/o newline in function icvXMLSkipSpaces

and with visualize_face_tracker as well, but with a different error message: OpenCV Error: Parsing error (hitchens.ogv(0): Too long string or a last string w/o newline) in icvXMLSkipSpaces, file /build/buildd/opencv-2.4.5+dfsg/modules/core/src/persistence.cpp, line 1844 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.4.5+dfsg/modules/core/src/persistence.cpp:1844: error: (-212) hitchens.ogv(0): Too long string or a last string w/o newline in function icvXMLSkipSpaces

I'd appreciate any help in our problems.

hegazy commented 9 years ago

same here

OpenCV Error: Parsing error (/home/hegazy/Videos/Google I_O 2012 - Security and Privacy in Android Apps - YouTube [720p].mp4(0): Too long string or a last string w/o newline) in icvXMLSkipSpaces, file /home/hegazy/Downloads/OpenCV/opencv-2.4.10/modules/core/src/persistence.cpp, line 1838 terminate called after throwing an instance of 'cv::Exception' what(): /home/hegazy/Downloads/OpenCV/opencv-2.4.10/modules/core/src/persistence.cpp:1838: error: (-212) /home/hegazy/Videos/Google I_O 2012 - Security and Privacy in Android Apps - YouTube [720p].mp4(0): Too long string or a last string w/o newline in function icvXMLSkipSpaces Aborted (core dumped)

shervinemami commented 9 years ago

I'll ask the author of that chapter if he knows what might be the problem.

shervinemami commented 9 years ago

The author Jason replied:

I've compiled and run the version on github using OpenCV 2.8 and don't see a problem. Looks like one of the users is using OpenCV 2.8, one if using 2.45 and one is using 2.10, so it's probably not an OpenCV version problem. I haven't seen this kind of error before. It's not entirely clear from the messages, but it may be to do with the path of the video files they're passing to the programs. They should try moving a video file to their home folder and renaming the file to a short filename without spaces, such as "/home/user/myvideo.mp4" to see if that fixes the problem. Or perhaps try a different video format, it is possible that your computer doesn't have the multimedia codecs installed for the video file type being requested. It could be the no newline problem as you've suggested (I see a message to that effect), though since I'm using the same OpenCV version of at least one of them, I doubt its something in OpenCV. I suppose they can always try this by going through all the "write" functions in each of the classes and add a newline character after the "}". As I can't replicate their errors I can't really check this though.

Cheers, Jason

prash911 commented 9 years ago

Hi..I have started working on Chapter 6.I have downloded the muct-landmarks tgz also.

Can you please guide me how to create annotations.yaml

Thx

chrsp commented 9 years ago

@prash911 , did you also have the jpg files? You can download it here: https://code.google.com/p/muct/downloads/list (all 5 files) and extract in a folder called jpg, in the same folder where your landmarks are.

gumeo commented 8 years ago

I was going through the example and compiled it with opencv 3.10. I can run part 1, but I cannot close the image, i.e. when I press q nothing happens. I close the program with CTRL-C in the terminal and then an annotion.yaml file is created, which does not work for the rest. Anyone experienced this?