<p>We're looking for a package to help identify and automatically rotate faxed TIFF images based on a  watermark or logo.  </p>

<p>We use libtiff for rotation currently, but don't know of any other libraries or packages I can use for detecting this logo and determining how to rotate the images.</p>

<p>I have done some basic work with OpenCV but I'm not sure that it is the right tool for this job.  I would prefer to use C/C++ but Java, Perl or PHP would be acceptable too.   </p>

[{'answer_id': 32654, 'author': 'Brian Stewart', 'author_id': 3114, 'author_profile': 'https://Stackoverflow.com/users/3114', 'pm_score': 0, 'selected': False, 'text': "<p>The Intel Performance Primitives (IPP) library has a lot of very efficient algorithms that help with this kind of a task. The library is callable from C/C++ and we have found it to be very fast. I should also note that it's not limited to just Intel hardware.</p>\n"}, {'answer_id': 34254, 'author': 'Roddy', 'author_id': 1737, 'author_profile': 'https://Stackoverflow.com/users/1737', 'pm_score': 0, 'selected': False, 'text': '<p>That\'s quite a complex and specialized algorithm that you need.</p>\n\n<p>Have a look at <a href="http://en.wikipedia.org/wiki/Template_matching" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Template_matching</a>. There\'s also a demo program (but no source) at <a href="http://www.lps.usp.br/~hae/software/cirateg/index.html" rel="nofollow noreferrer">http://www.lps.usp.br/~hae/software/cirateg/index.html</a></p>\n\n<p>Obviously these require you to know the logo you are looking for in advance...</p>\n'}, {'answer_id': 34311, 'author': 'Lehane', 'author_id': 142, 'author_profile': 'https://Stackoverflow.com/users/142', 'pm_score': 2, 'selected': True, 'text': '<p>You are in the right place using OpenCV, it is an excellent utility. For example, <a href="http://www.nashruddin.com/template-matching-in-opencv-with-example.html" rel="nofollow noreferrer">this guy</a> used it for template matching, which is fairly similar to what you need to do. Also, the link Roddy specified looks similar to what you want to do.</p>\n\n<p>I feel that OpenCV is the best library out there for this kind of development.</p>\n\n<p>@Brian, OpenCV and the IntelIPP are closely linked and very similar (both Intel libs). As far as I know, if OpenCV finds the intel IPP on your computer it will automatically use it under the hood for improved speed.</p>\n'}]
['https://Stackoverflow.com/questions/32643', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3269/']