Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
compute sum of square distance between the four corresponding down sampled images??
조회 수: 3 (최근 30일)
이전 댓글 표시
Compute SSD between 4 corresponding down sampled images?
댓글 수: 0
답변 (1개)
Walter Roberson
2017년 4월 12일
imgs = {YourImage1, YourImage2, YourImage3, YourImage4};
n_imgs = length(imgs);
results = zeros(n_imgs, n_imgs);
for J = 2 : n_imgs;
for K = 1 : J - 1;
this_result = sum( (double(imgs{J}(:)) - double(imgs{K}(:))).^2 );
results(J, K) = this_result;
results(K, J) = this_result;
end
end
댓글 수: 9
Walter Roberson
2017년 4월 14일
Img1=imread('A.jpg');
Img2=imread('B.jpg');
Img3=imread('C.jgp');
Img4=imread('D.jpg');
YourImage1 = Img1;
YourImage2 = Img2;
YourImage3 = Img3;
YourImage4 = Img4;
imgs = {YourImage1, YourImage2, YourImage3, YourImage4};
n_imgs = length(imgs);
results = zeros(n_imgs, n_imgs);
for J = 2 : n_imgs;
for K = 1 : J - 1;
this_result = sum( (double(imgs{J}(:)) - double(imgs{K}(:))).^2 ); results(J, K) = this_result; results(K, J) = this_result;
end
end
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!