Ask Your Question

Warren's profile - activity

2015-05-11 10:08:39 -0600 commented question How to train a cascade classifier for a a fixed image (logo)

From what I understand a cascade classifier should be fast for my problem. The problem is relatively simple and there are many commercial devices that use cascades on modest hardware. That is why I'm confused by my results. It seems I must be doing something wrong to have so many false positives and no correct identifications.

2015-05-11 08:44:53 -0600 commented question Generating good training data for haar cascades

Did you ever find an answer to your problem? I'm interested in this problem field as well.

I think that using other characters as negatives is exactly what you want to do. It should also include windows that cover the spaces between charactes and between lines - randomly spaced over a page. Your OCR must decide what is and is not the character in question so you will need to weaken the weights of features found on other letters. Consider "l" and "t" or "v" and w" They have a lot of corresponding features so you will need to show your cascade the difference with your negatives.

2015-05-11 08:08:59 -0600 commented question How to train a cascade classifier for a a fixed image (logo)

I am interested in possibly using other methods, Steven. Thank you for the advice. I am currently investigating cascade classifiers because A. they are fast B. my initial test with bag-of-words/feature points gave poor results.

I am using Java on an Android device so SURF and SIFT are not available. Even if they were the patent would be an issue. I tried bag-of-words matching using ORB and a few other descriptors but I was getting a large number of matching points when the card wasn't visible followed by a very small (insignificant) increase in matching points when the card became visible.

I am also concerned that if I try to detect many possible templates at once the performance may become an issue with feature point matching.

That being said, I'm open to ideas :-)

2015-05-11 08:01:55 -0600 commented question How to train a cascade classifier for a a fixed image (logo)

Positive and negative samples. The originals are four times larger. I downscaled for sharing. https://www.dropbox.com/s/5y1g88zrqff... https://www.dropbox.com/s/jiai7vo4yrk...

When you say "what kind of features?" Do you mean haar, hog, lbp? If so then I believe it's Haar. I didn't specify anywhere but the cascade file indicates haar in the xml.

2015-05-11 00:34:31 -0600 asked a question How to train a cascade classifier for a a fixed image (logo)

I have attempted to train a haar cascade classifier several times with varying, bad results. I created several positive sample images of a card with the logo printed on it. I added several block-like features to the card to make it easier to recognize. I downloaded a set of negative sample images. I generated vectors and samples with commands I pieced together from several websites, mainly this one: http://coding-robin.de/2013/07/22/tra... I am using OpenCV 3.0 rc1

I tried a range of stages, from 5 to 20. I have tried from 100 to 1500 positive samples and from 500 to 2000 negative samples. I have tried window sizes from 20x20 to 48x48 (the card I want to detect is square).

None of the cascade files have been any good. Some won't detect anything. Some detect almost everything... but not the card! I've checked over everything I can think of - like did I actually get the positive samples in the right directory...

I'm at a loss. Are there some common rookie mistakes I should double check? Has anyone had bad results like this? Are bad cascade files common? My target seems much easier to classify than most problems since it is a fixed image. Does that change the problem somehow in a way I do not grasp?