hanifabd / GLCM_Feature_Extraction

This Project use Anaconda Navigator and for the IDE is Jupyter Notebook
1 stars 1 forks source link

glcm angle issue #1

Open asmajavaidd opened 3 years ago

asmajavaidd commented 3 years ago

Hi I have a quick question for you. Since you already worked in GLCM and calculated glcm for 4 directions. So I am trying to calculate the texture features of my 1 image using GLCM. Now if I use these properties properties = ['contrast', 'energy','ASM', 'homogeneity', 'correlation', 'dissimilarity'] and calculate GLCM in 4 direction angles like [0, np.pi / 4, np.pi / 2, 3 np.pi / 4] then I get 4 6=24 feature values. Now my professor is saying 24 features are not enough for the feature selection so calculate GLCM in more directions to get more feature values like previously my directions were [0, 45,90,135] now he is asking me to calculate in [120, 180, 270], etc just to get more features. But everywhere on google, I have seen people are calculating GLCM in the standard four directions that is [0, np.pi / 4, np.pi / 2, 3 * np.pi / 4] so is this correct if I calculate GLCM in the other directions which he mentioned?

hanifabd commented 3 years ago

Actually i have work on 0, 60, 90, and 135 for my personal peoject, but i think its possible to get another angle, if you need strong citation i suggest you to search in papwr, but just try it on

Pada tanggal Sel, 10 Nov 2020 01:15, asmajavaidd notifications@github.com menulis:

Hi I have a quick question for you. Since you already worked in GLCM and calculated glcm for 4 directions. So I am trying to calculate the texture features of my 1 image using GLCM. Now if I use these properties properties = ['contrast', 'energy','ASM', 'homogeneity', 'correlation', 'dissimilarity'] and calculate GLCM in 4 direction angles like [0, np.pi / 4, np.pi / 2, 3 np.pi / 4] then I get 4 6=24 feature values. Now my professor is saying 24 features are not enough for the feature selection so calculate GLCM in more directions to get more feature values like previously my directions were [0, 45,90,135] now he is asking me to calculate in [120, 180, 270], etc just to get more features. But everywhere on google, I have seen people are calculating GLCM in the standard four directions that is [0, np.pi / 4, np.pi / 2, 3 * np.pi / 4] so is this correct if I calculate GLCM in the other directions which he mentioned?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hanifabd/GLCM_Feature_Extraction/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYSRZTPYEI3JOMMYAS7T2LSPAWVNANCNFSM4TPWDK7A .

hanifabd commented 3 years ago

Upss 45 i mean

Pada tanggal Sel, 10 Nov 2020 08:22, Hanif Abdillah hanifabd23@gmail.com menulis:

Actually i have work on 0, 60, 90, and 135 for my personal peoject, but i think its possible to get another angle, if you need strong citation i suggest you to search in papwr, but just try it on

Pada tanggal Sel, 10 Nov 2020 01:15, asmajavaidd notifications@github.com menulis:

Hi I have a quick question for you. Since you already worked in GLCM and calculated glcm for 4 directions. So I am trying to calculate the texture features of my 1 image using GLCM. Now if I use these properties properties = ['contrast', 'energy','ASM', 'homogeneity', 'correlation', 'dissimilarity'] and calculate GLCM in 4 direction angles like [0, np.pi / 4, np.pi / 2, 3 np.pi / 4] then I get 4 6=24 feature values. Now my professor is saying 24 features are not enough for the feature selection so calculate GLCM in more directions to get more feature values like previously my directions were [0, 45,90,135] now he is asking me to calculate in [120, 180, 270], etc just to get more features. But everywhere on google, I have seen people are calculating GLCM in the standard four directions that is [0, np.pi / 4, np.pi / 2, 3 * np.pi / 4] so is this correct if I calculate GLCM in the other directions which he mentioned?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hanifabd/GLCM_Feature_Extraction/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYSRZTPYEI3JOMMYAS7T2LSPAWVNANCNFSM4TPWDK7A .

asmajavaidd commented 3 years ago

Actually, everywhere on google, I found researches or the helpers at stack are only using those standard 4 angles that is why I thought to ask that maybe you know about it because you work on it. Between @hanifabd you just calculate 4 properties of glcm. I am trying to do exactly on your way but trying to find different properties like entropy, sum average, sum variance but I am getting the error do you know why is that? Is that because greycoprops does not calculate these properties?

print(skimage.feature.greycoprops(g, 'sum variance ')[0][0]) print(skimage.feature.greycoprops(g, 'entropy')[0][0]) print(skimage.feature.greycoprops(g, 'sum average,')[0][0]) print(skimage.feature.greycoprops(g, 'Cluster Shade')[0][0])

hanifabd commented 3 years ago

[image: image.png]

I think that's the problem, you can check my image or just go here https://scikit-image.org/docs/dev/api/skimage.feature.html#skimage.feature.greycoprops

On Tue, Nov 10, 2020 at 9:44 AM asmajavaidd notifications@github.com wrote:

Actually, everywhere on google, I found researches or the helpers at stack are only using those standard 4 angles that is why I thought to ask that maybe you know about it because you work on it. Between @hanifabd https://github.com/hanifabd you just calculate 4 properties of glcm. I am trying to do exactly on your way but trying to find different properties like entropy, sum average, sum variance but I am getting the error do you know why is that? Is that because greycoprops does not calculate these properties?

print(skimage.feature.greycoprops(g, 'sum variance ')[0][0]) print(skimage.feature.greycoprops(g, 'entropy')[0][0]) print(skimage.feature.greycoprops(g, 'sum average,')[0][0]) print(skimage.feature.greycoprops(g, 'Cluster Shade')[0][0])

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hanifabd/GLCM_Feature_Extraction/issues/1#issuecomment-724413870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYSRZT5ZPL5URU6ESERYJLSPCSKVANCNFSM4TPWDK7A .