I have this example image that has a transparent background
When I check it directly from matplotlib in python with these snippets:
import cv2
from matplotlib import pyplot as plt
template = cv2.imread(template_paths[0], cv2.IMREAD_COLOR)
plt.imshow(cv2.cvtColor(template, cv2.COLOR_BGR2RGB))
plt.show()
I get the following results:
I want to use this image as my source for template matching for some images that contains this pattern, but I don’t know, if having this gray background means the template matching will also match it with this gray background? if thats the case, how do I get rid of it? there isn’t any alpha channels (4th dimension) in this example.