필터 지우기
필터 지우기

three types of correlation coefficients for an image

조회 수: 8 (최근 30일)
faiz
faiz 2016년 10월 26일
답변: Ranjit Shrestha 2022년 1월 31일
i want to find the correlation cofficients for adjacent pixels in an image. i write this code and it give 2x2 matrix, now i don't know how to get horizantal, vertical and diagonal values for any image?
a=image;
a1=a(:,1:end-1);
a2=a(:,2:end);
cor=corrcoef(double(a1(:)),double(a2(:)));

채택된 답변

Thorsten
Thorsten 2016년 10월 26일
I = im2double(imread('cameraman.tif'));
c_diag = corrcoef(I(1:end-1, 1:end-1), I(2:end, 2:end))
c_vert = corrcoef(I(1:end-1, :), I(2:end, :))
c_horz = corrcoef(I(:, 1:end-1, :), I(:, 2:end))
  댓글 수: 2
faiz
faiz 2016년 10월 26일
thanks a lot sir
omar A.alghafoor
omar A.alghafoor 2020년 7월 11일
How are you draw this options ? for solution above
c_diag,c_vert and c_horz

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Ranjit Shrestha
Ranjit Shrestha 2022년 1월 31일
what if we have more than two images? I mean a sequence of images.

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by