Ask Your Question
0

how to find glcm of an image in OpenCV or numpy?

asked Oct 24 '13

raj8 gravatar image

I have to find texture based features of an image like correlation,energy,homogeneity,contrast in python. i am using python-opencv to do other operations.since python opencv returns image as an numpy array.but i don't found any good resource to find glcm using either opencv or numpy. also the i have to extract feature for d=1 and angle=[0,45,135,90] and then use this feature in svm.

Preview: (hide)

2 answers

Sort by » oldest newest most voted
0

answered Oct 24 '13

Immi gravatar image

Implement your own GLCM algorithm. You have:

  1. Get the value of the actual pixel and its neighbour
  2. Take those two values to adress the pixel in the GLCM-image
  3. Increment that chosen pixel
Preview: (hide)

Comments

thank you :)

raj8 gravatar imageraj8 (Oct 24 '13)edit

I hope it will help you.

Immi gravatar imageImmi (Oct 24 '13)edit
0

answered Oct 25 '13

raj88 gravatar image
Preview: (hide)

Question Tools

Stats

Asked: Oct 24 '13

Seen: 6,824 times

Last updated: Oct 25 '13