Calculation of TM_CCOEFF_NORMED for template matching
This template image below gives always 1.0:
best matching result in every source image. @pklab said here it is because the formula of TM_CCOEFF_NORMED returns 0/0 because the template image is constant color and opencv returns 1.0 to avoid match exception, but I still don't get it. I would understand better with an example, lets say template image = 3x4 pixels and source image = 10x12 pixels, could someone put the values in the formula please and show 0/0?
Why would you matching the template of a single colour? isn't it better to do segmentation and detect the biggest square in that region?
@thdrksdfthmn I don't have a choice, it must be this way for now, I just want to understand the formula...