Ask Your Question

JimM's profile - activity

2014-03-31 22:32:55 -0600 asked a question Should an image used for training always be detected?


I have a newbie question. Just getting the feel for this platform, I used a single image (in this case a US Quarter) to create 1000 samples using the below cmd: opencv_createsamples.exe -h 48 -w 48 -num 1000 -maxxangle .2 -maxyangle .2 -maxzangle .9 -vec quarter.vec -img quarter-1.jpg -bg quarter-NEG.txt

Then I trained the following classifier: opencv_traincascade.exe -h 48 -w 48 -numPos 900 -numNeg 2000 -numStages 10 -data Data -vec quarter.vec -bg quarter-NEG.txt -featureType LBP

The fact my cascade.xml is only 4k probably screams “u screw up”, but - my main question is that shouldn’t I always receive a match if I use the same image used to create the samples (in this case, quarter-1.jpg)? Because this returns 0: MatOfRect detectQuarter= new MatOfRect(); detector.detectMultiScale(coin, detectQuarter); System.out.println("Detection result: " + detectQuarter.toArray().length);

Using 2.4.8 JAVA API. Thank you for any help!! -Jim