Defect detection and analysis system based on image recognition

By using an image recognition defect detection and analysis system in the detection of syringe image recognition defects, combined with plane rectangular coordinate system and area division technology, the detection inaccurate problem caused by complex syringe structure is solved, and efficient identification and accurate judgment of syringe defects are achieved.

CN118918383AInactive Publication Date: 2024-11-08ANHUI POLYTECHNIC UNIV MECHANICAL & ELECTRICAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411091574.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the detection process of image recognition defects in the syringe, due to the complex structure of the syringe and the unstable image quality, the accuracy of the detection is affected, especially for defect detection such as damage and syringe bending deformation.

Method used

Using an image recognition defect detection and analysis system, the reference image selection, area division, image acquisition, abnormal area determination and image analysis module are used, combined with plane rectangular coordinate system and preprocessing technology, the abnormal area is accurately marked, and whether there are defects in the syringe is determined, and Identify different types of defects by distinguishing between blank areas, critical areas and non-critical areas.

Benefits of technology

It improves detection efficiency and resource utilization, can automatically identify different types of defects, provide more detailed detection results, improves the accuracy of detection results, can identify damage or breakage of the syringe syringe, and determine whether there are bending defects in the syringe syringe.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918383A_ABST
    Figure CN118918383A_ABST
Patent Text Reader

Abstract

The invention discloses a defect detection and analysis system based on image recognition, relates to the technical field of image recognition, and solves the problems that in the image recognition defect detection process of an injector, due to the fact that the structure of the injector is complex, when the injector is subjected to defect detection, the detection accuracy is possibly influenced due to unstable image quality, and the detection efficiency is influenced. In order to solve the problem of poor detection effect especially for defects such as breakage and needle tube bending deformation of the injector, blank areas, key areas and non-key areas of an image are classified, different parts of the injector are analyzed carefully, abnormal areas are accurately marked through a rectangular coordinate system, and the accuracy of the detection result is improved. According to the technical scheme, the detection system can position and recognize the abnormity in a short time, and different types of defects can be automatically recognized by judging the performance of the abnormal area in different areas, so that a more detailed detection result is provided, and meanwhile, the accuracy of the detection result is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a defect detection and analysis system based on image recognition. Background Art

[0002] The core of image recognition technology is to use computer vision and deep learning algorithms to analyze and process images, thereby achieving automatic inspection and quality control of products. In the production process of medical devices, traditional manual inspection methods have problems such as low efficiency, high false detection rate and high cost, and cannot meet the needs of modern production for high precision and high efficiency. By using image recognition defect detection technology, manufacturers can achieve real-time monitoring of medical devices and greatly improve production efficiency and product quality.

[0003] In the production of medical devices, syringes are a common medical device, and their quality is directly related to the health and safety of users. The production of syringes requires strict control of the quality of each link, including the size of the needle, the transparency of the syringe, the accuracy of the syringe scale, etc. Traditional manual inspection methods are not only time-consuming and labor-intensive, but also cannot guarantee the consistency and reliability of all products. Image recognition technology can quickly and accurately detect various defects that may occur in the production process of syringes.

[0004] Although image recognition technology has significant advantages in medical device inspection, there are still some urgent problems to be solved in the image recognition defect detection process of syringes. First, the structure of the syringe is complex. When inspecting syringe defects, the image quality may be unstable, thus affecting the accuracy of the inspection, especially for defects such as breakage and bending and deformation of the syringe. The inspection effect is not good. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a defect detection and analysis system based on image recognition, which solves the problem that during the image recognition defect detection process of syringes, due to the complex structure of the syringes, the image quality may be unstable when detecting syringe defects, thereby affecting the accuracy of detection, especially the problem of poor detection effect for defects such as breakage and bending and deformation of the syringes.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a defect detection and analysis system based on image recognition, comprising:

[0007] The reference image selection module is used to collect images of defect-free syringes, and obtain a standard syringe needle comparison image through image denoising, image enhancement and other preprocessing processes, and record it as a reference image;

[0008] The reference image area division module is used to divide the reference image into three areas, namely, a blank area, a key area and a non-key area, wherein the key area is the syringe needle area, and the non-key area is other areas of the syringe;

[0009] An image acquisition module is used to acquire images of the prepared syringe, and obtain a target detection image after preprocessing the acquired image such as image denoising and image enhancement;

[0010] The abnormal region determination module is used to establish a plane rectangular coordinate system on the reference image and the target detection image, determine the coordinate points that are different from the reference image by image comparison, and mark them as abnormal coordinate points, then determine the abnormal region of the target detection image according to the abnormal coordinate points, and finally determine the abnormal coordinate points and abnormal region of the final target detection image;

[0011] An image analysis module is used to mark the abnormal area on the target detection image on the reference image, and determine whether the syringe has defects according to the abnormal area on the reference image;

[0012] The image defect determination module is used to determine the specific defects on the syringe according to the judgment result of the image analysis module.

[0013] Preferably, in the reference image area division module, the three areas are divided in the following manner:

[0014] Define critical areas: By analyzing the contour, identify the specific location of the syringe barrel, which is the thinnest and most prominent part of the syringe, and identify it by its position or shape characteristics;

[0015] Define non-critical areas: Identify the parts other than the needle tube, which are larger and regularly shaped.

[0016] Define blank area: The image area not covered by the first two areas is considered blank area.

[0017] Preferably, in the abnormal area determination module, the specific method of determining the coordinate points of the target detection image that are different from the reference image and marking them as abnormal coordinate points is:

[0018] P1: Establish the x-axis and y-axis plane rectangular coordinate system with the center point of the target detection image and the reference image as the origin of the coordinate system;

[0019] P2: Set the unit on the plane rectangular coordinate x-axis and y-axis to be one pixel;

[0020] P3: Then compare the target detection image with the reference image to determine the coordinate points where the target detection image is different from the reference image, and mark them as abnormal coordinate points.

[0021] Preferably, the specific method of determining the abnormal area of ​​the target detection image according to the abnormal coordinate point is:

[0022] In the rectangular coordinate system of the target detection image, when there are more than two abnormal coordinates of the abnormal coordinate points on the x-axis or y-axis continuously, the pixel points corresponding to the more than two abnormal coordinate points are merged, and the merged area is marked as the abnormal area.

[0023] Preferably, in the image analysis module, the specific method for determining whether the syringe has defects is:

[0024] S1: Determine the specific position of the abnormal area on the target detection image through a rectangular coordinate system, and also mark it on the reference image to determine whether the abnormal area is located in a blank area, a key area, or a non-key area in the reference image;

[0025] S2: There are three situations where the abnormal area is located in the blank area, key area and non-key area of ​​the reference image: the abnormal area is in the key area on the reference image, the abnormal area is in the non-key area on the reference image and the abnormal area is in the blank area on the reference image;

[0026] S3: When the abnormal area exists in the critical area, it is judged that the syringe needle tube has defects;

[0027] S4: When the abnormal area exists in a non-critical area, it is judged that there is a defect in other parts of the syringe;

[0028] S5: If the abnormal area does not exist in the critical area and the non-critical area, the syringe is preliminarily judged to be qualified.

[0029] Preferably, in the image defect determination module, the specific defect mode of the syringe is determined as follows:

[0030] AS1: When the image analysis module determines that the syringe needle has defects, the abnormal area in the blank area is analyzed:

[0031] If there is no abnormal area in the blank area, it is determined that the syringe needle tube has damage and breakage defects, and the damage defect is marked;

[0032] If an abnormal area appears in the blank area, the specific coordinates of each abnormal point in the abnormal area are determined according to the coordinate system for each abnormal area, and the linear equations of the two slender edge straight lines of the needle tube are determined in combination, and the shortest distance from each abnormal point to the two slender lines is calculated by the shortest distance formula from point to straight line. The smallest value in the result is selected and compared with the preset value. If it is less than the preset value, it is judged that the needle tube has a bending defect in the abnormal area and the bending defect is marked. If it is greater than the preset value, it is judged that the needle tube does not have a bending defect in the abnormal area.

[0033] AS3: The image analysis module determines that the syringe is initially qualified, and then performs the bending defect mark judgment on steps AS1 and AS2 to determine whether other parts of the syringe and the needle tube are bent.

[0034] Preferably, after step AS1, the method further comprises:

[0035] AS2: When the image analysis module determines that there are defects in other parts of the syringe, analyze the abnormal area in the blank area:

[0036] If there is no abnormal area in the blank area, it is determined that other parts of the syringe have damage and breakage defects, and the damage defect is marked;

[0037] If an abnormal area appears in the blank area, the specific coordinates of each abnormal point in the abnormal area are determined according to the coordinate system, and the straight line equation of the edge line is determined in combination with the edge lines that constitute other parts. The shortest distance from each abnormal point to each edge line is calculated by the shortest distance formula from the point to the edge line. The smallest value in the result is selected and compared with the preset value. When it is less than the preset value, it is judged that other parts of the syringe have bending defects in the abnormal area, and the bending defects are marked. When it is greater than the preset value, it is judged that other parts do not have bending defects in the abnormal area.

[0038] Preferably, after step AS2, the method further includes:

[0039] AS3: The image analysis module determines that the syringe is initially qualified, and then performs the bending defect mark judgment on steps AS1 and AS2 to determine whether other parts of the syringe and the needle tube are bent.

[0040] The present invention provides a defect detection and analysis system based on image recognition. Compared with the prior art, it has the following beneficial effects:

[0041] (1) The present invention classifies the blank area, key area and non-key area of ​​the image, conducts a detailed analysis on different parts of the syringe, and accurately marks the abnormal area through a rectangular coordinate system, so that the detection system can locate and identify the abnormality in a relatively short time. This method of combining area division with coordinate marking effectively avoids excessive processing of the syringe as a whole, and only focuses on the part where defects may occur, thereby improving the detection efficiency and resource utilization. By judging the performance of the abnormal area in different areas, different types of defects can be automatically identified, thereby providing more detailed detection results and improving the accuracy of the detection results.

[0042] (2) The present invention further processes the judgment result of the image analysis module. Through defect detection, it can not only identify the damage or breakage of the syringe needle, but also perform more detailed coordinate analysis on the abnormal points in the blank area and calculate the shortest distance from the abnormal points to the straight line of the needle edge, thereby judging whether the needle has a bending defect, thereby improving the ability to identify syringe defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The present invention will be further described below in conjunction with the accompanying drawings.

[0044] Figure 1 It is an intuitive diagram of establishing a rectangular coordinate system based on an image recognition defect detection and analysis system of the present invention;

[0045] Figure 2 This is a framework diagram of a defect detection and analysis system based on image recognition according to the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] Embodiment 1

[0048] See also Figure 1-Figure 2 , the present invention provides a defect detection and analysis system based on image recognition, including a reference image selection module, a reference image region division module, an image acquisition module, an abnormal region determination module, an image analysis module and an image defect determination module;

[0049] The reference image selection module is used to collect images of defect-free syringes, and obtain a standard syringe needle comparison image through image denoising, image enhancement and other preprocessing processes, and record it as a reference image;

[0050] It should be noted that when selecting a defect-free syringe needle, experienced staff will select it, and the image collected will be pre-processed to obtain a reference image;

[0051] The reference image area division module is used to divide the reference image into three areas, namely, a blank area, a key area and a non-key area, wherein the key area is the syringe needle area, and the non-key area is other areas of the syringe;

[0052] Specifically, the three areas are divided as follows:

[0053] Define critical areas: By analyzing the contour, identify the specific location of the syringe barrel, which is usually the thinnest and most prominent part of the syringe and can be identified by its position or shape characteristics;

[0054] Define the non-critical area: Identify the parts other than the needle tube, which is usually large and regular in shape;

[0055] Definition of blank area: The image area not covered by the first two areas is considered as blank area;

[0056] An image acquisition module is used to acquire images of the prepared syringe, and obtain a target detection image after preprocessing the acquired image such as image denoising and image enhancement;

[0057] The abnormal region determination module is used to establish a plane rectangular coordinate system on the reference image and the target detection image, determine the coordinate points that are different from the reference image by image comparison, and mark them as abnormal coordinate points, then determine the abnormal region of the target detection image according to the abnormal coordinate points, and finally determine the abnormal coordinate points and abnormal region of the final target detection image;

[0058] like Figure 1 As shown, the specific method of determining the coordinate points where the target detection image and the reference image are different is as follows:

[0059] P1: Establish the x-axis and y-axis plane rectangular coordinate system with the center point of the target detection image and the reference image as the origin of the coordinate system;

[0060] P2: Set the unit on the plane rectangular coordinate x-axis and y-axis to be one pixel;

[0061] P3: Then compare the target detection image with the reference image, determine the coordinate points where the target detection image is different from the reference image, and mark them as abnormal coordinate points;

[0062] Among them, image comparison can be performed by comparing the pixels of the reference image and the target image point by point through difference detection, and calculating the difference value of each pixel in the image. If the difference value exceeds the set threshold, the pixel is marked as an abnormal point, that is, an abnormal coordinate point;

[0063] The specific method of determining the abnormal area of ​​the target detection image according to the abnormal coordinate points is:

[0064] In the rectangular coordinate system of the target detection image, when there are more than two abnormal coordinates of the abnormal coordinate points on the x-axis or y-axis, the pixel points corresponding to the more than two abnormal coordinate points are merged, and the merged area is marked as the abnormal area;

[0065] Specifically, in this embodiment, after the abnormal coordinate points are determined by fusion comparison of the target detection image and the reference image, if the abnormal coordinate points are (1,1) and (1,2), the pixels corresponding to the two abnormal coordinate points are merged, and the merged area is marked as the abnormal area. Similarly, if the abnormal coordinate points are (2,1) and (1,1), the pixels corresponding to the two abnormal coordinate points are merged, and the merged area is marked as the abnormal area. If the abnormal coordinate points are (1,1), (1,2) and (2,1), the pixels corresponding to the three abnormal coordinate points are merged, and the merged area is marked as the abnormal area.

[0066] An image analysis module is used to mark the abnormal area on the target detection image on the reference image, and determine whether the syringe has defects according to the abnormal area on the reference image;

[0067] The specific way to determine whether the syringe is defective is:

[0068] S1: Determine the specific position of the abnormal area on the target detection image through a rectangular coordinate system, and also mark it on the reference image to determine whether the abnormal area is located in a blank area, a key area, or a non-key area in the reference image;

[0069] S2: There are three situations where the abnormal area is located in the blank area, key area and non-key area of ​​the reference image: the abnormal area is in the key area on the reference image, the abnormal area is in the non-key area on the reference image and the abnormal area is in the blank area on the reference image;

[0070] S3: When the abnormal area exists in the critical area, it is judged that the syringe needle tube has defects;

[0071] S4: When the abnormal area exists in a non-critical area, it is judged that there is a defect in other parts of the syringe;

[0072] S5: If the abnormal area does not exist in the critical area or the non-critical area, the syringe is preliminarily judged to be qualified;

[0073] Embodiment 2

[0074] In the specific implementation process, this embodiment is based on the first embodiment and is different from the first embodiment in that this embodiment further analyzes and processes the judgment result of the image analysis module:

[0075] An image defect determination module, used to determine specific defects on the syringe based on the judgment result of the image analysis module;

[0076] The specific defects of the syringe are determined as follows:

[0077] AS1: When the image analysis module determines that the syringe needle has defects, analyze the abnormal area in the blank area:

[0078] If there is no abnormal area in the blank area, it is determined that the syringe needle tube has damage and breakage defects, and the damage defect is marked;

[0079] If an abnormal area appears in the blank area, the specific coordinates of each abnormal point in the abnormal area are determined according to the coordinate system for each abnormal area, and the linear equations of the two slender edge straight lines of the needle tube are determined in combination, and the shortest distance from each abnormal point to the two slender lines is calculated by the shortest distance formula from point to straight line. The smallest value in the result is selected and compared with the preset value. If it is less than the preset value, it is judged that the needle tube has a bending defect in the abnormal area and the bending defect is marked. If it is greater than the preset value, it is judged that the needle tube does not have a bending defect in the abnormal area.

[0080] Specifically, in this embodiment, the linear equations of the two slender edge lines of the needle tube on the reference image in the rectangular coordinate system are y 1 =2 and y 2 =6, there are 3 abnormal points in an abnormal area, namely (1,8), (1,7) and (2,7). According to the distance formula from point to line: 1 The distances of the straight line are 6, 5 and 5; the distances of the three outliers to y 2 The distances of the straight lines are 2, 1 and 1; the minimum value 1 is taken, and the preset value in this embodiment is 1.4. The minimum value is less than the preset value, and the syringe needle tube has a bending defect in the abnormal area;

[0081] AS2: When the image analysis module determines that there are defects in other parts of the syringe, analyze the abnormal area in the blank area:

[0082] If there is no abnormal area in the blank area, it is determined that other parts of the syringe have damage and breakage defects, and the damage defect is marked;

[0083] If an abnormal area appears in the blank area, the specific coordinates of each abnormal point in the abnormal area are determined according to the coordinate system for each abnormal area, and the linear equation of the edge line is determined in combination with the edge lines that constitute other parts. The shortest distance from each abnormal point to each edge line is calculated by the shortest distance formula from a point to an edge line. The smallest value in the result is selected and compared with the preset value. If it is less than the preset value, it is judged that other parts of the syringe have bending defects in the abnormal area and the bending defects are marked. If it is greater than the preset value, it is judged that other parts do not have bending defects in the abnormal area.

[0084] AS3: The image analysis module determines that the syringe is initially qualified, and then performs the bending defect mark judgment in steps AS1 and AS2 to determine whether other parts of the syringe and the needle tube are bent;

[0085] Embodiment 3

[0086] The specific implementation process of this embodiment includes the entire implementation process of the above two groups of embodiments.

[0087] Some of the data in the above formulas are dimensionless and numerically calculated. Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.

[0088] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.

Claims

1. A defect detection and analysis system based on image recognition, characterized in that: include: The reference image selection module is used to collect images of defect-free syringes, and obtain a standard syringe needle comparison image through image denoising, image enhancement and other preprocessing processes, and record it as a reference image; The reference image area division module is used to divide the reference image into three areas, namely, a blank area, a key area and a non-key area, wherein the key area is the syringe needle area, and the non-key area is other areas of the syringe; An image acquisition module is used to acquire images of the prepared syringe, and obtain a target detection image after preprocessing the acquired image such as image denoising and image enhancement; The abnormal region determination module is used to establish a plane rectangular coordinate system on the reference image and the target detection image, determine the coordinate points that are different from the reference image by image comparison, and mark them as abnormal coordinate points, then determine the abnormal region of the target detection image according to the abnormal coordinate points, and finally determine the abnormal coordinate points and abnormal region of the final target detection image; An image analysis module is used to mark the abnormal area on the target detection image on the reference image, and determine whether the syringe has defects according to the abnormal area on the reference image; The image defect determination module is used to determine the specific defects on the syringe according to the judgment result of the image analysis module.

2. The image recognition-based defect detection and analysis system according to claim 1, characterized in that: In the reference image area division module, the three areas are divided as follows: Define critical areas: By analyzing the contour, identify the specific location of the syringe barrel, which is the thinnest and most prominent part of the syringe, and identify it by its position or shape characteristics; Define non-critical areas: Identify the parts other than the needle tube, which are larger and regularly shaped. Define blank area: The image area not covered by the first two areas is considered blank area.

3. The image recognition-based defect detection and analysis system according to claim 2, characterized in that: In the abnormal area determination module, the specific method of determining the coordinate points where the target detection image is different from the reference image and marking them as abnormal coordinate points is as follows: P1: Establish the x-axis and y-axis plane rectangular coordinate system with the center point of the target detection image and the reference image as the origin of the coordinate system; P2: Set the unit on the plane rectangular coordinate x-axis and y-axis to be one pixel; P3: Then compare the target detection image with the reference image to determine the coordinate points where the target detection image is different from the reference image, and mark them as abnormal coordinate points.

4. The image recognition-based defect detection and analysis system according to claim 3, characterized in that: The specific method of determining the abnormal area of ​​the target detection image according to the abnormal coordinate points is: In the rectangular coordinate system of the target detection image, when there are more than two abnormal coordinates of the abnormal coordinate points on the x-axis or y-axis continuously, the pixel points corresponding to the more than two abnormal coordinate points are merged, and the merged area is marked as the abnormal area.

5. The image recognition-based defect detection and analysis system according to claim 1, characterized in that: In the image analysis module, the specific method for determining whether the syringe has defects is as follows: S1: Determine the specific position of the abnormal area on the target detection image through a rectangular coordinate system, and also mark it on the reference image to determine whether the abnormal area is located in a blank area, a key area, or a non-key area in the reference image; S2: There are three situations where the abnormal area is located in the blank area, key area and non-key area of ​​the reference image: the abnormal area is in the key area on the reference image, the abnormal area is in the non-key area on the reference image and the abnormal area is in the blank area on the reference image; S3: When the abnormal area exists in the critical area, it is judged that the syringe needle tube has defects; S4: When the abnormal area exists in a non-critical area, it is judged that there is a defect in other parts of the syringe; S5: If the abnormal area does not exist in the critical area and the non-critical area, the syringe is preliminarily judged to be qualified.

6. The image recognition-based defect detection and analysis system according to claim 1, characterized in that: In the image defect determination module, the specific defects of the syringe are determined as follows: AS1: When the image analysis module determines that the syringe needle has defects, analyze the abnormal area in the blank area: If there is no abnormal area in the blank area, it is determined that the syringe needle tube has damage and breakage defects, and the damage defect is marked; If an abnormal area appears in the blank area, the specific coordinates of each abnormal point in the abnormal area are determined according to the coordinate system for each abnormal area, and the linear equations of the two slender edge straight lines of the needle tube are determined in combination, and the shortest distance from each abnormal point to the two slender lines is calculated by the shortest distance formula from point to straight line. The smallest value in the result is selected and compared with the preset value. If it is less than the preset value, it is judged that the needle tube has a bending defect in the abnormal area and the bending defect is marked. If it is greater than the preset value, it is judged that the needle tube does not have a bending defect in the abnormal area. AS3: The image analysis module determines that the syringe is initially qualified, and then performs the bending defect mark judgment on steps AS1 and AS2 to determine whether other parts of the syringe and the needle tube are bent.

7. The image recognition-based defect detection and analysis system according to claim 6, characterized in that: After step AS1, the method further includes: AS2: When the image analysis module determines that there are defects in other parts of the syringe, analyze the abnormal area in the blank area: If there is no abnormal area in the blank area, it is determined that other parts of the syringe have damage and breakage defects, and the damage defect is marked; If an abnormal area appears in the blank area, the specific coordinates of each abnormal point in the abnormal area are determined according to the coordinate system, and the straight line equation of the edge line is determined in combination with the edge lines that constitute other parts. The shortest distance from each abnormal point to each edge line is calculated by the shortest distance formula from the point to the edge line. The smallest value in the result is selected and compared with the preset value. When it is less than the preset value, it is judged that other parts of the syringe have bending defects in the abnormal area, and the bending defects are marked. When it is greater than the preset value, it is judged that other parts do not have bending defects in the abnormal area.

8. The image recognition-based defect detection and analysis system according to claim 7, characterized in that: After step AS2, the method further includes: AS3: The image analysis module determines that the syringe is initially qualified, and then performs the bending defect mark judgment on steps AS1 and AS2 to determine whether other parts of the syringe and the needle tube are bent.