Learn Before
Concept
Results Array
If we have a 4x4 base image and a 2x2 template image then our output array will be a 3x3.
#base image [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]] #temp image [[255, 255], [255, 255]] #output array [[1, 1, 1], [1, 1, 1], [1, 1, 1]]
This will happen since all the values of the base image will match perfectly with the template image.
#base image [[255, 0, 255, 255], [255, 255, 0, 255], [255, 255, 255, 255], [0, 255, 255, 255]] #temp image [[255, 255], [255, 255]] #output array [[0, 0, 0], [1, 0, 0], [0, 1, 1]]
0
1
Updated 2021-07-10
Tags
Python Programming Language
Data Science