This notebooks implements a simple grid scanner that scans a photo of a 2d grid where some cells of the grid are hashed(colored).
from tsoding daily youtube channel
Via mouse clicks using a GUI tool
cv2.getPerspectiveTransform()
and cv2.warpPerspective()
Grayscale
CLAHE
contrast enhancementErode
(15,15) for 5 iterationsMedian Blur
(ksize=31)
The processing has distributed the centers of our cells like this (y axis is just the index of the cell in a given value bucket):
As you can see they're very seperable by thresholding the value of each cell. nice!
Note: value of each cell is the average of a small region in that cell(near the center of the cell)
Let's use a value like 119.
and Done.