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. <div><br></div><div><br></div><div><br></div><div>The steps I'm taking would be to </div><div><ol>
<li>compile in the cimg_ipl plugin into cimg</li><li>break up the ph_dct_imagehash function into 2 functions:</li><ol><li>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</li>
<li>A function that takes a cimg argument and returns the dct image hash</li></ol><li>I will make a third function that takes an IPLImage that then converts it into a CImg (using the cimg_ipl plugin)</li><li>that function will call the 2nd function and return the hash value</li>
</ol><div>Of course, I am having problems at the first step. Essentially, I added the following lines to phash.h:</div></div><div><br></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #794830">
#include <span style="color: #d32d26"><cstdlib></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #d32d26"><span style="color: #794830">#include </span><typeinfo></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327"><span style="color: #794830">#define cimg_plugin1 </span><span style="color: #d32d26">"cimg_ipl.h"</span><span style="color: #794830"> </span>//a modification from mike to give cimg more capability</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; ">This caused an error when I tried to run make, because it didn't see the openCV libraries to install, which looks like this:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; "></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327">
In file included from CImg.h:8624,</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327">                 from pHash.h:49,</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327">
                 from pHash.cpp:25:</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327">cimg_ipl.h:162: error: expected ‘,’ or ‘...’ before ‘*’ token</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327">
cimg_ipl.h:162: error: ISO C++ forbids declaration of ‘IplImage’ with no type</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327">
<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; ">So I wanted to know, what modifications do I need to make to the configure script, the <a href="http://configure.ac">configure.ac</a> 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)?</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; "><br></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327">
<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; ">Thanks,</span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #008327"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; ">Mike</span></p>
<p></p></div>