I implemented a near-duplicate image detecting system using Imagemagick API. After reading several research papers, I got to know that there are two main types of image comparison techniques: 1) feature based image comparison approach and 2) pixel based image comparison approach. After reading papers, I got to know Imagemagick compares images using perceptual hash compare metric algorithm. But still I cannot determine whether this perceptual hash compare metric algorithm belongs to feature based image approach or pixel based image approach. Is there anyone who has an idea about this?
Asked
Active
Viewed 389 times
0
-
IMHO, it sits right at the boundary between the two. It doesn't really identify features such as edges and corners, so it's not really feature based. It does average pixels and simplify colours down to a perceived pattern though, so you might call it pixel based, but if you consider the overall pattern of colours to be the salient feature of a scene... you are back where you started. – Mark Setchell Oct 17 '17 at 06:45
-
It is basically feature based. But the features are image statistics. It uses the image moments concept on 6 channels RGB and your choice of 3 channels from some other colorspace. There are 7 moments computed over each channel and thus 42 float numbers that are computed and SSD between those 42 number and 42 numbers from some other image is computed as the metric. See also http://www.imagemagick.org/discourse-server/viewtopic.php?f=4&t=24906 and https://en.wikipedia.org/wiki/Image_moment – fmw42 Oct 17 '17 at 06:51
-
It really consider about the color spaces of the pixels. Hue, intensity and saturation are the main color spaces it considered. So isn't there a high probability of this belongs to the pixel based image comparison – Sach Oct 17 '17 at 06:52
-
Depends upon what you call a feature. It does not compare pixel to pixel. It compares statistical features from each channel. – fmw42 Oct 17 '17 at 07:01
-
compare - metric MAE-subimage-search . if this command is used to detect near duplicate images using image magick can i know what is the technique it is using? is it using Perceptual hash compare metric algorithm? – Sach Oct 17 '17 at 07:33
-
No, MAE is the Mean Absolute Error, so it differences each pixel between the two images and makes that absolute (i.e. positive if negative) and averages those mean differences. So it is 100% pixel based. – Mark Setchell Oct 17 '17 at 08:40
-
I couldn't find any documentation about the algorithm used in imagemagick to compare images using compare - metric MAE-subimage-search command. Could you please reference me any documentation if available about the algorithm used in compare - metric MAE-subimage-search ? – Sach Oct 17 '17 at 09:57
-
See Anthony Thyssen's excellent usage information here... http://www.imagemagick.org/Usage/compare/#statistics – Mark Setchell Oct 17 '17 at 13:36
-
Thankyou very much. i went through the documentation.but they haven't give a clear flow of the algorithm.can u please provide me any details you know about the flow/steps of compare - metric MAE-subimage-search algorithm? – Sach Oct 17 '17 at 16:09
-
Most of the metrics used in ImageMagick compare are standard well-known mathematical operations. Just search google or wikipedia. Here is a link to MAE. https://en.wikipedia.org/wiki/Mean_absolute_difference. Processing gets some difference metric between each pixel in the image and computes the average (mean) over the image. In MAE, it computes the absolute difference in gray levels values per pixel per channel and then averages all the absolute differences. – fmw42 Oct 17 '17 at 16:13