Level Detection
This is the level detection function in which it detects the number of stars (encoded circles) on a card.
How does it work?
Zoom into a portion of the card
Grayscale the card and apply a bilateral filter
This is to ensure that all other information is blurred but the edges of the circles are preserved for edge detection
Below is the image after it was zoomed in
Below is the image after it has been gray scaled and filtered so extract the edges of the circle
Perform Edge Detection using Canny Edge Detection
Use a Hough Circle transform since we are attemping to find the number of circles with specified parameters
Then the Circles can simply be counted
A Sample output on the terminal can be seen below
Some images are so sharp and detailed that it introduces some unwanted noise and grain in the image. This can mess up the Canny Edge Detector because it will detect those small amounts of grain as edges, so it was necessary to blur out the image to the right amount so that these grains remain undetected but at the same time preserving the edges of the circles
How can you communicate?