Die casting defect detection method, device and equipment

By dividing feature area and optimizing the identification parameters of the visual image information of die castings, the problem of time-consuming and inconsistent results of traditional die casting detection methods is solved, and more efficient defect detection is achieved.

CN118447019BActive Publication Date: 2024-10-01南昌众力精密铸造有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410903032.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-01
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

Traditional die-casting testing methods take a long time and there are differences in judgment results, resulting in low consistency of the testing results, making it difficult to meet the high-speed production needs of modern manufacturing.

Method used

By acquiring the visual image information of the die casting to be detected, it is divided into a first feature area and a second feature area, the feature recognition parameters are determined based on the defect feature information of the first feature area, and the identification algorithm of the second feature area is optimized, and the Determine the defect detection results of die castings.

Benefits of technology

Improve the consistency and efficiency of the inspection results to meet the high-speed production needs of modern manufacturing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447019B_ABST
    Figure CN118447019B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of die-casting detection technology, and in particular to a die-casting defect detection method, device and equipment. The method comprises: obtaining visual image information of a die-casting to be detected, dividing the visual image information of the die-casting into a first feature area and a second feature area; determining first defect feature information reflecting a defect in the first feature area according to the first feature area of ​​the visual image information of the die-casting; determining feature recognition parameters of a second feature area recognition algorithm according to the first defect feature information of the first feature area; determining second defect feature information reflecting feature details of the defect in the second feature area according to the feature recognition parameters of the second feature area; determining defect detection results of the die-casting according to the first defect feature information of the first feature area and the second defect feature information of the second feature area, so as to improve the consistency and efficiency of the detection results and meet the high-speed production requirements of the modern manufacturing industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of die-casting detection technology, and in particular, relates to a die-casting defect detection method, device and equipment. Background Art

[0002] Die casting is a manufacturing process that uses high pressure to inject molten metal into a mold and quickly cool it to form a shape. This process is efficient but prone to some typical defects. Die casting defect detection refers to a series of inspection measures carried out on die casting products during the die casting production process to ensure the quality of die castings, in order to discover and evaluate various possible defects.

[0003] Traditional die-casting inspection methods such as manual visual inspection rely on the operator's experience, especially when the operator is tired or distracted, and the inspection is time-consuming. For mass-produced die-castings, traditional inspection methods are time-consuming and the judgment results are inconsistent, resulting in low consistency of inspection results, low inspection efficiency, and difficulty in meeting the high-speed production needs of modern manufacturing. Summary of the invention

[0004] The embodiments of the present application provide a die-casting defect detection method, device and equipment, which can solve the problem that in the process of die-casting defect detection, the traditional detection method takes a long time to detect and there are differences in the judgment results, resulting in low consistency of detection results, low detection efficiency, and difficulty in meeting the high-speed production needs of the modern manufacturing industry.

[0005] In a first aspect, an embodiment of the present application provides a die-casting defect detection method, comprising:

[0006] Acquire visual image information of a die casting to be inspected, and divide the visual image information of the die casting into a first characteristic region and a second characteristic region; wherein the first characteristic region and the second characteristic region are different;

[0007] Determine first defect feature information of the first feature area according to the first feature area of ​​the visual image information of the die casting; wherein the first defect feature information is used to reflect the feature details of the defect of the first feature area;

[0008] Determine feature recognition parameters of the second feature area according to the first defect feature information of the first feature area; wherein the feature recognition parameters are used to control and optimize the recognition algorithm;

[0009] Determine second defect feature information of the second feature area according to the feature recognition parameter of the second feature area; wherein the second defect feature information is used to reflect the feature details of the defect of the second feature area;

[0010] A defect detection result of the die casting is determined according to the first defect feature information of the first feature area and the second defect feature information of the second feature area.

[0011] The above technical solutions in the embodiments of the present application have at least the following technical effects:

[0012] The die-casting defect detection method provided in the embodiment of the present application obtains visual image information of the die-casting to be detected, and divides the visual image information of the die-casting into a first feature area and a second feature area; determines first defect feature information reflecting the feature details of the defect in the first feature area according to the first feature area of ​​the visual image information of the die-casting; determines feature recognition parameters for controlling and optimizing the second feature area recognition algorithm according to the first defect feature information of the first feature area; determines second defect feature information reflecting the feature details of the defect in the second feature area according to the feature recognition parameters of the second feature area; determines the defect detection result of the die-casting according to the first defect feature information of the first feature area and the second defect feature information of the second feature area, thereby improving the consistency and detection efficiency of the detection results and meeting the high-speed production requirements of the modern manufacturing industry.

[0013] In a second aspect, an embodiment of the present application provides a die-casting defect detection device, comprising:

[0014] An acquisition unit, used for acquiring visual image information of the die casting to be inspected, and dividing the visual image information of the die casting into a first characteristic region and a second characteristic region; wherein the first characteristic region and the second characteristic region are different;

[0015] A determination unit, configured to determine first defect feature information of the first feature area according to the first feature area of ​​the visual image information of the die casting; wherein the first defect feature information is used to reflect the feature details of the defect of the first feature area;

[0016] A parameter unit, used to determine a feature recognition parameter of the second feature area according to the first defect feature information of the first feature area; wherein the feature recognition parameter is used to control and optimize a recognition algorithm;

[0017] an identification unit, configured to determine second defect feature information of the second feature area according to the feature identification parameter of the second feature area; wherein the second defect feature information is used to reflect the feature details of the defect of the second feature area;

[0018] An evaluation unit is used to determine a defect detection result of the die casting according to the first defect feature information of the first feature area and the second defect feature information of the second feature area.

[0019] In a third aspect, an embodiment of the present application provides a die-casting defect detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspects above is implemented.

[0020] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method of any one of the above aspects.

[0021] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the above aspects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 It is a schematic diagram of a process of a die-casting defect detection method provided in an embodiment of the present application;

[0024] Figure 2 is a flow chart of step S100 in the die-casting defect detection method provided in one embodiment of the present application;

[0025] Figure 3 is a flow chart of step S120 of a die-casting defect detection method provided in an embodiment of the present application;

[0026] Figure 4 is a flow chart of step S130 of a die-casting defect detection method provided in an embodiment of the present application;

[0027] Figure 5 is a flow chart of step S140 of a die-casting defect detection method provided in an embodiment of the present application;

[0028] Figure 6 is a flow chart of step S200 of a die-casting defect detection method provided in an embodiment of the present application;

[0029] Figure 7 is a flow chart of step S300 of a die-casting defect detection method provided in an embodiment of the present application;

[0030] Figure 8is a flow chart of step S500 of a die-casting defect detection method provided in an embodiment of the present application;

[0031] Fig. 9 is a flow chart of step S520 of a die-casting defect detection device provided in one embodiment of the present application;

[0032] Fig.10 It is a structural schematic diagram of a die-casting defect detection device provided in one embodiment of the present application;

[0033] Fig.11 It is a structural schematic diagram of a die-casting defect detection device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0034] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0035] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0036] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0037] As used in the specification of this application and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if the described condition or event is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce the described condition or event is detected" or "in response to detecting the described condition or event" depending on the context.

[0038] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0039] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0040] Traditional die-casting inspection methods such as manual visual inspection rely on the operator's experience, especially when the operator is tired or distracted, and the inspection is time-consuming. For mass-produced die-castings, traditional inspection methods are time-consuming and the judgment results are inconsistent, resulting in low consistency of inspection results, low inspection efficiency, and difficulty in meeting the high-speed production needs of modern manufacturing.

[0041] To solve the above problems, the embodiments of the present application provide a die-casting defect detection method, device and equipment. In the method, by acquiring the visual image information of the die-casting to be detected, the visual image information of the die-casting is divided into a first feature area and a second feature area; according to the first feature area of ​​the visual image information of the die-casting, the first defect feature information reflecting the feature details of the defect in the first feature area is determined; according to the first defect feature information of the first feature area, the feature recognition parameters for controlling and optimizing the second feature area recognition algorithm are determined; according to the feature recognition parameters of the second feature area, the second defect feature information reflecting the feature details of the defect in the second feature area is determined; according to the first defect feature information of the first feature area and the second defect feature information of the second feature area, the defect detection result of the die-casting is determined, so as to improve the consistency and detection efficiency of the detection results and meet the high-speed production requirements of the modern manufacturing industry.

[0042] The die-casting defect detection method provided in the embodiment of the present application can be applied to a terminal device. In this case, the terminal device is the executor of the die-casting defect detection method provided in the embodiment of the present application. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0043] For example, the terminal device can be an industrial controller, an intelligent detection robot, an embedded system, an Internet of Things (IoT) sensor node, a mobile detection unit, a remote monitoring station, an automated test bench for a smart factory, a cloud-connected analysis device, a highly integrated portable detection tool kit, a desktop computer, a smart large screen, a smart TV, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, etc.

[0044] In order to better understand the die-casting defect detection method provided in the embodiment of the present application, the specific implementation process of the die-casting defect detection method provided in the embodiment of the present application is exemplarily introduced below.

[0045] Figure 1 A schematic flow chart of a die-casting defect detection method provided in an embodiment of the present application is shown, and the die-casting defect detection method includes:

[0046] S100, obtaining visual image information of a die casting to be inspected, and dividing the visual image information of the die casting into a first characteristic region and a second characteristic region; wherein the first characteristic region and the second characteristic region are different.

[0047] Exemplarily, a high-resolution industrial camera can be used to take photos of die castings from multiple angles to obtain high-definition visual images of die castings. Using preset image processing techniques, such as edge detection, threshold segmentation, etc., the entire image is divided into two main areas of interest: the first feature area and the second feature area. These two areas correspond to the parts of the die casting that are expected to have different characteristics or defect tendencies. First, edge detection is performed on the visual image information of the die casting to find the contour of the die casting. Based on the edge detection results, the curvature changes of each segment of the edge of the die casting are analyzed to identify the feature points where the curvature direction changes significantly, which are usually caused by structural changes, edges or defects. According to the feature points where the curvature direction changes, especially those endpoints on different sides of the curvature direction, the minimum detection area is constructed, and these areas become target detection areas because they are likely to contain or be adjacent to die casting defects. All determined target detection areas are divided into the first feature area, and all image areas outside the target detection area are divided into non-direct detection areas, that is, the second feature area.

[0048] In one possible implementation, see Figure 2 In step S100, visual image information of the die casting to be inspected is obtained, and the visual image information of the die casting is divided into a first feature area and a second feature area, including:

[0049] S110, obtaining visual image information of the die casting to be detected, and performing edge detection on the visual image information of the die casting.

[0050] It can be understood that a preset edge detection algorithm (such as Canny edge detection, Sobel operator, Laplacian operator, etc.) can be used to process the original visual image, with the purpose of highlighting the contour and internal structure edge of the die casting.

[0051] S120, based on the result of edge detection on the visual image information of the die casting, determining a feature point on the edge of the die casting in the visual image information where the curvature direction changes.

[0052] It can be understood that the curvature change on the edge can be analyzed based on the results of edge detection to identify the feature points where the curvature direction changes significantly. These feature points are usually located at the corners of the edge or the parts where the shape changes significantly, and are crucial for distinguishing different feature areas. For example, in the part where the edge of a die-casting transitions from smooth to curved, these feature points mark the starting point or end point of the structural change.

[0053] Optionally, see Figure 3 S120, based on the result of edge detection of the visual image information of the die casting, determining the characteristic points where the curvature direction of the edge of the die casting in the visual image information changes, including:

[0054] S121, based on the result of edge detection on the visual image information of the die casting, determining the curvature change value of each segment of the edge of the die casting in the visual image information.

[0055] For example, after edge detection is completed, each continuous edge segment can be analyzed to calculate the curvature change value of each segment. Curvature is a quantity that measures the degree of curvature of a curve at a certain point. The average or local curvature of each edge segment can be obtained by mathematical methods (such as the derivative of the curve or the curvature formula), thereby quantifying the curvature characteristics of the edge. Curvature is a mathematical quantity that describes the degree of curvature of a curve at a certain point, and its calculation formula can be expressed as K=|dα / ds|. This formula defines curvature from a geometric perspective, where K represents curvature, dα is the angle that the curve turns within a small arc length ds (that is, the change in the tangent direction of the point on the curve), and |dα / ds| is the absolute value of the angle change rate, that is, the angle change per unit arc length. This definition intuitively reflects the concept of "degree of curvature" and does not depend on the specific parameter form of the curve.

[0056] S122, locating a characteristic position corresponding to a change in curvature direction according to the curvature change value of each segment of the edge of the die casting in the visual image information; wherein the curvature directions on both sides of the characteristic position are different.

[0057] It can be understood that based on the calculated change values ​​of the curvature of each edge segment, the locations where the curvature direction changes significantly are identified. This means that at these locations, the edge changes from one curvature trend to another, such as from convex to concave or a sharp change in direction. The different curvature directions on both sides of these locations have become an important mark for distinguishing different feature areas. For example, if a certain edge segment is nearly a straight line, its curvature is close to zero; if it is an arc, the curvature is a constant; where the edge is bent or has a sharp corner, the curvature will change significantly.

[0058] S123, according to the characteristic position corresponding to the change in curvature direction, determine the characteristic position as a characteristic point on the edge of the die casting where the curvature direction changes.

[0059] It can be understood that the sharp curvature change points are the characteristic locations to be found. These locations where the curvature suddenly increases (forming a flange) or decreases (forming a groove) represent irregular changes in the structure of the component, which can be considered to be abnormal locations or connected locations. For example, a component transitions from a smooth top edge to the sharp angle of the interface, where the curvature suddenly increases from a low value, indicating that the edge direction changes from nearly horizontal to vertical. At the identified characteristic locations, such as the sharp angle turning point mentioned above, the edge directions on both sides of the characteristic location are obviously different. One side may be a smooth curve along the top of the cylinder body, while the other side is a straight line or curved edge running vertically downward. This fundamental change in the direction of curvature clearly distinguishes different functional areas and may also be a high-incidence area of ​​potential defects, such as burrs, cracks or irregular shapes that may be generated during the casting process. Accurately identifying these locations helps to quickly focus on possible problem areas and improve the pertinence and accuracy of defect detection.

[0060] S130, determining a target detection area in the visual image information according to a feature point where a curvature direction changes on an edge of a die casting in the visual image information.

[0061] It can be understood that through the identified feature points, target detection areas that require special attention can be defined. These areas surround the edge change feature points and include expected defect-prone areas or key structural features of die castings, ensuring that subsequent analysis focuses on the most critical or most likely areas of the die casting.

[0062] Optionally, see Figure 4 S130, determining a target detection area in the visual image information according to a feature point where the curvature direction of the die casting edge in the visual image information changes, including:

[0063] S131, determining the end point where the curvature direction on the edge of the die-casting changes according to the feature point where the curvature direction on the edge of the die-casting changes in the visual image information.

[0064] It can be understood that the feature points where the curvature direction changes refer to those points on the contour line of the die casting where the curvature (i.e., the degree of curvature of the curve) has a significant change, such as a sudden change from a straight part to a curve, or a position where the degree of curvature changes sharply. These feature points are key positions for identifying shape changes on the edge of the die casting. These feature points are crucial for determining the geometric characteristics of the die casting because they often mark the turning point of the edge or the beginning and end of a complex shape. By detecting these feature points through algorithms, the precise location of the change in the shape of the edge of the die casting can be effectively located, that is, the endpoint where the curvature direction changes. For example, if the curvature value of a certain area suddenly increases from near zero (indicating a straight part) to a high value (indicating entering a curved part), then this feature point is marked as an endpoint.

[0065] S132, based on the endpoints where the curvature direction on the edge of the die casting changes, construct a minimum detection area where the curvature direction on the edge of the die casting changes in the visual image information, and use the minimum detection area as the target detection area in the visual image information.

[0066] It can be understood that the endpoints where the curvature direction changes on the edge of the die casting mark the locations where the curvature on the edge of the die casting changes significantly. Adjacent endpoints within a preset range can be connected to form a series of line segments. These line segments enclose a polygonal area that surrounds all feature points and theoretically only covers the part where the edge curvature changes most significantly. This area is the minimum detection area. This can effectively narrow the detection range and reduce unnecessary image analysis burdens. The minimum detection area is a polygonal area that is as compact as possible while ensuring that all key features are included. To construct such an area, geometric algorithms can be applied, such as the convex hull algorithm to ensure that the polygonal boundary can tightly surround all endpoints, or more complex algorithms can be used to find the minimum area enclosing polygon to ensure that the detection area is both accurate and efficient.

[0067] Exemplarily, for example, there are three endpoints:

[0068] End point A: The upper left corner of the part, where the straight line turns into a curve.

[0069] End point B: The point above the middle where the curvature becomes more severe.

[0070] End point C: The middle point on the right side where the curve turns into a straight line.

[0071] Construct the minimum polygon: Draw a polygon with these three endpoints as vertices. Start from endpoint A, connect ABC in clockwise or counterclockwise order, and finally return to point A. The boundary of this polygon fits the curvature change area of ​​the edge of the die casting closely, forming the "minimum detection area" to accurately identify possible problem areas and improve the pertinence and accuracy of defect detection.

[0072] S140, dividing the visual image information of the die casting into a first characteristic region and a second characteristic region according to the target detection region in the visual image information.

[0073] It can be understood that based on the determined target detection area, the visual image information is accurately divided into the first feature area and the second feature area. Based on the edge detection results, the curvature changes of each segment of the die-casting edge are analyzed to identify the feature points where the curvature direction changes significantly, which are usually caused by structural changes, edges or defects. Based on the feature points where the curvature direction changes, especially those endpoints on different sides of the curvature direction, the minimum detection area is constructed. These areas become the target detection areas because they are likely to contain or be adjacent to the die-casting defects. All determined target detection areas are divided into the first feature area, and all image areas outside the target detection area are classified as non-direct detection areas, that is, the second feature area.

[0074] Optionally, see Figure 5 S140, dividing the visual image information of the die casting into a first feature area and a second feature area according to the target detection area in the visual image information, including:

[0075] S141, determining an indirect detection area in the visual image information according to the target detection area in the visual image information; wherein the indirect detection area includes an image area outside all target detection areas in the image.

[0076] It can be understood that the target detection area refers to the minimum detection area constructed based on the endpoints where the curvature direction changes on the edge of the die casting that have been identified during the image analysis process. These areas are determined by the algorithm analyzing the image pixel data, and the algorithm will mark their positions based on the shape, color, texture and other features of the object. The indirect detection area refers to the image area outside all target detection areas in the image. The indirect detection area does not identify defects through the curvature change feature, but is detected through the detection results of the target detection area and the preset detection mode.

[0077] S142, dividing all target detection areas in the visual image information into first characteristic areas, and dividing all indirect detection areas in the visual image information into second characteristic areas.

[0078] It can be understood that the first characteristic area is the minimum detection area constructed based on the endpoints where the curvature direction changes on the edge of the die casting, and is also the direct detection area.

[0079] S200, determining first defect feature information of the first feature region according to the first feature region of the visual image information of the die casting; wherein the first defect feature information is used to reflect the feature details of the defect in the first feature region.

[0080] It can be understood that the in-depth analysis of the first characteristic area is aimed at identifying and extracting characteristic information related to the defect. This may include calculating pixel intensity, texture features, shape parameters, etc. to determine whether there is a defect in the area and its characteristics. For example, if the first characteristic area is the surface portion of the die casting, look for signs of defects such as cracks, holes or unevenness. The first defect characteristic information is a detailed description of the characteristic details of the single defect that has been identified and recorded, that is, each defect identified in the first characteristic area will have corresponding defect characteristic information, that is, each single defect corresponds to the first defect characteristic information.

[0081] In one possible implementation, see Figure 6 S200, determining first defect feature information of the first feature area according to the first feature area of ​​the visual image information of the die casting, including:

[0082] S210, determining, according to a first characteristic region of the visual image information of the die casting, a change characteristic of a curvature change value of each segment of the edge of the die casting in the first characteristic region.

[0083] It is understood that for a detailed analysis of the die casting edge, possible defect signs can be identified by calculating the change in edge curvature. The change in edge curvature can sensitively reflect surface discontinuities, such as the start or end point of a crack, and unexpected deformation of the shape, which is particularly effective for identifying small or hidden defects. The curvature change values ​​of each segment of the die casting edge in the first characteristic area can be obtained through a preset statistical algorithm to obtain a curve of curvature change values, which can reflect the change characteristics of the curvature change values.

[0084] S220, identifying preliminary defect feature information of the first feature region according to the change characteristics of the curvature change values ​​of each segment of the die casting edge in the first feature region.

[0085] It can be understood that according to the change characteristics of the edge of the curve analysis of the curvature change value, the curvature change characteristics can be classified using a pattern recognition algorithm to identify possible defect areas. Based on the change characteristics of the curvature change value, the defect type, such as cracks, holes or unevenness, is preliminarily determined, and these preliminarily determined defect types are preliminary defect feature information. The identified preliminary defect feature information is recorded for further analysis and processing. By conducting an in-depth analysis of the change characteristics of the curvature change value, the defects on the surface of the die casting can be effectively identified. And the contour of the defect can be extracted from the image using a connected component analysis or a contour tracking algorithm to measure the size of the defect. This process can sensitively detect surface discontinuities and provide a reliable data basis for subsequent defect feature extraction and optimization design. Exemplarily, a preset algorithm can be used to analyze the curvature change curve to identify significant curvature change points (such as peak values, valley values, etc.). These significant change points may correspond to surface discontinuities or defect locations. According to the morphology and position of the significant change points, the defect type is preliminarily determined. For linear defects such as cracks, the length of the longest continuous contour can be calculated as the length of the defect, which is achieved by calculating the straight-line distance or curve length between the contour endpoints. For width measurement, several key points on the contour (such as the widest point) can be selected to calculate the lateral distance between these points. Alternatively, if the defect has a more regular shape, the average width can be estimated by analyzing the thickness distribution of the contour. For example:

[0086] Crack: Sharp peaks or valleys appear in the curvature change curve, indicating the start or end of the crack.

[0087] Holes: Wide, gentle valleys appearing in the curvature curve indicate depressions or holes in the surface.

[0088] Unevenness: Multiple small fluctuations in the curvature change curve indicate an uneven surface.

[0089] Record the identified defect type, location, size, etc. to form preliminary defect feature information. For example:

[0090] Defect type: Crack.

[0091] Position: The edge position [x1, x2].

[0092] Size: 1.8 in length, 1.5 in width.

[0093] Feature description: The curvature change value shows a significant peak between the positions [x1, x2].

[0094] S230, based on the preliminary defect feature information of the first feature area, matching the relationship between each preliminary defect feature information of the first feature area and the corresponding standard size.

[0095] Exemplarily, a standard size information library that stores die casting design specifications and quality standards can be pre-established. These standard size information libraries define the allowable tolerance range of die castings and the maximum allowable size of defects. Match each identified preliminary defect feature information to check whether it is within the allowable range of the standard size. Specifically, check the size of the defect (such as length, width, depth) and compare it with the standard size. If the defect size is within the allowable range of the standard size, it is considered that the defect does not need to be repaired. If the defect size exceeds the allowable range of the standard size, it is marked as a defect that needs to be repaired.

[0096] S240, determining first defect feature information of the first feature area according to a relationship between each preliminary defect feature information of the first feature area and a corresponding standard size.

[0097] It can be understood that based on the matching result of the preliminary defect feature information and the standard size, the first defect feature information of the first feature area is finally determined. Specifically, by evaluating the relationship between the preliminary defect feature information and the standard size, the type, severity and repair requirements of the defect are determined. The first defect feature information is a detailed description of the defect feature that has been identified and recorded. For each preliminary defect feature information, it is evaluated whether it meets the standard size requirements. According to the matching results, the defect feature information is classified, for example:

[0098] Defect type: Crack.

[0099] Position: The edge position [x1, x2].

[0100] Feature description: The curvature change value shows a significant peak between the positions [x1, x2].

[0101] Acceptable defect: The defect size is within the allowable range of the standard and does not require repair.

[0102] Determining defect feature information based on standard size matching not only improves the scientificity and accuracy of defect detection, but also promotes the improvement of production efficiency and cost control.

[0103] S300, determining feature recognition parameters of a second feature region according to first defect feature information of a first feature region; wherein the feature recognition parameters are used to recognize defect feature information of the second feature region.

[0104] It is understood that the parameters used to analyze the second feature area can be adjusted or set according to the defect features found in the first feature area. Feature recognition parameters refer to a series of parameter variables used to control and optimize recognition during feature recognition, and are specific parameters for identifying defect feature information in the second feature area. For example, these parameters can be specific thresholds, input weights of template matching rules, to optimize the ability to identify potential defects in the second feature area, reflecting the strategy of adapting from known information to improve the accuracy of subsequent analysis.

[0105] In one possible implementation, see Figure 7 S300, determining feature recognition parameters of a second feature area according to first defect feature information of a first feature area, including:

[0106] S310, determining a first defect feature information map of the die casting according to the first defect feature information of the first feature region; wherein the first defect feature information map is used to reflect the details of all known defect feature information of the first feature region.

[0107] It can be understood that a defect feature information map, namely the first defect feature information map, is generated based on the defect feature information found in the first feature area. The map includes information such as defect type, location, size and severity. For example, if cracks and holes are found in the first feature area, the map will record the specific details of these defects, such as the location and length of the cracks, the location and diameter of the holes, etc. The first defect feature information map is a chart or database that integrates the detailed description and statistical data of all known defect feature information in the first feature area, and graphically displays the defect feature distribution of the first feature area, which is convenient for quick understanding and analysis. Exemplarily, the first defect feature information map can use Python's matplotlib library to visualize the defect feature information.

[0108] S320, determining a feature recognition pattern of a second feature area according to the first defect feature information map of the die casting; wherein the feature recognition pattern includes parameters and methods for identifying a specific type of defect.

[0109] It can be understood that, based on the first defect feature information map, determining the recognition mode for analyzing the second feature area is to formulate a set of recognition modes according to the types and distribution characteristics of the defects in the defect feature information map. Defects in the first defect feature information map are classified and labeled. It can include identifying different types of defects such as cracks, pores, cold shuts, shrinkage holes, etc. Analyze the distribution and characteristics of defects in the first feature area. For example, analyze the defect density, defect type distribution, geometric characteristics of defects, defect location, etc. According to the defect type and distribution characteristics, determine the parameters of the image processing algorithm and formulate a feature recognition mode for the second feature area. This mode will affect how to set the parameters of the image processing algorithm and how to adjust the sensitivity of the detection. The feature recognition mode is a method or strategy for automatically detecting, extracting and distinguishing different features from the data. The feature recognition mode includes parameters and methods for identifying specific types of defects. For example, if multiple cracks are found in the first feature area, the parameters for crack detection are set in the second feature area, such as the threshold and template matching rules for enhancing crack detection.

[0110] S330, determining feature recognition parameters of the second feature area according to the feature recognition mode of the second feature area and the first defect feature information map.

[0111] It can be understood that the recognition parameters of the second feature area are set according to the recognition mode and the defect feature information map. Specific parameters are set according to the recognition mode. These parameters may include image processing thresholds, edge detection parameters, template matching weights, etc., to optimize the accuracy and efficiency of defect recognition. For example, the defect feature information map of the first feature area shows that cracks are the main defect type, accounting for a proportion of all defects that is higher than a certain threshold. Therefore, through the preset mapping relationship, the feature recognition parameters are adjusted to enhance the detection of cracks, and the threshold of the edge detection algorithm is adjusted to a lower value to increase the detection sensitivity of the fine edges of the cracks. When classifying the defect type, the weight of the crack is adjusted to a higher value to prioritize the identification of the crack. It is also possible to introduce additional crack feature extraction steps when the crack ratio exceeds a predetermined threshold, such as using morphological operations or fine line detection algorithms to improve the detection rate of cracks. For example, the defect information map shows that the proportion of hole defect types in the first feature area to all defects is higher than a certain threshold, so the preset mapping relationship adjustment parameters are used to better identify holes. The parameters of the edge detection algorithm can be adjusted to better capture the details of the hole edges, and the shape matching algorithm is introduced to constrain the shape of the detected holes. For example, only holes that are approximately circular are accepted, and the minimum and maximum diameter ranges of the holes are set to exclude holes that are too small or too large and reduce false detections. Through these steps, the accuracy and efficiency of subsequent analysis can be effectively improved through known information.

[0112] Exemplarily, crack defects account for 70%, followed by holes, accounting for 25%, and other types of defects account for 5%. For the second characteristic area, the detection algorithm needs to be optimized to ensure high-precision identification of cracks and holes while maintaining efficient detection speed. Through the mapping relationship, since cracks usually appear as fine lines, the high and low threshold ratios of edge detection algorithms in image processing (such as Canny edge detection) are adjusted to a wider range (for example, 1:3 to 1:5) to increase sensitivity to fine edges. A common crack morphology template library is introduced, and the weight of template matching is increased to 1.5 times the original basis. Crack features are matched first, and open operations are applied to remove noise around the cracks. Closed operations connect broken crack edges to fully identify the crack path.

[0113] S400, determining second defect feature information of the second feature area according to feature recognition parameters of the second feature area; wherein the second defect feature information is used to reflect feature details of the defect in the second feature area.

[0114] It can be understood that the second feature area can be analyzed in detail using the set feature recognition parameters to identify the defect feature information in the second feature area. This step is based on the knowledge learned from the first area to detect defect types that may be more hidden or different. The second defect feature information is the corresponding details and description of the defects identified and recorded when the second feature area is detected.

[0115] In a possible implementation, S400, determining second defect feature information of the second feature area according to the feature recognition parameter of the second feature area includes:

[0116] S410, determining second defect feature information of the second feature region according to a feature recognition parameter of the second feature region through a feature recognition mode of the second feature region.

[0117] It is understood that the knowledge previously learned from the first feature area and the preset feature recognition parameters (such as adjusted thresholds, template matching of specific forms, edge detection sensitivity, etc.) can be applied to the image processing and analysis of the second feature area. It can also include but is not limited to adjusting the brightness contrast of the image, performing specific types of filtering to enhance the target features, and using preset edge detection algorithm parameters to highlight the potential defect boundaries. The second feature area is scanned and analyzed using the adjusted feature recognition mode, such as texture analysis and shape recognition. These modes can be designed specifically for identifying specific types of defects, such as fine scratches, irregular depressions, or foreign objects embedded in specific sizes and forms. Through the above recognition mode, the identification defect information is extracted from the second feature area. The identified defect type and its location are recorded to form the second defect feature information. It can include identifying a new defect type different from the first feature area, or an example of showing more refined different features (such as more subtle, shape changes, etc.) in the same type of defects. Further data analysis is performed on the extracted second defect feature information, such as statistical analysis, feature vector calculation, etc., to ensure the accuracy of recognition. Through refined parameter adjustment and advanced feature recognition technology, the defects in the second feature area are deeply explored and accurately determined, ensuring effective identification even in the face of more complex or hidden defects.

[0118] S500, determining a defect detection result of the die casting according to first defect feature information of the first feature region and second defect feature information of the second feature region.

[0119] It can be understood that the defect feature information of the first feature area and the second feature area can be integrated to determine the comprehensive detection results to determine the overall defect situation of the die casting. It can be a simple logical judgment (such as determining it as unqualified if the number of defects exceeds a threshold), or a more complex algorithm model that comprehensively considers multiple factors such as the type, location, and size of the defects, and finally outputs the defect detection results.

[0120] In one possible implementation, see Figure 8 S500, determining a defect detection result of the die casting according to first defect feature information of the first feature area and second defect feature information of the second feature area, including:

[0121] S510, determining a second defect feature information map of the die casting according to the second defect feature information of the second feature area; wherein the second defect feature information map is used to reflect the details of all known defect feature information of the second feature area.

[0122] It can be understood that all the second defect characteristic information obtained from the second characteristic area analysis is integrated to form a detailed atlas. The key attributes such as defect type, location, size, shape, etc. of all identified second characteristic areas are recorded and classified. The frequency of occurrence of each defect type and their distribution in the second characteristic area are counted. According to the mapping relationship between the nature and size of the defect and the preset, its potential impact on the function and strength of the die casting is evaluated. Based on the above information, a second defect characteristic information atlas of the second characteristic area is generated. The second defect characteristic information atlas is a visual expression of the details of all known defect characteristic information in the second characteristic area, which is convenient for intuitively understanding the defect mode and characteristic distribution of the second characteristic area. For example, the second defect characteristic information of the second characteristic area shows that there are three main defects: pores, cracks and surface unevenness. A total of 15 pores were found, with a diameter range of 5-15mm and uniform distribution; there were 4 cracks with a length of 10-30mm, concentrated at the edge of the second characteristic area; and surface unevenness accounted for 5% of the total area of ​​the second characteristic area. According to the preset standards, pores and cracks have a direct impact on structural strength, while surface unevenness may affect appearance and assembly. By integrating this information, a second defect characteristic information map of the second characteristic area is created. Based on the preset visualization tool library, different colors and marks are used to display the location and density of various defects for easy intuitive understanding.

[0123] S520, determining the defect complexity of the die-casting according to the first defect characteristic information map and the second defect characteristic information map of the die-casting.

[0124] It can be understood that the defect feature information map of the first feature area and the map of the second feature area just constructed can be combined to comprehensively evaluate the overall defect status of the die casting. Compare the defect types, distribution, frequency and severity of the two feature areas to identify commonalities and differences. A set of evaluation criteria can be pre-established to consider factors such as the number, type, uniformity of distribution of defects, and potential impact on product performance. According to the mapping relationship between actual test data and evaluation criteria, the defect complexity of die castings is divided into multiple levels such as simple, medium, and complex to provide a basis for subsequent decision-making. Scores and weights can be set for each dimension according to actual conditions.

[0125] Optionally, see Fig. 9 S520, determining the defect complexity of the die casting according to the first defect characteristic information map and the second defect characteristic information map of the die casting, including:

[0126] S521, determining defect distribution data of the die casting according to the first defect characteristic information map and the second defect characteristic information map of the die casting.

[0127] It can be understood that by analyzing the first defect characteristic information map and the second defect characteristic information map of the die casting, the defect distribution data of the die casting is updated. These maps can include multi-dimensional information such as the position, size, frequency and morphology of various types of defects (such as cracks, shrinkage holes, cold shuts, etc.) on the die casting. By combining these two maps, the concentrated areas, distribution patterns and potential correlations of defects are identified. The defect distribution data not only records the situation of a single defect, but also reveals the spatial relationship and overall layout between defects.

[0128] S522, determining the defect complexity of the die casting according to the defect distribution data of the die casting and a preset defect sequence; wherein the defect sequence is used to reflect the influence degree of different defects on the die casting.

[0129] It can be understood that the defect complexity of die castings can be evaluated based on the obtained defect distribution data combined with the preset defect sequence. The preset defect sequence is a sorting mechanism that grades defects according to different defect types, locations, sizes and other factors, reflecting the potential impact of each defect on the function, strength, appearance and even service life of the die casting. Simply put, some defects (such as large cracks in key load-bearing parts) may be ranked at the front of the sequence because they pose a major threat to the performance of die castings; while some minor surface flaws may be ranked at the back and have relatively small impacts. By comparing the defect distribution data with the defect sequence, the overall defect status of the die casting can be quantified to determine which defects are the main focus and which may be secondary considerations. Based on the defect distribution data and the preset defect sequence (assuming that in the sequence, cracks > shrinkage cavities, and the larger the size, the more serious the impact), the defect complexity can be determined. Count all defect types and their frequency of occurrence. Assume that there are a total of n There are different types of defects. The distribution probability of each type can be calculated by calculating the number of defects of each type, and the entropy of each defect type can be calculated to reflect the disorder of the defect distribution, that is, the complexity of the defect. The influence of different defect types on die castings can be reflected by a preset defect sequence. For example, the disorder of the defect type can be obtained by summarizing the entropy and weight of the defect type through a preset weight to reflect the complexity of the defect.

[0130] S530, determining a defect detection result of the die casting according to the defect complexity of the die casting.

[0131] It can be understood that the overall quality status of die castings can be judged based on the evaluation results of defect complexity. This can be done by setting a threshold interval for defect complexity so that the defect detection results of die castings are interval mapped according to the value of defect complexity. For example, [0, a] is a simple interval, (a, b] is a medium interval, and (b, ∞) is a complex interval. A simple interval may mean that the product meets the standard, while defects in a complex interval may require rework, scrapping, or special quality control review. Prepare a detailed inspection report that outlines the inspection process, the types of defects found, the complexity rating, and the final processing recommendations. The inspection results can also be fed back to the production process to guide process adjustments, mold maintenance, or revisions to quality standards to form a closed-loop quality control. Through this series of steps, not only can the defects of die castings be specifically identified and classified, but also their complexity can be quantitatively evaluated, the consistency of the inspection results and the inspection efficiency can be improved, and the high-speed production requirements of the modern manufacturing industry can be met.

[0132] Corresponding to the die-casting defect detection method of the above embodiment, the embodiment of the present application further provides a die-casting defect detection device, and each unit of the device can implement each step of the die-casting defect detection method. Fig.10 A structural block diagram of a die-casting defect detection device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0133] Reference Fig.10 , the die-casting defect detection device comprises:

[0134] An acquisition unit, used for acquiring visual image information of the die casting to be inspected, and dividing the visual image information of the die casting into a first characteristic region and a second characteristic region; wherein the first characteristic region and the second characteristic region are different;

[0135] A determination unit, configured to determine first defect feature information of the first feature area according to the first feature area of ​​the visual image information of the die casting; wherein the first defect feature information is used to reflect the feature details of the defect of the first feature area;

[0136] A parameter unit, used to determine a feature recognition parameter of the second feature area according to the first defect feature information of the first feature area; wherein the feature recognition parameter is used to control and optimize a recognition algorithm;

[0137] an identification unit, configured to determine second defect feature information of the second feature area according to the feature identification parameter of the second feature area; wherein the second defect feature information is used to reflect the feature details of the defect of the second feature area;

[0138] An evaluation unit is used to determine a defect detection result of the die casting according to the first defect feature information of the first feature area and the second defect feature information of the second feature area.

[0139] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0140] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit module can exist physically separately, or two or more unit modules can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0141] The present application also provides a die-casting defect detection device, Fig.11 This is a schematic diagram of the structure of a die-casting defect detection device provided in one embodiment of the present application. Fig.11 As shown, the die casting defect detection device 6 of this embodiment includes: at least one processor 60 ( Fig.11 Only one is shown), at least one memory 61 ( Fig.11 Only one is shown in the figure) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the die-casting defect detection device 6 implements the steps in any of the above-mentioned die-casting defect detection method embodiments, or the die-casting defect detection device 6 implements the functions of each unit in the above-mentioned device embodiments.

[0142] Exemplarily, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the die casting defect detection device 6.

[0143] The die-casting defect detection device 6 may be an industrial controller, an intelligent detection robot, an embedded system, an Internet of Things (IoT) sensor node, a mobile detection unit, a remote monitoring station, an automated test bench of a smart factory, or a cloud-connected analysis device. The die-casting defect detection device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art may understand that Fig.11 It is only an example of the die-casting defect detection device 6 and does not constitute a limitation of the die-casting defect detection device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, buses, etc.

[0144] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0145] In some embodiments, the memory 61 may be an internal storage unit of the die-casting defect detection device 6, such as a hard disk or memory of the die-casting defect detection device 6. In other embodiments, the memory 61 may also be an external storage device of the die-casting defect detection device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the die-casting defect detection device 6. Further, the memory 61 may also include both the internal storage unit of the die-casting defect detection device 6 and an external storage device. The memory 61 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0146] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0147] An embodiment of the present application provides a computer program product. When the computer program product is executed on a terminal device, the terminal device implements the steps in any of the above method embodiments.

[0148] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0149] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0150] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0151] In the embodiments provided in the present application, it should be understood that the disclosed die-casting defect detection device / die-casting defect detection equipment and method can be implemented in other ways. For example, the die-casting defect detection device / die-casting defect detection equipment embodiment described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A die casting defect detection method, characterized in that: include: Acquire visual image information of a die casting to be inspected, and divide the visual image information of the die casting into a first characteristic region and a second characteristic region; wherein the first characteristic region and the second characteristic region are different; Determine first defect feature information of the first feature area according to the first feature area of ​​the visual image information of the die casting; wherein the first defect feature information is used to reflect the feature details of the defect of the first feature area; Determine a feature recognition parameter of the second feature region according to the first defect feature information of the first feature region; wherein the feature recognition parameter is used to recognize the defect feature information of the second feature region; Determine second defect feature information of the second feature area according to the feature recognition parameter of the second feature area; wherein the second defect feature information is used to reflect the feature details of the defect of the second feature area; Determining a defect detection result of the die casting according to the first defect feature information of the first feature area and the second defect feature information of the second feature area; Wherein, the step of acquiring visual image information of the die casting to be inspected and dividing the visual image information of the die casting into a first characteristic region and a second characteristic region comprises: Acquiring visual image information of a die casting to be inspected, and performing edge detection on the visual image information of the die casting; Based on the result of edge detection of the visual image information of the die casting, determining a feature point where the curvature direction of the edge of the die casting in the visual image information changes; Determine a target detection area in the visual image information according to the feature point where the curvature direction of the edge of the die casting changes in the visual image information; Dividing the visual image information of the die casting into a first characteristic region and a second characteristic region according to the target detection region in the visual image information; The step of dividing the visual image information of the die casting into a first feature area and a second feature area according to the target detection area in the visual image information comprises: Determine an indirect detection area in the visual image information according to the target detection area in the visual image information; wherein the indirect detection area includes an image area outside all target detection areas in the image; All the target detection areas in the visual image information are divided into first characteristic areas, and all the indirect detection areas in the visual image information are divided into second characteristic areas.

2. The die casting defect detection method according to claim 1, characterized in that: The step of determining a characteristic point where a curvature direction of the edge of the die casting in the visual image information changes based on a result of edge detection of the visual image information of the die casting comprises: Determining, based on the result of edge detection of the visual image information of the die casting, a curvature change value of each segment of the edge of the die casting in the visual image information; According to the curvature change value of each segment of the edge of the die casting in the visual image information, locate the characteristic position corresponding to the change of curvature direction; wherein the curvature directions on both sides of the characteristic position are different; According to the characteristic position corresponding to the change in curvature direction, the characteristic position is determined as a characteristic point on the edge of the die casting where the curvature direction changes.

3. The die casting defect detection method according to claim 1, characterized in that: The step of determining the target detection area in the visual image information based on the feature point where the curvature direction of the edge of the die casting changes in the visual image information includes: Determine the end point where the curvature direction on the edge of the die casting changes according to the characteristic point where the curvature direction on the edge of the die casting changes in the visual image information; Based on the endpoint where the curvature direction on the edge of the die casting changes, a minimum detection area where the curvature direction on the edge of the die casting changes in the visual image information is constructed, and the minimum detection area is used as the target detection area in the visual image information.

4. The die casting defect detection method according to claim 2, characterized in that: The determining, based on the first feature area of ​​the visual image information of the die casting, first defect feature information of the first feature area comprises: Determining, according to the first characteristic region of the visual image information of the die casting, a change characteristic of the curvature change value of each segment of the edge of the die casting in the first characteristic region; Identify preliminary defect feature information of the first feature area according to the change feature of the curvature change value of each segment of the edge of the die casting in the first feature area; Based on the preliminary defect feature information of the first feature area, matching the relationship between each preliminary defect feature information of the first feature area and the corresponding standard size; The first defect feature information of the first feature area is determined according to the relationship between each preliminary defect feature information of the first feature area and the corresponding standard size.

5. The die casting defect detection method according to claim 1, characterized in that: The determining, according to the first defect feature information of the first feature area, feature recognition parameters of the second feature area includes: Determine a first defect feature information map of the die casting according to the first defect feature information of the first feature area; wherein the first defect feature information map is used to reflect the details of all known defect feature information of the first feature area; Determining a feature recognition mode of the second feature area according to the first defect feature information map of the die casting; wherein the feature recognition mode includes parameters and methods for identifying a specific type of defect; Determine feature recognition parameters of the second feature area according to the feature recognition pattern of the second feature area and the first defect feature information map.

6. The die casting defect detection method according to claim 5, characterized in that: The determining, according to the feature recognition parameter of the second feature area, second defect feature information of the second feature area comprises: According to the feature recognition parameter of the second feature area, second defect feature information of the second feature area is determined by the feature recognition mode of the second feature area.

7. The die casting defect detection method according to claim 5, characterized in that: The step of determining the defect detection result of the die casting according to the first defect feature information of the first feature area and the second defect feature information of the second feature area comprises: Determine a second defect characteristic information map of the die casting according to the second defect characteristic information of the second characteristic region; wherein the second defect characteristic information map is used to reflect the details of all known defect characteristic information of the second characteristic region; Determining the defect complexity of the die casting according to the first defect characteristic information map and the second defect characteristic information map of the die casting; Determine a defect detection result of the die casting according to the defect complexity of the die casting.

8. The die casting defect detection method according to claim 7, characterized in that: Determining the defect complexity of the die casting according to the first defect characteristic information map and the second defect characteristic information map of the die casting includes: Determining defect distribution data of the die casting according to the first defect characteristic information map and the second defect characteristic information map of the die casting; The defect complexity of the die casting is determined based on the defect distribution data of the die casting and a preset defect sequence; wherein the defect sequence is used to reflect the degree of influence of different defects on the die casting.

9. A die casting defect detection device, characterized in that: include: An acquisition unit, used for acquiring visual image information of the die casting to be inspected, and dividing the visual image information of the die casting into a first characteristic region and a second characteristic region; wherein the first characteristic region and the second characteristic region are different; A determination unit, configured to determine first defect feature information of the first feature area according to the first feature area of ​​the visual image information of the die casting; wherein the first defect feature information is used to reflect the feature details of the defect of the first feature area; A parameter unit, used to determine a feature recognition parameter of the second feature area according to the first defect feature information of the first feature area; wherein the feature recognition parameter is used to control and optimize a recognition algorithm; an identification unit, configured to determine second defect feature information of the second feature area according to the feature identification parameter of the second feature area; wherein the second defect feature information is used to reflect the feature details of the defect of the second feature area; an evaluation unit, configured to determine a defect detection result of the die casting according to the first defect feature information of the first feature area and the second defect feature information of the second feature area; Wherein, the acquisition unit is further used for: Acquiring visual image information of a die casting to be inspected, and performing edge detection on the visual image information of the die casting; Based on the result of edge detection of the visual image information of the die casting, determining a feature point where the curvature direction of the edge of the die casting in the visual image information changes; Determine a target detection area in the visual image information according to the feature point where the curvature direction of the edge of the die casting changes in the visual image information; Dividing the visual image information of the die casting into a first characteristic region and a second characteristic region according to the target detection region in the visual image information; The step of dividing the visual image information of the die casting into a first feature area and a second feature area according to the target detection area in the visual image information comprises: Determine an indirect detection area in the visual image information according to the target detection area in the visual image information; wherein the indirect detection area includes an image area outside all target detection areas in the image; All the target detection areas in the visual image information are divided into first characteristic areas, and all the indirect detection areas in the visual image information are divided into second characteristic areas.

10. A die casting defect detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.