2013-07-03 04:22:12 -0600 | answered a question | I want to know how can i do haartraining on android Hi, If you just want to train a classifier, check out this very thorough guide : http://note.sonots.com/SciSoftware/haartraining.html It's really easy to do -although I'll admit it is harder to do than searching google for haartraining... |
2013-07-02 05:18:47 -0600 | asked a question | Template matching with Orb [I also posted this on StackOverflow] Hi, I'm trying to detect whether a template image (logo) is present in a pdf document. The document can be either a scan encapsulated in a pdf or a "pure" pdf document, but this is completely random. First, I convert the pdf document to a png image using ImageMagick's convert tool, then I cut the output images in half because they're so big, and after that I try to match a logo from a database with any of the shapes present in the half-cut image. To do so, I use an Orb Feature Detector with an Orb Descriptor, and a RobustMatcher (sort of improved BruteForce matcher, source code available here). Here is a snippet of code from my adaptation of it : The code works great on some examples that I chose carefully, with a highly-recognizable logo and a clean image, with certain proportions... etc. But when I try to apply the process to random pdf files, I start to get this error from OpenCV :
I checked for this error, and it appeared that src1.cols != src2.cols, and a quick fix for it would be to test the condition before trying to match the images. The problem is that I miss a lot of images doing so, and this would be OK only if I were working on a video stream... but I'm not, and the next image has nothing in common with the previous one, and I can't determine whether my logo was present or not in the document. Here is the code from stat.cpp, lines 1789 to 1826 : (assertion is at the beginning on line 1797) (more) |