Home > Back-end >  MFC with a picture compared with multiple pictures
MFC with a picture compared with multiple pictures

Time:05-12

I calculate the Hash value of the image, and then calculate a folder all images of Hash value, put it in the List, the last in the FOR loop iterates through, but there has been no results, the following is a code, please leaders to help correct:
 int index=0;//used to list index 


IplImage * image1=(IplImage *) & amp; IplImage (srcImg);
IplImage * image2=(IplImage *) & amp; IplImage (targetImg);


String imgPrint1=ImageHashValue (image1);
String imgPrint2=ImageHashValue (image2);

Double similarity1;

List List1.
for (int i=0; I & lt; ImgPrint2. Length (); I++)
{
List1. Push_back (imgPrint2);
Similarity1=ImageSimilarity (imgPrint1 imgPrint2);
}
List List2;
For (int j=0; J & lt; ImgPrint2. Length (); J++)
{
Similarity1=ImageSimilarity (imgPrint1 imgPrint2);
List2. Push_back (similarity1);
M_List. SetItemText (index, j, _T (" similarity1 "));//update//similarity
index++;
}
  • Related