Sub-pixel Size Detection Method and System for PIN Pins Images of Ceramic Antennas

Through machine vision technology, combined with Zhang's calibration method and deep learning framework, sub-pixel size detection of ceramic antenna PIN needles is solved, and the problems of slow detection speed and poor reliability in the existing technology are achieved, and fast and accurate measurement of PIN needle size is achieved.

CN115641326BActive Publication Date: 2025-05-27CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211398987.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2025-05-27
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

In the prior art, the size detection of ceramic antenna PIN needles mainly relies on artificial naked eyes and micrometers, resulting in slow detection speed, poor reliability, and easy to miss inspection.

Method used

A subpixel size detection method based on machine vision is adopted, and industrial cameras are calibrated using Zhang's calibration method. The ROI area of ​​the PIN needle image is obtained in combination with a deep learning framework, and image preprocessing and analysis are performed. Subpixel edge detection and parallel edge line fitting are realized through the improved Sobel operator and probability Hough method to calculate the diameter size of the PIN needle.

Benefits of technology

It realizes rapid and accurate measurement of ceramic antenna PIN needles under non-contact conditions. It has the characteristics of non-contact, fast speed and high accuracy, and is suitable for the needs of modern industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115641326B_ABST
    Figure CN115641326B_ABST
Patent Text Reader

Abstract

The present invention discloses a sub-pixel size detection method for the images of PIN pins of ceramic antennas. The industrial camera is calibrated by using the Zhang's calibration method, the ROI region of the PIN pin image is obtained by using the deep learning framework, image preprocessing is performed on each ROI region, image analysis and recognition are performed on the preprocessed ROI region to obtain the pixel width of the PIN pin at the ROI region, and the diameter size of the measured PIN pin at the ROI region is obtained by converting according to the pixel width of the PIN pin. The system and method of the present invention achieve the precise measurement of the size of the PIN pin under non-contact conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to an image recognition processing method and system for a needle-shaped structure in the field of visual measurement technology, and particularly relates to a sub-pixel size detection method and system for a ceramic antenna PIN needle image. Background Art

[0002] With the rapid development and application of ceramic process technology, the low-temperature co-fired ceramic technology has quickly become an important means for processing a new generation of microwave devices due to its advantages such as high assembly density, good frequency characteristics, and high batch processing consistency. Therefore, the ceramic antenna PIN needle has become a new generation of navigation antennas. The GPS ceramic antenna PIN needle, as the most important receiving component in a GPS device, plays a role equivalent to our "ears". Therefore, the quality of its external dimensions will directly affect the product quality of the entire GPS device.

[0003] Currently, most manufacturers complete the inspection by visual inspection with the naked eye supplemented by tools such as micrometers. Manual inspection is slow, unreliable, and prone to missed inspections. Machine vision is an interdisciplinary subject integrating technologies such as digital image processing, mechanical engineering, electronic engineering, optical engineering, and software engineering. Its core is to process and analyze the collected images. The size measurement method based on machine vision has the characteristics of non-contact, high speed, and high precision, meeting the requirements of modern industrial production for the measurement speed and precision of PIN needle parts. Summary of the Invention

[0004] In order to solve the problems in the background art, the purpose of the present invention is to provide a sub-pixel size detection method for a ceramic antenna PIN needle image, realizing rapid and accurate measurement of the size of a GPS ceramic antenna PIN needle under non-contact conditions.

[0005] To achieve the above purpose, the technical solution of the present invention includes:

[0006] I. A sub-pixel size detection method for a ceramic antenna PIN needle image:

[0007] 1) Calibrate the industrial camera using the Zhang calibration method;

[0008] 2) Obtain the ROI region of the PIN needle image using a deep learning framework;

[0009] 3) Perform image preprocessing on each ROI region;

[0010] 4) Perform image analysis and recognition on the preprocessed ROI region to obtain the pixel width of the PIN needle at the ROI region;

[0011] 5) Convert according to the pixel width of the PIN needle to obtain the diameter size of the measured PIN needle at the ROI region.

[0012] The described PIN pins have multiple shapes with different stepped sizes.

[0013] In a specific implementation, the PIN pins are vertically placed in the image and divided into multiple segments along the vertical direction. The diameter sizes of different segments are different, and there is a transitional connection between adjacent segments.

[0014] The industrial camera is calibrated using Zhang's calibration method, including calibrating the distortion matrix, pixel equivalent, and internal and external parameter matrices of the industrial camera using a checkerboard calibration plate with a single grid side length of unit length. The unit length is set to 1 millimeter in reality.

[0015] The specifications of the checkerboard calibration plate are 16 * 20 grids, the side length of a single grid is 1 mm, and its accuracy is 0.001 mm.

[0016] The calibration of the distortion matrix refers to obtaining a calibration map and a distortion matrix by performing distortion correction on the calibration image;

[0017] The calibration of the pixel equivalent includes: finding the corner points of the checkerboard in the calibrated image after distortion correction and saving them, respectively obtaining the pixel widths between adjacent two corner points in each row of corner points, and then taking the average to obtain the number of pixels contained in the unit length as the pixel equivalent pixelsPerMetric.

[0018] The specific implementation is a 16 * 20 checkerboard, and a total of 15 * 18 pixel width data are obtained in the checkerboard.

[0019] The specific content of step 2) includes: pre-collecting a data set for the PIN pin sample to be measured, using the labelimg tool to label the data set for pre-training the YoloX-s network, then using the PIN pin image collected by the current camera as input, and using the different measurement regions of the PIN pin output by the trained YoloX-s network model as ROI regions to obtain the coordinate information of the ROI regions, so as to distinguish multiple ROI targets in the PIN pin image.

[0020] In a specific implementation, different stepped sizes of the PIN pins are used as different ROI regions, and a region with a unified diameter size forms an ROI region.

[0021] The preprocessing of step 3) includes format conversion, grayscale processing, and Gaussian filtering and smoothing processing in sequence.

[0022] The specific content of step 4) is:

[0023] 4.1) Perform sub-pixel edge detection based on curve fitting and improved Sobel operator to obtain a sub-pixel edge map;

[0024] 4.2) Use the probabilistic Hough method to fit the parallel edge lines of the PIN pins in the sub-pixel edge map, and calculate the pixel width of the spacing between the parallel edge lines as the pixel width of the PIN pins;

[0025] The specific content of 4.1) is as follows:

[0026] 4.1.1) Process the image after Gaussian filtering and smoothing using the improved Sobel operator to obtain pixel-level edges:

[0027] First, use the improved 8-direction Sobel operator set by the following formula to obtain the gradient magnitude and direction of the ROI region, and establish the gradient map of the ROI region;

[0028]

[0029]

[0030] Among them, S 1 ~S 8 are the direction templates with gradient directions of 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315° respectively;

[0031] Then, use non-maximum suppression and double thresholds in the Canny method to refine the edges and connect strong and weak edges of the gradient map of the ROI region to obtain pixel-level edges;

[0032] 4.1.2) Then use the curve fitting method to process the pixel-level edges to extract the sub-pixel edges of the image:

[0033] Traverse the edge points on each pixel-level edge. Along the gradient direction of the current edge point on the pixel-level edge, select 30 edge points on the gradient map, and use the Gaussian function of the following formula to perform Gaussian curve fitting for sub-pixel processing to obtain the Gaussian curve. The Gaussian function is described as:

[0034]

[0035] Among them, i = 1, 2, 3,..., 20, x i is the abscissa position of the i-th edge point, z i is the gradient magnitude of the i-th edge point, z max , x max and L are the peak gradient magnitude, peak abscissa position, and half-width information respectively;

[0036] Then, find the position with the maximum gradient in the Gaussian curve through the least squares method as the edge point on the sub-pixel edge, that is, find the peak gradient magnitude z max and the peak abscissa position x max , and then according to the peak gradient magnitude zmax and the peak abscissa position x max Combine the gradient direction to find the peak ordinate position y max , thereby determining the edge point coordinates (x max , y max ) corresponding to the current edge point on the sub-pixel edge.

[0037] 4.1.3) After traversing each edge point on the pixel-level edge, all the edge points corresponding to the sub-pixel edge are obtained, and finally the sub-pixel edge is formed.

[0038] The specific steps of step 4.2) are as follows: Input the sub-pixel edge into the probabilistic Hough method for processing and transformation to extract each straight line segment. Each straight line segment returns the coordinates (x1, y1), (x2, y2) of two endpoints; Calculate the slopes among all the extracted straight line segments, and take two straight line segments with the same or closest slopes as the parallel edge lines on both sides of the PIN needle, that is, the extraction of the parallel edge lines is completed, and then calculate the pixel distance between the two straight line segments as the pixel width of the PIN needle.

[0039] The specific step 5) is to convert the pixel width of the PIN needle according to the pixel equivalent pixelsPerMetric to obtain the actual diameter size of the measured PIN needle in the ROI area.

[0040] Second, a sub-pixel size detection system for a ceramic antenna PIN needle used to implement the method. The system applies machine vision to PIN needle measurement:

[0041] Image acquisition and display module, used to acquire the image of the measured PIN needle, preprocess the image and display the measurement results;

[0042] ROI extraction module, used to obtain the ROI area of the PIN needle by the deep learning framework and eliminate redundant image information;

[0043] Camera calibration module, used to calibrate the internal and external parameter matrices, distortion matrix and pixel equivalent of the industrial camera by the Zhang's calibration method;

[0044] Measurement module, used for sub-pixel edge detection and fitting the parallel edge lines of the part in the sub-pixel edge map by the probabilistic Hough method, and calculating the distance between the parallel edge lines;

[0045] Parameter monitoring and saving module, used to track the measurement progress in real time, display key parameters, and save the parameters locally.

[0046] Compared with the prior art, the above one or more technical solutions have the following beneficial effects:

[0047] The technical solution of the present disclosure uses an industrial camera to measure the size of PIN pins. Combining traditional image processing and deep learning technologies, it detects the ROI area to be measured and measures the size of the PIN pin images collected by the camera. According to the specification requirements and acceptance standards of actual factory production, it compares and analyzes the measurement data to obtain the PIN pin size measurement result, which has the characteristics of non-contact, high speed, and high precision, and has good industrial application value.

[0048] The technical solution of the present disclosure calibrates the camera using the Zhang-Zhengyou calibration method with a high-precision checkerboard, and proposes a pixel equivalent calibration method based on the checkerboard, which can not only complete the distortion correction of the image in normal calibration work, but also determine the pixel equivalent to complete the measurement task of the present invention.

[0049] The technical solution of the present disclosure improves the traditional Sobel operator, constructs templates in 8 directions based on the original two directions of vertical and horizontal, and can more accurately detect the edge gradient magnitude. In addition, the sub-pixel edge localization based on Gaussian curve fitting enables this solution to further improve the accuracy at the method level, and this method has the advantages of simplicity, effectiveness, and low equipment cost.

[0050] The technical solution of the present disclosure uses the probabilistic Hough transform to fit the two side generatrices of the PIN pin to measure the diameter of the PIN pin. Aiming at the problems in line detection, a more efficient parallel edge line detection for the diameter measurement task is proposed. Description of the Drawings

[0051] Figure 1 It is a flowchart of the method for detecting the diameter size of the PIN pin in the embodiment of the present disclosure.

[0052] Figure 2 It is a flowchart of calibrating the internal and external parameters of the industrial camera in the embodiment of the present disclosure.

[0053] Figure 3 It is a statistical chart of pixel data between adjacent grids of the checkerboard pictures before and after correction in the embodiment of the present disclosure.

[0054] Figure 4 It is the target segmentation effect diagram of the trained Yolox network in the embodiment of the present disclosure.

[0055] Figure 5 It is a flowchart of the size measurement method in the embodiment of the present disclosure.

[0056] Figure 6 It is a single-edge detection diagram of the improved Sobel operator in the embodiment of the present disclosure.

[0057] Figure 7 It is a process diagram of obtaining the sub-pixel edge in the embodiment of the present disclosure.

[0058] Figure 8 This is the fitting effect diagram of the probabilistic Hough method in the embodiments of the present disclosure.

[0059] Figure 9 This is the final effect diagram in the embodiments of the present disclosure.

[0060] Figure 10 This is the experimental comparison data of the pixel-level detection system and the sub-pixel-level detection system in the embodiments of the present disclosure.

[0061] Figure 11 This is the upper computer software interface for measuring the size of the PIN needle in the embodiments of the present disclosure. Detailed implementation manners

[0062] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present disclosure belongs.

[0063] The present invention will be described in detail below with reference to the specific implementation manners shown in the drawings, but these implementation manners do not limit the present invention. Any structural, methodical, or functional transformation made by those of ordinary skill in the art based on these implementation manners is included in the protection scope of the present invention.

[0064] As Figure 1 shown, an embodiment of the present invention includes:

[0065] In a specific implementation example, for the camera calibration method, the most classic Zhang Zhengyou calibration method is selected. The specification of the checkerboard is determined to be 16 * 20 grids, the side length of a single grid is 1 mm, and its accuracy is 0.001 mm.

[0066] The calibration process is as Figure 2 shown. By taking 20 photos of the checkerboard at different angles and running the calibration program, the internal parameter matrix and the external parameter matrix of the camera can be obtained. According to the internal parameter matrix and the external parameter matrix, the conversion from the world coordinate system (X w , Y w , Z w ) to the camera coordinate system (X c , Y c , Z c ) and the conversion from the image coordinate system (X p , Y p , Z p ) to the pixel coordinate system (u, v) can be completed. The conversion relationship is as follows:

[0067]

[0068]

[0069]

[0070] With the obtained internal and external parameter matrices, the distortion correction of the images collected by the camera can be performed.

[0071] Based on the conventional Zhang calibration method, in order to meet the measurement task of the present invention, a calibration method based on the pixel equivalent of the checkerboard is proposed. Find the coordinates of the checkerboard corner points in the collected checkerboard images and save them in the Corners matrix; respectively obtain the pixel widths between two adjacent corner points in each row of corner points:

[0072]

[0073] where d pixel [i] represents the pixel distance from the (i + 1)-th corner point to the i-th corner point, represents the abscissa of the i-th corner point, represents the ordinate of the i-th corner point.

[0074] A total of 15 * 18 data are obtained in the checkerboard, and the mean value is taken to obtain the pixels included in the actual 1 mm, that is, the pixel equivalent pixelsPerMetric. The pixel data between adjacent grids of the images before and after correction are respectively statistically analyzed, and the statistical results are as Figure 3 (a)- Figure 3 (b) shown. It can be seen that the pixel fluctuation range after correction is significantly reduced. At the same time, the statistical average value before correction is 139.05, the variance is 0.570, and the standard deviation is 0.756. The average value after correction is 135.65, the variance is 0.073, and the standard deviation is 0.272. Therefore, it is determined that the pixel equivalent pixelsPerMetric = 135.65.

[0075] Pre-collect a data set for the PIN needle sample to be measured, label the data set using the labelimg tool, take the PIN needle sample image as the input, and use the YoloX-s network to train the PIN needle image sample. Input the image collected by the current camera into the YoloX-s network for prediction to obtain the target segmentation effect as Figure 4 (a)- Figure 4 (b) shown.

[0076] After the target segmentation of the measurement area of the PIN needle, immediately perform a method for measuring the size of the obtained target. The detailed process of this method is as Figure 5 shown.

[0077] Image preprocessing and sub-pixel edge detection based on curve fitting and improved Sobel operator: Convert the input image format to an image format suitable for opencv, and perform grayscale processing and Gaussian filtering on the image; Use the improved 8-direction Sobel operator shown in Equation (1) to obtain the gradient magnitude and direction of the preprocessed image;

[0078]

[0079] where S 1 ~S 8 are the direction templates with gradient directions of 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315° respectively.

[0080] Then, use the classic non-maximum suppression and double thresholds in the Canny method to refine the edges and connect the strong and weak edges to obtain the pixel-level edges as Figure 6 shown.

[0081] Select 30 points along the gradient direction of the target edge points on the single-pixel edge for Gaussian curve fitting sub-pixel calculation. The Gaussian function is described as:

[0082]

[0083] where i = 1, 2, 3,..., 20, x i is the abscissa position of the i-th point, z i is the gradient magnitude of the i-th point, z max , x max and L are the peak gradient magnitude, peak position, and half-width information respectively. Take the natural logarithm of both sides of Equation (2) to get:

[0084]

[0085] Convert it to matrix form as:

[0086]

[0087] where w i = lnz i , The above equation is abbreviated as W = XF. According to the least squares principle, the least squares solution of matrix F is:

[0088] F = (X T X) -1 X T W (5)

[0089] According to Equations (5) and (3), the peak gradient magnitude z max and the peak abscissa position xmax , and then calculate the peak ordinate position y according to the gradient direction max , and the sub-pixel edge coordinates (x max , y max ) can be determined.

[0090] Magnify the sub-pixel coordinates by ten times and round them to roughly but intuitively display its sub-pixel edge map. Then, scale the pixel sub-pixel edge map and the sub-pixel level sub-pixel edge map to the same size, and take the local edge to obtain the process of obtaining the sub-pixel edge as Figure 7 shown.

[0091] Input the sub-pixel edge into the probabilistic Hough transform for processing to extract each straight line segment.

[0092] Calculate the slope k among the extracted straight lines, retain and output each pair of straight lines with a slope error less than error = 0.01, that is, the extraction of parallel edge lines is completed. The fitting effect diagram of the probabilistic Hough method is as Figure 8 shown.

[0093] Each group of parallel edge lines returns two line segments Line1 and Line2, with a total of four endpoint coordinates (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ), (x 4 , y 4 ). Convert the endpoint coordinates of one of the line segments Line1 into the form of a straight line equation: Ax + By + C = 0.

[0094] Among them:

[0095]

[0096] Then, according to the point-line distance formula:

[0097]

[0098] Calculate the pixel distance N3 from (x3, y3) to Line1 and the pixel distance N4 from (x4, y4) to Line1 respectively, and then take the average value to obtain the pixel distance N between the extracted parallel edge lines. According to the pixel equivalent pixelsPerMetric, calculate the actual diameter size d = N / pixelsPerMetric millimeters of this part of the PIN needle.

[0099] The final effect diagram of the overall detection is as Figure 9 shown.

[0100] To prove the advantages of the present invention, this embodiment also uses a common pixel-level edge detection algorithm combined with the idea of ​​the present invention to detect the size of the PIN needle, and conducts a comparative experiment with this system. Figure 10 As shown, Figure 10 (a) is the experimental data of the pixel-level detection system. Figure 10 (b) is the experimental data of the sub-pixel detection system. From the comparison of experimental data, it can be seen that the error result obtained by comparing the measured value of the PIN needle diameter of the pixel-level detection system with the measured value of the micrometer with an accuracy of 0.001mm is within 0.02mm, and the error of the sub-pixel detection system is improved to within 0.006mm.

[0101] This embodiment also discloses a sub-pixel size detection system for ceramic antenna PIN needles, wherein the PIN needle size measurement host computer software interface is as follows: Figure 11 The system comprises:

[0102] Image acquisition and display module, used to acquire images of the PIN needle under test, pre-process the images and display the measurement results;

[0103] ROI extraction module, used in deep learning framework to obtain the ROI area of ​​PIN needle and remove redundant image information;

[0104] The camera calibration module is used to calibrate the internal and external parameter matrix, distortion matrix and pixel equivalent of industrial cameras using Zhang's calibration method;

[0105] A measurement module, which is used for sub-pixel edge detection and fitting the parallel edge lines of the parts in the sub-pixel edge map of the area to be measured using the probabilistic Hough method, and calculating the spacing information between the parallel edge lines;

[0106] The parameter monitoring and saving module is used to track the measurement progress in real time, display key parameters, and save the parameters locally.

[0107] After the above detailed implementation, the visual inspection of the GPS ceramic antenna PIN needle size can be easily carried out, and its accuracy reaches 0.006mm, which meets the inspection requirements. This method is suitable for online high-precision inspection of the GPS ceramic antenna PIN needle size and has important application value. It not only improves the stability of the visual inspection of the GPS ceramic antenna PIN needle, but also saves the cost of manual inspection and improves the efficiency and accuracy of inspection.

[0108] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

[0109] Although the specific implementation manners of the present disclosure have been described above in conjunction with the accompanying drawings, it is not a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that, based on the technical solutions of the present disclosure, various modifications or deformations that can be made without creative efforts by those skilled in the art are still within the protection scope of the present disclosure.

[0110]

[0111] ​

Claims

1. A sub-pixel size detection method for ceramic antenna PIN needle images, characterized in that, the method includes: 1) Calibrate the industrial camera using the Zhang's calibration method, including calibrating the pixel equivalent of the industrial camera using a checkerboard calibration board; The calibration of the pixel equivalent includes: finding the corner points of the checkerboard in the calibrated image after distortion correction and saving them, respectively obtaining the pixel widths between adjacent two corner points in each row of corner points, and then taking the average to obtain the number of pixels contained in the unit length as the pixel equivalent pixelsPerMetric; 2) Use the deep learning framework to obtain the ROI region of the PIN needle image; 3) Perform image preprocessing on each ROI region; 4) Perform image analysis and recognition on the preprocessed ROI region to obtain the pixel width of the PIN needle at the ROI region; The specific step 4) is: 4.1) Perform edge detection using an improved Sobel operator and Gaussian curve fitting on the preprocessed image, and take the peak of the curve fitting as the edge point coordinates corresponding to the current edge point on the sub-pixel edge, where the improved Sobel operator is: Among them, S 1 ~S 8 are direction templates with gradient directions of 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315° respectively; 4.2) Input the sub-pixel edge into the probabilistic Hough method for processing to extract each straight line segment, and each straight line segment returns the coordinates (x1, y1), (x2, y2) of the two endpoints; calculate the slopes among all the extracted straight line segments, and take two straight line segments with the same or close slopes as the parallel edge lines on both sides of the PIN needle, and then calculate the pixel distance between the two straight line segments as the pixel width of the PIN needle; 5) Convert the pixel width of the PIN needle to obtain the diameter size of the PIN needle at the ROI region.

2. A sub-pixel size detection method for ceramic antenna PIN needle images according to claim 1, characterized in that: The PIN needle has multiple shapes with different step sizes.

3. A sub-pixel size detection method for ceramic antenna PIN needle images according to claim 1, characterized in that: The calibration of the industrial camera using the Zhang's calibration method includes calibrating the distortion matrix and the internal and external parameter matrices of the industrial camera using a checkerboard calibration board.

4. A sub-pixel size detection method for ceramic antenna PIN needle images according to claim 3, characterized in that: The calibration of the distortion matrix refers to performing distortion correction on the calibration image to obtain the calibration image and the distortion matrix.

5. A sub-pixel size detection method for ceramic antenna PIN needle images according to claim 1, characterized in that: The specific step 2) includes: pre-collecting a data set for the PIN needle samples, using the labelimg tool to annotate the data set for pre-training the YoloX-s network, and then taking the PIN needle image collected by the current camera as the input, and using the different measurement regions of the PIN needle output by the trained YoloX-s network model as the ROI regions to obtain the coordinate information of the ROI regions.

6. A sub-pixel size detection method for ceramic antenna PIN needle images according to claim 1, characterized in that: The specific 4.1) is: 4.1.1) Process the image after Gaussian filtering and smoothing using an improved Sobel operator to obtain pixel-level edges: First, use the improved 8-direction Sobel operator set by the following formula to obtain the gradient magnitude and direction of the ROI region, and establish a gradient map of the ROI region; Then, use non-maximum suppression and double thresholds in the Canny method to refine the edges and connect strong and weak edges of the gradient map of the ROI region to obtain pixel-level edges; 4.1.2) Then, use the curve fitting method to process the pixel-level edges to extract the sub-pixel edges of the image: Traverse the edge points on each pixel-level edge. Along the gradient direction of the current edge point on the pixel-level edge, select 30 edge points on the gradient map, and perform Gaussian curve fitting sub-pixel processing using the Gaussian function of the following formula to obtain a Gaussian curve; where i = 1, 2, 3,..., 20, x i is the abscissa position of the i-th edge point, z i is the gradient magnitude of the i-th edge point, z max , x max and L are the peak gradient magnitude, the abscissa position of the peak, and the half-width information, respectively; Find the position with the maximum gradient in the Gaussian curve as the edge point on the sub-pixel edge, that is, find the peak value z of the gradient amplitude in the gradient direction max and the peak abscissa position x max , and then according to the peak value z of the gradient amplitude max and the peak abscissa position x max Combine the gradient direction to find the peak ordinate position y max , thereby determining the edge point coordinates corresponding to the current edge point on the sub-pixel edge (x max , y max ); 4.1.3) After traversing each edge point on the pixel-level edge, obtain the edge points corresponding to all edge points on the sub-pixel edge, and finally form the sub-pixel edge.

7. A sub-pixel size detection method for a ceramic antenna PIN pin image according to claim 1, characterized in that: The specific step 5) is to convert the pixel width of the PIN pin according to the pixel equivalent pixelsPerMetric to obtain the actual diameter size of the PIN pin in the ROI region.

8. A sub-pixel size detection system for implementing the method according to any one of claims 1-7, characterized by including: An image acquisition and display module, used for acquiring the image of the measured PIN pin, preprocessing the image, and displaying the measurement results; An ROI extraction module, used for the deep learning framework to obtain the ROI region of the PIN pin and eliminate redundant image information; A camera calibration module, used for calibrating the internal and external parameter matrices, distortion matrix, and pixel equivalent of the industrial camera using the Zhang's calibration method; A measurement module, used for sub-pixel edge detection and fitting the parallel edge lines of the part in the sub-pixel edge map using the probabilistic Hough method, and calculating the distance between the parallel edge lines; A parameter monitoring and saving module, used for real-time tracking of the measurement progress, displaying key parameters, and locally saving the parameters.