MATLAB Answers

when i use pdist2 function of Hamming distance between tow binary images the result is not percentage value

5 views (last 30 days)
haider alnaqeeb
haider alnaqeeb on 14 Jan 2017
Commented: John Chilleri on 16 Jan 2017
Dear Gentlemen i face problem when i use pdist2 function of hamming distance between two binary images in same size, the output result is an array not a percentage value, where i want to use hamming distance to calculate the percentage difference between two binary images:
Image1 = imread('S8.bmp');
Image2 = imread('S9.bmp');
D = pdist2(bw1,bw2,'hamming');

  1 Comment

John Chilleri
John Chilleri on 16 Jan 2017
Given array D, could you just say sum(D)/length(D) to obtain the desired percentage? Or sum(sum(D))/(size(D,1)*size(D,2))?

Sign in to comment.

Answers (0)

Sign in to answer this question.