matlab - Sum of absolute differences and Manhattan distance for image analysis -
i wish find out close resemblance of 'a' 'b' image , 'a' 'c' image. result sum of absolute difference of 'a'and 'b' or 'a'and 'c' gives less treated close 'a' among 'b' , 'c'.
i have used following matlab code purpose.
sad_natural=imabsdiff(inputimage,reconstructedimage_natural); sad_knn=imabsdiff(inputimage,reconstructedimage_knn); figure('name','sad_natural','numbertitle','off'),imshow(sad_natural,[]); figure('name','sad_knn','numbertitle','off'),imshow(sad_knn,[]);
here give me 2 images. want find out distance between them(close-ness). how can use manhattan distance in matlab.
as noted yourself, imabsdiff
returns image per-pixel absolute differences. if want single number represents the "distance between 2 images", may want at
mydista_b = mean( sad_natural(:) ); mydista_c = mean( sad_knn(:) );
and based on these numbers can decide if b
better reconstruction of c
or vice versa.
Comments
Post a Comment