Ask Your Question
0

Error in opencv_visualize...looking for file named true?

asked 2018-01-24 16:02:58 -0500

Lots of useful help on this list! Thanks to all of the contributors. I'm having a problem "visualising" the results of my cascade filter training and I don't see any similar posts here.

After training a cascade filter I try to run the visualisation tool:

opencv_visualisation -i positive/IMG_0057.jpg -m training_data/cascade.xml

which gives:

the cascade file 'true' could not be loaded.

I created an empty filed called true but that simply leads to other errors (strace below but it probably is not useful as this was just a shot in the dark). Am I missing an argument to opencv_visualisation? Any hints would be appreciated.

David

open("true", O_RDONLY)                  = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76eef000
read(4, "", 4096)                       = 0
write(2, "OpenCV Error: Unknown error code"..., 152OpenCV Error: Unknown error code -49 (Input file is empty) in cvOpenFileStorage, file /home/pi/opencv-3.3.1/modules/core/src/persistence.cpp, line 4484
) = 152
write(2, "terminate called after throwing "..., 48terminate called after throwing an instance of ') = 48
write(2, "cv::Exception", 13cv::Exception)           = 13
write(2, "'\n", 2'
)                      = 2
write(2, "  what():  ", 11  what():  )             = 11
write(2, "/home/pi/opencv-3.3.1/modules/co"..., 124/home/pi/opencv-3.3.1/modules/core/src/persistence.cpp:4484: error: (-49) Input file is empty in function cvOpenFileStorage
) = 124
write(2, "\n", 1
)                       = 1
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(4720, 4720, SIGABRT)             = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=4720, si_uid=1000} ---
+++ killed by SIGABRT +++
Aborted
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-01-24 19:10:31 -0500

berak gravatar image

the correct cmdline would be:

opencv_visualisation -i=positive/IMG_0057.jpg -m=training_data/cascade.xml

(you missed the = between param and value)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-01-24 16:00:31 -0500

Seen: 351 times

Last updated: Jan 24 '18