Haralik features : Maximal Correlation Coefficient
조회 수: 2 (최근 30일)
이전 댓글 표시
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
Image Analyst
2022년 4월 10일
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)?
채택된 답변
Image Analyst
2022년 4월 10일
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
Serhat Yesilkoy
2022년 12월 14일
편집: Serhat Yesilkoy
2022년 12월 14일
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.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!