Borrar filtros
Borrar filtros

Haralik features : Maximal Correlation Coefficient

8 visualizaciones (últimos 30 días)
Hend Abouche
Hend Abouche el 10 de Abr. de 2022
Editada: Serhat Yesilkoy el 14 de Dic. de 2022
Hi Guys, I am working on haralik features and so far I managed to find all the 13 features except for Maximal Correlation Coefficient, that should be calculated as:
I've already define the px and py:
p_x(i,k) = p_x(i,k) + glcm(i,j,k);
p_y(i,k) = p_y(i,k) + glcm(j,i,k);
p(i,j)=glcm(i,j,k)
I ahve 4 offsets
thank u in advance for ur comments
  2 comentarios
Image Analyst
Image Analyst el 10 de Abr. de 2022
What are Q, p, px, and py? Which is your image? How did you get the glcm array? How does your equation compute Q(i, j)?
Hend Abouche
Hend Abouche el 10 de Abr. de 2022
Editada: Hend Abouche el 10 de Abr. de 2022
glcm is the results of graycomatrix(gry,'offset',offsets); using a gray image, p is co-occurence probability matrix,
px(i): i-th entry in the marginal-probability matrix obtained by summing the rows of p(i,j)
py(j): j-th entry in the marginal-probability matrix obtained by summing the columns of p(i,j)
PS: I normalized the data: glcm = glcm./sum(glcm(:));

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 10 de Abr. de 2022
You need to have 3 nested loops. The outer one would be over j (columns). The middle one would be over i (rows). The innermost one would be over k.
[rows, columns] = size(p)
for j = 1 : columns
for i = 1 : rows
numerator = 0;
denominator = 0;
for k = 1 : columns
numerator = numerator + p(i, k) * p(j, k);
denominator = denominator + px(i) * py(k);
end
Q(i, j) = sum(numerator / denominator);
end
end
  4 comentarios
Hend Abouche
Hend Abouche el 13 de Abr. de 2022
alright thank you so much
Serhat Yesilkoy
Serhat Yesilkoy el 14 de Dic. de 2022
Editada: Serhat Yesilkoy el 14 de Dic. de 2022
hi,I didn't understand the part of how the marginal probability functions px and py are defined.Unrecognized function or variable 'px'.Unrecognized function or variable 'px'. I am facing the problem.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by