1

I want to do comparison between two textures to identify the similarity. I obtained the features of GLCM using the following code:

import cv2
import numpy as np
from skimage.feature import greycomatrix, greycoprops

img           = cv2.imread('images/test1_texture_blur.png', 0)
image_array   = np.array(img, dtype=np.uint8)
g             = greycomatrix(image_array, [1, 2], [0, np.pi/2], levels=256, normed=True, symmetric=True)
contrast      = greycoprops(g, 'contrast')
dissimilarity = greycoprops(g, 'dissimilarity')
homogeneity   = greycoprops(g, 'homogeneity')
energy        = greycoprops(g, 'energy')
correlation   = greycoprops(g, 'correlation')
ASM           = greycoprops(g, 'ASM')

Now I have two images and their GLCM. How to compare it? My aim is actually to identify the Print and Scan effect.

Kayal Vizhi
  • 61
  • 1
  • 5
  • I have a totally different idea, how about ssim (structural similarity index)? – Jeru Luke Jul 09 '18 at 19:09
  • Yeah. I compared using MSE and SSIM. It shows good result, but what am thinking is: Are these parameters enough to compare? Or I need more than that to increase the efficiency of the result. – Kayal Vizhi Jul 10 '18 at 04:48
  • SSIM is great for comparing similarities between two images. But what do you mean by efficiency here? @KayalVizhi – Jeru Luke Jul 10 '18 at 04:52
  • I meant for the overall result am getting. Only with SSIM, do I get the correct comparison result? My aim is to identify the Print and Scan effect. I have digital texture in my hand. I print the texture and scan it to authenticate it. Is that enough to have SSIM only to authenticate? Will it be efficient in result view? That is my point. – Kayal Vizhi Jul 10 '18 at 04:56
  • 1
    In short 'yes'. SSIM does a pretty good job. It even returns good similarity score for two same images of different dimensions! – Jeru Luke Jul 10 '18 at 05:01
  • Let me research with SSIM more and get back to you if I have any questions. Thank you so much for your response. – Kayal Vizhi Jul 10 '18 at 05:39

0 Answers0