how to calculate hamming distance between 2 binary matrices having size 20 * 512 with a single score value as result.
조회 수: 6 (최근 30일)
이전 댓글 표시
i have 2 binary matrices with 0's and 1's of size 20 * 512... i want to compute hamming distance between them..and the result should be a single score value..
댓글 수: 0
답변 (1개)
Image Analyst
2018년 5월 28일
If they are truly binary matrices of type logical, then you can use xor() to see which pixels are different, and then count them with sum() or nnz():
numberOfMismatches = nnz(xor(BW1, BW2))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Hamming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!