Info

This question is closed. Reopen it to edit or answer.

compute sum of square distance between the four corresponding down sampled images??

1 view (last 30 days)
Compute SSD between 4 corresponding down sampled images?

Answers (1)

Walter Roberson
Walter Roberson on 12 Apr 2017
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 Comments
Walter Roberson
Walter Roberson on 14 Apr 2017
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

This question is closed.

Community Treasure Hunt

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

Start Hunting!