필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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');
level1=graythresh(Image1);
bw1=im2bw(Image1,level1);
level2=graythresh(Image2);
bw2=im2bw(Image2,level2);
D = pdist2(bw1,bw2,'hamming');
  댓글 수: 1
John Chilleri
John Chilleri 2017년 1월 16일
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))?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by