MATLAB: On which parameters freeman chain code correctness can be determined

chain codeconfusion matrixfreeman chain code

I have applied chain code on images for predicting the object as normal and worn. Now I have to apply confusion matrix on those images so that precision can be calculated. But the problem is chain code for both the images i.e. chain code for normal object and worn object are different. Matrix dimensions are different for both and hence I am unable to get desired results. How I can get the desired values for true positive,false positive,false negative,true negative ? Are there any other parameters which can be used in this case?

Best Answer

"features" that are of different length are not directly comparable. You need to find a way to make the arrays the same size. Or you need to find a way to extract constant-size information from the arrays. Or you need to define a "matching" metric that can work with different sizes or arrays (e.g., by searching for matching subpatterns.)