A Corner Detection Method with Phase Consistency Enhancement and Adaptive Geometric Fitting
By combining YOLO detection with CLAHE enhancement, phase consistency and Harris response processing, and adaptive multi-threshold and geometric constraints, the accuracy problem of corner detection in complex environments is solved, achieving high-precision sub-pixel positioning and improving the displacement measurement effect of structural monitoring.
Patent Information
- Application Number
- CN202511157931.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-19
AI Technical Summary
Existing corner detection algorithms suffer from decreased accuracy in complex environments (such as overexposure, shadows, raindrops, reflections, motion blur, etc.) and cannot provide high-precision target corner coordinates. Existing methods are also sensitive to changes in illumination and contrast, resulting in severe noise interference and affecting extraction accuracy.
By combining YOLO target detection and CLAHE region enhancement, a comprehensive response map is constructed through phase consistency and Harris response. Adaptive multi-threshold screening and cross-target geometric constraints are combined, and the RANSAC algorithm is used to eliminate false detection points. Weighted quadratic surface fitting is then performed to achieve sub-pixel-level localization.
It effectively suppresses interference from uneven illumination in complex environments, improves the robustness and accuracy of corner detection, ensures sub-pixel-level positioning accuracy, and enhances the displacement measurement accuracy of structural monitoring.
Smart Images

Figure CN120708032B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and image processing technology, and more specifically, to a corner detection method with phase consistency enhancement and adaptive geometric fitting. Background Technology
[0002] With the development of health monitoring technology for civil structures such as dams and bridges, displacement measurement methods based on visual sensing have been widely adopted. In practical applications, cross targets are often placed at key locations on the structure, and the targets are photographed by cameras. Then, the target corner coordinates are accurately obtained through target detection and corner extraction methods to calculate the small displacements of the structure. In recent years, deep learning target detection algorithms (such as YOLO) have performed well in real-time target recognition and can quickly locate target areas in images.
[0003] However, current YOLO detection only yields coarse target bounding boxes, failing to provide high-precision target corner coordinates. Therefore, finer corner detection and sub-pixel localization are typically required within the detected target area. Existing corner detection operators (such as Harris and Shi-Tomasi) are primarily based on grayscale gradient information, making them sensitive to changes in illumination and contrast. Their performance degrades significantly in complex environments such as overexposure, shadows, raindrops, reflections, and motion blur. For instance, when an image area is overexposed or has strong reflections, traditional Harris corner detection often fails to find accurate corner locations. Under raindrop or blur interference, corner responses are prone to false points or loss. Furthermore, complex backgrounds in the target image area introduce noise, affecting corner extraction accuracy.
[0004] Therefore, in real-world environments with complex interference, there is an urgent need for a novel sub-pixel corner detection method that combines depth detection and robust algorithms to improve the accuracy and reliability of target corner extraction. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a corner detection method that combines phase consistency enhancement and adaptive geometric fitting. By combining YOLO target detection with CLAHE region enhancement, it can effectively suppress illumination inhomogeneity interference such as overexposure and shadows within the target area. Furthermore, by employing phase consistency and Harris response to jointly construct a comprehensive response map and using adaptive multi-threshold screening of corner candidates, it takes into account both the photometric invariance characteristics and gradient significance of corners, thereby improving the accuracy of corner extraction and solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a corner detection method with enhanced phase consistency and adaptive geometric fitting, comprising the following steps:
[0007] S1. First, adaptive histogram equalization and CLAHE contrast enhancement are performed on the cross-shaped target area image detected by YOLO to improve the local contrast of the target area and suppress brightness non-uniformity.
[0008] S2. Calculate the phase consistency response of the enhanced image, and use a multi-scale Log-Gabor filter to extract brightness-insensitive structural features to obtain corner candidate regions that are insensitive to changes in brightness and contrast.
[0009] S3. Calculate the Harris corner response on the enhanced image, construct a comprehensive response map by combining the Harris response with the phase consistency response score, and use adaptive multi-threshold to filter out the corner candidate set from the comprehensive response map.
[0010] S4. Using the geometric constraints of the cross-shaped target structure, namely that the corner points are pairwise orthogonal and the lengths of the connecting lines are basically equal, and combined with the Random Sample Consensus (RANSAC) algorithm, outliers that do not conform to the geometric constraints are removed from the candidate corner points, and four corner points that conform to the cross structure are extracted.
[0011] S5. Perform weighted quadratic surface fitting on the grayscale images of the local neighborhoods of the four extracted corner points to achieve sub-pixel level corner point localization and improve the accuracy of corner point coordinates.
[0012] S6. Sort the extracted corner points according to the comprehensive response intensity and fitting confidence of the corner points, and confirm the final four corner points.
[0013] In a preferred embodiment, when performing CLAHE contrast enhancement on the detection box region in step S1, the detection box region is divided into several sub-regions of equal size 8×8 grids, and local histogram equalization is performed on each sub-region to suppress illumination non-uniformity, and contrast-limited distribution is used to avoid noise amplification.
[0014] In a preferred embodiment, the phase consistency response in step S2 is calculated using a multi-scale Log-Gabor filter bank. The corner saliency is determined by analyzing the phase information consistency of the image at different scales and orientations, thereby improving the robustness of feature detection under complex lighting conditions.
[0015] In a preferred embodiment, the adaptive multiple thresholds in step S3 are determined by the Otsu method, i.e., the Otsu algorithm, or a dynamic thresholding method based on response statistics, to adapt to changes in the corner response distribution under different scenarios.
[0016] In a preferred embodiment, the RANSAC algorithm in step S4 is performed at least 1000 times, and four corner points are randomly selected in each iteration to fit the cross structure model in order to maximize the number of points that satisfy the geometric constraints and ensure that the corner points can still be extracted correctly even when there is noise and false detection.
[0017] In a preferred embodiment, when performing weighted quadratic surface fitting on the corner points in step S5, the weight is related to the magnitude of the local gradient or the intensity of the overall response, making the fitting process more sensitive to grayscale changes at the corner points and improving sub-pixel positioning accuracy.
[0018] In a preferred embodiment, the comprehensive evaluation index used for sorting corner points in step S6 is composed of the weighted sum of the comprehensive response value of the corner point and the fitting residual. Corner points with higher comprehensive response and smaller fitting error have higher priority, so as to improve the reliability and accuracy of corner point selection.
[0019] The technical effects and advantages of this invention are as follows:
[0020] This invention combines YOLO target detection with CLAHE region enhancement. This algorithm can effectively suppress interference from uneven lighting such as overexposure and shadows within the target area, thereby improving the robustness of corner detection.
[0021] This invention employs a combination of phase consistency and Harris response to construct a comprehensive response map, and uses adaptive multi-threshold filtering to select corner candidates, taking into account both the luminosity invariance and gradient significance of corners, thereby improving the accuracy of corner extraction.
[0022] This invention introduces geometric constraints of a cross-shaped target and uses the RANSAC algorithm to eliminate false detection points, ensuring that the four corner points conform to the preset geometric relationship; combined with weighted quadratic surface fitting, it achieves sub-pixel level positioning, which greatly improves the positioning accuracy of corner points. Attached Figure Description
[0023] Figure 1 This is a flowchart of the overall corner detection method of the present invention;
[0024] Figure 2 This is a structural block diagram of the displacement measurement system of the present invention;
[0025] Figure 3 This is a schematic diagram illustrating the extraction of four corner points using geometric constraints and RANSAC filtering according to the present invention. Detailed Implementation
[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] As attached Figures 1 to 3 The diagram illustrates a corner detection method combining phase consistency enhancement and adaptive geometric fitting. This method is applicable to crosshair target images in a YOLO-based displacement measurement system and includes the following steps:
[0028] S1. First, adaptive histogram equalization and CLAHE contrast enhancement are performed on the cross-shaped target region image detected by YOLO.
[0029] S2. Calculate the phase consistency response of the enhanced image to obtain corner candidate regions that are insensitive to changes in brightness and contrast.
[0030] S3. Calculate the Harris corner response on the enhanced image, construct a comprehensive response map by combining the Harris response with the phase consistency response score, and use adaptive multi-threshold to filter out the corner candidate set from the comprehensive response map.
[0031] S4. Using the geometric constraints of the cross-shaped target structure, namely that the corner points are pairwise orthogonal and the lengths of the connecting lines are basically equal, and combined with the Random Sample Consensus (RANSAC) algorithm, outliers that do not conform to the geometric constraints are removed from the candidate corner points, and four corner points that conform to the cross structure are extracted.
[0032] S5. Perform weighted quadratic surface fitting on the grayscale images of the local neighborhoods of the four extracted corner points to achieve sub-pixel level corner point localization.
[0033] S6. Sort the extracted corner points according to the comprehensive response intensity and fitting confidence of the corner points, and confirm the final four corner points.
[0034] The corner detection method with enhanced phase consistency and adaptive geometric fitting includes a robust sub-pixel corner detection device, which comprises:
[0035] The YOLO detection unit is used to detect cross-shaped targets in an image and output the target detection bounding box area.
[0036] The CLAHE enhancement unit performs adaptive contrast enhancement on the image of the detection box region.
[0037] The phase consistency calculation unit calculates the phase consistency response in the enhanced image;
[0038] Harris response calculation unit calculates Harris corner response in enhanced image;
[0039] The integrated response generation and filtering unit combines the phase consistency response and Harris response to generate an integrated response map, and uses adaptive multi-threshold filtering to select a candidate set of corner points;
[0040] The RANSAC geometric filtering unit removes outliers from the corner candidate set and extracts corners that conform to the cross structure based on the geometric constraints of the cross target (mutually orthogonal and equal-length sides).
[0041] The subpixel fitting unit performs weighted quadratic surface fitting on the grayscale image of the local neighborhood where the extracted corner point is located to achieve subpixel-level positioning.
[0042] The sorting and confirmation unit sorts the extracted corner points and confirms the final four corner points based on the comprehensive response intensity and fitting confidence of the corner points.
[0043] Step S1 includes a YOLO-based crosshair target displacement measurement system for structural health monitoring, which includes:
[0044] The image acquisition unit is used to acquire real-time images of the monitoring scene;
[0045] The YOLO detection unit performs target detection and locates the cross-shaped target in the acquired image, and outputs the target detection bounding box area.
[0046] A robust subpixel corner detection device is used to perform CLAHE enhancement, phase consistency calculation, comprehensive response screening, RANSAC geometric screening and subpixel fitting on the image of the detection box region to extract the four corner points of the cross target.
[0047] The displacement calculation unit calculates the displacement changes of the dam or bridge structure based on the extracted positions of the four corner points.
[0048] The YOLO-based target detection unit processes the captured image, quickly identifies and locates the crosshair target, and outputs the target's detection box coordinates (i.e., ROI region). This detection box region is then used as input for subsequent fine corner detection.
[0049] For the image region within the YOLO detection frame, the robust subpixel corner detection device of the present invention performs the following steps:
[0050] (1) CLAHE Adaptive Enhancement: The contrast-limited adaptive histogram equalization (CLAHE) algorithm is applied to the image of the detection box region for enhancement. Specifically, the detection region is divided into multiple equal-sized sub-blocks (such as an 8×8 grid), local histogram equalization is performed on each sub-block, and its contrast gain is limited to avoid noise amplification and over-enhancement. This process can improve the local contrast of the target region, balance the brightness distribution, and make edge and corner features more prominent;
[0051] (2) Phase consistency response calculation: The phase consistency response map is calculated on the enhanced image. Specifically, the enhanced image is filtered using a Log-Gabor filter bank at multiple scales and directions to extract phase information; then the phase consistency at each scale and in each direction is normalized and accumulated to obtain the final phase consistency response map. The phase consistency response emphasizes the structural features in the image and is insensitive to changes in grayscale and contrast, thus it can reliably mark potential corner regions under complex lighting conditions.
[0052] (3) Construction of Harris Response and Composite Response Map: Simultaneously, the traditional corner response is calculated using the Harris operator on the enhanced image. The Harris operator generates the corner response value for each pixel by analyzing the changes in the image's grayscale gradient within a local window, reflecting the significance of the surrounding gradient. Then, the Harris response is combined with the phase consistency response obtained in step 2 according to certain weights (e.g., weighted summation) to generate a composite response map. This composite response map integrates brightness-invariant features and gradient significance, taking into account the detection capabilities of different corner characteristics.
[0053] (4) Adaptive threshold screening of candidate corner points: Perform multi-threshold segmentation on the comprehensive response map to screen out the candidate set of corner points. The Otsu algorithm or the dynamic threshold method based on response distribution statistics can be used to determine the appropriate threshold. The peak areas in the comprehensive response map that are greater than the threshold are taken as candidate corner points. Multi-threshold processing can take into account the corner features of different intensity levels and ensure the integrity of the candidate set;
[0054] (5) Geometric constraints and RANSAC removal of outlier corners: The inherent geometric structure of the cross-shaped target is utilized, namely, the lines connecting the four corners are mutually orthogonal and have approximately equal lengths, to screen candidate corners. Specifically, the Random Sample Consensus (RANSAC) algorithm is used: four points are randomly selected from the candidate corner set, two mutually perpendicular lines are constructed and their intersection and length are calculated. It is checked whether these two line segments meet the conditions of relatively close perpendicular angles and equal lengths. For the corner group that meets the conditions, the number of interior points it supports in the candidate set is calculated. The above process is repeated several times, and the group of corners with the largest number of interior points is taken as the four corners that conform to the cross structure. This step can effectively remove false corners caused by noise, occlusion, or false detection.
[0055] (6) Subpixel-level positioning: For the four corner points extracted in step 5, perform gray-scale weighted quadratic surface fitting in their local neighborhood (e.g., take a 5×5 or 7×7 pixel window at the center of each corner point). Specifically, establish a quadratic surface model by combining the gray values and coordinates in the neighborhood. The model is fitted with weights (such as Gaussian weights based on gradient magnitude or with the corner center as the peak value) and weighted least squares fitting is introduced. The coefficients of the model are solved. By calculating the first-order partial derivative of the fitted quadratic surface and setting it to zero, the extreme points of the quadratic surface are obtained, which are the corner position offsets at the sub-pixel level, thereby achieving sub-pixel positioning. This fitting method can suppress the influence of noise on positioning and improve positioning accuracy.
[0056] (7) Corner sorting and confirmation: The four extracted corners are sorted according to their comprehensive response intensity and fitting confidence. A comprehensive evaluation index can be defined, such as using the weighted sum of the response value of the corner in the comprehensive response map and its fitting residual. Corners with high response and small residual score higher. The final set of corners is determined by sorting, and the sub-pixel coordinates of these four corners are output.
[0057] Through the above steps, this invention achieves stable extraction and high-precision positioning of corner points of crosshair targets in complex environments. Using the target area detected by YOLO as the algorithm's processing range effectively reduces background interference and improves processing efficiency; the combination of CLAHE and phase consistency enhances adaptability to extreme lighting conditions; the fusion of Harris and phase consistency takes into account different types of corner point features; geometric filtering and RANSAC eliminate false detection interference; and weighted fitting achieves sub-pixel accuracy. Results show that this algorithm can accurately extract corner points even in complex interference scenarios such as overexposure, raindrops, blur, and reflections, significantly improving the displacement measurement accuracy of structural monitoring.
[0058] Finally, the following points should be noted: First, in the description of this application, it should be noted that, unless otherwise specified and limited, the terms "installation", "connection", and "linkage" should be interpreted broadly, and can be mechanical or electrical connections, or internal connections between two components, or direct connections. "Up", "down", "left", "right", etc. are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may change.
[0059] Secondly: The accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other.
[0060] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A corner detection method with enhanced phase consistency and adaptive geometric fitting, characterized in that: This detection method is applicable to crosshair target images in YOLO-based displacement measurement systems and includes the following steps: S1. Adaptive histogram equalization and CLAHE contrast enhancement are performed on the cross-shaped target region image detected by YOLO. S2. Calculate the phase consistency response of the enhanced image to obtain corner candidate regions that are insensitive to changes in brightness and contrast. S3. Calculate the Harris corner response on the enhanced image, construct a comprehensive response map by combining the Harris response with the phase consistency response score, and use adaptive multi-threshold to filter out the corner candidate set from the comprehensive response map. S4. Utilizing the geometric constraints of the cross-shaped target structure, namely that the corner points are pairwise orthogonal and the connecting line lengths are equal, and combined with the Random Sample Consensus (RANSAC) algorithm, outliers that do not conform to the geometric constraints are removed from the candidate corner points, and four corner points that conform to the cross structure are extracted. S5. Perform weighted quadratic surface fitting on the grayscale images of the local neighborhoods of the four extracted corner points to achieve sub-pixel level corner point localization. S6. Sort the extracted corner points according to the comprehensive response intensity and fitting confidence of the corner points, and confirm the final four corner points.
2. The corner detection method with phase consistency enhancement and adaptive geometric fitting according to claim 1, characterized in that: In step S1, when performing CLAHE contrast enhancement on the detection box area, the detection box area is divided into several sub-regions of equal size 8×8 grids. Local histogram equalization is performed on each sub-region to suppress illumination non-uniformity, and contrast-limited distribution is used to avoid noise amplification.
3. The corner detection method with phase consistency enhancement and adaptive geometric fitting according to claim 1, characterized in that: In step S2, the phase consistency response is calculated using a multi-scale Log-Gabor filter bank. The saliency of corner points is determined by analyzing the consistency of phase information in the image at different scales and orientations.
4. The corner detection method with phase consistency enhancement and adaptive geometric fitting according to claim 1, characterized in that: In step S3, the adaptive multiple thresholds are determined by the Otsu method, i.e., the Otsu algorithm, or a dynamic thresholding method based on response statistics, to adapt to the changes in the corner response distribution under different scenarios.
5. The corner detection method with phase consistency enhancement and adaptive geometric fitting according to claim 1, characterized in that: In step S4, the RANSAC algorithm undergoes at least 1000 iterations. In each iteration, four corner points are randomly selected to fit the cross structure model to satisfy the geometric constraints.
6. The corner detection method with enhanced phase consistency and adaptive geometric fitting according to claim 1, characterized in that: In step S5, when performing weighted quadratic surface fitting on the corner points, the weights are related to the magnitude of the local gradient or the intensity of the overall response.
7. The corner detection method with phase consistency enhancement and adaptive geometric fitting according to claim 1, characterized in that: In step S6, the comprehensive evaluation index used for sorting the corner points consists of the weighted sum of the comprehensive response value of the corner points and the fitting residual.
Citation Information
Patent Citations
Image corner point matching method based on self-adaptive threshold and RANSAC
CN108335319A
Method and system for image processing and classifying target entities within image
US20240087288A1