Complete revamp of image preprocessing and circle post-processing
Image pre-processing:
Increases brightness of image by a scalar value generated based on the median brightness of the image
Switched back to Gaussian blur with a kernel of 5 and modified circle detection parameters.
The circle detection is now more generous and has no minimum radius.
The max radius was decreased and may need increasing as the test data set was low resolution and radius increases with higher resolution
Circle post-processing:
Filters out circles that are either above, to the right of, to the left of, or inside the detected text using TextDetector.
Filters out circles that are a depth of 5000 millimeters (5 meters) or more away using the depth image.
Groups circles that are near each other into clusters and runs bucket sorting on each of the clusters to choose the best one (with the most parallels), the one that's likely the module holes.
Circle clustering:
Circles are now clustered together to eliminate circles that are spread out and to break up and narrow down which grouping of circles is most likely the module holes
The clustering continuously runs until a desired overall compactness of the clusters is achieved
Clusters with less than four circles (outliers) are then removed from calculation
Then the bucket sorting is run on each cluster to identify the best_cluster, which is the cluster with the most parallel slopes between circles detected
Other changes:
show_circles() was removed and integrated with show_img() to make it uniform with save_img()
The image visualization functions were also reworked to handle showing all the clusters of circles that were grouped together.
Slight tweaking of some of the circle detection requirements such as the maximum circles allowed before in_frame or get_center fail since a lot of filtering is being applied to the circles
Complete revamp of image preprocessing and circle post-processing
Image pre-processing:
Circle post-processing:
Circle clustering:
Other changes: