how to calculate hamming distance between 2 binary matrices having size 20 * 512 with a single score value as result.
2 views (last 30 days)
Image Analyst on 28 May 2018
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))