[pHash-support] IPLImage

Mike Manh phash.123 at vteklabs.com
Fri Nov 5 14:50:11 PDT 2010

So I thought i would add the capability to pass in either a CImg or even an
IPLImage and get an imagehash out of phash.

The steps I'm taking would be to

   1. compile in the cimg_ipl plugin into cimg
   2. break up the ph_dct_imagehash function into 2 functions:
      1. The first part of the function that takes the file name and loads
      it to get a cimg, then passes it to the second function
      2. A function that takes a cimg argument and returns the dct image
   3. I will make a third function that takes an IPLImage that then converts
   it into a CImg (using the cimg_ipl plugin)
   4. that function will call the 2nd function and return the hash value

Of course, I am having problems at the first step. Essentially, I added the
following lines to phash.h:

#include <cstdlib>

#include <typeinfo>

#define cimg_plugin1 "cimg_ipl.h" //a modification from mike to give cimg
more capability

This caused an error when I tried to run make, because it didn't see the
openCV libraries to install, which looks like this:

In file included from CImg.h:8624,

                 from pHash.h:49,

                 from pHash.cpp:25:

cimg_ipl.h:162: error: expected ‘,’ or ‘...’ before ‘*’ token

cimg_ipl.h:162: error: ISO C++ forbids declaration of ‘IplImage’ with no

So I wanted to know, what modifications do I need to make to the configure
script, the configure.ac or the make file to have it see my openCV directory
(which is a repo I checked out in the same parent directory as I checked out
the phash repo)?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phash.org/pipermail/phash-support-phash.org/attachments/20101105/1ef0db99/attachment-0001.htm>

More information about the pHash-support mailing list