I'm working on a CV tool for image analysis and use 4 points to form a transformation matrix (map) for image correction (perspective projection - cv.four_point_transform
).
I have a set of source images obtained from a thermal imager with the presence of distortion. I'm successfully applying a pipeline of standard OpenCV functions. You can see it in the pictures below (Fig. 1). Please note that the main pipeline consists of the following steps:
- Correction of distortion.
- Smoothing with a bilateral filter.
- Threshold.
- Harris corner detector.
- Erosion.
- The weighted average value of a point on a plane over a point cloud after erosion. In the "Target" image you see 4 points, the actual size of 1 pixel (enlarged for clarity).
- Which approach do you think is easier to implement in the future?
- How to properly approach the removal of parasitic points?
- Are there simpler approaches to detection corners?
Unfortunately, I come across cases where the Harris corner detector doesn't cope and doesn't detect obtuse angles. I started testing different approaches such as:
- Threshold -> Contours -> Approximate Contour -> Points.
- Threshold -> Canny Edges Detection -> Dilation -> FAST.
- Threshold -> Canny Edges Detection -> Dilation -> SIFT.
- Threshold -> Canny Edges Detection -> Dilation -> Probabilistic Hough lines -> Bentley-Ottmann points.
As you can see, some of the approaches can be used, but they form a number of parasitic points. I'm afraid that it will be more difficult to fight them than it seems at first glance (Fig. 2).
Fig. 1 - Successful detection
Fig. 2 - Unsuccessful detection