Vision line finding method and system based on multi-scale phase consistency and ordinal constraint

CN122990224APending Publication Date: 2026-10-27SUZHOU HUICUI INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610989887.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]然而,在实际工业检测场景中,待测图像往往受到金属反光、阴影、亮度不均、表面纹理及传感器噪声等因素影响,导致真实物理边缘的灰度梯度可能减弱,而伪边缘或局部噪声响应反而增强,基于梯度幅值或二阶导数响应的找线方案,在此类复杂条件下仍需要依赖滤波尺度、阈值等参数进行人工调节,其边缘强度通常也主要由灰度变化幅值表征,难以稳定反映边缘的真实结构特征

Benefits of technology

[0056]1、本发明采用基于相位一致性的边缘检测思路替代传统灰度梯度检测方式,使边缘特征不再主要依赖图像亮度或对比度变化,因此在光照不均、阴影遮挡、金属反光等复杂工业场景下,仍能够稳定、完整地提取目标直线边缘,同时,本发明进一步结合多尺度响应一致性构建边缘强度图,通过分析真实边缘与噪声、纹理在不同尺度下的响应差异,有效抑制伪边缘干扰,提高边缘检测结果的准确性和稳定性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990224A_ABST
    Figure CN122990224A_ABST
Patent Text Reader

Abstract

The application discloses a visual line searching method and system based on multi-scale phase consistency and ordinal constraint, and belongs to the technical field of image detection, and comprises the following steps: S1, image denoising preprocessing; S2, image filtering and decomposition; S3, texture suppression and noise filtering processing; S4, obtaining a sub-pixel edge point; and S5, accurate extraction of an edge line. Through the above manner, the application adopts an edge detection idea based on phase consistency to replace a traditional gray gradient detection mode, so that edge features no longer mainly depend on image brightness or contrast change, and therefore, in a complex industrial scene such as uneven illumination, shadow shielding and metal reflection, target straight line edges can still be stably and completely extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image detection technology, specifically to a visual line-finding method and system based on multi-scale phase consistency and ordinal constraints. Background Technology

[0002] In the field of machine vision industrial inspection, line-finding algorithms are the core foundation for geometric measurement, defect detection, target localization, and recognition. Whether it's semiconductor wafer dicing, LCD panel alignment, precision component dimensional measurement, or road boundary recognition in robot navigation, all rely on quickly and accurately extracting straight-line edge features from images. Ideally, the edges in an image correspond to the boundaries of objects in the physical world. By detecting these edges, key geometric parameters such as the object's position, orientation, and size can be deduced.

[0003] For example, the Canny operator can be used for edge detection, combined with Hough transform or least squares fitting to obtain line parameters; or the Steger algorithm can be used to achieve high-precision line edge extraction through sub-pixel localization in the Hessian matrix and normal direction. The core technical idea of ​​this type of scheme is: first, filter and denoise the image, then calculate the gradient magnitude, direction or second derivative response based on grayscale changes, obtain the edge point set through steps such as non-maximum suppression, threshold discrimination, and edge connection, and finally fit the discrete edge points into a straight line.

[0004] However, in actual industrial inspection scenarios, the images under test are often affected by factors such as metal reflection, shadows, uneven brightness, surface texture and sensor noise, which may weaken the gray-level gradient of the real physical edge, while the response of the false edge or local noise is enhanced. Under such complex conditions, line-finding schemes based on gradient magnitude or second derivative response still need to rely on parameters such as filtering scale and threshold for manual adjustment. The edge strength is usually mainly characterized by the gray-level change amplitude, which is difficult to stably reflect the real structural features of the edge. Summary of the Invention

[0005] To address the aforementioned shortcomings of existing technologies, this invention provides a visual line-finding method and system based on multi-scale phase consistency and ordinal constraints.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A visual line-finding method based on multi-scale phase consistency and ordinal constraints includes the following steps:

[0008] S1. Denoise the original grayscale image to obtain the preprocessed image;

[0009] S2. Image decomposition based on the Log-Gabor filter bank includes the following steps:

[0010] (1) Construct a Log-Gabor filter bank, which contains m scales and n directions;

[0011] (2) After performing Fourier transform on the preprocessed image, filter it, and then perform inverse Fourier transform on the filtering result to obtain the even-symmetric filter response and the odd-symmetric filter response.

[0012] (3) Using the even-symmetric filter response and the odd-symmetric filter response as the basic data of local frequency domain features, calculate the local amplitude and local phase under scale and direction, and obtain the phase offset by the degree of deviation of the local phase from the average phase. Finally, establish a phase consistency map based on the phase offset and the local amplitude.

[0013] S3. Read the local amplitudes corresponding to m scales, perform texture suppression and noise filtering on the phase consistency map, and obtain the edge intensity map;

[0014] S4. Obtain the edge intensity map and use the improved local extremum method to accurately locate potential edge points and obtain sub-pixel edge points;

[0015] S5. Cluster sub-pixel edge points into straight line segments and determine the spatial order of edge peaks based on ordinal scan lines to achieve edge line extraction.

[0016] Furthermore, in step (1), the Log-Gabor filter exhibits a Gaussian distribution on a logarithmic frequency scale, and its transfer function is defined in the frequency domain as:

[0017]

[0018] in, Let be the transfer function of the Log-Gabor filter in the j-th direction in the frequency domain. For frequency, For the center frequency, Let be the direction angle of the j-th filter. For frequency bandwidth parameters, Here, j is the directional bandwidth parameter, and j is the directional index. It is a natural exponential function. It is the natural logarithm function.

[0019] Furthermore, in step (2), the preprocessed image... Perform Fourier transform to obtain For each scale and direction The corresponding Log-Gabor filter is used for filtering to obtain the filtering result:

[0020]

[0021] in, This represents the filtering result at the m-th scale and in the n-th direction. Fourier transform for preprocessed images, For the corresponding scale direction, use a Log-Gabor filter;

[0022] For the filtering results Performing the inverse Fourier transform yields a pair of orthogonal components: the even-symmetric filter response. Sum of odd symmetric filter responses .

[0023] Furthermore, in step (3), the formula for calculating the local amplitude is:

[0024]

[0025] in, Let be the local amplitude of the pixel at the m-th scale and in the n-th direction. For even-symmetric filter response, It is an odd-symmetric filter response;

[0026] The formula for calculating the local phase is:

[0027]

[0028] The formula for calculating the phase offset is:

[0029]

[0030] in, The local phase at the m-th scale and in the n-th direction. It is the arctangent function in the fourth quadrant. For even-symmetric filter response, For odd-symmetric filter responses, Let m be the phase offset in the m-th scale and n-th direction. This is the weighted average phase.

[0031] Furthermore, in step (3), the phase consistency calculation formula is as follows:

[0032]

[0033] in, For phase consistency in direction n, For frequency spread weighting function, The noise compensation threshold in direction n. To prevent extremely small positive numbers with a denominator of zero;

[0034] The phase consistency responses in all directions are fused to obtain the final phase consistency map. .

[0035] Furthermore, in step S3, an edge strength metric is defined. The formula is:

[0036]

[0037]

[0038] in, This is an edge intensity map. For phase consistency diagram, The standard deviation is the scale. For pixels In all The mean of phase consistency across multiple scales, To prevent extremely small positive numbers with a denominator of zero, This is the scale consistency factor.

[0039] Furthermore, step S4 specifically involves: processing the edge intensity map. initial edge pixels By performing a quadratic polynomial fitting on the local edge intensity distribution along its normal direction, the edge intensity map is obtained. The peak position, and the coordinates corresponding to the peak position are sub-pixel coordinates. The edge point determined by the sub-pixel coordinates is called the sub-pixel edge point.

[0040] Furthermore, step S5 specifically includes:

[0041] S501. Cluster the i sub-pixel coordinates into line segments using least squares. Each straight line segment, in addition to geometric parameters In addition, the average edge strength along the line is also included. ;

[0042] S502. Extract the edge line number based on the reference scan line and establish its spatial association with the detected straight line segment;

[0043] S503, Set of all detected line segments In the middle, compare their average edge strength ,choose Output the line segment with the largest value.

[0044] Furthermore, in step S502, edge line numbers are extracted based on the reference scan lines, and their spatial association with the detected straight line segments is established, and the following analysis is performed:

[0045] 1) Generate N reference scan lines;

[0046] 2) Along the scan line, check the edge intensity map. Sampling was performed to obtain a one-dimensional intensity curve. ;

[0047] 3) For one-dimensional intensity curves Peak detection is performed, and the detected peaks are assigned physical ordinal numbers according to their spatial order along the scan line. ;

[0048] 4) Establish the correspondence between the peak position and the detected straight line segment, and match the peak position with the detected straight line segment. Perform spatial association.

[0049] A visual line-finding system based on multi-scale phase consistency and ordinal constraints, the system comprising:

[0050] An image denoising preprocessing system receives an original grayscale image and performs denoising preprocessing on the original grayscale image to obtain a preprocessed image.

[0051] The phase consistency calculation system performs frequency domain analysis on the preprocessed image based on the Log-Gabor filter bank to obtain the even-symmetric filter response and odd-symmetric filter response, and calculates the local amplitude and local phase under scale and direction, thereby establishing a phase consistency map;

[0052] The noise texture suppression system receives a phase consistency map and local amplitudes corresponding to multiple scales, calculates a scale consistency factor, and combines it with the phase consistency map to generate an edge intensity map.

[0053] The edge point localization system finds the peak position of edge intensity along the edge normal direction based on the local extreme value distribution in the edge intensity map, and determines the sub-pixel coordinates corresponding to the peak by quadratic polynomial fitting, thereby obtaining the sub-pixel edge point.

[0054] The ordinal space-based line filtering system clusters and fits multiple sub-pixel coordinates into line segments, generates ordinal scan lines, samples the edge intensity map and detects peaks along the ordinal scan lines, and then establishes a spatial association between the peak positions and the detected line segments, thereby outputting the line segments corresponding to the user-specified ordinal number.

[0055] Compared with the prior art, the beneficial effects of this invention are as follows:

[0056] 1. This invention adopts a phase-consistency-based edge detection approach to replace the traditional gray-scale gradient detection method, so that edge features no longer mainly depend on changes in image brightness or contrast. Therefore, even in complex industrial scenarios such as uneven lighting, shadow occlusion, and metal reflection, it can still stably and completely extract the target straight edge. At the same time, this invention further combines multi-scale response consistency to construct an edge intensity map. By analyzing the response differences between real edges and noise and texture at different scales, it effectively suppresses false edge interference and improves the accuracy and stability of edge detection results.

[0057] 2. This invention also assigns a clear physical meaning to the "strongest edge," that is, determining the edge with the greatest structural stability in the image based on phase consistency and scale consistency, rather than simply selecting the edge with the largest gradient magnitude, thereby avoiding misjudgments caused by local highlights or noise. Furthermore, this invention introduces an ordinal space scanning strategy, establishing a correspondence between the detected straight edges and their arrangement order in physical space. This allows the system to directly output the target straight line based on the user-specified "Nth edge," reducing manual ROI setting and complex post-processing requirements. Additionally, the parameter adaptive mechanism reduces debugging and migration costs, improving the applicability of the machine vision system in different detection scenarios. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 This is a flowchart illustrating the method structure of the present invention.

[0060] Figure 2 This is a schematic diagram of the phase consistency principle of the present invention, in which, from left to right, are the waveforms of the same ideal edge signal under high and low contrast, the detection response based on gradient, and the detection response based on phase consistency.

[0061] Figure 3 This is a schematic diagram of the ordinal space scanning strategy of the present invention. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0063] Example 1: As Figure 1 As shown, the visual line-finding method based on multi-scale phase consistency and ordinal constraints includes the following steps:

[0064] S1. Grayscale image denoising preprocessing

[0065] To eliminate the influence of high-frequency noise on subsequent phase analysis, the original grayscale image is input. Using a small median filter or anisotropic diffusion filter, the sharpness of edges is preserved to the maximum extent while denoising, resulting in a preprocessed image. This provides a more stable and clear input basis for subsequent phase consistency calculations, thereby improving the completeness and reliability of real straight line edge extraction;

[0066] S2. Image multi-scale and multi-directional decomposition based on Log-Gabor filter banks, including the following steps:

[0067] (1) Construct a Log-Gabor filter bank, which contains multiple scales m and multiple directions n;

[0068] (2) After the preprocessed image is subjected to Fourier transform, it is filtered, and the filtering result is subjected to inverse Fourier transform to obtain the even symmetric filter response and the odd symmetric filter response.

[0069] (3) Using the even-symmetric filter response and the odd-symmetric filter response as the basic data of local frequency domain features, calculate the local amplitude and local phase under scale and direction, and obtain the phase offset by the degree of deviation of the local phase from the average phase. Finally, establish a phase consistency map based on the phase offset and the local amplitude.

[0070] In step (1), the Log-Gabor filter exhibits a Gaussian distribution on the logarithmic frequency scale, enabling it to encode information from natural images more naturally and construct arbitrarily large bandwidths. Its transfer function is defined in the frequency domain as:

[0071]

[0072] in, Let be the transfer function of the Log-Gabor filter in the j-th direction in the frequency domain. For frequency, For the center frequency, Let be the direction angle of the j-th filter (e.g., 0°, 45°, 90°, 135°). For frequency bandwidth parameters, Here, j is the directional bandwidth parameter, and j is the directional index. It is a natural exponential function. It is the natural logarithm function;

[0073] In step (2), the preprocessed image is... Perform Fourier transform to obtain For each scale and direction The corresponding Log-Gabor filter is used for filtering to obtain the filtering result:

[0074]

[0075] in, This represents the filtering result at the m-th scale and in the n-th direction. Fourier transform for preprocessed images, For the corresponding scale direction, use a Log-Gabor filter;

[0076] For the filtering results Performing the inverse Fourier transform yields a pair of orthogonal components: the even-symmetric filter response. (Real part) and odd-symmetric filter response (Imaginary part), these two parts constitute the pixel at a specific scale and direction. Local energy at the location;

[0077] Among them, even-symmetric filter responses and odd-symmetric filter responses can describe the frequency domain structure information of the same spatial location from different phase angles, so that subsequent processing no longer depends solely on the strength of gray-level gradients, but comprehensively utilizes local energy and phase relationships to improve the stability of edge responses under complex lighting conditions.

[0078] In step (3), the even-symmetric filter response is... With odd symmetric filter response The data is fused using local frequency domain features as the basis, where local amplitude is used to characterize the response energy of the frequency component at the current scale. The formula for calculating local amplitude is:

[0079]

[0080] in, Let be the local amplitude of the pixel at the m-th scale and in the n-th direction. For even-symmetric filter response, It is an odd-symmetric filter response;

[0081] When the edge structure is obvious Larger, especially in flat or noisy areas. Since the local amplitude is relatively small, it is used as the energy weight in the subsequent phase consistency calculation to measure the contribution of the response at each scale to the edge structure. The energy contribution of the frequency components at each scale and in each direction to the edge structure can be obtained through the local amplitude data. This data can be used as the weight for the phase consistency calculation, so that the strong response corresponding to the real edge is fully preserved, while the influence of flat areas or weak noise areas on the results is reduced.

[0082] Local phase is used to characterize the phase state of the frequency components at the current scale. The phase offset is obtained by statistically analyzing the deviation of the local phase at each scale from the average phase.

[0083]

[0084]

[0085] in, The local phase at the m-th scale and in the n-th direction. It is the arctangent function in the fourth quadrant. For even-symmetric filter response, For odd-symmetric filter responses, This is the phase offset at the m-th scale and in the n-th direction (when the phases of all scales are consistent). Conversely, it tends to be 0. The weighted average phase;

[0086] like Figure 2 As shown, a phase consistency calculation model is established by combining phase offset with local amplitude to evaluate the phase clustering degree of frequency components at different scales in the same spatial location, and to obtain the phase consistency response value for edge detection at the pixel point. Location, regarding direction By combining all scales The responses are combined to calculate the phase consistency in that direction. :

[0087]

[0088] in, For phase consistency in direction n, For frequency spread weighting function, The noise compensation threshold in direction n is calculated dynamically by automatically estimating the mean and variance of the image's background noise by fitting a Rayleigh distribution using the amplitude response at the highest frequency scale of the image. To prevent extremely small positive numbers with a denominator of zero;

[0089] The phase consistency responses in all directions are fused to obtain the final phase consistency map. For example, taking the maximum value or weighted sum in each direction. The normalization value ranges between [0,1]. The larger the value, the higher the probability that the point is the edge of the structure. This metric is not sensitive to changes in illumination.

[0090] Among them, the phase consistency map, as a structural edge response that is insensitive to changes in illumination and contrast, can separate edge authenticity from grayscale amplitude, enabling the system to stably identify physical edges even in scenes with changes in brightness, shadows, or low contrast.

[0091] S3. Perform texture suppression and noise filtering on the phase consistency map.

[0092] Read the local amplitudes corresponding to m scales, perform texture suppression and noise filtering on the phase consistency map to obtain the edge intensity map, including the following steps:

[0093] Phase Consistency Map Although robust to illumination, it also responds to fine textures. To distinguish between real edges and textures / noise, we further analyzed the variation of phase consistency with scale:

[0094] For a true step edge, its corresponding local amplitude at multiple scales It maintains high values ​​in both phase-consistent response and is therefore able to consistently produce strong responses across all scales;

[0095] For noise or fine textures, the corresponding local amplitude The phase-consistent response is mainly concentrated at small scales and weakens rapidly as the scale increases;

[0096] Based on the above, a new edge strength metric is defined. :

[0097]

[0098]

[0099] in, This is an edge intensity map. For phase consistency diagram, The standard deviation is the scale. For pixels In all The mean of phase consistency across multiple scales, To prevent extremely small positive numbers with a denominator of zero, Scale consistency factor;

[0100] For true edges, the responses at each scale are similar, the standard deviation is small, and the scale consistency factor approaches 1;

[0101] For noise, a large standard deviation and a scale consistency factor close to 0 effectively suppress noise edges;

[0102] The edge intensity map obtained through step S3 combines the phase consistency response with the scale consistency factor, which can preserve the real physical edges of the continuous response at each scale and suppress textures, noise and pseudo edges that only appear at small scales, making the output results cleaner and more accurate, and enhancing the ability to resist noise and texture interference.

[0103] S4. Obtain the edge intensity map, and use the improved local extremum method to locate potential edge points and obtain sub-pixel edge points, specifically:

[0104] Edge intensity map initial edge pixels By performing a quadratic polynomial fitting on the local edge intensity distribution along its normal direction, the edge intensity map is obtained. The peak position, and the coordinates corresponding to the peak position are sub-pixel coordinates. The edge point determined by the sub-pixel coordinates is called the sub-pixel edge point.

[0105] The normal direction can be determined by the direction of maximum response. Determined, at a certain pixel At point n, calculate the maximum phase coherence response value in the filtering direction. that direction This is the direction of maximum response for this pixel. ;

[0106] The sub-pixel edge point data obtained in step S4 corresponds to the precise location of the edge intensity peak, which can improve the edge positioning from the pixel level to the sub-pixel level, improve the accuracy of the straight line fitting parameters, and improve the accuracy of subsequent geometric measurement, size calculation and target positioning.

[0107] S5. Line filtering based on ordinal space

[0108] like Figure 3 As shown, sub-pixel edge points are fitted into straight lines, and then filtered based on spatial order to achieve accurate edge line extraction. This includes the following steps:

[0109] S501. Cluster multiple sub-pixel coordinates into line segments using least squares. Each straight line segment, in addition to geometric parameters In addition, the average edge strength along the line is also included. ;

[0110] S502. Extract edge line numbers based on the reference scan lines and establish their spatial association with the detected straight line segments, then perform the following analysis:

[0111] 1) Construct ordinal scan lines: Based on the user-specified region of interest and approximate direction, automatically generate one or more reference scan lines (the scan lines should be perpendicular to the target family of lines).

[0112] Furthermore, the region of interest (ROI) refers to a local image sub-region specified by the user that contains the edge of the target line to be detected (i.e., a manually defined or preset ROI window), which is used to limit the generation range of the scan line, avoid blindly searching in the entire image, and thus concentrate computing resources on the effective area where the target line is located.

[0113] The general direction is the overall orientation of the target line edge within the region of interest (i.e., the angle of inclination of the line), such as the horizontal direction (approximately 0°), the vertical direction (approximately 90°), or a specific tilt angle;

[0114] 2) Sampling and Peak Detection: Along the scan line, the edge intensity map is sampled. Sampling was performed to obtain a one-dimensional intensity curve. ;

[0115] 3) Ordinal assignment: for one-dimensional intensity curves Peak detection is performed, and the detected peaks are assigned physical ordinal numbers according to their spatial order along the scan line (e.g., from left to right, from top to bottom). ;

[0116] 4) Line Segment Matching and Output: Establish the correspondence between peak positions and detected line segments, and match the peak positions with the detected line segments. Spatial correlation is performed. For example, when a user requests "the second edge line", the system finds the peak position with a physical ordinal number of 2 and outputs the straight line segment associated with that position. Full parameters ;

[0117] S503. When the user needs to extract the "strongest edge line", the system does not need to perform ordinal scanning, but only needs to collect all detected straight line segments. In the middle, compare their average edge strength ,choose Output the line segment with the largest value; because It is derived from phase consistency, therefore the strongest edge line has illumination invariance and is the strongest structural edge in a physical sense;

[0118] By obtaining the set of line segments, the average edge intensity along the line, the one-dimensional intensity curve, the peak ordinal number, and the line segment parameters corresponding to the user-specified ordinal number through step S5, a mapping relationship can be established from the "Nth edge line" or "strongest edge line" instruction to the specific line parameters. This reduces the need for manual ROI drawing and complex geometric screening, improves the automation and debugging efficiency in repeated parallel structure measurements, and at the same time, the average edge intensity derived based on phase consistency enables the "strongest edge line" to have physical structural stability, rather than being simply equivalent to the edge with the maximum gray-scale gradient.

[0119] Example 2: A visual line-finding system based on multi-scale phase consistency and ordinal constraints, comprising:

[0120] An image denoising preprocessing system receives an original grayscale image and performs denoising preprocessing on the original grayscale image to obtain a preprocessed image.

[0121] The phase consistency calculation system performs frequency domain analysis on the preprocessed image based on the Log-Gabor filter bank to obtain the even-symmetric filter response and odd-symmetric filter response, and calculates the local amplitude and local phase under scale and direction, thereby establishing a phase consistency map;

[0122] The noise texture suppression system receives a phase consistency map and local amplitudes corresponding to multiple scales, calculates a scale consistency factor, and combines it with the phase consistency map to generate an edge intensity map.

[0123] The edge point localization system finds the peak position of edge intensity along the edge normal direction based on the local extreme value distribution in the edge intensity map, and determines the sub-pixel coordinates corresponding to the peak by quadratic polynomial fitting, thereby obtaining the sub-pixel edge point.

[0124] The ordinal space-based line filtering system clusters and fits multiple sub-pixel coordinates into line segments, generates ordinal scan lines, samples the edge intensity map and detects peaks along the ordinal scan lines, and then establishes a spatial association between the peak positions and the detected line segments, thereby outputting the line segments corresponding to the user-specified ordinal number.

[0125] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A visual line-finding method based on multi-scale phase consistency and ordinal constraints, characterized in that, Includes the following steps: S1. Denoise the original grayscale image to obtain the preprocessed image; S2. Image decomposition based on the Log-Gabor filter bank includes the following steps: (1) Construct a Log-Gabor filter bank, which contains m scales and n directions; (2) After performing Fourier transform on the preprocessed image, filter it, and then perform inverse Fourier transform on the filtering result to obtain the even-symmetric filter response and the odd-symmetric filter response. (3) Using the even-symmetric filter response and the odd-symmetric filter response as the basic data of local frequency domain features, calculate the local amplitude and local phase under scale and direction, and obtain the phase offset by the degree of deviation of the local phase from the average phase. Finally, establish a phase consistency map based on the phase offset and the local amplitude. S3. Read the local amplitudes corresponding to m scales, perform texture suppression and noise filtering on the phase consistency map, and obtain the edge intensity map; S4. Obtain the edge intensity map and use the improved local extremum method to accurately locate potential edge points and obtain sub-pixel edge points; S5. Cluster sub-pixel edge points into straight line segments and determine the spatial order of edge peaks based on ordinal scan lines to achieve edge line extraction.

2. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 1, characterized in that, In step (1), the Log-Gabor filter exhibits a Gaussian distribution on a logarithmic frequency scale, and its transfer function is defined in the frequency domain as: ; in, Let be the transfer function of the Log-Gabor filter in the j-th direction in the frequency domain. For frequency, For the center frequency, Let be the direction angle of the j-th filter. For frequency bandwidth parameters, Here, j is the directional bandwidth parameter, and j is the directional index. It is a natural exponential function. It is the natural logarithm function.

3. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 2, characterized in that, In step (2), the preprocessed image Perform Fourier transform to obtain For each scale and direction The corresponding Log-Gabor filter is used for filtering to obtain the filtering result: ; in, This represents the filtering result at the m-th scale and in the n-th direction. Fourier transform for preprocessed images, For the corresponding scale direction, use a Log-Gabor filter; For the filtering results Performing the inverse Fourier transform yields a pair of orthogonal components: the even-symmetric filter response. Sum of odd symmetric filter responses .

4. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 3, characterized in that, In step (3), the formula for calculating the local amplitude is: ; in, Let be the local amplitude of the pixel at the m-th scale and in the n-th direction. For even-symmetric filter response, It is an odd-symmetric filter response; The formula for calculating the local phase is: ; The formula for calculating the phase offset is: ; in, The local phase at the m-th scale and in the n-th direction. It is the arctangent function in the fourth quadrant. For even-symmetric filter response, For odd-symmetric filter responses, Let m be the phase offset in the m-th scale and n-th direction. This is the weighted average phase.

5. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 4, characterized in that, In step (3), the formula for calculating phase consistency is: ; in, For phase consistency in direction n, For frequency spread weighting function, The noise compensation threshold in direction n. To prevent extremely small positive numbers with a denominator of zero; The phase consistency responses in all directions are fused to obtain the final phase consistency map. .

6. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 1, characterized in that, In step S3, an edge strength metric is defined. The formula is: ; ; in, This is an edge intensity map. For phase consistency diagram, The standard deviation is the scale. For pixels In all The mean of phase consistency across multiple scales, To prevent extremely small positive numbers with a denominator of zero, This is the scale consistency factor.

7. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 1, characterized in that, Step S4 specifically involves: processing the edge intensity map. initial edge pixels By performing a quadratic polynomial fitting on the local edge intensity distribution along its normal direction, the edge intensity map is obtained. The peak position, and the coordinates corresponding to the peak position are sub-pixel coordinates. The edge point determined by the sub-pixel coordinates is called the sub-pixel edge point.

8. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 1, characterized in that, Step S5 specifically involves: S501. Cluster the i sub-pixel coordinates into line segments using least squares. Each straight line segment, in addition to geometric parameters In addition, the average edge strength along the line is also included. ; S502. Extract the edge line number based on the reference scan line and establish its spatial association with the detected straight line segment; S503, Set of all detected line segments In the middle, compare their average edge strength ,choose Output the line segment with the largest value.

9. The visual line-finding method based on multi-scale phase consistency and ordinal constraints according to claim 8, characterized in that, In step S502, edge line numbers are extracted based on the reference scan lines, and their spatial association with the detected straight line segments is established. The following analysis is then performed: 1) Generate N reference scan lines; 2) Along the scan line, check the edge intensity map. Sampling was performed to obtain a one-dimensional intensity curve. ; 3) For one-dimensional intensity curves Peak detection is performed, and the detected peaks are assigned physical ordinal numbers according to their spatial order along the scan line. ; 4) Establish the correspondence between the peak position and the detected straight line segment, and match the peak position with the detected straight line segment. Perform spatial association.

10. A visual line-finding system based on multi-scale phase consistency and ordinal constraints, characterized in that, The system is used in the visual line-finding method based on multi-scale phase consistency and ordinal constraints as described in any one of claims 1-9, and the system comprises: An image denoising preprocessing system receives an original grayscale image and performs denoising preprocessing on the original grayscale image to obtain a preprocessed image. The phase consistency calculation system performs frequency domain analysis on the preprocessed image based on the Log-Gabor filter bank to obtain the even-symmetric filter response and odd-symmetric filter response, and calculates the local amplitude and local phase under scale and direction, thereby establishing a phase consistency map; The noise texture suppression system receives a phase consistency map and local amplitudes corresponding to multiple scales, calculates a scale consistency factor, and combines it with the phase consistency map to generate an edge intensity map. The edge point localization system finds the peak position of edge intensity along the edge normal direction based on the local extreme value distribution in the edge intensity map, and determines the sub-pixel coordinates corresponding to the peak by quadratic polynomial fitting, thereby obtaining the sub-pixel edge point. The ordinal space-based line filtering system clusters and fits multiple sub-pixel coordinates into line segments, generates ordinal scan lines, samples the edge intensity map and detects peaks along the ordinal scan lines, and then establishes a spatial association between the peak positions and the detected line segments, thereby outputting the line segments corresponding to the user-specified ordinal number.