Closed F8RZD closed 4 months ago
I'll try to implement
Sharing my implementation idea: Having an u8 array of the same dimensions as the template image as the mask.
And each pixel on the mask would specify how important that pixel is.
I haven't read how the present template matching works but assuming every pixel after calculations has a score
value from 0 to 1.
something along these lines would be great:
let final_score = pixel_score * (mask_pixel_value / 255);
then users can decide whether they want to use a binary mask (only including 0 and 255) or they want a more smoother one.
There is no need to guess
open cv provides a mask argument for their template matching function
mask specifies the pixels that can be ignored during the matching progress
it's very useful for transparent or white background image template matching
I couldn't find any similar functionality here is it planned to be implemented?
any help would be appreciated