A method and system for visual inspection of injection mold quality

Through detailed analysis, screening and fitting of the grayscale image of the injection mold, the problem of inaccurately distinguishing cracks and hole textures in the prior art is solved, and the accuracy and reliability of visual inspection of injection mold quality is improved.

CN118762026BActive Publication Date: 2024-11-22SHENZHEN XINGUAN PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411252346.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-11-22
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

The prior art cannot accurately distinguish cracks and hole internal textures in visual inspection of injection mold quality, resulting in inaccurate detection of detection results.

Method used

By obtaining the grayscale image sequence of the injection mold, the suspected crack areas are screened, the root mean square error and the minimum edge length of the circumference rectangle are calculated, the center and degree of influence are fitted, and the possible crack overlapping areas are screened, further improving the detection accuracy.

Benefits of technology

It improves the accuracy of visual inspection of injection mold quality, accurately locates where possible defects are present, effectively eliminates interference from non-crack areas, and enhances the reliability of crack identification and detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762026B_ABST
    Figure CN118762026B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and specifically to a method and system for visual inspection of injection mold quality, comprising: obtaining a plurality of suspected areas of each injection mold grayscale image. Calculating the minimum circumscribed rectangle and root mean square error of each suspected area, and screening out suspected crack areas. Obtaining the suspected crack fitting curve segment of each suspected crack area, calculating the fitting center, and screening out reference suspected crack areas. Calculating the first influence degree of each suspected crack area, and screening out possible crack overlap areas. Identifying similar areas based on the crack fitting curve segment, and obtaining the second influence degree based on the distance from the fitting center to the boundary pixel point. Finally, screening out the crack area based on the first influence degree and the second influence degree of each possible crack overlap area. The present invention improves the accuracy of the visual inspection results of the injection mold quality by analyzing each injection mold grayscale image.
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 processing, and in particular to a method and system for visually inspecting the quality of an injection mold. Background Art

[0002] Injection molds are molds used to produce various plastic products. They are important tools for the production of plastic products. There are many types of materials for injection molds, mainly metal materials, non-metallic materials and composite materials. Metal materials are one of the commonly used materials for manufacturing injection molds. Common metal materials include steel, aluminum alloy, copper alloy, etc. Among them, steel material is the most common injection mold material because of its high hardness, high strength, high wear resistance and good processing performance, which can meet the requirements of most injection molds. Aluminum alloy materials have lower density, higher thermal conductivity and better processing performance, and are suitable for the production of small injection molds; copper alloy materials have high thermal conductivity and good corrosion resistance, and are suitable for the production of high-demand injection molds.

[0003] Injection molds are prone to cracks during use, which affects the quality of the product, so it is necessary to conduct quality inspections on the injection molds. In the process of determining the crack area in the injection mold hole through single-sheet threshold segmentation technology, the existing technology has the disadvantage of being unable to distinguish between the crack and the internal texture of the hole, resulting in inaccurate results of visual inspection of injection mold quality. Summary of the invention

[0004] The invention provides an injection mold quality visual inspection method and system to solve the existing problems.

[0005] The present invention provides a method and system for visually inspecting the quality of injection molds using the following technical solutions:

[0006] An embodiment of the present invention provides a method for visually inspecting the quality of an injection mold, the method comprising the following steps:

[0007] Acquire a grayscale image sequence of the injection mold; in the grayscale image sequence of the injection mold, acquire a plurality of suspected regions of each grayscale image of the injection mold;

[0008] Obtain the minimum circumscribed rectangle and root mean square error of each suspected area of ​​each injection mold grayscale image; screen out several suspected crack areas according to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle;

[0009] Obtain the suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image; obtain the fitting center of each suspected crack area according to the suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image; screen out the reference suspected crack area of ​​each suspected crack area of ​​each injection mold grayscale image, and obtain the first influence degree of each suspected crack area according to the grayscale values ​​of all pixels of each suspected crack area of ​​each injection mold grayscale image and the distance between the reference suspected crack area and the fitting center of all adjacent suspected crack areas; screen out several possible crack overlap areas according to the first influence degree of each suspected crack area of ​​each injection mold grayscale image;

[0010] According to the suspected crack fitting curve segments of each possible crack overlap region of each injection mold grayscale image, several similar regions of each possible crack overlap region are obtained; according to the distance from the fitting circle center of each possible crack overlap region of each injection mold grayscale image to all boundary pixel points of the corresponding possible crack overlap region and the similar regions of the possible crack overlap region, the second influence degree of each possible crack overlap region is obtained;

[0011] According to the first influence degree and the second influence degree of each possible crack overlap region of each injection mold grayscale image, a number of crack regions are screened out.

[0012] Furthermore, the method of screening out a number of suspected crack areas according to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle includes the following specific steps:

[0013] According to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle, the possibility that each suspected area of ​​each injection mold grayscale image is a crack area is obtained;

[0014] In the In the grayscale image of the injection mold, if is greater than the preset first threshold, then Grayscale image of the injection mold suspected areas are recorded as suspected crack areas; among them, Indicates Grayscale image of the injection mold The possibility that the suspected area is a crack area.

[0015] Furthermore, according to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle, the specific calculation formula corresponding to the possibility that each suspected area of ​​each injection mold grayscale image is a crack area is obtained as follows:

[0016]

[0017] in, Indicates Grayscale image of the injection mold The root mean square error of the suspected area; Indicates Grayscale image of the injection mold The length of the longest side of the smallest circumscribed rectangle of the suspected area; Indicates Grayscale image of the injection mold The length of the shortest side of the smallest circumscribed rectangle of the suspected area; represents the linear normalization function.

[0018] Furthermore, the method of obtaining the fitting center of each suspected crack region according to the suspected crack fitting curve segment of each suspected crack region of each injection mold grayscale image includes the following specific steps:

[0019] Draw normal lines for all pixel points on the suspected crack fitting curve segment of each suspected crack region of each injection mold grayscale image, and obtain a plurality of normal lines for each suspected crack region of each injection mold grayscale image;

[0020] The point where the normal lines of each suspected crack area in each grayscale image of the injection mold intersect the most is recorded as the center of the fitting circle.

[0021] Furthermore, the reference suspected crack region of each suspected crack region of each injection mold grayscale image is screened out, and the first influence degree of each suspected crack region is obtained according to the grayscale values ​​of all pixels of each suspected crack region of each injection mold grayscale image and the distance between the reference suspected crack region and the fitting center of all adjacent suspected crack regions, including the following specific steps:

[0022] In the Among the four edges of the grayscale image of the injection mold, The edge closest to the suspected crack area is recorded as the target edge. The suspected crack area between the suspected crack areas is recorded as the interval suspected crack area;

[0023] The distance The suspected crack area in the interval closest to the suspected crack area is recorded as A reference suspected crack area for each suspected crack area;

[0024] According to the grayscale values ​​of all pixels in each suspected crack area of ​​each injection mold grayscale image and the distances to the fitting centers of all adjacent suspected crack areas, the specific formula corresponding to the first influence degree of each suspected crack area is obtained as follows:

[0025]

[0026] in, Indicates Grayscale image of the injection mold The first impact level of the suspected crack area; Indicates Grayscale image of the injection mold The distance between the fitting center of a suspected crack area and its reference suspected crack area; Indicates Grayscale image of the injection mold The mean of the distances between a suspected crack region and the fitting centers of all its adjacent suspected crack regions; Indicates Grayscale image of the injection mold The mean gray value of all pixels in the suspected crack area; represents the absolute value function, represents the linear normalization function.

[0027] Furthermore, the method of screening out a plurality of possible crack overlap regions according to the first influence degree of each suspected crack region of each injection mold grayscale image includes the following specific steps:

[0028] In the In the grayscale image of the injection mold, if is greater than the preset second threshold, then Grayscale image of the injection mold The suspected crack areas are recorded as possible crack overlap areas.

[0029] Furthermore, the method of obtaining a plurality of similar regions of each possible crack overlap region according to the suspected crack fitting curve segments of each possible crack overlap region of each injection mold grayscale image includes the following specific steps:

[0030] In the In the grayscale image of the injection mold, Grayscale image of the injection mold The minimum angle between the two end points of the normal line of the suspected crack fitting curve segment in the possible crack overlap area is recorded as The normal angle of the possible crack overlap area;

[0031] In the injection mold grayscale image sequence Zhang Daodi In the mth grayscale image of the injection mold, The possible crack overlap area with the same normal angle is recorded as similar areas where cracks may overlap; among them, is the preset quantity threshold.

[0032] Furthermore, the second influence degree of each possible crack overlap region is obtained according to the distance from the fitting circle center of each possible crack overlap region of each injection mold grayscale image to all boundary pixel points of the corresponding possible crack overlap region and the similar region of the possible crack overlap region, and the specific steps include the following:

[0033] In the Grayscale image of the injection mold In the possible crack overlap area, The fitting circle center of the possible crack overlap area is taken as the starting point. All the boundary pixels of the possible crack overlap area are used as rays, and the repeated rays are removed to obtain the Several rays of possible crack overlap areas;

[0034] The first The average distance between two boundary pixels on all rays in the possible crack overlap area is recorded as The average distance between possible crack overlap areas;

[0035] According to the difference in average distances of all similar regions of each possible crack overlap region of each injection mold grayscale image, the specific calculation formula corresponding to the second influence degree of each possible crack overlap region of each injection mold grayscale image is obtained as follows:

[0036]

[0037] in, Indicates Grayscale image of the injection mold The second degree of impact of possible crack overlap areas; Indicates Grayscale image of the injection mold The possible crack overlap area Similar areas to The absolute value of the difference in the average distances of similar regions; Indicates Grayscale image of the injection mold The mean of the absolute values ​​of the differences in the average distances of all adjacent similar areas of possible crack overlap areas; Indicates Grayscale image of the injection mold The number of similar regions where cracks may overlap; represents the absolute value function.

[0038] Furthermore, the method of screening out a plurality of crack regions according to the first influence degree and the second influence degree of each possible crack overlap region of each injection mold grayscale image includes the following specific steps:

[0039] According to the first influence degree and the second influence degree of each possible crack overlap region of each injection mold grayscale image, the specific calculation formula corresponding to the final possibility that each possible crack overlap region of each injection mold grayscale image is a crack is obtained as follows:

[0040]

[0041] in, Indicates Grayscale image of the injection mold The possible crack overlap area is the final possibility of cracks; Indicates Grayscale image of the injection mold The number of similar regions where cracks may overlap; Indicates Grayscale image of the injection mold The possible crack overlap area Similar areas to The absolute value of the difference in the first impact degree of similar regions; Indicates Grayscale image of the injection mold The mean of the absolute values ​​of the differences in the first impact degrees of all adjacent similar areas of the possible crack overlap area; Indicates Grayscale image of the injection mold The second degree of impact of possible crack overlap areas; represents the absolute value function;

[0042] like If the value is greater than the preset third threshold, Grayscale image of the injection mold The possible crack overlap area is recorded as the crack area.

[0043] The present invention also proposes a visual inspection system for injection mold quality, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned visual inspection method for injection mold quality.

[0044] The beneficial effects of the technical solution of the present invention are:

[0045] Obtain a sequence of grayscale images of injection molds; in the sequence of grayscale images of injection molds, obtain several suspected areas of each grayscale image of injection molds, accurately locate the position where defects may exist, and improve the accuracy of detection. Obtain the minimum circumscribed rectangle and root mean square error of each suspected area of ​​each grayscale image of injection molds; according to the root mean square error and the side length of the minimum circumscribed rectangle of each suspected area of ​​each grayscale image of injection molds, screen out several suspected crack areas, and further improve the accuracy of detection. Obtain the suspected crack fitting curve segment of each suspected crack area of ​​each grayscale image of injection molds; according to the suspected crack fitting curve segment of each suspected crack area of ​​each grayscale image of injection molds, obtain the fitting center of each suspected crack area, and improve the accuracy of subsequent calculation of suspected crack areas. Screen out the reference suspected crack area of ​​each suspected crack area of ​​each grayscale image of injection molds, and obtain the first influence degree of each suspected crack area according to the grayscale values ​​of all pixels of each suspected crack area of ​​each grayscale image of injection molds and the distance between the reference suspected crack area and the fitting center of all adjacent suspected crack areas, which can effectively eliminate the interference of non-crack areas and improve the accuracy of detection. According to the first influence degree of each suspected crack area of ​​each injection mold grayscale image, several possible crack overlap areas are screened out to further improve the reliability of crack identification. According to the suspected crack fitting curve segments of each possible crack overlap area of ​​each injection mold grayscale image, several similar areas of each possible crack overlap area are obtained to determine the ductility and overlap of the cracks. According to the distance from the fitting circle center of each possible crack overlap area of ​​each injection mold grayscale image to all boundary pixel points of the corresponding possible crack overlap area and the similar areas of the possible crack overlap area, the second influence degree of each possible crack overlap area is obtained to further improve the accuracy of crack detection. According to the first influence degree and the second influence degree of each possible crack overlap area of ​​each injection mold grayscale image, several crack areas are screened out. The present invention improves the accuracy of the visual inspection results of the injection mold quality by analyzing each injection mold grayscale image. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A flow chart of the steps of a method for visually inspecting the quality of an injection mold according to the present invention;

[0048] Figure 2 A schematic diagram of a grayscale image of an injection mold provided in this embodiment;

[0049] Figure 3 A schematic diagram of an endoscope provided in this embodiment;

[0050] Figure 4 This is a schematic diagram of edge detection of a grayscale image of an injection mold provided in this embodiment. DETAILED DESCRIPTION

[0051] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the injection mold quality visual inspection method and system proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0052] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0053] The specific scheme of a method and system for visually inspecting the quality of injection molds provided by the present invention is described in detail below with reference to the accompanying drawings.

[0054] See also Figure 1 , which shows a flow chart of a method for visually inspecting the quality of an injection mold provided by an embodiment of the present invention, the method comprising the following steps:

[0055] Step S001: obtaining a sequence of grayscale images of an injection mold; in the sequence of grayscale images of the injection mold, obtaining a plurality of suspected regions of each grayscale image of the injection mold.

[0056] The endoscope is stably placed into the hole of the injection mold through the holder. The video footage of the hole is captured by moving the endoscope at a constant speed of centimeters per second. The injection mold images in the video are captured in seconds, and each injection mold image is grayscaled to obtain an injection mold grayscale image sequence. Figure 2 This is a schematic diagram of the grayscale image of the injection mold provided in this embodiment. is a preset speed threshold. The preset speed threshold in this embodiment is 0.5 cm per second; is a preset frequency threshold. The preset frequency threshold in this embodiment is The time interval is 1 second, and this example is used for description.

[0057] It should be noted that the structure of the endoscope includes optical fiber, insertion tube and video imaging system. The working principle is that the image is transmitted to CCD (inductively coupled image sensor) through the objective lens, and then CCD converts the light image into electronic data signal, which is transmitted to the video control component, and then the video control component outputs the image to the display component. Figure 3 This is a schematic diagram of an endoscope provided in this embodiment. Figure 3 The light intensity emitted by the endoscope when working can be divided into 5 levels, namely 0, 1, 2, 3, 4 and 5. The types of endoscopes can be divided into 8 types, namely 1.2mm direct view, 2.0mm direct view, 2.8mm direct view, 3.9mm direct view, 6.0mm direct view, 6.0mm side view, 6.0mm direct / side view dual lens, 6.0mm direct / side interchangeable lens.

[0058] In the injection mold grayscale image sequence, according to the grayscale value of each pixel in each injection mold grayscale image, the Sobel edge detection algorithm is used to perform edge detection on each injection mold grayscale image to obtain several edge pixel points in each injection mold grayscale image; according to all edge pixel points in each injection mold grayscale image, the contour extraction algorithm is used to perform contour extraction on each injection mold grayscale image, and several closed contour areas in each injection mold grayscale image are recorded as suspected areas. Among them, the Sobel edge detection algorithm and the contour extraction algorithm are well-known technologies, and the specific methods are not introduced here. Figure 4 This is a schematic diagram of edge detection of a grayscale image of an injection mold provided in this embodiment.

[0059] Step S002: obtaining the minimum circumscribed rectangle and the root mean square error of each suspected area of ​​each injection mold grayscale image; screening out a number of suspected crack areas according to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle;

[0060] It should be noted that during the use of the injection mold, cracks are generated due to excessive temperature or pressure. Therefore, the shape of the crack is mostly arc. The edges of the crack area are mostly smooth, so the suspected area can be screened by the smoothness of the edge; the crack area is mostly slender, so the suspected area can be screened by the aspect ratio of the minimum circumscribed rectangle.

[0061] The least square method is used to calculate all pixel points of each suspected area of ​​each injection mold grayscale image to obtain the root mean square error of each suspected area of ​​each injection mold grayscale image. Among them, the least square method is a well-known calculation, and the specific method is not introduced here.

[0062] The minimum bounding rectangle is used to operate each suspected area of ​​each injection mold grayscale image to obtain the minimum bounding rectangle of each suspected area of ​​each injection mold grayscale image.

[0063] First Take the grayscale image of an injection mold as an example, Grayscale image of the injection mold The specific calculation formula corresponding to the possibility that a suspected area is a crack area is:

[0064]

[0065] in, Indicates Grayscale image of the injection mold The possibility that the suspected area is a crack area; Indicates Grayscale image of the injection mold The root mean square error of the suspected area; Indicates Grayscale image of the injection mold The length of the longest side of the smallest circumscribed rectangle of the suspected area; Indicates Grayscale image of the injection mold The length of the shortest side of the smallest circumscribed rectangle of the suspected area; represents the linear normalization function.

[0066] What needs to be explained is: and Inversely proportional, The larger the value of Grayscale image of the injection mold The more likely a suspected area is a crack area, the lower the probability; The larger the value, the Grayscale image of the injection mold The more the shape of the suspected area conforms to the shape characteristics of the crack, the Grayscale image of the injection mold The more likely a suspected area is a crack area, the greater the possibility.

[0067] Through the above process, we obtain Grayscale image of the injection mold The possibility that the suspected area is a crack area.

[0068] Each suspected region of each injection mold grayscale image is operated according to the above process to obtain the possibility that each suspected region of each injection mold grayscale image is a crack region.

[0069] like is greater than the preset first threshold, then Grayscale image of the injection mold The suspected area is recorded as the suspected crack area. In this embodiment, the first threshold value preset is 0.5, which is used as an example for description.

[0070] Through the above process, several suspected crack areas of each injection mold grayscale image are obtained.

[0071] Step S003: Obtain the suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image; obtain the fitting center of each suspected crack area according to the suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image; screen out the reference suspected crack area of ​​each suspected crack area of ​​each injection mold grayscale image, and obtain the first influence degree of each suspected crack area according to the grayscale values ​​of all pixels of each suspected crack area of ​​each injection mold grayscale image and the distance between the reference suspected crack area and the fitting center of all adjacent suspected crack areas; screen out several possible crack overlap areas according to the first influence degree of each suspected crack area of ​​each injection mold grayscale image.

[0072] It should be noted that cracks may overlap with the texture in the hole. When this happens, the hole will be misaligned. The transition of a normal hole is smooth, so the change in the center position of the circular texture is gradual, but if a crack appears, the change in the center position of the circle where the crack is located will destroy this gradual change. The grayscale value of the suspected crack area will be smaller than the grayscale value of the texture.

[0073] It is further necessary to explain that when the endoscope is inserted for shooting, the texture inside the hole of the injection mold appears quasi-circular. When cracks are misaligned in the hole due to production problems, the cracks inside the hole may overlap with the texture inside the hole, presenting quasi-circular or quasi-arc characteristics. When the hole is misaligned and cracks occur, the position of the center of all quasi-circular textures remains unchanged or gradually changes in a certain direction. Therefore, screening can be performed based on the reasonable degree of change in the position of the center of the quasi-circular texture. The suspected crack area is deeper in the hole than the texture area, so the grayscale mean of the suspected crack area will be larger. Therefore, screening can be performed based on the grayscale value of the suspected crack area.

[0074] The least square method is used to calculate all pixel points in each suspected crack area of ​​each injection mold grayscale image to obtain a suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image. Among them, the least square method is a well-known calculation, and the specific method is not introduced here.

[0075] Normal lines are drawn for all pixel points on the suspected crack fitting curve segment of each suspected crack region of each injection mold grayscale image to obtain a plurality of normal lines of each suspected crack region of each injection mold grayscale image.

[0076] The point where the normal lines of each suspected crack area in each grayscale image of the injection mold intersect the most is recorded as the center of the fitting circle.

[0077] Through the above process, the fitting center of each suspected crack area of ​​each injection mold grayscale image is obtained.

[0078] In the Among the four edges of the grayscale image of the injection mold, The edge closest to the suspected crack area is recorded as the target edge. The suspected crack area between the suspected crack areas is recorded as the interval suspected crack area.

[0079] The distance The suspected crack area in the interval closest to the suspected crack area is recorded as The reference suspected crack area of ​​the suspected crack area.

[0080] It should be noted that: if there are multiple nearest edges, any one is selected for analysis; if there are multiple nearest interval suspected crack areas, any one is selected for analysis.

[0081] Through the above process, a reference suspected crack region of each suspected crack region of each injection mold grayscale image is obtained.

[0082] Still Take the grayscale image of an injection mold as an example, Grayscale image of the injection mold The specific calculation formula corresponding to the first impact degree of a suspected crack area is:

[0083]

[0084] in, Indicates Grayscale image of the injection mold The first impact level of the suspected crack area; Indicates Grayscale image of the injection mold The distance between the fitting center of a suspected crack area and its reference suspected crack area; Indicates Grayscale image of the injection mold The mean of the distances between a suspected crack region and the fitting centers of all its adjacent suspected crack regions; Indicates Grayscale image of the injection mold The mean gray value of all pixels in the suspected crack area; represents the absolute value function, represents the linear normalization function.

[0085] What needs to be explained is: The larger the value, the Grayscale image of the injection mold The more unreasonable the center of the suspected crack area is, the greater the possibility that it is a crack area. Grayscale image of the injection mold The greater the first impact of each suspected crack area; and Inversely proportional, The smaller the value of Grayscale image of the injection mold The greater the first impact of the suspected crack area.

[0086] Through the above process, we obtain Grayscale image of the injection mold The first impact level of a suspected crack area.

[0087] Each suspected crack region of each injection mold grayscale image is operated according to the above process to obtain the first influence degree of each suspected crack region of each injection mold grayscale image.

[0088] like is greater than the preset second threshold, then Grayscale image of the injection mold The suspected crack regions are recorded as possible crack overlap regions. The second threshold value preset in this embodiment is 0.5, which is used as an example for description.

[0089] Through the above process, several possible crack overlap regions of each injection mold grayscale image are obtained.

[0090] Step S004: According to the suspected crack fitting curve segments of each possible crack overlap area of ​​each injection mold grayscale image, several similar areas of each possible crack overlap area are obtained; according to the distance from the fitting center of each possible crack overlap area of ​​each injection mold grayscale image to all boundary pixel points of the corresponding possible crack overlap area and the similar areas of the possible crack overlap area, the second influence degree of each possible crack overlap area is obtained.

[0091] It should be noted that when the injection mold is in use, cracks may appear in the texture of the hole due to excessive tension, which will cause the cracks inside the hole of the injection mold to overlap with the texture of the hole, which makes the width of the possible crack overlap area wider than that of other texture areas. When the endoscope is shooting, the width of the crack obtained at the beginning may be narrow due to the angle or occlusion of other areas, which is similar to the width of the ordinary texture area. However, as the endoscope gradually moves in and gets closer to the possible crack overlap area, the width of the possible crack overlap area gradually increases. Therefore, further screening can be performed based on the degree of gradual change in the width of the possible crack overlap area corresponding to multiple grayscale images of the injection mold.

[0092] It is further necessary to explain that as the endoscope approaches the possible crack overlap region, the length of the possible crack overlap region becomes longer and the width becomes wider, and the possible crack overlap region becomes closer and closer to the edge of the injection mold grayscale image, but the curvature of the possible crack overlap region remains unchanged. Therefore, based on the principle that the normal directions of the two end points of the suspected crack fitting curve segment of the possible crack overlap region will not change, several similar regions of each possible crack overlap region are screened in multiple injection mold grayscale images.

[0093] Still Take the grayscale image of the injection mold as an example. Grayscale image of the injection mold The minimum angle between the two end points of the normal line of the suspected crack fitting curve segment in the possible crack overlap area is recorded as The normal angle of the possible crack overlap area.

[0094] Through the above process, the normal angle of each possible crack overlap area of ​​each injection mold grayscale image is obtained.

[0095] In the injection mold grayscale image sequence Zhang Daodi In the grayscale image of the injection mold, Grayscale image of the injection mold The possible crack overlap area with the same normal angle is recorded as There are similar areas where cracks may overlap. is a preset quantity threshold. The preset quantity threshold in this embodiment is The value is 20, and this is used as an example for description.

[0096] Through the above process, several similar regions of each possible crack overlap region of each injection mold grayscale image are obtained.

[0097] In the Grayscale image of the injection mold In the possible crack overlap area, The fitting circle center of the possible crack overlap area is taken as the starting point. All the boundary pixels of the possible crack overlap area are used as rays, and the repeated rays are removed to obtain the Several rays of possible crack overlap areas.

[0098] The first The average distance between two boundary pixels on all rays in the possible crack overlap area is recorded as The average distance between the possible crack overlap areas.

[0099] It should be noted that if there are more than two boundary pixels on a ray, the ray will not be used in the above average calculation process. Boundary pixels are pixels on the boundary of the region.

[0100] What needs to be explained is: If there is only one boundary pixel point on the ray of the possible crack overlap area, no calculation is performed.

[0101] Each possible crack overlap region of each injection mold grayscale image is calculated according to the above process to obtain an average distance of each possible crack overlap region of each injection mold grayscale image.

[0102] The first Grayscale image of the injection mold The specific calculation formula corresponding to the second influence degree of the possible crack overlap area is:

[0103]

[0104] in, Indicates Grayscale image of the injection mold The second degree of impact of possible crack overlap areas; Indicates Grayscale image of the injection mold The possible crack overlap area Similar areas to The absolute value of the difference in the average distances of similar regions; Indicates Grayscale image of the injection mold The mean of the absolute values ​​of the differences in the average distances of all adjacent similar areas of possible crack overlap areas; Indicates Grayscale image of the injection mold The number of similar regions where cracks may overlap; represents the absolute value function.

[0105] What needs to be explained is: The smaller the value of Grayscale image of the injection mold The greater the degree of gradient of the adjacent similar areas of the possible crack overlap area, the Grayscale image of the injection mold The greater the second impact of the possible crack overlap area.

[0106] Through the above process, we obtain Grayscale image of the injection mold The second degree of impact of possible crack overlap areas;

[0107] Each possible crack overlap region of each injection mold grayscale image is calculated according to the above process to obtain a second influence degree of each possible crack overlap region of each injection mold grayscale image.

[0108] Step S005: Screening out a number of crack regions according to the first influence degree and the second influence degree of each possible crack overlap region of each injection mold grayscale image.

[0109] It should be noted that as the endoscope gradually approaches the crack, the closer the crack is to the edge of the grayscale image of the injection mold, the farther the distance between the possible crack overlap area and the center of the other area is, the more obvious the disruption to the law of the gradual change of the center distance is. Because the possible crack overlap area is deeper than other ordinary texture areas, its grayscale value is smaller. Therefore, the first influence degree and the second influence degree of each possible crack overlap area are used for screening.

[0110] When the endoscope approaches, the difference in grayscale value between the crack area and other possible crack overlap areas becomes larger. Thus, the possible crack overlap areas can be screened by the gradual change of the first influence degree of the areas changing with the sequence.

[0111] Still Take the grayscale image of an injection mold as an example, Grayscale image of the injection mold The specific calculation formula corresponding to the final probability that the possible crack overlap area is a crack is:

[0112]

[0113] in, Indicates Grayscale image of the injection mold The possible crack overlap area is the final possibility of cracks; Indicates Grayscale image of the injection mold The number of similar regions where cracks may overlap; Indicates Grayscale image of the injection mold The possible crack overlap area Similar areas to The absolute value of the difference in the first impact degree of similar regions; Indicates Grayscale image of the injection mold The mean of the absolute values ​​of the differences in the first impact degrees of all adjacent similar areas of the possible crack overlap area; Indicates Grayscale image of the injection mold The second degree of impact of possible crack overlap areas; represents the absolute value function.

[0114] What needs to be explained is: and Inversely proportional, The larger the value of Grayscale image of the injection mold The more possible crack overlap areas are, the smaller the probability that the crack will eventually form. and Proportional, The larger the value of Grayscale image of the injection mold The more possible crack overlap areas are, the greater the probability that they are the final crack.

[0115] Through the above process, we obtain Grayscale image of the injection mold The possible overlap area of ​​the cracks is the final possibility of the crack.

[0116] Each possible crack overlap region of each injection mold grayscale image is calculated according to the above process to obtain the final possibility that each possible crack overlap region of each injection mold grayscale image is a crack.

[0117] like If the value is greater than the preset third threshold, Grayscale image of the injection mold The possible crack overlap area is recorded as the crack area.

[0118] Through the above process, several crack areas of each injection mold grayscale image are obtained.

[0119] The crack area of ​​each injection mold grayscale image is marked using a mask operation to obtain several final marked injection mold grayscale images.

[0120] It should be noted that in the process of marking using the mask operation, all the pixels in the crack area of ​​each injection mold grayscale image are marked in red.

[0121] Each final marked grayscale image of the injection mold is displayed on the staff's computer as a grayscale image to facilitate the staff's subsequent processing.

[0122] It should be noted that: in this embodiment, when the denominator in the formula is 0, the denominator is set to 1 to ensure that the formula is valid, and this example is used for description.

[0123] So far, the present invention is completed.

[0124] In summary, in an embodiment of the present invention, several suspected areas of each grayscale image of an injection mold are obtained. The minimum circumscribed rectangle and root mean square error of each suspected area are calculated, and suspected crack areas are screened out. The suspected crack fitting curve segment of each suspected crack area is obtained, the fitting center is calculated, and the reference suspected crack area is screened out. The first influence degree of each suspected crack area is calculated, and possible crack overlap areas are screened out. Similar areas are identified based on the crack fitting curve segment, and the second influence degree is obtained based on the distance from the fitting center to the boundary pixel point. Finally, the crack area is screened out according to the first influence degree and the second influence degree of each possible crack overlap area. The present invention improves the accuracy of the visual inspection results of the injection mold quality by analyzing each grayscale image of the injection mold.

[0125] The present invention also provides a system for visual inspection of injection mold quality, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned method for visual inspection of injection mold quality.

[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A visual inspection method for injection mold quality, It is characterized in that The method comprises the following steps: Acquire a grayscale image sequence of the injection mold; in the grayscale image sequence of the injection mold, acquire a plurality of suspected regions of each grayscale image of the injection mold; Obtain the minimum circumscribed rectangle and root mean square error of each suspected area of ​​each injection mold grayscale image; screen out several suspected crack areas according to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle; Obtain the suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image; obtain the fitting center of each suspected crack area according to the suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image; screen out the reference suspected crack area of ​​each suspected crack area of ​​each injection mold grayscale image, and obtain the first influence degree of each suspected crack area according to the grayscale values ​​of all pixels of each suspected crack area of ​​each injection mold grayscale image and the distance between the reference suspected crack area and the fitting center of all adjacent suspected crack areas; screen out several possible crack overlap areas according to the first influence degree of each suspected crack area of ​​each injection mold grayscale image; According to the suspected crack fitting curve segments of each possible crack overlap region of each injection mold grayscale image, several similar regions of each possible crack overlap region are obtained; according to the distance from the fitting circle center of each possible crack overlap region of each injection mold grayscale image to all boundary pixel points of the corresponding possible crack overlap region and the similar regions of the possible crack overlap region, the second influence degree of each possible crack overlap region is obtained; According to the first influence degree and the second influence degree of each possible crack overlap region of each injection mold grayscale image, a number of crack regions are screened out.

2. According to claim 1, a method for visually inspecting the quality of injection molds, It is characterized in that The specific steps of screening out a number of suspected crack areas according to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle are as follows: According to the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle, the possibility that each suspected area of ​​each injection mold grayscale image is a crack area is obtained; In the In the grayscale image of the injection mold, if is greater than the preset first threshold, then Grayscale image of the injection mold suspected areas are recorded as suspected crack areas; among them, Indicates Grayscale image of the injection mold The possibility that the suspected area is a crack area.

3. According to the method for visual inspection of injection mold quality according to claim 2, It is characterized in that The specific calculation formula corresponding to the possibility that each suspected area of ​​each injection mold grayscale image is a crack area is obtained based on the root mean square error of each suspected area of ​​each injection mold grayscale image and the side length of the minimum circumscribed rectangle: in, Indicates Grayscale image of the injection mold The root mean square error of the suspected area; Indicates Grayscale image of the injection mold The length of the longest side of the smallest circumscribed rectangle of the suspected area; Indicates Grayscale image of the injection mold The length of the shortest side of the smallest circumscribed rectangle of the suspected area; represents the linear normalization function.

4. According to claim 1, a method for visually inspecting the quality of injection molds, It is characterized in that The specific steps of obtaining the fitting center of each suspected crack area according to the suspected crack fitting curve segment of each suspected crack area of ​​each injection mold grayscale image are as follows: Draw normal lines for all pixel points on the suspected crack fitting curve segment of each suspected crack region of each injection mold grayscale image, and obtain a plurality of normal lines for each suspected crack region of each injection mold grayscale image; The point where the normal lines of each suspected crack area in each grayscale image of the injection mold intersect the most is recorded as the center of the fitting circle.

5. According to the method for visual inspection of injection mold quality according to claim 1, It is characterized in that The method of screening out a reference suspected crack region of each suspected crack region of each injection mold grayscale image, and obtaining a first influence degree of each suspected crack region according to the grayscale values ​​of all pixels of each suspected crack region of each injection mold grayscale image and the distance between the reference suspected crack region and the fitting center of all adjacent suspected crack regions, comprises the following specific steps: In the Among the four edges of the grayscale image of the injection mold, The edge closest to the suspected crack area is recorded as the target edge. The suspected crack area between the suspected crack areas is recorded as the interval suspected crack area; The distance The suspected crack area in the interval closest to the suspected crack area is recorded as A reference suspected crack area for a suspected crack area; According to the grayscale values ​​of all pixels in each suspected crack area of ​​each injection mold grayscale image and the distances to the fitting centers of all adjacent suspected crack areas, the specific formula corresponding to the first influence degree of each suspected crack area is obtained as follows: in, Indicates Grayscale image of the injection mold The first impact level of the suspected crack area; Indicates Grayscale image of the injection mold The distance between the fitting center of a suspected crack area and its reference suspected crack area; Indicates Grayscale image of the injection mold The mean of the distances between a suspected crack region and the fitting centers of all its adjacent suspected crack regions; Indicates Grayscale image of the injection mold The mean gray value of all pixels in the suspected crack area; represents the absolute value function, represents the linear normalization function.

6. A method for visually inspecting the quality of injection molds according to claim 5, It is characterized in that The method of screening out a number of possible crack overlap regions according to the first influence degree of each suspected crack region in each injection mold grayscale image includes the following specific steps: In the In the grayscale image of the injection mold, if is greater than the preset second threshold, then Grayscale image of the injection mold The suspected crack areas are recorded as possible crack overlap areas.

7. A method for visually inspecting the quality of injection molds according to claim 1, It is characterized in that The specific steps of obtaining a plurality of similar regions of each possible crack overlap region according to the suspected crack fitting curve segments of each possible crack overlap region of each injection mold grayscale image are as follows: In the In the grayscale image of the injection mold, Grayscale image of the injection mold The minimum angle between the two end points of the normal line of the suspected crack fitting curve segment in the possible crack overlap area is recorded as The normal angle of the possible crack overlap area; In the injection mold grayscale image sequence Zhang Daodi In the mth grayscale image of the injection mold, The possible crack overlap area with the same normal angle is recorded as similar areas where cracks may overlap; among them, is the preset quantity threshold.

8. A method for visually inspecting the quality of injection molds according to claim 1, It is characterized in that The method of obtaining the second influence degree of each possible crack overlap region according to the distance from the fitting circle center of each possible crack overlap region of each injection mold grayscale image to all boundary pixel points of the corresponding possible crack overlap region and the similar region of the possible crack overlap region comprises the following specific steps: In the Grayscale image of the injection mold In the possible crack overlap area, The fitting circle center of the possible crack overlap area is taken as the starting point. All the boundary pixels of the possible crack overlap area are used as rays, and the repeated rays are removed to obtain the Several rays of possible crack overlap areas; The first The average distance between two boundary pixels on all rays in the possible crack overlap area is recorded as The average distance between possible crack overlap areas; According to the difference in average distances of all similar regions of each possible crack overlap region of each injection mold grayscale image, the specific calculation formula corresponding to the second influence degree of each possible crack overlap region of each injection mold grayscale image is obtained as follows: in, Indicates Grayscale image of the injection mold The second degree of impact of possible crack overlap areas; Indicates Grayscale image of the injection mold The possible crack overlap area Similar areas to The absolute value of the difference in the average distances of similar regions; Indicates Grayscale image of the injection mold The mean of the absolute values ​​of the differences in the average distances of all adjacent similar areas of the possible crack overlap area; Indicates Grayscale image of the injection mold The number of similar regions where cracks may overlap; represents the absolute value function.

9. A method for visually inspecting the quality of injection molds according to claim 1, It is characterized in that The specific steps of screening out a plurality of crack regions according to the first influence degree and the second influence degree of each possible crack overlap region of each injection mold grayscale image are as follows: According to the first influence degree and the second influence degree of each possible crack overlap region of each injection mold grayscale image, the specific calculation formula corresponding to the final possibility that each possible crack overlap region of each injection mold grayscale image is a crack is obtained as follows: in, Indicates Grayscale image of the injection mold The possible crack overlap area is the final possibility of cracks; Indicates Grayscale image of the injection mold The number of similar regions where cracks may overlap; Indicates Grayscale image of the injection mold The possible crack overlap area Similar areas to The absolute value of the difference in the first impact degree of similar regions; Indicates Grayscale image of the injection mold The mean of the absolute values ​​of the differences in the first impact degrees of all adjacent similar areas of the possible crack overlap area; Indicates Grayscale image of the injection mold The second degree of impact of possible crack overlap areas; represents the absolute value function; like If the value is greater than the preset third threshold, Grayscale image of the injection mold The possible crack overlap area is recorded as the crack area.

10. A visual inspection system for injection mold quality, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the computer program is executed by a processor, the steps of a method for visually inspecting the quality of an injection mold as described in any one of claims 1 to 9 are implemented.