Needle cylinder precision detection method based on infrared imaging scanning

Through the infrared imaging scanning method, the three-dimensional point cloud of the syringe is constructed and aligned with the CAD model, which solves the problems of insufficient detection accuracy and difficulty in adaptation in the prior art, and achieves efficient and accurate syringe detection.

CN120232945AInactive Publication Date: 2025-07-01JINJIANG JINGBO KNITTING MASCH CO LTD

Patent Information

Application Number
CN202510704287.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-07-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing medical syringe detection methods have problems such as edge positioning deviations caused by transparent syringe refraction effect, traditional image algorithms are sensitive to hot press forming traces, and the need to frequently replace fixtures with multiple specifications.

Method used

Using the syringe accuracy detection method based on infrared imaging scanning, an infrared light source array is used to collect external heat radiation images, build a three-dimensional point cloud of the syringe, and align it with the CAD model of the syringe to perform defect detection.

Benefits of technology

It improves the accuracy and efficiency of syringe detection, eliminates edge positioning deviations caused by the refractive effect of transparent syringe, enhances the detection ability of hot press forming traces, and reduces the need to replace fixtures when adapting multiple specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120232945A_ABST
    Figure CN120232945A_ABST
Patent Text Reader

Abstract

The invention discloses a syringe precision detection method based on infrared imaging scanning, and relates to the technical field of infrared detection. The method comprises the following steps: S1, constructing an infrared light source array, and irradiating a needle cylinder sample from multiple angles; s2, acquiring a multi-view infrared thermal radiation image by adopting a high-resolution infrared phase unit; s3, denoising and distortion correction are carried out on the acquired infrared thermal radiation image; s4, inputting the preprocessed infrared thermal radiation image to construct a needle cylinder three-dimensional point cloud; s5, aligning the constructed three-dimensional point cloud of the needle cylinder with the CAD model of the needle cylinder; and S6, carrying out defect detection on the needle cylinder through size comparison. According to the invention, the infrared light source array is constructed to collect the external heat radiation image to construct the three-dimensional point cloud of the needle cylinder, and the generated three-dimensional point cloud of the needle cylinder is aligned and compared with the CAD model of the needle cylinder to detect the defects of the needle cylinder, so that the detection precision and the detection efficiency of the needle cylinder are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of infrared detection, and particularly relates to a method for detecting the precision of a syringe based on infrared imaging scanning. Background Art

[0002] As a precision injection device, the geometric precision of a medical syringe (inner diameter error ≤ ±0.05 mm, scale line spacing error ≤ ±0.1 mm) directly affects the accuracy of the administered dose. The current industry mainly adopts the following detection methods:

[0003] (1) Contact measurement technology

[0004] Manual sampling inspection is carried out using a digital caliper / projector; the defects are slow detection speed (3 - 5 syringes per minute) and deformation error caused by contact pressure (up to 0.03 mm);

[0005] (2) Visible light vision detection

[0006] Two-dimensional dimension measurement based on a CCD camera; the defect is that it cannot penetrate transparent materials, and the missed detection rate of air bubbles / internal cracks is as high as 15%;

[0007] (3) X-ray detection

[0008] Industrial CT tomography is used; the defect is that the equipment cost exceeds 2 million yuan, and there is a need for radiation protection.

[0009] It can be seen that the following defects exist in the existing medical syringe detection process: (1) Edge positioning deviation is caused by the refraction effect of the transparent syringe; (2) Traditional image algorithms are sensitive to thermoforming marks; (3) Frequent fixture replacement is required for multi-specification adaptation. Summary of the Invention

[0010] The purpose of the present invention is to provide a method for detecting the precision of a syringe based on infrared imaging scanning. By building an infrared light source array to collect external thermal radiation images for constructing the three-dimensional point cloud of the syringe, and aligning and comparing the generated three-dimensional point cloud of the syringe with the CAD model of the syringe to detect the defects of the syringe, the problems of edge positioning deviation and insufficient syringe precision caused by the refraction effect of the existing transparent syringe are solved.

[0011] To solve the above technical problems, the present invention is realized through the following technical solutions:

[0012] The present invention is a method for detecting the precision of a syringe based on infrared imaging scanning, including the following steps:

[0013] Step S1: Build an infrared light source array and irradiate the syringe sample from multiple angles;

[0014] Step S2: Use a high-resolution infrared camera group to collect multi-view infrared thermal radiation images;

[0015] Step S3: Denoise and correct the distortion of the collected infrared thermal radiation image;

[0016] Step S4: Input the preprocessed infrared thermal radiation image to construct the three-dimensional point cloud of the syringe;

[0017] Step S5: Align the constructed three-dimensional point cloud of the syringe with the CAD model of the syringe;

[0018] Step S6: Detect the defects of the syringe by size comparison.

[0019] As a preferred technical solution, in the step S1, the infrared light source array is composed of 12 groups of 850W infrared LED units, and the wavelength of the infrared LED units is ( ); the infrared LED units are evenly distributed at 360 degrees on a circular bracket with a diameter of 300 mm, and the adjustable range of the pitch angle of each group of infrared LEDs is degrees.

[0020] As a preferred technical solution, in the step S2, the infrared camera group is composed of four uncooled infrared cameras (resolution , ); one of the uncooled infrared cameras is located in each of the orthogonal X-axis and Y-axis directions (field of view angle is 60 degrees) and one at each end of the syringe axis (field of view angle is 30 degrees); the syringe is placed on a pneumatic rotary platform, and the syringe is clamped and fixed on the pneumatic rotary platform, and the pneumatic rotary platform rotates uniformly at 120 rpm; the pneumatic rotary platform is also internally provided with an FPGA controller and an environmental temperature compensation module; the FPGA controller adjusts the power of each LED unit according to the real-time infrared temperature measurement feedback; the specific power adjustment formula of each LED unit is as follows:

[0021] ;

[0022] In the formula, is the real-time adjusted power of the th LED unit, is the proportional coefficient, obtained by calibration of the heat conduction model experiment, is the preset target temperature, is the measured temperature value of the infrared sensor.

[0023] As a preferred technical solution, in the step S3, the specific process of denoising the infrared thermal radiation image is as follows:

[0024] Step Q31: Convert the multi-view infrared thermal radiation image into a grayscale image, and normalize the pixel values to the range of [0, 1] to eliminate the influence of uneven illumination;

[0025] Step Q32: Establish an array of, define the gray level as 256, perform smoothing processing using a filter to obtain an infrared image after noise and clutter elimination, and the smoothed image is expressed as:

[0026] ;

[0027] In the formula, represents the image pixel point coordinates, represents the original infrared image, represents the infrared image after smoothing processing, respectively represent the number of row pixels and column pixels of the infrared image, represents the pixel point coordinate increment;

[0028] After completing the smoothing filtering process of the infrared image, considering that there is a certain difference in brightness between the image target area and the background area, therefore, aiming to enhance the target area, an exponential transformation is performed on the infrared image, and the specific transformation formula is as follows:

[0029] ;

[0030] In the formula, is the adjustment parameter; after the infrared image enhancement processing, the contrast between the background area and the target area is effectively improved;

[0031] Step Q34: For each pixel point after exponential transformation, traverse all similar blocks within a preset neighborhood, calculate the Gaussian weighted Euclidean distance as the similarity between blocks, and use an exponential decay function to generate a weight coefficient. The formula is:

[0032] ;

[0033] In the formula, is the pixel block, and h is the smoothing parameter;

[0034] Step Q35: For the current pixel point, aggregate the weighted average values of all similar blocks, output the image after filtering and denoising, and suppress Gaussian noise while retaining edge details.

[0035] As a preferred technical solution, in the step S3, the specific process of distorting and correcting the infrared thermal radiation image is as follows:

[0036] Step J31: Use a high-precision checkerboard calibration plate to take at least 15 infrared thermal radiation images at multiple angles and positions within the field of view of the infrared camera, covering the edge area of the image to fully stimulate the lens distortion characteristics. At the same time, the calibration plate needs to be kept flat and at a non-parallel angle with the camera optical axis (the included angle range is 15° to 75°);

[0037] Step J32: Locate the corner points of the checkerboard based on the Harris corner detection algorithm, and initially obtain the pixel coordinates of the corner points. For sub-pixel level optimization of the coordinate accuracy, a quadratic polynomial is used to fit the gray-scale distribution in the neighborhood of the corner points, and iterative calculation is performed until the accuracy requirement is met (error < 0.1 pixel).

[0038] Step J33: Establish the mapping relationship between the world coordinate system and the image coordinate system. The specific formula is as follows:

[0039] ;

[0040] In the formula, is the internal parameter matrix, including the focal length , the principal point coordinates and the skew factor , is the external parameter matrix, is the scale factor, representing the scale or focal length of the image, respectively represent the horizontal and vertical coordinates of the pixels on the image, respectively represent the horizontal, vertical and depth coordinates of the point in the world coordinate system;

[0041] Step J34: Calculate the camera internal parameter matrix and the radial distortion coefficients by the least squares method; through the decomposition of the homography matrix of multiple groups of images, initially estimate the relationship between the internal parameter matrix and the external parameter matrix as: ; where, are the first two columns of the rotation matrix;

[0042] The radial distortion coefficient and the tangential distortion coefficient , the formula of the distortion model is:

[0043] ;

[0044] In the formula, is the distance from the current point to the center of the image, and , is the normalized plane coordinate; The normalized plane coordinate after distortion, is the radial distortion coefficient, is the tangential distortion coefficient;

[0045] Step J35: Iteratively optimize the external parameter matrix until the reprojection error converges below the threshold ( pixels);

[0046] Step J36: Perform radial distortion correction on the original image according to the calibration parameters. The bicubic spline interpolation method is selected. When performing distortion correction, for each pixel point , calculate its corresponding coordinates in the original distorted image . The specific formula is as follows:

[0047] ;

[0048] After calculating the original coordinates through the inverse distortion model, use the bicubic spline interpolation method to fill the corrected image;

[0049] Step J37: Output the undistorted infrared thermal radiation image while retaining the original image EXIF information for subsequent multi-view registration.

[0050] As a preferred technical solution, in the step S4, the construction process of the syringe three-dimensional point cloud is as follows:

[0051] Step S41: Input the preprocessed infrared thermal radiation image for adaptive histogram equalization to enhance the internal structure of the material (such as the thickness change area of the glass syringe), and adjust the edge threshold to adapt to the low-contrast characteristics of the infrared image;

[0052] Step S42: Introduce a two-way optical flow verification mechanism to match point pairs, eliminate mis-matched points, and at the same time introduce the syringe geometric constraint to improve the accuracy of point cloud production;

[0053] Step S43: Select two views with the longest baseline and calculate the initial point cloud position through essential matrix decomposition;

[0054] Step S44: Use the prior information of the syringe diameter to constrain the distribution range of the point cloud;

[0055] Step S45: Gradually add new syringe views, optimize the camera pose and three-dimensional point coordinates, minimize the weighted sum of the reprojection error and geometric constraints. The geometric constraint term includes a cylindricity error penalty factor, and use the LM algorithm for iterative solution. The convergence condition is set as the change of adjacent iteration errors ;

[0056] Step S46: Divide a 0.1mm×0.1mm patch grid on the sparse point cloud, and optimize the patch normal vector estimation in combination with the thermal radiation intensity gradient information;

[0057] Step S47: Use the Poisson reconstruction algorithm to generate a continuous surface, retain sub-millimeter-level details (such as scale line grooves), complete the construction of the syringe three-dimensional point cloud, and perform statistical analysis to eliminate outliers.

[0058] As a preferred technical solution, in the step S5, the alignment process of the syringe three-dimensional point cloud and the CAD model of the syringe is as follows:

[0059] Step S51: Convert the CAD model of the syringe into a high-density point cloud (sampling density ≥ 50 points / mm²).

[0060] Step S52: Establish a spatial coordinate system based on the axis of the syringe to eliminate pose differences.

[0061] Step S53: Extract the feature regions of the syringe, such as extracting feature regions like syringe scale lines and chamfers at the tube openings, and generate a 128-dimensional feature vector to describe the spatial geometric relationship.

[0062] Step S54: Screen and match feature pairs through the RANSAC algorithm, establish an initial transformation matrix, and achieve 6DOF rigid body transformation through FPFH.

[0063] Step S55: Set a dynamic distance threshold (initial threshold 0.5mm, step size 0.1mm), automatically adjust the search range of corresponding points according to the registration residual during the iteration process, and assign a higher weight to the scale region, such as 1.5 - 2.0 times the weight coefficient.

[0064] Step S56: Establish a temperature-deformation compensation function to eliminate the systematic error caused by thermal expansion.

[0065] As a preferred technical solution, in step S51, the original CAD model (usually represented by NURBS surface or BREP) is decomposed into computable parametric surface patches, and local encryption is performed on complex structures in the CAD model (such as syringe threads, scale lines, chamfers, etc.) to ensure feature integrity. The sampling density is dynamically adjusted according to the surface curvature change. The sampling density in high-curvature regions (such as chamfers at the syringe tube openings) is increased to 80 - 100 points / mm². The mapping grid method is used to generate a uniform grid in the parameter domain plane, and the parameter points are mapped to the three-dimensional space through the surface equation to generate an initial discrete point cloud, and Laplacian smoothing filtering is performed to eliminate jagged edges. Voxel grid downsampling is applied to remove redundant points and maintain the balance of density accuracy.

[0066] As a preferred technical solution, in step S52, the specific process of establishing a spatial coordinate system based on the axis of the syringe is as follows:

[0067] Step S521: Perform RANSAC cylinder fitting on the infrared point cloud to extract the central axis equation L, where L is ;

[0068] Step S522: Correct the axis direction vector through principal component analysis ;

[0069] Step S523: Read the design datum of the CAD model (usually the central axis of the cylinder) and convert it into a standard straight line equation.

[0070] Step S524: Take the geometric center of the syringe flange end face as the coordinate origin , and define the axial directions of X, Y, and Z. The Z-axis is along the axis direction, that is, from the flange end to the needle end; the X / Y axes are the orthogonal directions calculated based on the evenly distributed characteristic points on the end face circumference;

[0071] Step S525: Perform spatial transformation calculations to solve the rigid body transformation matrix. The specific formula is:

[0072] ;

[0073] In the formula, the rotation matrix R minimizes the axial deviation between the point cloud and the CAD model through the Kabsch algorithm, and the translation vector t is calculated from the difference in origin coordinates;

[0074] Step S526: Introduce the temperature expansion coefficient compensation formula: ; In the formula, is the length change amount, is the material thermal expansion coefficient, is the initial length at the reference temperature, are the current ambient temperature and the reference temperature respectively.

[0075] As a preferred technical solution, in step S6, when comparing the dimensions of the syringe three-dimensional point cloud with the CAD model of the syringe, generate cross-sectional cut surfaces at 0.1 mm intervals along the syringe axis direction for the syringe three-dimensional point cloud. Each cut surface is subjected to ellipse fitting to obtain the instantaneous inner diameter and outer diameter measurement values; take the average value of the short axis lengths of the ellipses of each slice to calculate the inner diameter of the syringe; project the point cloud along the axis direction, and use a sliding window to identify the peak positions of the scale lines to measure the scale spacing; the defect detection includes bubble detection and crack detection; the bubble detection is realized by calculating the connected domain area and the roundness index; when extracting the connected domain, use 8-neighborhood connected analysis to mark the independent regions in the binary image and obtain the pixel area and boundary coordinates of each connected domain; perform bubble detection on the syringe through the roundness calculation formula: to perform bubble detection on the syringe; in the formula is the area magnification factor of the ideal circle, represents the perimeter increase that penalizes non-circular contours; when = 1, it represents a perfect circle; when approaches 0, it means the shape is more irregular; so, when , it is determined that there are bubbles.

[0076] The crack detection is realized by calculating the aspect ratio and the trend consistency. Use PCA analysis to obtain the principal component vector of the crack direction. The formula is: ; In the formula, is the major axis length, that is, the crack extension direction; is the minor axis length, i.e., the crack width direction; when it is determined that there is a crack.

[0077] The present invention has the following beneficial effects:

[0078] (1) The present invention constructs the three-dimensional point cloud of the syringe by building an infrared light source array to collect the external thermal radiation image, and aligns and compares the generated three-dimensional point cloud of the syringe with the CAD model of the syringe to detect the defects of the syringe, improving the detection accuracy and detection efficiency of the syringe;

[0079] (2) The present invention collects the surface temperature distribution data of the sample in real time through a non-cooled infrared temperature sensor. After the FPGA controller receives the temperature data, according to the difference between the preset target temperature and the measured temperature, it calculates the power adjustment amount of each LED unit and realizes the precise control of the LED power through PWM modulation, reducing the error of the generated infrared image, eliminating the influence of environmental temperature fluctuations, and improving the anti-interference ability during detection.

[0080] (3) The present invention realizes the high-precision spatial alignment of the CAD model and the measured data in the field of medical device detection by integrating parametric modeling and physical perception technology, and realizes sub-millimeter registration accuracy in the high-precision detection scenario of medical devices.

[0081] (4) The present invention monitors the surface temperature fluctuation of the syringe in real time through infrared temperature measurement, establishes a temperature-deformation compensation function, eliminates the systematic error caused by thermal expansion, improves the measurement accuracy of the syringe, and reduces the influence of temperature change on the syringe detection.

[0082] Of course, it is not necessary for any product implementing the present invention to achieve all the above-mentioned advantages simultaneously. Description of the Drawings

[0083] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0084] Figure 1 is a flowchart of a syringe precision detection method based on infrared imaging scanning of the present invention. Detailed Embodiments

[0085] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0086] In addition, the technical features involved in the following described various embodiments of the present invention can be combined with each other as long as they do not conflict with each other.

[0087] In order to make the purpose, technical solution and advantages of the present application clearer, the following further describes the present application in detail with reference to the Figure 1 accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0088] Please refer to Figure 1 as shown. The present invention is a method for detecting the accuracy of a syringe based on infrared imaging scanning, including the following steps:

[0089] Step S1: Build an infrared light source array and irradiate the syringe sample from multiple angles;

[0090] Step S2: Use a high-resolution infrared camera group to collect multi-view infrared thermal radiation images;

[0091] Step S3: Denoise and correct the distortion of the collected infrared thermal radiation images;

[0092] Step S4: Input the preprocessed infrared thermal radiation images to construct the three-dimensional point cloud of the syringe;

[0093] Step S5: Align the constructed three-dimensional point cloud of the syringe with the CAD model of the syringe;

[0094] Step S6: Detect the defects of the syringe by comparing the dimensions.

[0095] In step S1, the infrared light source array is composed of 12 groups of 850W infrared LED units, and the wavelength of the infrared LED units is ( ); the infrared LED units are evenly distributed at 360 degrees on a circular bracket with a diameter of 300 mm, and the adjustable range of the pitch angle of each group of infrared LEDs is degrees.

[0096] In step S2, the infrared camera group consists of four uncooled infrared cameras (resolution , )(Composition); There is one uncooled infrared camera in each of the orthogonal X-axis and Y-axis directions (field of view: 60 degrees) and one at each end of the syringe axis (field of view: 30 degrees); The syringe is placed on a pneumatic rotary platform and is clamped and fixed on the pneumatic rotary platform. The pneumatic rotary platform rotates uniformly at 120 rpm; The pneumatic rotary platform also has an FPGA controller and an environmental temperature compensation module built-in. The FPGA controller realizes the hard synchronization of the light source pulse and the camera exposure time; The FPGA controller adjusts the power of each LED unit according to the real-time infrared temperature measurement feedback; The specific power adjustment formula for each LED unit is as follows:

[0097] ;

[0098] In the formula, is the real-time adjusted power of the th LED unit, is the proportional coefficient, obtained by calibration in the heat conduction model experiment, is the preset target temperature, is the temperature value measured by the infrared sensor, realizing a surface temperature difference of the syringe of 0.5 degrees Celsius, reducing the error in generating the infrared image, eliminating the influence of environmental temperature fluctuations, and improving the anti-interference ability of detection.

[0099] The parameter data is as follows:

[0100] Component Parameter Index Technical Basis Infrared Light Source Wavelength #timg# The transmittance of the glass material at a wavelength of 10.6 μm > 90% Irradiation Angle Incident Angle 25 degrees - 65 degrees Avoid specular reflection interference and achieve imaging of the internal structure of the material through orthogonal incidence Camera Sampling Rate 15 frames per second Meet the requirement of obtaining 180 images per revolution of the rotating platform Working Distance Distance from the light source to the syringe #timg# Ensure illuminance uniformity > 95%

[0101] In step S3, the specific process of denoising the infrared thermal radiation image is as follows:

[0102] Step Q31: Convert the multi-view infrared thermal radiation image into a grayscale image and normalize the pixel values to the range of [0,1] to eliminate the influence of uneven illumination;

[0103] Step Q32: Establish an array, define the gray level as 256, and perform smoothing processing using a filter to obtain an infrared image after eliminating noise and clutter. The smoothed image is expressed as:

[0104] ;

[0105] In the formula, represents the image pixel point coordinates, represents the original infrared image, represents the infrared image after smoothing processing, respectively represent the number of row pixels and column pixels of the infrared image, represents the pixel point coordinate increment;

[0106] Step Q33: After completing the infrared image smoothing and filtering process, considering that there are certain differences in the brightness between the image target area and the background area, the infrared image is exponentially transformed with the goal of enhancing the target area. The specific transformation formula is as follows:

[0107] ;

[0108] In the formula, is the adjustment parameter; after the infrared image enhancement process, the contrast between the background area and the target area is effectively improved;

[0109] Step Q34: For each pixel point after the exponential transformation, all similar blocks are traversed within a preset neighborhood (such as pixels), the Gaussian weighted Euclidean distance is calculated as the similarity between blocks, and a weight coefficient is generated using an exponential decay function. The formula is:

[0110] ;

[0111] In the formula, is the pixel block, h is the smoothing parameter, usually h is 3 times the standard deviation of the noise;

[0112] Step Q35: For the current pixel point, the weighted average values of all similar blocks are aggregated, and the filtered and denoised image is output, suppressing Gaussian noise while retaining edge details.

[0113] In step S3, the specific process of distorting and correcting the infrared thermal radiation image is as follows:

[0114] Step J31: Use a high-precision checkerboard calibration board to take at least 15 infrared thermal radiation images at multiple angles and positions within the field of view of the infrared camera, covering the edge area of the image to fully stimulate the lens distortion characteristics. At the same time, the calibration board needs to be kept flat and at a non-parallel angle (the included angle range is 15° - 75°) with the camera optical axis;

[0115] Step J32: Locate the checkerboard corners based on the Harris corner detection algorithm to initially obtain the pixel coordinates of the corners , and the sub-pixel level optimized coordinate accuracy uses a quadratic polynomial to fit the gray distribution in the corner neighborhood and iteratively calculates until the accuracy requirement is met (error < 0.1 pixel);

[0116] Step J33: Establish the mapping relationship between the world coordinate system and the image coordinate system. The specific formula is as follows:

[0117] ;

[0118] In the formula, is the internal parameter matrix including the focal length , the principal point coordinates and the skew factor , is the external parameter matrix, is the scale factor, representing the scale or focal length of the image, respectively represent the horizontal and vertical coordinates of the pixels on the image, respectively represent the horizontal, vertical and depth coordinates of the point in the world coordinate system, and the depth coordinate is the distance from the camera;

[0119] Step J34: Calculate the camera internal parameter matrix and radial distortion coefficients by the least squares method; through the homography matrix of multiple groups of images decomposition, initially estimate the internal parameter matrix and the external parameter matrix The relationship is: ; where are the first two columns of the rotation matrix;

[0120] Radial distortion coefficient and tangential distortion coefficient , the formula of the distortion model is:

[0121] ;

[0122] In the formula, is the distance from the current point to the center of the image, and , is the normalized plane coordinate; The normalized plane coordinate after distortion, is the radial distortion coefficient, is the tangential distortion coefficient;

[0123] Step J35: Iteratively optimize the external parameter matrix until the reprojection error converges below the threshold ( pixels);

[0124] Step J36: Perform radial distortion correction on the original image according to the calibration parameters. The interpolation method selects bicubic spline interpolation. During distortion correction, for each pixel point , calculate its corresponding coordinate in the original distorted image. The specific formula is as follows:

[0125] ;

[0126] After calculating the original coordinates through the inverse distortion model, use the bicubic spline interpolation method to fill the corrected image;

[0127] Step J37: Output the undistorted infrared thermal radiation image while retaining the EXIF information of the original image for subsequent multi-view registration.

[0128] In step S4, the construction process of the syringe three-dimensional point cloud is as follows:

[0129] Step S41: Input the preprocessed infrared thermal radiation image for adaptive histogram equalization to enhance the internal structure of the material (such as the thickness change area of the glass syringe), and adjust the edge threshold to adapt to the low-contrast characteristics of the infrared image;

[0130] Step S42: Introduce a bidirectional optical flow verification mechanism to match point pairs, eliminate mis-matched points, and at the same time introduce the geometric constraints of the syringe to improve the accuracy of point cloud production;

[0131] Step S43: Select two views with the longest baseline and calculate the initial point cloud position through essential matrix decomposition;

[0132] Step S44: Use the prior information of the syringe diameter to constrain the distribution range of the point cloud;

[0133] Step S45: Gradually add new syringe views, optimize the camera pose and three-dimensional point coordinates, minimize the weighted sum of the reprojection error and geometric constraints. The geometric constraint term includes a cylindricity error penalty factor, and use the LM algorithm for iterative solution. The convergence condition is set as the change of adjacent iteration errors ;

[0134] Step S46: Divide a 0.1mm×0.1mm patch grid on the sparse point cloud, and optimize the patch normal vector estimation by combining the thermal radiation intensity gradient information;

[0135] Step S47: Use the Poisson reconstruction algorithm to generate a continuous surface, retain sub-millimeter-level details (such as scale line grooves), complete the construction of the syringe three-dimensional point cloud, and perform statistical analysis to eliminate outliers; generate a point cloud file (PLY format) containing three-dimensional coordinates and thermal radiation intensity. Optional output parameters include key indicators such as inner diameter / outer diameter size, roundness, and surface roughness.

[0136] In step S5, the alignment process between the syringe three-dimensional point cloud and the CAD model of the syringe is as follows:

[0137] Step S51: Convert the CAD model of the syringe into a high-density point cloud (sampling density ≥ 50 points / mm²);

[0138] Step S52: Establish a spatial coordinate system based on the axis of the syringe to eliminate pose differences;

[0139] Step S53: Extract the feature regions of the syringe, such as extracting feature regions such as syringe scale lines and tube mouth chamfers, and generate a 128-dimensional feature vector to describe the spatial geometric relationship;

[0140] Step S54: Screen matching feature pairs through the RANSAC algorithm, establish an initial transformation matrix, and achieve 6DOF rigid body transformation through FPFH;

[0141] Step S55: Set a dynamic distance threshold (initial threshold 0.5 mm, step size 0.1 mm), automatically adjust the corresponding point search range according to the registration residual during the iteration process, and assign a higher weight to the scale area, such as 1.5 - 2.0 times the weight coefficient;

[0142] Step S56: Establish a temperature - deformation compensation function to eliminate the systematic error caused by thermal expansion.

[0143] In step S51, decompose the original CAD model (usually represented by NURBS surface or BREP) into computable parametric surface patches, perform local encryption division on complex structures in the CAD model (such as syringe threads, scale lines, chamfers, etc.) to ensure feature integrity, dynamically adjust the sampling density according to the surface curvature change, increase the sampling density in high - curvature areas (such as syringe nozzle chamfers) to 80 - 100 points / mm², generate a uniform grid in the parameter domain plane using the mapped grid method, map the parameter points to three - dimensional space through the surface equation, generate the initial discrete point cloud and perform Laplacian smoothing filtering to eliminate the jagged edges, and apply voxel grid downsampling to remove redundant points to maintain the balance of density accuracy.

[0144] In step S52, the specific process of establishing a spatial coordinate system based on the syringe axis is as follows:

[0145] Step S521: Perform RANSAC cylinder fitting on the infrared point cloud to extract the central axis equation L, where L is ;

[0146] Step S522: Correct the axis direction vector through principal component analysis ;

[0147] Step S523: Read the CAD model design datum (usually the central axis of the cylinder) and convert it into a standard straight - line equation;

[0148] Step S524: Take the geometric center of the syringe flange end face as the coordinate origin , and define the axial directions of XYZ, the Z - axis is along the axis direction, that is, from the flange end to the needle end; the X / Y axes are the orthogonal directions calculated based on the evenly - distributed feature points on the end face circumference;

[0149] Step S525: Perform spatial transformation calculation to solve the rigid - body transformation matrix, and the specific formula is:

[0150] ;

[0151] In the formula, the rotation matrix R minimizes the axial deviation between the point cloud and the CAD model through the Kabsch algorithm, and the translation vector t is calculated from the origin coordinate difference;

[0152] Step S526: Introduce the temperature expansion coefficient compensation formula: ; In the formula, is the amount of length change, is the material thermal expansion coefficient, is the initial length at the reference temperature, are the current ambient temperature and the reference temperature respectively.

[0153] In step S6, when comparing the three-dimensional point cloud of the syringe barrel with the CAD model of the syringe barrel, cross-sectional cuts are generated at 0.1 mm intervals along the axis of the syringe barrel. The inner and outer diameter instantaneous measurement values are obtained by fitting an ellipse to each cut surface; the mean value of the minor axis lengths of the ellipses of each slice is taken to calculate the inner diameter of the syringe barrel; the point cloud is projected along the axis direction, and the peak positions of the scale lines are identified using a sliding window to measure the scale spacing; the defect detection includes bubble detection and crack detection; the bubble detection is achieved by calculating the connected domain area and the roundness index; when extracting the connected domain, 8-neighborhood connected analysis is used to label the independent regions in the binary image and obtain the pixel area and boundary coordinates of each connected domain; the bubble detection of the syringe barrel is carried out through the roundness calculation formula: ; In the formula is the area magnification factor of the ideal circle, represents the perimeter increase that penalizes non-circular contours; when = 1, it represents a perfect circle; when approaches 0, it means the shape is more irregular; therefore, when , it is determined that there are bubbles (for example, the theoretical value of a 5 mm diameter bubble is 0.998).

[0154] The crack detection is achieved by calculating the aspect ratio and the direction consistency. The principal component vector in the crack direction is obtained using PCA analysis, and the formula is: ; In the formula, is the major axis length, that is, the crack extension direction; is the minor axis length, that is, the crack width direction; when , it is determined that there are cracks, and when , it is recognized as scratch / texture interference.

[0155] It should be noted that in the above system embodiments, the various units included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.

[0156] In addition, those of ordinary skill in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium.

[0157] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of this specification. These embodiments are selected and specifically described in this specification in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can well understand and utilize the present invention. The present invention is only limited by the claims and their full scope and equivalents.

Claims

1. A method for detecting the accuracy of a syringe based on infrared imaging scanning, characterized in that, It includes the following steps: Step S1: Build an infrared light source array and irradiate the syringe sample from multiple angles; Step S2: Use a high-resolution infrared camera group to collect multi-view infrared thermal radiation images; Step S3: Denoise and correct the distortion of the collected infrared thermal radiation images; Step S4: Input the preprocessed infrared thermal radiation images to construct the three-dimensional point cloud of the syringe; Step S5: Align the constructed three-dimensional point cloud of the syringe with the CAD model of the syringe; Step S6: Detect the defects of the syringe through dimensional comparison.

2. The syringe precision detection method based on infrared imaging scanning according to claim 1, wherein In the step S1, the infrared light source array is composed of 12 groups of infrared LED units; the infrared LED units are evenly distributed at 360-degree intervals on the annular bracket, and the adjustable range of the pitch angle of each group of infrared LEDs is degrees.

3. The syringe precision detection method based on infrared imaging scanning according to claim 1, characterized in that In the said step S2, the infrared camera group consists of four uncooled infrared cameras; one of the uncooled infrared cameras is located in each of the orthogonal X-axis and Y-axis directions and one is located at each of the two ends of the syringe axis; the syringe is placed on a pneumatic rotary platform; the pneumatic rotary platform is also internally provided with an FPGA controller and an environmental temperature compensation module; the FPGA controller adjusts the power of each LED unit according to the real-time infrared temperature measurement feedback. The specific power adjustment formula for each LED unit is as follows: ; In the formula, is the real-time adjusted power of the th LED unit, is the proportionality coefficient, which is calibrated by the heat conduction model experiment, is the preset target temperature, is the temperature value measured by the infrared sensor.

4. A syringe precision detection method based on infrared imaging scanning according to claim 1, characterized in that In the said step S3, the specific process of denoising the infrared thermal radiation image is as follows: Step Q31: Convert the multi-view infrared thermal radiation images into grayscale images and normalize the pixel values to the range of [0,1]; Step Q32: Establish an array of, and perform smoothing processing using a filter to obtain an infrared image after noise and clutter elimination. The smoothed image is represented as: ; In the formula, represents the coordinates of an image pixel point, represents the original infrared image, represents the infrared image after smoothing processing, respectively represent the number of row pixels and the number of column pixels of the infrared image, represents the increment of pixel point coordinates; Step Q33: Perform an exponential transformation on the infrared image. The specific transformation formula is as follows: ; In the formula, is the adjustment parameter; Step Q34: For each pixel point after the exponential transformation, traverse all similar blocks in the preset neighborhood, calculate the Gaussian weighted Euclidean distance as the similarity between blocks, and use the exponential decay function to generate the weight coefficient; Step Q35: Aggregate the weighted average values of all similar blocks for the current pixel point and output the filtered and denoised image.

5. A method for detecting the accuracy of a syringe based on infrared imaging scanning according to claim 1, characterized in that, In the said step S3, the specific process of correcting the distortion of the infrared thermal radiation image is as follows: Step J31: Use a high-precision checkerboard calibration board to take at least 15 infrared thermal radiation images at multiple angles and positions within the field of view of the infrared camera; Step J32: Locate the checkerboard corners based on the Harris corner detection algorithm and optimize the coordinate accuracy at the sub-pixel level; Step J33: Establish the mapping relationship between the world coordinate system and the image coordinate system. The specific formula is as follows: ; In the formula, is the internal parameter matrix including the focal length , the principal point coordinates and the skew factor , is the external parameter matrix, is the scale factor, representing the scale or focal length of the image, respectively represent the horizontal and vertical coordinates of the pixels on the image, respectively represent the horizontal, vertical and depth coordinates of the point in the world coordinate system; Step J34: Calculate the camera internal parameter matrix and the radial distortion coefficient through the least squares method; Step J35: Iteratively optimize the external parameter matrix until the reprojection error converges below the threshold; Step J36: Perform radial distortion correction on the original image according to the calibration parameters, and select the bicubic spline interpolation method for the interpolation; Step J37: Output the undistorted infrared thermal radiation image while retaining the EXIF information of the original image.

6. A method for detecting the accuracy of a syringe based on infrared imaging scanning according to claim 1, characterized in that, In the said step S4, the construction process of the three-dimensional point cloud of the syringe is as follows: Step S41: Input the preprocessed infrared thermal radiation images to perform adaptive histogram equalization to strengthen the internal structure of the material; Step S42: Introduce a two-way optical flow verification mechanism to match point pairs and eliminate mis-matched points; Step S43: Select the two views with the longest baseline and calculate the initial point cloud position through the decomposition of the essential matrix; Step S44: Use the prior information of the syringe diameter to constrain the distribution range of the point cloud; Step S45: Gradually add new syringe views to optimize the camera pose and the three-dimensional point coordinates. Step S46: Divide a 0.1mm×0.1mm patch grid based on the sparse point cloud, and optimize the patch normal vector estimation by combining the thermal radiation intensity gradient information; Step S47: Use the Poisson reconstruction algorithm to generate a continuous surface and complete the construction of the syringe 3D point cloud.

7. A method for detecting the accuracy of a syringe based on infrared imaging scanning according to claim 1, characterized in that, In the said Step S5, the alignment process between the syringe 3D point cloud and the CAD model of the syringe is as follows: Step S51: Convert the CAD model of the syringe into a high-density point cloud; Step S52: Establish a spatial coordinate system based on the axis of the syringe; Step S53: Extract the feature regions of the syringe and generate a 128-dimensional feature vector to describe the spatial geometric relationship; Step S54: Screen the matching feature pairs through the RANSAC algorithm, establish an initial transformation matrix, and achieve a 6DOF rigid body transformation; Step S55: Set a dynamic distance threshold and automatically adjust the corresponding point search range according to the registration residual during the iteration process; Step S56: Establish a temperature-deformation compensation function.

8. The method for detecting the accuracy of a syringe based on infrared imaging scanning according to claim 7, wherein, In the said Step S51, decompose the original CAD model into computable parametric surface patches, perform local encryption division on the structure in the CAD model, dynamically adjust the sampling density according to the surface curvature change, generate a uniform grid in the parameter domain plane using the mapping grid method, map the parameter points to the three-dimensional space through the surface equation, generate the initial discrete point cloud, and perform Laplacian smoothing filtering to eliminate the jagged edges.

9. A method for detecting the accuracy of a syringe based on infrared imaging scanning according to claim 7, characterized in that In the said Step S52, the specific process of establishing a spatial coordinate system based on the axis of the syringe is as follows: Step S521: Perform RANSAC cylinder fitting on the infrared point cloud and extract the central axis equation L; Step S522: Correct the axis direction vector through principal component analysis; Step S523: Read the design datum of the CAD model and convert it into a standard straight line equation; Step S524: Take the geometric center of the syringe flange end face as the coordinate origin and define the axial directions of XYZ; Step S525: Perform spatial transformation calculation and solve the rigid body transformation matrix; Step S526: Introduce the temperature expansion coefficient compensation formula: ; where is the length change amount, is the material thermal expansion coefficient, is the initial length at the reference temperature, are the current ambient temperature and the reference temperature respectively.

10. A method for detecting the accuracy of a syringe based on infrared imaging scanning according to claim 1, characterized in that, In the said Step S6, when comparing the dimensions between the syringe 3D point cloud and the CAD model of the syringe, generate cross-sectional cut surfaces at 0.1mm intervals along the axis of the syringe for the syringe 3D point cloud, and perform ellipse fitting on each cut surface to obtain the instantaneous measured values of the inner diameter and outer diameter; take the average value of the short axis lengths of the ellipses of each slice to calculate the inner diameter of the syringe; project the point cloud along the axis direction and use a sliding window to identify the peak positions of the scale lines to measure the scale spacing; the defect detection includes bubble detection and crack detection; the bubble detection is realized by calculating the connected domain area and the roundness index; the crack detection is realized by calculating the aspect ratio and the trend consistency.

Citation Information

Patent Citations

  • Stamped part surface defect detection device and method based on three-dimensional vision

    CN107052086A

  • Laser point cloud three-dimensional reconstruction method combined with infrared image

    CN117392318A

  • Infrared image three-dimensional reconstruction method based on neural radiation field

    CN118587357A

  • System and method for detecting internal defects of basin-type insulator based on pulse infrared thermal waves

    CN119643638A

  • Target detection method based on infrared camera and three-dimensional laser radar

    CN119758373A

Cited By

  • Real-time needle cylinder precision detection method based on image recognition

    CN121904046A

  • Image recognition-based syringe precision real-time detection method

    CN121904046B