A mesh line intersection positioning method based on connected domain analysis and Gaussian fitting
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI INT CENT FOR APPLIED SUPERCONDUCTIVITY
- Filing Date
- 2026-01-21
- Publication Date
- 2026-06-30
Smart Images

Figure CN121962261B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision and image processing technology, and more specifically to a method and system for locating grid line intersections based on connected component analysis and Gaussian fitting. Background Technology
[0002] Mesh structures are common in various engineering and scientific fields. In machine vision and image processing applications, accurately obtaining the coordinates of mesh intersections is fundamental to many key technologies. Traditional methods mainly rely on edge detection and corner detection techniques, such as the Canny operator and Harris corner detection, to achieve intersection localization. However, these traditional methods often have the following limitations: localization accuracy is limited to the pixel level, making it difficult to achieve sub-pixel level precise localization, which affects the accuracy of subsequent analysis and applications; there is a lack of systematic understanding of the overall mesh structure, making it difficult to establish complete correlations, resulting in insufficient robustness in complex scenarios; and the methods sometimes rely on manual intervention and parameter adjustment, resulting in low automation and limiting their application in large-scale or real-time scenarios.
[0003] Therefore, there is an urgent need for a grid intersection positioning method that is highly accurate, robust, and capable of forming complete grid relationships, applicable to multiple scenarios, in order to meet the increasing demands for accuracy and automation in practical applications. Summary of the Invention
[0004] In view of this, the present invention provides a grid intersection point localization method based on connected component analysis and Gaussian fitting. By establishing the grid structure correlation characteristics through connected component processing technology, and combining it with the Gaussian fitting algorithm, the method achieves sub-pixel level accurate localization of grid intersection points. This method can effectively improve the extraction accuracy and reliability of grid intersection point coordinates and is applicable to various image measurement and analysis tasks that require accurate grid localization. In addition, the invention innovatively establishes an automatic grid corner point identification and region correlation mapping mechanism, providing a new approach and technical support for accurate measurement and analysis in related fields.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for locating grid line intersections based on connected component analysis and Gaussian fitting includes:
[0007] Step 1: Acquire the grid image and preprocess it to obtain a clean grid image;
[0008] Step 2: Enhance and extract edge features from the clean mesh image to obtain the optimized edge mesh unit region image;
[0009] Step 3: Perform connected component analysis, sorting, and corner point recognition on the optimized edge grid cell region image to obtain the overall sequence map of the edge grid cell region;
[0010] Step 4: Establish regional association mapping relationships for the overall sequence diagram of the edge grid cell regions;
[0011] Step 5: Perform Gaussian fitting based on the regional correlation mapping relationship to accurately locate the intersection point and obtain its coordinates;
[0012] Step 6: Obtain the optimized grid intersection coordinates by solving the analytical intersection points of adjacent horizontal and vertical grid lines.
[0013] Preferably, step 1 includes the following steps:
[0014] For a grid image with a white background and black lines, grayscale inversion is performed to convert the grid lines into bright features. The inverted image is then smoothed and filtered, followed by binarization and thresholding. Finally, connected component analysis is used to process the image, find all connected components, label them, calculate the feature value of each connected component, and filter the grid regions based on the feature values to obtain a clean grid image.
[0015] Preferably, step 2 includes the following steps:
[0016] The clean mesh image is dilated and eroded respectively, and the difference is calculated to obtain an image C that simultaneously contains the mesh edge lines and the partial area of the edge mesh cells;
[0017] The pure grid image is inverted and then processed with image C. The minimum value of the gray values at the same position is taken to obtain image D.
[0018] A second connected component analysis is performed on image D, and singular points are filtered out based on area thresholds to obtain the optimized edge grid cell region image D1.
[0019] Preferably, step 3 includes the following steps:
[0020] Connectivity analysis was performed on the optimized edge grid cell region image D1 to obtain the center coordinates of each edge grid cell region. By performing connected component processing on image C, the center coordinates of the regions containing both grid edge lines and edge grid cells are obtained. ;
[0021] Based on the obtained center coordinates and center coordinates By performing region sorting and corner point identification, a total sequence map of edge grid cell regions is obtained.
[0022] Preferably, step 4 includes the following steps:
[0023] Based on the overall sequence diagram of the edge grid unit region, the corner point positions are recorded, and the center positions of the left and right corner points of the upper half of the edge grid unit region are set as follows: The center positions of the left and right corner points of the lower half edge grid cell region are respectively ,
[0024] Let the serial number be The serial number of the area corresponding to the line area ,
[0025] when hour,
[0026] ;
[0027] Among them, l u Indicates the total amount in the upper small region, l d Indicates the total amount in the lower half of the small and medium-sized areas; l u +l d This represents the total number of small regions in the entire image;
[0028] when season ,but The corresponding connecting areas for:
[0029] ;
[0030] In the above formula, for the center position of the left corner point region of the upper boundary The corresponding point of its horizontal line has been determined to be the right corner of the upper boundary. For the center position of the right corner point area of the upper boundary The corresponding point of its vertical line has been determined to be the right corner point of the lower boundary. ;
[0031] At the same time, separately Vertical line corresponding points , Horizontal connection corresponding points In the serial number Record this information and find the corresponding line region numbers for all edge grid cell regions. .
[0032] Preferably, step 5 includes:
[0033] Based on the edge grid cell region, the center point of each edge grid cell small region and its corresponding line region are connected to form a scanning line. The intersection of this line with the grid line produces multiple intersection points. The pixel grayscale distribution along the scanning line is analyzed, and the intersection point position is determined according to the brightness and darkness characteristics of the grid.
[0034] Using the peak coordinate position as the initial estimate of the intersection point, and using this position as the center, expand to the left and right along the scan line direction until the gray value tends to stabilize, thus determining the fitting interval. , in the interval Inside, the gray-level distribution is fitted using a Gaussian function:
[0035] ;
[0036] Where A is the amplitude parameter, The mean, Standard deviation, This is the offset compensation adjustment amount;
[0037] Fitting After obtaining the coordinate values, the corresponding y-coordinates are calculated by combining them with the equation of the scanning line to obtain the intersection coordinates with sub-pixel precision.
[0038] Preferably, step 6 includes:
[0039] After obtaining the intersection coordinates, the intersection coordinates are automatically classified into the corresponding horizontal grid line group and vertical grid line group according to the spatial distribution characteristics of the intersection coordinates. Using the intersection set of each grid line group, the equation of the line where each grid line is located is obtained by fitting method. By solving the analytical intersection of adjacent horizontal grid lines and vertical grid lines, the optimized grid intersection coordinates are finally obtained.
[0040] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a grid line intersection point location method based on connected component analysis and Gaussian fitting, which has the following significant advantages:
[0041] Based on connected component feature analysis and region filtering, it effectively resists noise interference and background complexity; through a multi-step image processing workflow, it adapts to various application scenarios with changing grid shapes.
[0042] An innovative mechanism for automatic identification of grid corners and regional correlation mapping was established, enabling a complete understanding of the correlation relationships in the grid structure and providing a structured data foundation for subsequent analysis.
[0043] From extracting the grid region to outputting the final intersection coordinates, the entire process is basically automated, reducing the need for manual intervention and improving processing efficiency.
[0044] By globally fitting grid lines and optimizing intersection points, local positioning errors are eliminated, ensuring the geometric regularity of the grid structure and the uniformity of intersection point distribution, thus providing high-quality grid data.
[0045] The method does not depend on specific mesh parameters and is applicable to various scenarios with different scales and deformations;
[0046] Sub-pixel level intersection point localization is achieved by using a Gaussian fitting model, which has higher localization accuracy than traditional pixel-level methods.
[0047] This invention effectively solves the key technical problem of accurate positioning of grid intersections through a systematic image processing workflow and innovative algorithm design, providing a new approach and reliable technical support for accurate measurement and analysis in related fields.
[0048] The mesh structure of this invention typically possesses good regional connectivity and exhibits significant differences in geometric features and grayscale distribution compared to the surrounding background environment. Specifically, the mesh area is relatively fixed, presents a periodic distribution pattern of alternating light and dark areas, and the pixels within the mesh units have the same or similar grayscale / color characteristics, exhibiting a closely adjacent arrangement in space. Attached Figure Description
[0049] 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0050] Figure 1 The method flowchart provided by the present invention.
[0051] Figure 2 A grid image with a white background and black lines provided for this invention.
[0052] Figure 3 The image after grayscale inversion processing provided by this invention.
[0053] Figure 4 The image after smoothing and denoising provided by this invention.
[0054] Figure 5 A clean grid image A is provided for this invention.
[0055] Figure 6 Image C, provided for this invention, simultaneously includes grid edge lines and partial regions of edge grid cells.
[0056] Figure 7The optimized edge grid cell region image D1 is provided for this invention.
[0057] Figure 8 The overall sequence diagram of the edge grid unit region provided by the present invention.
[0058] Figure 9 The scanning line diagram provided for this invention.
[0059] Figure 10 The fitting intersection diagram provided by this invention.
[0060] Figure 11 The present invention provides a method for classifying intersections into corresponding horizontal and vertical grid line groups.
[0061] Figure 12 The optimized grid intersection coordinate diagram provided by this invention. Detailed Implementation
[0062] 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.
[0063] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a method for accurate location of grid intersections based on connected component analysis and Gaussian fitting. Specific objectives include:
[0064] Achieve sub-pixel-level precise positioning of grid intersections, significantly improving positioning accuracy;
[0065] Enhance the robustness of grid detection and effectively overcome the influence of the external environment;
[0066] Establish complete mesh relationships to achieve a comprehensive understanding of the mesh structure;
[0067] It reduces the need for manual intervention and enables automated identification and processing;
[0068] To adapt to various scenarios with different scales and deformations, and improve the versatility of the method.
[0069] like Figure 1 As shown, this embodiment of the invention discloses a method for locating grid line intersections based on connected component analysis and Gaussian fitting, including:
[0070] Step 1: Acquire the grid image and preprocess it to obtain a clean grid image;
[0071] Step 2: Enhance and extract edge features from the clean mesh image to obtain the optimized edge mesh unit region image;
[0072] Step 3: Perform connected component analysis, sorting, and corner point recognition on the optimized edge grid cell region image to obtain the overall sequence map of the edge grid cell region;
[0073] Step 4: Establish regional association mapping relationships for the overall sequence diagram of the edge grid cell regions;
[0074] Step 5: Perform Gaussian fitting based on the regional correlation mapping relationship to accurately locate the intersection point and obtain its coordinates;
[0075] Step 6: Obtain the optimized grid intersection coordinates by solving the analytical intersection points of adjacent horizontal and vertical grid lines.
[0076] Specifically, step 1 includes the following process:
[0077] For a grid image with a white background and black lines, grayscale inversion is performed to convert the grid lines into bright features. The inverted image is then smoothed and filtered, followed by binarization and thresholding. Finally, connected component analysis is used to process the image, find all connected components, label them, calculate the feature value of each connected component, and filter the grid regions based on the feature values to obtain a clean grid image.
[0078] In a specific embodiment of the present invention, for a grid image with a white background and black lines, grayscale inversion processing is first performed to convert the grid lines into bright features:
[0079] ;
[0080] in This represents the maximum gray level of an 8-bit grayscale image. .
[0081] Figure 2 A grid image with a white background and black lines. Figure 3 This is the image after grayscale inversion;
[0082] Perform a standard smoothing filter operation, such as Gaussian filtering, on the inverted image to achieve smoothing and noise reduction. Figure 4 The image shown is the image after smoothing filtering. This step can be selected or not depending on the quality of the image acquisition data.
[0083] The smoothed image is binarized and thresholded. Then, common connected component analysis methods, such as the bwlabel function in MATLAB, are used to process the image, find all connected components and label them, calculate various feature values for each connected component, and filter grid regions based on the feature values.
[0084] like Figure 5 As shown in the image, it is clear that the connected component area of the grid region is the largest. Therefore, based on the area feature, the largest connected region is selected as the main grid region, and the non-grid regions are set to zero to obtain a clean grid image A. In addition, users can choose an appropriate method to filter out the grid region according to the specific characteristics of the grid region.
[0085] Specifically, step 2 includes the following process:
[0086] The clean mesh image is dilated and eroded respectively, and the difference is calculated to obtain an image C that simultaneously contains the mesh edge lines and the partial area of the edge mesh cells;
[0087] The pure grid image is inverted and then processed with image C. The minimum value of the gray values at the same position is taken to obtain image D.
[0088] A second connected component analysis is performed on image D, and singular points are filtered out based on area thresholds to obtain the optimized edge grid cell region image D1.
[0089] In a specific embodiment of the present invention, a clean mesh image A is subjected to dilation and erosion respectively. The image obtained after dilation is denoted as B1, and the image obtained after erosion is denoted as B2; the difference is used to calculate:
[0090] ;
[0091] An image C can be obtained that simultaneously contains grid edge lines and partial regions of edge grid cells. Figure 6 As shown.
[0092] Furthermore, image A is inverted and then processed with image C. The minimum value of the gray values at the same position is taken to obtain image D.
[0093] ;
[0094] Among them, The maximum value of the image's grayscale level;
[0095] Performing quadratic connected component analysis on image D, and filtering out singularities based on area thresholds, yields the optimized edge grid cell region image D1, as shown below. Figure 7 As shown.
[0096] Specifically, step 3 includes the following processes:
[0097] Connectivity analysis was performed on the optimized edge grid cell region image D1 to obtain the center coordinates of each edge grid cell region. By performing connected component processing on image C, the center coordinates of the regions containing both grid edge lines and edge grid cells are obtained. ;
[0098] Based on the obtained center coordinates and center coordinates By performing region sorting and corner point identification, a total sequence map of edge grid cell regions is obtained.
[0099] In a specific embodiment of the present invention, connected component analysis is performed on image D1 to obtain the center coordinates of each edge grid cell region. , Indicates the first Small regions; perform connected component processing on image C to obtain the center coordinates of regions that simultaneously contain grid edge lines and edge grid cells. .
[0100] Based on whether the relative positional relationship is satisfied: The edge grid cell region is divided into upper and lower parts, with the coordinates of the center point of the upper part as follows: , Here, ui represents a sequence number for each sub-region in the upper half. Similarly, di represents a sequence number for each sub-region in the lower half.
[0101] Coordinates of the center point of the lower half of the region: , ;
[0102] Let vector , Unit horizontal vector ;
[0103] Calculate the orientation angle of each region relative to the horizontal reference using the formula;
[0104] ;
[0105] ;
[0106] right Sort in ascending order Sort the edge grid cells from largest to smallest to obtain the sorting of the upper and lower edge grid cell regions. Using the sorting method above, find the coordinates of the corresponding region center points and combine them to obtain the coordinate matrix of the upper part.
[0107] ;
[0108] Lower half of the coordinate matrix:
[0109] ;
[0110] right The coordinate values in the second column are calculated twice consecutively using the following formula:
[0111] ;
[0112] ;
[0113] Obtain the matrix ,
[0114] Similarly, we can obtain ;
[0115] Based on the characteristic of large jumps in the difference results at the corner points, respectively... , Sort the absolute values of the coordinates in the matrix from largest to smallest, and calculate the coordinates of the two largest values in the matrix. , The corresponding row number is used to obtain the position number of the four corner points.
[0116] At the same time, in order to maintain unity, Based on the sorting sequence number, add Total quantity Then you can obtain the overall sequence diagram of the entire edge grid cell region, such as... Figure 8 As shown, and using the aforementioned method, the corner positions can be automatically identified, for example, as shown in the attached image. Figure 8 In the given situation, the corner positions are 13, 37, 61, and 85 respectively.
[0117] Specifically, step 4 includes the following process:
[0118] Based on the overall sequence diagram of the edge grid unit region, the corner point positions are recorded, and the center positions of the left and right corner points of the upper half of the edge grid unit region are set as follows: The center positions of the left and right corner points of the lower half edge grid cell region are respectively ,
[0119] Let the serial number be The serial number of the area corresponding to the line area ,
[0120] when hour,
[0121] ;
[0122] Among them, l u Indicates the total amount in the upper small region, l dIndicates the total amount in the lower half of the small and medium-sized areas; l u +l d This represents the total number of small regions in the entire image;
[0123] when season ,but The corresponding connecting areas for:
[0124] ;
[0125] In the above formula, for the center position of the left corner point region of the upper boundary The corresponding point of its horizontal line has been determined to be the right corner of the upper boundary. For the center position of the right corner point area of the upper boundary The corresponding point of its vertical line has been determined to be the right corner point of the lower boundary. ;
[0126] At the same time, separately Vertical line corresponding points , Horizontal connection corresponding points In the serial number Record this information and find the corresponding line region numbers for all edge grid cell regions. .
[0127] Specifically, step 5 includes:
[0128] Based on the edge grid cell region, the center point of each edge grid cell small region and its corresponding line region are connected to form a scanning line. The intersection of this line with the grid line produces multiple intersection points. The pixel grayscale distribution along the scanning line is analyzed, and the intersection point position is determined according to the brightness and darkness characteristics of the grid.
[0129] Using the peak coordinate position as the initial estimate of the intersection point, and using this position as the center, expand to the left and right along the scan line direction until the gray value tends to stabilize, thus determining the fitting interval. , in the interval Inside, the gray-level distribution is fitted using a Gaussian function:
[0130] ;
[0131] Where A is the amplitude parameter, The mean, Standard deviation, This is the offset compensation adjustment amount;
[0132] Fitting After obtaining the coordinate values, the corresponding y-coordinates are calculated by combining them with the equation of the scanning line to obtain the intersection coordinates with sub-pixel precision.
[0133] In a specific embodiment of the present invention, based on the established grid relationship, the center point of each edge grid cell's small region is connected to its corresponding line region to form a scanning straight line. This straight line intersects the grid lines to generate multiple intersection points. The pixel grayscale distribution along the scanning straight line is analyzed, and the intersection point positions are determined based on the grid's brightness characteristics.
[0134] When the grid line represents a bright area and the grid cell represents a dark area, the intersection point corresponds to the peak position of the gray-level distribution; when the grid line represents a dark area and the grid cell represents a bright area, the intersection point corresponds to the trough position of the gray-level distribution. The scan line is shown in the attached diagram. Figure 9 As shown
[0135] Furthermore, after finding the peak coordinates, this is used as the initial estimate of the intersection point. Using this position as the center, the range is expanded to the left and right along the scan line direction until the gray value tends to stabilize, thus determining the fitting interval. , in the interval Internally, a Gaussian function is used to fit the gray-level distribution:
[0136] ;
[0137] Where A is the amplitude parameter, corresponding to the grayscale extreme value amplitude, which is adjusted according to the actual grayscale distribution. The mean, Standard deviation, Offset compensation adjustment amount
[0138] Fitting After obtaining the coordinate values, the corresponding y-coordinate is calculated using the equation of the scanning line, thus obtaining the intersection coordinates with sub-pixel precision. The found intersection points are as follows: Figure 10 As shown.
[0139] Specifically, step 6 includes:
[0140] After obtaining the intersection coordinates, the intersection coordinates are automatically classified into the corresponding horizontal grid line group and vertical grid line group according to the spatial distribution characteristics of the intersection coordinates. Using the intersection set of each grid line group, the equation of the line where each grid line is located is obtained by fitting method. By solving the analytical intersection of adjacent horizontal grid lines and vertical grid lines, the optimized grid intersection coordinates are finally obtained.
[0141] In a specific embodiment of the present invention, after obtaining the coordinates of all intersection points, the intersection points are automatically classified into corresponding horizontal grid line groups and vertical grid line groups based on the spatial distribution characteristics of the intersection point coordinates. Using the set of intersection points for each grid line group, the equation of the line containing each grid line is obtained using common fitting methods such as the least squares method. Figure 11 As shown. By solving the analytical intersection points of adjacent horizontal and vertical grid lines, the optimized grid intersection point coordinates are finally obtained, as shown. Figure 12 As shown.
[0142] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0143] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for locating grid line intersections based on connected component analysis and Gaussian fitting, characterized in that, include: Step 1: Acquire the grid image and preprocess it to obtain a clean grid image; Step 2: Enhance and extract edge features from the clean mesh image to obtain the optimized edge mesh unit region image; Step 3: Perform connected component analysis, sorting, and corner point recognition on the optimized edge grid cell region image to obtain the overall sequence map of the edge grid cell region; Step 4: Establish regional association mapping relationships for the overall sequence map of the edge grid cell regions; the process includes: Based on the overall sequence diagram of the edge grid unit region, the corner point positions are recorded, and the center positions of the left and right corner points of the upper half of the edge grid unit region are set as follows: The center positions of the left and right corner points of the lower half edge grid cell region are respectively , Let the serial number be The serial number of the connected area corresponding to the region , when hour, ; Among them, l u Indicates the total amount in the upper small region, l d Indicates the total amount in the lower half of the small and medium-sized areas; l u +l d This represents the total number of small regions in the entire image; when season ,but The corresponding connecting areas for: ; In the formula, the center position of the left corner point region of the upper boundary The corresponding point of its horizontal line has been determined to be the right corner of the upper boundary. For the center position of the right corner point area of the upper boundary The corresponding point of its vertical line has been determined to be the right corner point of the lower boundary. ; At the same time, separately Vertical line corresponding points , Horizontal connection corresponding points In the serial number Record this information and find the corresponding line region numbers for all edge grid cell regions. ; Step 5: Perform Gaussian fitting based on the regional correlation mapping relationship to accurately locate the intersection point and obtain its coordinates; Step 6: Obtain the optimized grid intersection coordinates by solving the analytical intersection points of adjacent horizontal and vertical grid lines.
2. The grid line intersection point location method based on connected component analysis and Gaussian fitting according to claim 1, characterized in that, The process of step 1 includes: For a grid image with a white background and black lines, grayscale inversion is performed to convert the grid lines into bright features. The inverted image is then smoothed and filtered, followed by binarization and thresholding. Finally, connected component analysis is used to process the image, find all connected components, label them, calculate the feature value of each connected component, and filter the grid regions based on the feature values to obtain a clean grid image.
3. The grid line intersection point location method based on connected component analysis and Gaussian fitting according to claim 2, characterized in that, Step 2 includes the following process: The clean mesh image is dilated and eroded respectively, and the difference is calculated to obtain an image C that simultaneously contains the mesh edge lines and the partial area of the edge mesh cells; The pure grid image is inverted and then processed with image C. The minimum value of the gray values at the same position is taken to obtain image D. A second connected component analysis is performed on image D, and singular points are filtered out based on area thresholds to obtain the optimized edge grid cell region image D1.
4. The grid line intersection point location method based on connected component analysis and Gaussian fitting according to claim 3, characterized in that, Step 3 includes the following process: Connectivity analysis was performed on the optimized edge grid cell region image D1 to obtain the center coordinates of each edge grid cell region. By performing connected component processing on image C, the center coordinates of the regions containing both grid edge lines and edge grid cells are obtained. ; Based on the obtained center coordinates and center coordinates By performing region sorting and corner point identification, a total sequence map of edge grid cell regions is obtained.
5. The grid line intersection point location method based on connected component analysis and Gaussian fitting according to claim 1, characterized in that, Step 5 includes: Based on the edge grid cell region, the center point of each edge grid cell small region and its corresponding line region are connected to form a scanning line. The intersection of this line with the grid line produces multiple intersection points. The pixel grayscale distribution along the scanning line is analyzed, and the intersection point position is determined according to the brightness and darkness characteristics of the grid. Using the peak coordinate position as the initial estimate of the intersection point, and using this position as the center, expand to the left and right along the scan line direction until the gray value tends to stabilize, thus determining the fitting interval. , in the interval Inside, the gray-level distribution is fitted using a Gaussian function: ; Where A is the amplitude parameter, The mean, Standard deviation, This is the offset compensation adjustment amount; Fitting After obtaining the coordinate values, the corresponding y-coordinates are calculated by combining them with the equation of the scanning line to obtain the intersection coordinates with sub-pixel precision.
6. The grid line intersection point location method based on connected component analysis and Gaussian fitting according to claim 5, characterized in that, Step 6 includes: After obtaining the intersection coordinates, the intersection coordinates are automatically classified into the corresponding horizontal grid line group and vertical grid line group according to the spatial distribution characteristics of the intersection coordinates. Using the intersection set of each grid line group, the equation of the line where each grid line is located is obtained by fitting method. By solving the analytical intersection of adjacent horizontal grid lines and vertical grid lines, the optimized grid intersection coordinates are finally obtained.