Info
此问题已关闭。 请重新打开它进行编辑或回答。
compute sum of square distance between the four corresponding down sampled images??
1 次查看(过去 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!