Ask Your Question
0

opencv_traincascade throwing error "...lbpfeatures.cpp:17: error: (-215) _maxSampleCount > 0 in function init"

asked 2015-12-13 09:55:36 -0500

Delauney gravatar image

Hello everyone. An internet search suggested that this was a bug that was patched in the past so I have no idea what I'm doing wrong to recreate this bug. I've tried it in 2.4.11 and 3.0.0. Running on Linux Mint 17.2 64-bit.

Here's the full command and output:

user@linux ~/file/path $ opencv_traincascade -data ~/file/path/ -vec cards.vec -bg negatives.txt -numPos 500 -numNeg -500 -numStages 2 -w 53 -h 74 -featureType LBP
OpenCV Error: Assertion failed (_maxSampleCount > 0) in init, file /home/user/Documents/opencv-3.0.0/apps/traincascade/lbpfeatures.cpp, line 17
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/user/Documents/opencv-3.0.0/apps/traincascade/lbpfeatures.cpp:17: error: (-215) _maxSampleCount > 0 in function init

Aborted

I have 790 positive samples to use and 40,000 negative samples so I know I'm not running out. What could cause this? Is it possibly a bug in my negatives.txt? I've followed several different guides/tutorials from the internet, all to no avail.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-12-20 14:03:30 -0500

Delauney gravatar image

I'm not sure what the original cause for this error was but ultimately I recreated the negatives.txt file using full file paths and also did not use -featureType switch.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-12-13 09:55:36 -0500

Seen: 209 times

Last updated: Dec 20 '15