A method and system for detecting defects in an infusion filter

By combining an adaptive threshold segmentation method with a ring light source and camera system, defect detection of infusion filters is performed, which solves the problems of low detection efficiency and high cost in the existing technology and realizes low-cost and high-efficiency defect detection of infusion filters.

CN117173113BActive Publication Date: 2026-02-13JIAXING MINSHUO INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311042983.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2026-02-13
Estimated Expiration
2043-08-17

AI Technical Summary

Technical Problem

In existing technologies, defect detection of infusion filters is inefficient and costly. Manual inspection methods are harmful to workers' health, while deep learning methods require a large amount of data and hardware support, resulting in high inspection costs.

Method used

An adaptive threshold segmentation method is used to detect defects in the front and back images of an infusion filter. By combining a ring light source and a camera system, defect features are obtained through adaptive threshold segmentation, which reduces hardware requirements and improves detection efficiency.

Benefits of technology

It achieves low-cost, high-real-time defect detection of infusion filters, effectively detecting defects such as oil stains, foreign objects, and black spots on objects, simplifying the algorithm and improving the real-time performance of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173113B_ABST
    Figure CN117173113B_ABST
Patent Text Reader

Abstract

The application discloses a kind of infusion filter defect detection method and system, the method includes: obtaining the image to be detected of infusion filter, the image to be detected of infusion filter includes infusion filter front surface image to be detected and infusion filter back surface image to be detected;By adaptive threshold segmentation method respectively on the image to be detected of infusion filter front surface and the image to be detected of infusion filter back surface are carried out defect detection and mark processing, obtain infusion filter front surface defect and infusion filter back surface defect;Integrate the infusion filter front surface defect and the infusion filter back surface defect, obtain the defect of infusion filter.The application can carry out defect detection to image by adaptive threshold segmentation method, realize low-cost high real-time detection process.The application is a kind of infusion filter defect detection method and system, and can be widely applied to image defect detection technical field.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image defect detection, in particular to a defect detection method and system of an infusion filter. BACKGROUND

[0002] As a bridge for delivering liquid medicine, nutrients and blood products into the body of a patient, the infusion set plays an important role in the medical treatment of a hospital. Therefore, the demand for infusion sets in a hospital is relatively large. The infusion filter is an important component of the infusion set, so it is very important to detect the quality of the infusion filter. How to detect defects of a complex infusion filter has been a problem for contemporary manufacturers. For infusion filter-like medical products, some problems will inevitably occur during the manufacturing, processing and packaging processes, which will have a great impact on the quality, appearance and user comfort of the products. Therefore, defect detection is needed after processing to determine whether the products are qualified and how to process them next. Most infusion filter manufacturers generally use the human eye observation method to detect them. For infusion filter defect detection, the artificial detection method and the deep learning method are generally used. The human eye observation method is to use the naked eye to distinguish the surface defects of the product under certain lighting conditions. The deep learning defect detection uses a trained model to extract the generalization features of a large amount of data, so as to obtain a better prediction model and determine whether there is a defect. However, the human eye observation method has low detection efficiency, and the light and long-time eye fatigue will cause damage to the workers' eyes, and the use of a large amount of manpower has a high cost. The deep learning defect detection requires a large amount of data and has certain requirements for hardware, and the hardware cost of its implementation is also relatively high. SUMMARY

[0003] To solve the above technical problems, the purpose of the present application is to provide a defect detection method and system of an infusion filter, which can detect defects in images through an adaptive threshold segmentation method to realize a low-cost and high-real-time detection process.

[0004] The first technical solution adopted by the present application is: a defect detection method of an infusion filter, comprising the following steps:

[0005] Obtaining an image to be detected of an infusion filter, the image to be detected of the infusion filter including a front surface image to be detected of the infusion filter and a back surface image to be detected of the infusion filter;

[0006] Detecting defects in the front surface image to be detected of the infusion filter and the back surface image to be detected of the infusion filter through an adaptive threshold segmentation method and marking processing, to obtain front surface defects of the infusion filter and back surface defects of the infusion filter;

[0007] Integrate the front side defect of the infusion filter and the back side defect of the infusion filter to obtain a defect of the infusion filter.

[0008] Further, the step of obtaining the to-be-detected image of the infusion filter specifically comprises:

[0009] When the infusion filter is fixed in the infusion filter card slot, the light intensity of the ring light source is controlled by the ring light source controller;

[0010] The fixed infusion filter is subjected to light compensation processing according to the light intensity of the ring light source;

[0011] The infusion filter subjected to the light compensation processing is subjected to shooting processing by the camera to obtain a camera result;

[0012] The camera shooting result is transmitted to the control terminal for display to obtain the to-be-detected image of the infusion filter;

[0013] The ring light source, the ring light source controller, the infusion filter card slot, the camera and the control terminal form an infusion filter ring light source detection system.

[0014] Further, the step of detecting and marking the front side defect of the infusion filter and the back side defect of the infusion filter by the adaptive threshold segmentation method respectively on the to-be-detected image of the front side of the infusion filter and the to-be-detected image of the back side of the infusion filter specifically comprises:

[0015] The to-be-detected image of the infusion filter is subjected to image pixel size calibration processing to obtain a corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter;

[0016] The to-be-detected image of the infusion filter is subjected to adaptive threshold segmentation processing by a preset window sliding strategy to obtain a defect binary image of the infusion filter;

[0017] The defect binary image of the infusion filter is subjected to circular degree contour extraction fitting processing to obtain straight line angle information;

[0018] The defect size and defect position information of the to-be-detected image of the infusion filter are determined in combination with the straight line angle information and the corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter;

[0019] The defect size and defect position information of the to-be-detected image of the infusion filter are subjected to marking processing to obtain the front side defect of the infusion filter and the back side defect of the infusion filter.

[0020] Further, the step of calibrating the image pixel size of the infusion filter image to be detected to obtain the corresponding relationship between the infusion filter image pixel size and the actual physical size of the infusion filter specifically comprises:

[0021] Obtaining the actual physical size of the infusion filter by measuring the infusion filter;

[0022] Based on the image to be detected of the infusion filter, obtaining a plurality of boundary pixel points of the image to be detected of the infusion filter;

[0023] Calculating the distance between each boundary pixel point of the image to be detected of the infusion filter, and selecting the maximum value of the distance between the boundary pixel points as the infusion filter image pixel size;

[0024] According to the actual physical size of the infusion filter and the infusion filter image pixel size, the corresponding relationship between the infusion filter image pixel size and the actual physical size of the infusion filter is constructed.

[0025] Further, the infusion filter includes a filter itself area and an air suction filter port area, and the step of performing adaptive threshold segmentation processing on the image to be detected of the infusion filter to obtain a defect binary image of the infusion filter by a preset window sliding strategy specifically comprises:

[0026] Selecting a window with all pixel points on the image to be detected of the infusion filter as the center and setting the range of the window;

[0027] According to the range of the window, performing Gaussian weighted average calculation processing to determine the mean value of the window;

[0028] Introducing a segmentation threshold, subtracting the mean value of the window from the segmentation threshold to obtain a window segmentation node threshold;

[0029] Obtaining the pixel gray value of the image to be detected of the infusion filter;

[0030] Based on the filter itself area and the air suction filter port area, the pixel gray value of the image to be detected of the infusion filter less than the window segmentation node threshold is segmented and extracted and marked respectively to obtain a defect pixel point;

[0031] Integrating all the defect pixel points to obtain a defect binary image of the infusion filter.

[0032] Further, the step of performing circular degree contour extraction fitting processing on the defect binary image of the infusion filter to obtain straight line angle information specifically comprises:

[0033] contour extraction processing is performed on the binary image of the defect of the infusion filter to obtain a plurality of defect contours;

[0034] area and perimeter calculation processing is performed on the plurality of defect contours to obtain the area of the defect contour and the perimeter of the defect contour;

[0035] corresponding defect contour roundness is obtained through a contour roundness calculation formula combined with the area of the defect contour and the perimeter of the defect contour;

[0036] A roundness threshold range is set, and defect contours corresponding to defect contour roundnesses within the roundness threshold range are selected to obtain selected defect contours;

[0037] The distance between the camera and the focus point of the infusion filter image to be detected is obtained, and the focus point of the infusion filter image to be detected is within the boundary of the infusion filter image to be detected;

[0038] According to the distance between the camera and the focus point of the infusion filter image to be detected and the pixel size of the infusion filter image, the center pixel coordinate point of the infusion filter is determined;

[0039] The center point pixel coordinates of the selected defect contours are determined, and the center pixel coordinate point of the infusion filter is combined to obtain straight line angle information through a straight line angle information calculation formula.

[0040] Further, if the number of center point pixel coordinates of the selected defect contours is greater than 1, the distance between the center point pixel coordinates of the selected defect contours is calculated, and the center point pixel coordinates corresponding to the maximum distance value are selected for straight line angle information calculation.

[0041] Further, the contour roundness calculation formula is specifically as follows:

[0042] roundness n =|4*π*Counterarea n / I n | 2

[0043] In the above formula, roundness n represents the contour roundness of the nth contour, π represents the circular constant, I n represents the perimeter of the nth contour, and Counterarea n represents the area of the nth contour.

[0044] Further, the straight line angle information calculation formula is specifically as follows:

[0045]

[0046] In the formula, angle p1-p2 represents the straight line angle information, x p1 , y p1 represents the center pixel coordinate point of the infusion filter, x p2 , y p2 represents the center point pixel coordinate of the selected defect profile.

[0047] The second technical solution adopted by the present application is: a defect detection system of an infusion filter, comprising:

[0048] An acquisition module is configured to acquire an image to be detected of an infusion filter, wherein the image to be detected of the infusion filter comprises a front surface image to be detected of the infusion filter and a back surface image to be detected of the infusion filter;

[0049] A detection module is configured to perform defect detection and marking processing on the front surface image to be detected of the infusion filter and the back surface image to be detected of the infusion filter respectively by using an adaptive threshold segmentation method, so as to obtain front surface defects of the infusion filter and back surface defects of the infusion filter;

[0050] An integration module is configured to integrate the front surface defects of the infusion filter and the back surface defects of the infusion filter, so as to obtain defects of the infusion filter.

[0051] The method and system have the following beneficial effects: the present application further acquires defect features corresponding to the front surface image to be detected of the infusion filter and the back surface image to be detected of the infusion filter by using the adaptive threshold segmentation method, avoids traditional image defect detection by using a deep learning algorithm, reduces hardware requirements for image detection, can well detect defects such as oil stains, foreign matters and black spots of the infusion tube object, has a simple algorithm, has good real-time performance, and finally determines whether the infusion filter is qualified in quality by comprehensively determining front surface and back surface detection results. BRIEF DESCRIPTION OF DRAWINGS

[0052] Figure 1 is a step flow chart of a defect detection method of an infusion filter according to an embodiment of the present application;

[0053] Figure 2 is a structural block diagram of a defect detection system of an infusion filter according to an embodiment of the present application;

[0054] Figure 3 is a device schematic diagram of an infusion filter ring light source detection system constructed according to a specific embodiment of the present application;

[0055] Figure 4 is a schematic diagram of acquiring a size of an infusion filter according to a specific embodiment of the present application;

[0056] Figure 5 is a schematic diagram of the adaptive threshold segmentation region of the infusion filter obtained by the specific embodiment of the present application;

[0057] Figure 6 is a schematic diagram of the adaptive segmentation principle of the specific embodiment of the present application;

[0058] Figure 7 is a front adaptive segmentation result diagram of the infusion filter of the specific embodiment of the present application;

[0059] Figure 8 is a front partition processing schematic diagram of the infusion filter of the specific embodiment of the present application;

[0060] Figure 9 is a front defect marking schematic diagram of the infusion filter of the specific embodiment of the present application;

[0061] Figure 10 is a back adaptive segmentation result diagram of the infusion filter of the specific embodiment of the present application;

[0062] Figure 11 is a small circle screening result schematic diagram of the back of the infusion filter of the specific embodiment of the present application;

[0063] Figure 12 is a front partition processing schematic diagram of the infusion filter of the specific embodiment of the present application;

[0064] Figure 13 is a result schematic diagram of the defect of the infusion filter of the specific embodiment of the present application;

[0065] The reference signs are: 1, annular light source; 2, annular light source controller; 3, camera; 4, infusion filter; 5, control terminal; 6, card slot. DETAILED DESCRIPTION

[0066] The present application will be further described in detail below in combination with the drawings and specific embodiments. For the step numbers in the following embodiments, only the setting is for the convenience of description, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0067] Referring to Figure 1 , the present application provides a defect detection method of an infusion filter, which comprises the following steps:

[0068] S1, acquiring an image to be detected of the infusion filter, the image to be detected of the infusion filter comprising a front image to be detected of the infusion filter and a back image to be detected of the infusion filter;

[0069] Specifically, referring to Figure 3, and the infusion filter annular light source detection system comprises an annular light source 1, an annular light source controller 2, an infusion filter clamping groove 6, a camera 3 and a control terminal 5; the infusion filter 4 is fixed in the infusion filter clamping groove 6; based on the fixed infusion filter, the light intensity of the annular light source 1 is controlled through the annular light source controller 2; the fixed infusion filter is subjected to light compensation processing according to the light intensity of the annular light source 1; based on the infusion filter after light compensation, the camera 3 is used for shooting processing, and a camera result is obtained; the camera shooting result is transmitted to the control terminal 5 for display, and a to-be-detected image of the infusion filter is obtained;

[0070] In the embodiment, the annular light source 1 functions as a light source, the annular light source controller 2 adjusts the brightness of the annular light source and supplies power for the annular light source, the infusion filter 4 is placed in the clamping groove 6 and directly below the annular light source at a fixed distance, and the camera 3 is used as a tool for shooting the surface of an object, and the pictures obtained by the camera are transmitted to the control terminal 5, that is, a computer, for further processing.

[0071] S2, respectively, the front face of the infusion filter to-be-detected image and the back face of the infusion filter to-be-detected image are subjected to defect detection and marking processing through an adaptive threshold segmentation method, and the front face of the infusion filter and the back face of the infusion filter are obtained.

[0072] Specifically, the to-be-detected image of the infusion filter is subjected to image pixel size calibration processing, and a corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter is obtained, wherein the actual physical size of the infusion filter is obtained by measuring the infusion filter; based on the to-be-detected image of the infusion filter, a plurality of boundary pixel points of the to-be-detected image of the infusion filter are obtained; the distance between the boundary pixel points of each to-be-detected image of the infusion filter is calculated, and the maximum value of the distance between the boundary pixel points is selected as the image pixel size of the infusion filter; and the corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter is constructed according to the actual physical size of the infusion filter and the image pixel size of the infusion filter.

[0073] It should be noted that the image obtained by the camera is composed of different gray pixels, and when the image is used to evaluate the internal quality of the to-be-measured object, the size of the defect or the specific structure needs to be measured. The result directly measured from the image is a measurement value in units of pixels, and the corresponding relationship between the image pixel size and the actual physical size needs to be established, that is, the image pixel size needs to be calibrated. After the image pixel size is calibrated, the actual size of the defect or the structure size measured in the image can be obtained. Therefore, the pixel size needs to be calibrated before the image is measured, and whether the pixel size calibration is accurate directly affects the measurement result of the structure in the image.

[0074] The preset window sliding strategy is used for adaptive threshold segmentation processing of the to-be-detected image of the infusion filter, to obtain a defect binary image of the infusion filter, wherein a window is selected with all pixel points on the to-be-detected image of the infusion filter as the center and the range of the window is set; according to the range of the window, Gaussian weighted average calculation processing is performed to determine the mean value of the window; a segmentation threshold is introduced, and the mean value of the window is subtracted from the segmentation threshold to obtain a window segmentation node threshold; the pixel gray value of the to-be-detected image of the infusion filter is obtained; the pixel gray value of the to-be-detected image of the infusion filter that is less than the window segmentation node threshold is segmented and extracted and marked to obtain a defect pixel point; all defect pixel points are integrated to obtain the defect binary image of the infusion filter.

[0075] The defect binary image of the infusion filter is subjected to circularity contour extraction fitting processing to obtain straight line angle information, wherein the defect binary image of the infusion filter is subjected to contour extraction processing to obtain a plurality of defect contours; the area and the circumference of the defect contours are calculated to obtain the area and the circumference of the defect contours; the corresponding defect contour circularity is obtained through a contour circularity calculation formula and in combination with the area and the circumference of the defect contours; a circularity threshold range is set, and the defect contours corresponding to the circularity threshold range are selected to obtain selected defect contours; the distance between a camera and the focus point of the to-be-detected image of the infusion filter is obtained, and the focus point of the to-be-detected image of the infusion filter is within the boundary of the to-be-detected image of the infusion filter; the center pixel coordinate point of the infusion filter is determined according to the distance between the camera and the focus point of the to-be-detected image of the infusion filter and the image pixel size of the infusion filter; the center pixel coordinate of the selected defect contour is determined based on the selected defect contour, and the straight line angle information is obtained through a straight line angle information calculation formula in combination with the center pixel coordinate point of the infusion filter; if the number of the center pixel coordinates of the selected defect contour is greater than 1, the distance between the center pixel coordinates of the plurality of selected defect contours is calculated, and the center pixel coordinate corresponding to the maximum distance value is selected for straight line angle information calculation.

[0076] In combination with the corresponding relationship between the straight line angle information and the image pixel size of the infusion filter and the actual physical size of the infusion filter, the defect size and the defect position information of the to-be-detected image of the infusion filter are determined; the defect size and the defect position information of the to-be-detected image of the infusion filter are marked to obtain the front defects of the infusion filter and the back defects of the infusion filter.

[0077] S21, detecting defects of a front to-be-detected image of the infusion filter;

[0078] In this embodiment, reference is made to Figure 4Because the size of the infusion filter can be obtained by measuring as L, the size of the two boundary points of the infusion filter on the image is calculated as L image According to the corresponding relationship between the pixel size of the infusion filter image and the actual physical size of the infusion filter, it can be clearly known that each pixel point represents the actual size of the infusion filter as L pix , wherein the expression of the corresponding relationship between the pixel size of the infusion filter image and the actual physical size of the infusion filter is:

[0079]

[0080] In the above formula, L represents the actual physical size of the infusion filter, L image represents the pixel size of the infusion filter image, L pix represents the actual size of the infusion filter under the pixel point.

[0081] As Figure 5 shown, further determine the coordinate point p1(x p1 ,y p1 ) of the center of the circular infusion filter in the camera and the positions of the two suction filter ports, first, the circular and rectangular inner part of the photographed picture of the infusion filter is subjected to adaptive threshold segmentation, wherein the adaptive threshold is determined by calculating the mean value or Gaussian weighted average in a certain window range, as Figure 6 shown, which is a 3x3 window, the window mean value is calculated as 121, and the threshold value of 96 pixels in the figure is segmented by setting less than the window mean value 15, and the appropriate window size and the appropriate segmentation threshold value are set to segment the circular and rectangular inner part of the infusion filter, as Figure 4 shown, by Figure 4 setting the mask of the area in the black frame to retain only the in-frame part of the segmentation result, the adaptive threshold segmentation is performed to obtain a binary image, as Figure 7 shown;

[0082] Further, the contour extraction is performed, the area and the perimeter of the n contours are calculated respectively, and the contours with the circular degree close to 1 are screened out by calculating the contour circular degree calculation formula. The small circle contour is obtained by judging the area and the perimeter of the contours with the circular degree close to 1, and the center point coordinate p2(x p2 ,y p2 ) is obtained by performing circle fitting on the contour, that is Figure 7 the center coordinate of the circle in the red box above, and the expression of the contour circular degree calculation formula is as follows:

[0083] roundness n =|4*π*Counterarea n / I n |2

[0084] In the formula, roundness n represents the n-th profile roundness, π represents the circular constant, I n represents the n-th profile circumference, Counterarea n represents the n-th profile area;

[0085] The two-point straight line angle information calculation formula can obtain the straight line angle information angle p1-p2 , by p1 and p2 points and two-point direction partitioning, as Figure 8 shown, and each zone (circle and annulus) thereof is subjected to different setting value window threshold segmentation to eliminate gray scale excessive change interference. The straight line angle information calculation formula is specifically as follows:

[0086]

[0087] In the formula, angle p1-p2 represents the straight line angle information, x p1 , y p1 represents the center pixel coordinate point of the infusion filter, x p2 , y p2 represents the center point pixel coordinate of the selected defect profile;

[0088] The results of the processing are combined and according to the defect size, i.e. the above-mentioned Figure 8 partitioning and segmentation results, the binarized images of each defect are obtained. It is also known that the pixel point represents the actual size of the infusion filter as L pix . The application has a screening on the number and size of defects, and makes a circular mark on the original image as shown below. Figure 9

[0089] S22, detecting defects on the back surface of the infusion filter.

[0090] In this embodiment, the back surface is photographed and subjected to adaptive threshold segmentation as shown in the principle, a suitable window size is set and a suitable segmentation threshold is set for adaptive threshold segmentation to obtain a binarized image as shown below. Figure 6 Figure 10

[0091] Further, the profile extraction is performed, the area and circumference of the n profiles are calculated, and the profiles with roundness close to 1 are screened out through the profile roundness calculation formula. The area and circumference of the profiles with roundness close to 1 are determined to obtain 6 small circular profiles as shown below. Figure 11 b1 b2 ​​​​​p b3 p b4 p b5 p b6 The distances between the six points are calculated using the two-point distance formula. The angle between the two points with the largest distance is then calculated using the line angle formula. b ,like Figure 11 As shown;

[0092] Divide the area into two parts by the two points with the greatest distance and the directions between them, such as... Figure 12 As shown, different set window thresholds are applied to each region—rectangular, annular, and inner circle—to eliminate interference from excessive grayscale variations. Specifically, a region-based detection method is used for infusion filter samples, which effectively detects defects such as oil stains, foreign objects, and black spots on the infusion tubing. The processed results are then merged and analyzed based on the defect size, as described above. Figure 12 After partitioning and segmentation, binarized images of each defect are obtained, and it is known that each pixel represents the actual size L of the infusion filter. pix The application filters based on the size and quantity of defects, marking them as circles on the original image as follows. Figure 13 As shown.

[0093] S3. Integrate the defects on the front and back of the infusion filter to obtain the defects of the infusion filter.

[0094] Reference Figure 2 A defect detection system for an infusion filter, comprising:

[0095] The acquisition module is used to acquire the image to be tested of the infusion filter, which includes the front image and the back image of the infusion filter.

[0096] The detection module is used to perform defect detection and marking processing on the front and back images of the infusion filter using an adaptive threshold segmentation method, respectively, to obtain defects on the front and back of the infusion filter.

[0097] An integration module is used to integrate the defects on the front and back of the infusion filter to obtain the defects of the infusion filter.

[0098] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0099] The above is a specific description of the preferred embodiment of the application, but the application is not limited to the described embodiments, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the present application.

Claims

1. A method of detecting defects in an infusion filter, characterized by, The method comprises the following steps: obtaining the image to be detected of the infusion filter, wherein the image to be detected of the infusion filter comprises the front face image to be detected of the infusion filter and the back face image to be detected of the infusion filter; performing defect detection and marking processing on the front face image to be detected of the infusion filter and the back face image to be detected of the infusion filter respectively by using the adaptive threshold segmentation method to obtain the front face defect of the infusion filter and the back face defect of the infusion filter; integrating the front face defect of the infusion filter and the back face defect of the infusion filter to obtain the defect of the infusion filter; wherein the step of obtaining the image to be detected of the infusion filter specifically comprises: controlling the illumination intensity of the ring light source through the ring light source controller when the infusion filter is fixed in the infusion filter card slot; performing light compensation processing on the fixed infusion filter according to the illumination intensity of the ring light source; performing shooting processing on the light compensated infusion filter through the camera to obtain the camera result; transmitting the camera shooting result to the control terminal for display to obtain the image to be detected of the infusion filter; wherein the ring light source, the ring light source controller, the infusion filter card slot, the camera and the control terminal form an infusion filter ring light source detection system; wherein the step of performing defect detection and marking processing on the front face image to be detected of the infusion filter and the back face image to be detected of the infusion filter respectively by using the adaptive threshold segmentation method to obtain the front face defect of the infusion filter and the back face defect of the infusion filter specifically comprises: performing image pixel size calibration processing on the image to be detected of the infusion filter to obtain the corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter; performing adaptive threshold segmentation processing on the image to be detected of the infusion filter through the preset window sliding strategy to obtain the defect binary image of the infusion filter; performing circular degree contour extraction fitting processing on the defect binary image of the infusion filter to obtain the straight line angle information; combining the straight line angle information and the corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter to determine the defect size and defect position information of the image to be detected of the infusion filter; performing marking processing on the defect size and defect position information of the image to be detected of the infusion filter to obtain the front face defect of the infusion filter and the back face defect of the infusion filter; the step of performing circular degree contour extraction fitting processing on the defect binary image of the infusion filter to obtain the straight line angle information specifically comprises: performing contour extraction processing on the defect binary image of the infusion filter to obtain a plurality of defect contours; performing area and perimeter calculation processing on the plurality of defect contours to obtain the area of the defect contour and the perimeter of the defect contour; obtaining the corresponding defect contour circular degree through the contour circular degree calculation formula and combining the area of the defect contour and the perimeter of the defect contour; setting a circular degree threshold range, selecting the defect contour corresponding to the defect contour circular degree within the circular degree threshold range to obtain the selected defect contour; acquire the distance between the camera and the image focus point of the infusion filter to be detected, the image focus point of the infusion filter to be detected being within the boundary of the image of the infusion filter to be detected; determine the center pixel coordinate point of the infusion filter according to the distance between the camera and the image focus point of the infusion filter to be detected and the pixel size of the infusion filter image; determine the center point pixel coordinate of the selected defect profile, combine the center pixel coordinate point of the infusion filter, and obtain the straight line angle information through the straight line angle information calculation formula; According to the center point pixel coordinate of the selected defect profile, the center pixel coordinate point of the infusion filter and the straight line angle information, the area is divided, and each area is segmented by different setting value window threshold to eliminate the interference of excessive change of gray scale.

2. The method of claim 1, wherein the defect detection of the infusion filter is characterized by, The step of calibrating the image pixel size of the infusion filter image and obtaining the corresponding relationship between the infusion filter image pixel size and the actual physical size of the infusion filter includes: acquiring the measurement data of the infusion filter, and determining the actual physical size of the infusion filter according to the measurement data; acquire several boundary pixel points of the image to be detected of the infusion filter; calculate the distance between each boundary pixel point of the image to be detected of the infusion filter, and select the maximum value of the distance between the boundary pixel points as the pixel size of the infusion filter image; construct the corresponding relationship between the pixel size of the infusion filter image and the actual physical size of the infusion filter.

3. The method of claim 1, wherein the step of detecting the defect of the infusion filter is characterized by, The infusion filter includes a filter itself area and an air suction filter port area, and the step of performing adaptive threshold segmentation processing on the image to be detected of the infusion filter to obtain a defect binary image of the infusion filter by the preset window sliding strategy includes: select a window with all pixel points on the image to be detected of the infusion filter as the center of the window and set the range of the window; According to the range of the window, the mean value of the window is determined by Gaussian weighted average calculation processing; introducing a segmentation threshold, subtracting the mean value of the window from the segmentation threshold to obtain a window segmentation node threshold; acquire the pixel gray value of the image to be detected of the infusion filter; Based on the filter itself area and the air suction filter port area, the pixel gray value of the image to be detected of the infusion filter less than the window segmentation node threshold is segmented and extracted and marked respectively to obtain a defect pixel point. Integrate all the defect pixel points to obtain the defect binary image of the infusion filter.

4. The method of claim 1, wherein the step of detecting the defect of the infusion filter is characterized by, If the number of center point pixel coordinates of the selected defect profile is greater than 1, the distance between the center point pixel coordinates of the selected defect profile is calculated, and the center point pixel coordinate corresponding to the maximum distance value is selected for straight line angle information calculation.

5. The method of claim 1, wherein the step of detecting the defect of the infusion filter is characterized by, The profile circularity calculation formula is as follows: In the above formulae, denotes the circularity of the defect profile, denotes the circle constant, denotes the profile circumference of the defect profile, denotes the profile area of the defect profile.

6. The method of claim 1, wherein the step of detecting the defect of the infusion filter is characterized by, The straight line angle information calculation formula is as follows: In the above formula, represents the straight line angle information, , represents the center pixel coordinate point of the infusion filter, , represents the center point pixel coordinate of the selected defect profile.

7. A defect detection system for infusion filters, characterized by, It includes the following modules: An acquisition module is configured to acquire an image to be detected of an infusion filter, the image to be detected of the infusion filter including an image to be detected of a front surface of the infusion filter and an image to be detected of a back surface of the infusion filter; A detection module is configured to perform defect detection and marking processing on the image to be detected of the front surface of the infusion filter and the image to be detected of the back surface of the infusion filter respectively by using an adaptive threshold segmentation method, to obtain a front surface defect of the infusion filter and a back surface defect of the infusion filter; An integration module is configured to integrate the front surface defect of the infusion filter and the back surface defect of the infusion filter, to obtain a defect of the infusion filter; The acquisition of the image to be detected of the infusion filter specifically includes the following steps: controlling the illumination intensity of the ring light source by using a ring light source controller when the infusion filter is fixed in an infusion filter card slot; performing illumination compensation processing on the fixed infusion filter according to the illumination intensity of the ring light source; performing shooting processing on the infusion filter after the illumination compensation by using a camera, to obtain a camera result; transmitting the camera shooting result to a control terminal for display, to obtain the image to be detected of the infusion filter; The ring light source, the ring light source controller, the infusion filter card slot, the camera and the control terminal form an infusion filter ring light source detection system; The defect detection and marking processing on the image to be detected of the front surface of the infusion filter and the image to be detected of the back surface of the infusion filter respectively by using the adaptive threshold segmentation method specifically includes the following steps: performing image pixel size calibration processing on the image to be detected of the infusion filter, to obtain a corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter; performing adaptive threshold segmentation processing on the image to be detected of the infusion filter by using a preset window sliding strategy, to obtain a defect binary image of the infusion filter; performing circular degree contour extraction fitting processing on the defect binary image of the infusion filter, to obtain straight line angle information; combining the straight line angle information and the corresponding relationship between the image pixel size of the infusion filter and the actual physical size of the infusion filter, to determine defect size and defect position information of the image to be detected of the infusion filter; performing marking processing on the defect size and defect position information of the image to be detected of the infusion filter, to obtain the front surface defect of the infusion filter and the back surface defect of the infusion filter; The circular degree contour extraction fitting processing on the defect binary image of the infusion filter, to obtain the straight line angle information specifically includes the following steps: performing contour extraction processing on the defect binary image of the infusion filter, to obtain a plurality of defect contours; performing area and perimeter calculation processing on the plurality of defect contours, to obtain the area of the defect contour and the perimeter of the defect contour; obtaining corresponding defect contour circular degrees by using a contour circular degree calculation formula and combining the area of the defect contour and the perimeter of the defect contour. A circularity threshold range is set, and a defect profile corresponding to a circularity of the defect profile within the circularity threshold range is selected to obtain a selected defect profile; A distance between the camera and a focus point of the image to be detected of the infusion filter is obtained, and the focus point of the image to be detected of the infusion filter is within a boundary of the image to be detected of the infusion filter; According to the distance between the camera and the focus point of the image to be detected of the infusion filter and the pixel size of the image of the infusion filter, a center pixel coordinate point of the infusion filter is determined; A center point pixel coordinate of the selected defect profile is determined, and a straight line angle information is obtained by a straight line angle information calculation formula in combination with the center pixel coordinate point of the infusion filter; According to the center point pixel coordinate of the selected defect profile, the center pixel coordinate point of the infusion filter, and the straight line angle information, a partition is performed, and each region is segmented by a different set value window threshold to eliminate interference of excessive changes in gray scale.

Citation Information

Patent Citations

  • Resin optical filter film crack detection device and method

    CN109827974A

  • Mini LED wafer front and back appearance defect detection method and device

    CN112255245A

  • Mirror surface defect detection method and device based on binary fringes and medium

    CN115526854A