computeECC returning strange values
From version 4.1.x there's the opportunity the compute the enhanced correlation coefficient between two images. It seems to me that it's not working correctly. My two images are very similar and I get an ECC=0.474. Just to test the functionality I also tried to run:
retval = cv2.computeECC(templateImage=reference, inputImage=reference)
and it returns me 0.475, while I was expecting 1.00.
Does anybody know how to solve this? Thank you for your help.
Why do you expect 1.00?
Because just to test the functionality I used the same image (called reference in the code snippet) for both parameters templateImage and inputImage.
No, I mean mathematically, should it really be 1 for matching images? I can see, that algorithm searches for ECC maximum, but don't see clues about its range?
Also the operator findTransformECC provides the same output correlation coefficient. I just tried the following
I verified that warp_matrix is actually an identity matrix so no transform has been applied to the image. So far, the two output values are respectively:
Could be a bug, could you please file an issue to the GitHub?