Casting quality inspection method, system and equipment based on machine vision
Through machine vision technology, combined with production process and environmental data, the surface texture characteristics of castings are automatically identified, which solves the subjectivity problem of casting quality inspection, improves detection efficiency and accuracy, and is suitable for mass production.
Patent Information
- Application Number
- CN202410963775.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Existing quality inspection of castings relies on visual inspection, which is easily affected by the subjectivity of personal judgment, leading to missed detection or misjudgment of defects, low detection efficiency, and is not suitable for modern mass production.
Using an inspection method based on machine vision, by obtaining the production process data, high-definition image data and environmental parameter data of the casting, the surface texture features are identified and extracted, combined with the predefined evaluation rules, to perform automated quality assessment and generate the final inspection result.
It achieves accurate judgment on the quality of castings, improves detection efficiency, is suitable for the needs of modern mass production, and reduces human errors.
Smart Images

Figure CN118505703B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of casting inspection, and in particular, relates to a casting quality inspection method, system and equipment based on machine vision. Background Art
[0002] Castings are metal shaped objects made through the casting process, which is a long-standing manufacturing technology widely used in various industrial fields such as automobiles, aviation, machinery, construction and household goods. The basic principle of casting is to pour molten metal into a mold of a preset shape, wait for it to cool and solidify, and then take it out to obtain a component of the desired shape and size.
[0003] In the prior art, casting quality inspection is usually performed visually, which relies on the experience and attention of the inspectors and is easily affected by the subjectivity of personal judgment. Especially for a large number or large castings, it takes a lot of time and manpower, resulting in missed defects or misjudgment, low inspection efficiency, and is not suitable for the needs of modern large-scale production. Summary of the invention
[0004] The embodiments of the present application provide a casting quality inspection method, system and equipment based on machine vision, which can solve the problem that casting quality inspection is easily affected by the subjectivity of personal judgment, resulting in missed defects or misjudgment, low inspection efficiency, and unsuitability for the needs of modern large-scale production.
[0005] In a first aspect, an embodiment of the present application provides a casting quality detection method based on machine vision, comprising:
[0006] Acquire production process data of castings, high-definition image data of the casting surface, and environmental parameter data; wherein the production process data is used to reflect the process conditions of the castings, and the environmental parameter data is used to reflect the casting environment of the castings;
[0007] According to the production process data, the environmental parameter data and the high-definition image data, an evaluation area image sequence is obtained; the evaluation area image sequence is used to reflect the influence of external conditions on different areas of the casting;
[0008] Identifying and extracting casting surface texture features from the evaluation area image sequence to obtain texture direction information; the texture direction information is used to reflect the directional distribution of the casting surface structure;
[0009] According to the texture direction information and the evaluation area image sequence, a plurality of preliminary evaluation data are obtained based on predefined evaluation rules;
[0010] Data evaluation is performed based on the plurality of preliminary evaluation data to obtain final evaluation data; wherein the final evaluation data is used to reflect the detection result of the casting quality.
[0011] The above technical solutions in the embodiments of the present application have at least the following technical effects:
[0012] The casting quality detection method based on machine vision provided in the embodiment of the present application, by obtaining the production process data of the casting, the high-definition image data of the casting surface and the environmental parameter data, understands the process conditions and casting environment of the casting. According to the production process data, the environmental parameter data and the high-definition image data, the evaluation area image sequence is obtained to determine the influence of the external conditions on different areas of the casting. The surface texture features of the casting are identified and extracted from the evaluation area image sequence, the texture direction information is obtained, and the directional distribution of the surface structure of the casting is understood. According to the texture direction information and the evaluation area image sequence, a plurality of preliminary evaluation data are obtained based on predefined evaluation rules, and data evaluation is performed based on the plurality of preliminary evaluation data to obtain the final evaluation data, which finally reflects the detection result of the casting quality, accurately judges the quality of the casting, improves the detection efficiency, and is suitable for the detection needs of modern large-scale production.
[0013] In a second aspect, the present application embodiment provides a casting quality inspection system based on machine vision, comprising:
[0014] An acquisition unit, used to acquire production process data of the casting, high-definition image data of the casting surface, and environmental parameter data; wherein the production process data is used to reflect the process conditions of the casting, and the environmental parameter data is used to reflect the casting environment of the casting;
[0015] A sequence unit, used to obtain an evaluation area image sequence based on the production process data, the environmental parameter data and the high-definition image data; the evaluation area image sequence is used to reflect the impact of external conditions on different areas of the casting;
[0016] A texture unit, used to identify and extract casting surface texture features from the evaluation area image sequence to obtain texture direction information; the texture direction information is used to reflect the directional distribution of the casting surface structure;
[0017] A preliminary evaluation unit, configured to obtain a plurality of preliminary evaluation data based on the texture direction information and the evaluation area image sequence and based on predefined evaluation rules;
[0018] The final evaluation unit is used to perform data evaluation based on the multiple preliminary evaluation data to obtain final evaluation data; wherein the final evaluation data is used to reflect the detection result of the casting quality.
[0019] In a third aspect, an embodiment of the present application provides a casting quality inspection device based on machine vision, 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. When the computer program product is run on a casting quality inspection device based on machine vision, the casting quality inspection device based on machine vision executes the method of any one of the above-mentioned first aspects.
[0021] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, 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 partial flow chart of a casting quality inspection method based on machine vision provided in one embodiment of the present application;
[0024] Figure 2 It is a flow chart of step S200 in the casting quality detection method based on machine vision provided in one embodiment of the present application;
[0025] Figure 3 It is a flowchart of step S230 of a casting quality inspection method based on machine vision provided in an embodiment of the present application;
[0026] Figure 4 It is a flowchart of step S231 of a casting quality detection method based on machine vision provided in an embodiment of the present application;
[0027] Figure 5 It is a flowchart of step S400 of a casting quality inspection method based on machine vision provided in an embodiment of the present application;
[0028] Figure 6 It is a flowchart of step S410 of a casting quality inspection method based on machine vision provided in an embodiment of the present application;
[0029] Figure 7It is a flowchart of step S420 of a casting quality inspection method based on machine vision provided in an embodiment of the present application;
[0030] Figure 8 It is a flowchart of step S500 of a casting quality inspection method based on machine vision provided in an embodiment of the present application;
[0031] Fig. 9 It is a partial flow chart of a casting quality inspection method based on machine vision provided in one embodiment of the present application;
[0032] Fig.10 It is a structural schematic diagram of a casting quality inspection system based on machine vision provided in one embodiment of the present application;
[0033] Fig.11 It is a structural schematic diagram of a casting quality inspection device based on machine vision 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 and appended claims of this application, 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 [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [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] In the prior art, casting quality inspection is usually performed visually, which relies on the experience and attention of the inspectors and is easily affected by the subjectivity of personal judgment. Especially for a large number or large castings, it takes a lot of time and manpower, resulting in missed defects or misjudgment, low inspection efficiency, and is not suitable for the needs of modern large-scale production.
[0041] To solve the above problems, the embodiments of the present application provide a casting quality detection method, system and equipment based on machine vision. In this method, by obtaining the production process data of the casting, the high-definition image data of the casting surface and the environmental parameter data, the process conditions and casting environment of the casting are understood. Based on the production process data, the environmental parameter data and the high-definition image data, an evaluation area image sequence is obtained to determine the impact of external conditions on different areas of the casting. The surface texture features of the casting are identified and extracted from the evaluation area image sequence, the texture direction information is obtained, and the directional distribution of the surface structure of the casting is understood. Based on the texture direction information and the evaluation area image sequence, multiple preliminary evaluation data are obtained based on predefined evaluation rules, and data evaluation is performed based on multiple preliminary evaluation data to obtain final evaluation data, which finally reflects the detection results of the casting quality, accurately judges the quality of the casting, improves the detection efficiency, and is suitable for the detection needs of modern large-scale production.
[0042] The casting quality inspection method based on machine vision provided in the embodiment of the present application can be applied to the casting quality inspection equipment based on machine vision. At this time, the casting quality inspection equipment based on machine vision is the execution subject of the casting quality inspection method based on machine vision 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 casting quality inspection equipment based on machine vision.
[0043] For example, the casting quality inspection equipment based on machine vision can be a variety of intelligent inspection equipment. The casting quality inspection equipment based on machine vision can include image acquisition equipment (camera or other imaging equipment), input and output equipment, communication equipment, computing equipment, and display equipment. The computing equipment can be a computer, a computer, a laptop, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), a desktop computer, a smart screen, a smart TV, etc.
[0044] In order to better understand the casting quality inspection method based on machine vision provided in the embodiment of the present application, the specific implementation process of the casting quality inspection method based on machine vision provided in the embodiment of the present application is exemplarily introduced below.
[0045] Figure 1 A schematic flow chart of a casting quality detection method based on machine vision provided in an embodiment of the present application is shown. The casting quality detection method based on machine vision includes:
[0046] S100, obtaining production process data of the casting, high-definition image data of the casting surface, and environmental parameter data; wherein the production process data is used to reflect the process conditions of the casting, and the environmental parameter data is used to reflect the casting environment of the casting.
[0047] It can be understood that the production process data of castings, high-definition image data of the casting surface, and environmental parameter data can be obtained. The production process data can be collected in real time through industrial sensors and control systems. These sensors are installed at key locations of casting equipment and production lines to record parameters such as temperature, pressure, and cooling rate. Environmental parameter data can be collected through environmental monitoring sensors, which are distributed in the workshop to monitor environmental factors such as temperature, humidity, and air quality. High-definition image data of the casting surface can be obtained through high-resolution cameras, which are installed next to the production line to capture high-definition images of the casting surface in real time. The obtained production process data, high-definition image data of the casting surface, and environmental parameter data will be used for subsequent defect detection and analysis, and are the data basis for subsequent analysis.
[0048] S200, obtaining an evaluation area image sequence based on production process data, environmental parameter data and high-definition image data; wherein the evaluation area image sequence is used to reflect the impact of external conditions on different areas of the casting.
[0049] It can be understood that the evaluation area image sequence can be obtained based on the production process data, environmental parameter data and high-definition image data. The evaluation area image sequence reflects the impact of external conditions on different areas of the casting. The image can be divided into regions by analyzing the production process data and environmental parameter data, combined with the high-definition image data, to identify and evaluate the high-incidence areas of defects that may exist on the surface of the casting, and the casting surface can be divided into multiple evaluation areas for subsequent detailed analysis. The production process data and environmental parameter data can be combined with the high-definition image data, and the machine learning algorithm (using the production process data, environmental parameter data, and the evaluation area image sequence as input, and the divided evaluation area image sequence high-definition image as the result to train the machine learning model) or statistical analysis methods can be used to integrate different data sources to generate an evaluation area image sequence.
[0050] In one possible implementation, see Figure 2 , S200, based on the production process data, environmental parameter data and high-definition image data, obtain the evaluation area image sequence, including:
[0051] S210, dividing the high-definition image data into regions according to the production process data and the environmental parameter data to obtain partition feature data; wherein the partition feature data is used to reflect the defect-prone areas on the casting surface.
[0052] It can be understood that the high-definition image data can be divided into regions through production process data and environmental parameter data to obtain partition feature data. The partition feature data reflects the characteristics of different areas on the casting surface, especially the defect-prone areas. Through this regional division, the casting surface can be analyzed more specifically and potential defect areas can be identified. The partition feature data can be realized by image processing algorithms, such as edge detection, image segmentation and other methods, to divide the high-definition image data into different regions. The division relationship can be pre-defined, and the division relationship reflects the influence of different production process data and environmental parameter data on the casting curve. It can be preset through historical data and industry data to establish a mapping relationship table. The division relationship can be based on the preset mapping table. Through the specific values of the production process data and environmental parameter data, it is mapped to the preset division relationship. The production process data and environmental parameter data are used to identify and mark the areas where defects may exist, thereby generating partition feature data. The historical casting defect records and the corresponding production environment and process data can be used to analyze the laws of defect occurrence and identify the production parameters and environmental factors that are highly correlated with the defects. Based on the above analysis results, a mapping relationship between the production process data and environmental parameter data and the distribution of defects on the casting surface is constructed. For example, production records can be used to determine the pouring temperature interval and humidity range when porosity defects occurred frequently in the past. Image segmentation technology is applied to high-definition casting images to separate surface areas that may be more affected by temperature and humidity (such as parts that cool faster). Based on the temperature and humidity data of the current pouring batch and referring to the historical mapping relationship, the marked area is most likely to form porosity.
[0053] S220, performing regional positioning on the high-definition image data based on the partition feature data to obtain a plurality of casting inspection area images; wherein the casting inspection area images are used to reflect defect features of the corresponding casting inspection area.
[0054] It can be understood that the high-definition image data is regionally positioned based on the partition feature data to obtain multiple casting inspection area images. This can be achieved through image matching and positioning algorithms, including feature point matching, region growing and other technologies, to match and locate the partition feature data with the high-definition image data, so as to obtain a specific image of each casting inspection area. Under the guidance of the partition feature data, key feature points are first identified in the high-definition image, which should reflect the surface structure changes or possible defect features of the casting. Algorithms such as SIFT (Scale-Invariant Feature Transform), SURF (Speeded Up Robust Features) or ORB (Oriented FAST and Rotated BRIEF) can be used to automatically extract these feature points. Feature matching technology (such as RANSAC - Random Sample Consensus algorithm) can be used to find the best correspondence between the partition feature data and the high-definition image data. Based on the matched key feature points, a suitable seed point is selected as the starting position of the region growth, and points located near the boundary of the expected defect area can be used. Apply region growing algorithms, such as watershed algorithms or graph-based segmentation methods, starting from the seed point and gradually expanding, clustering pixels with similar textures, colors or grayscale values into the same region. Finally, the located casting inspection area is cropped from the original high-definition image to generate multiple independent inspection area images, providing clear target areas for subsequent defect identification and classification. The casting inspection area image reflects the defect characteristics of the corresponding casting inspection area.
[0055] S230, determining a dynamic sensitivity coefficient of a casting inspection area corresponding to each casting inspection area image based on a plurality of casting inspection area images; wherein the dynamic sensitivity coefficient is used to reflect the reaction of the casting inspection area to changes in external conditions.
[0056] It can be understood that the dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image is determined based on multiple casting inspection area images. The dynamic sensitivity coefficient is calculated through data analysis and modeling technology, and the specific methods include time series analysis, dynamic system modeling, etc. By analyzing the surface change dynamic information corresponding to the casting inspection area image, a dynamic sensitivity coefficient model is established to reflect the response of these areas to changes in external conditions.
[0057] Optionally, see Figure 3 S230, determining the dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image according to the plurality of casting inspection area images, including:
[0058] S231, analyzing the surface change dynamic information of the casting inspection area corresponding to each casting inspection area image based on the multiple casting inspection area images; wherein the surface change dynamic information is used to reflect the evolution trend of the casting inspection area.
[0059] It can be understood that the sensitivity of these areas to changes in external conditions can be determined by analyzing the surface change dynamic information corresponding to each casting inspection area image. The surface change dynamic information is a specific manifestation of the evolution trend of the casting inspection area, and the surface change dynamic information can be analyzed by time series analysis technology to identify the change trend.
[0060] Exemplarily, the high-definition image data of the casting surface includes high-definition image data of multiple casting inspection areas at different times, see Figure 4 S231, according to the multiple casting inspection area images, the surface change dynamic information of the casting inspection area corresponding to each casting inspection area image is analyzed, including:
[0061] S2311, aligning the high-definition image data of the multiple casting inspection areas at different times based on the multiple casting inspection area images, and extracting the surface features of the high-definition image data of each casting inspection area at different times.
[0062] It can be understood that the high-definition image data of the casting surface includes images obtained from different time points and different angles. The feature relationship between the images can reflect the dynamic changes of the surface of the casting at different time states. Image registration technology can be used to align the images and extract key surface features for subsequent dynamic analysis of changes. Feature extraction methods can use image processing technology, such as edge detection, texture analysis, morphological analysis, etc. Edge detection is the use of edge detection algorithms (such as Canny) to identify edge features in an image. Texture analysis is the use of texture analysis technology (such as GLCM or LBP) to extract texture features of an image. Morphological analysis is the use of morphological operations (such as dilation and erosion) to extract morphological features in an image.
[0063] S2312, identifying and determining the motion information of the surface features of each casting inspection area according to the surface features in the high-definition image data of each casting inspection area at different times.
[0064] It can be understood that according to the surface features of each casting inspection area in the high-definition image data at different times, the changes in the surface features can be calculated by comparing the images at different times, and the motion information of the surface features of each casting inspection area can be identified and determined. For example, differential analysis and optical flow methods (such as Farneback optical flow method and Lucas-Kanade method) can be used to calculate the difference of images at different times, identify the change area, estimate the movement of the surface features, and track the changes in the features of each casting inspection area, and record its dynamic information such as position, shape and size.
[0065] S2313, aggregate the motion information of the surface features of each casting inspection area to obtain dynamic information of surface changes.
[0066] It can be understood that the motion information of each casting inspection area at different times can be aggregated and analyzed to form a comprehensive motion information description, and the motion vectors of different inspection areas can be summarized to form overall motion dynamic data, thereby obtaining the surface change dynamic information of the casting inspection area corresponding to each casting inspection area image.
[0067] S232, obtaining a dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image according to the surface change dynamic information of the casting inspection area corresponding to each casting inspection area image.
[0068] It can be understood that the dynamic sensitivity coefficient corresponding to each casting inspection area image is obtained according to the surface change dynamic information corresponding to each casting inspection area image. This can be achieved through dynamic system modeling technology, using the surface change dynamic information parsed in the previous step to calculate the dynamic sensitivity coefficient. Apply time series analysis methods (such as ARIMA, state space model, etc.) to analyze the change trend and periodic pattern of surface features over time and understand the dynamic characteristics of the change. Based on the extracted features, select a suitable dynamic model (such as nonlinear dynamic model, Kalman filter model) to describe the process of surface change. The dynamic sensitivity coefficient can be defined as the proportion of the output (surface feature change) caused by a specific input change (such as temperature, pressure fluctuations or material property changes), reflecting the sensitivity of the area to changes in the environment or process parameters. Differentiation or gradient-based methods, such as finite difference methods or sensitivity equations derived directly from the dynamic model, are used to calculate the direct impact of small changes in each parameter on the change of surface features.
[0069] S240, obtaining an evaluation region image sequence according to the dynamic sensitivity coefficient of the casting inspection region corresponding to each casting inspection region image; wherein the evaluation region image sequence sequentially includes casting inspection region images corresponding to casting inspection regions with dynamic sensitivity coefficients from large to small.
[0070] It can be understood that according to the dynamic sensitivity coefficient corresponding to each casting inspection area image, all casting inspection area images can be sorted to obtain an evaluation area image sequence. Through a preset sorting algorithm, the dynamic sensitivity coefficients of the casting inspection areas are sorted from large to small to generate a sequence of casting inspection area images corresponding to all casting inspection areas, and those areas that are more sensitive to external conditions are evaluated first.
[0071] S300, identifying and extracting casting surface texture features from the evaluation area image sequence to obtain texture direction information; wherein the texture direction information is used to reflect the directional distribution of the casting surface structure.
[0072] It can be understood that the surface texture features of the casting can be identified and extracted from the evaluation area image sequence to obtain texture direction information. Through image analysis and pattern recognition techniques, including Fourier transform, gradient directional histogram (HOG) and texture analysis, etc. Through these techniques, texture features can be extracted from the evaluation area image sequence and texture direction information can be calculated.
[0073] S400, obtaining a plurality of preliminary evaluation data based on predefined evaluation rules according to texture direction information and the evaluation region image sequence.
[0074] It can be understood that, according to the texture direction information and the evaluation area image sequence, the casting area corresponding to each casting inspection area image is evaluated based on the predefined evaluation rules to obtain multiple preliminary evaluation data. According to the texture direction information and the evaluation area image sequence, the defect type and its actual frequency corresponding to each casting inspection area image can be determined, and the expected frequency threshold of the defect type in each area can be determined based on the predefined evaluation rules. Through difference analysis and scoring algorithm, the preliminary evaluation data of the casting inspection area corresponding to each casting inspection area image is determined according to the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold.
[0075] In one possible implementation, see Figure 5 , S400, based on the texture direction information and the evaluation area image sequence, a plurality of preliminary evaluation data are obtained based on predefined evaluation rules, including:
[0076] S410, based on the texture direction information and the evaluation area image sequence, determine the defect type and its actual frequency of the casting inspection area corresponding to each casting inspection area image in turn, and determine the estimated frequency threshold of the defect type of each casting inspection area based on predefined evaluation rules.
[0077] It can be understood that the defect type and its actual frequency corresponding to each casting inspection area image can be identified and determined through data matching and statistical analysis technology combined with predefined evaluation rules. The defect type and its actual frequency of the casting inspection area corresponding to each casting inspection area image can be realized through preset automated algorithms, including statistical analysis, machine learning, image processing, etc.
[0078] For example, image processing can identify defects on the surface of castings, such as cracks, pores, etc., by detecting edges in the image. Common edge detection algorithms include Canny, Sobel, etc. Using texture analysis techniques, such as gray-level co-occurrence matrix (GLCM) and local binary pattern (LBP), the location and type of defects can be determined based on the extracted surface texture features and texture direction information. Machine learning algorithms can train a classification model (such as support vector machine SVM, random forest RF, convolutional neural network CNN, etc.), the model input is texture direction information and image features, and the output is the defect type. Through training with a large amount of labeled data, the model can learn the characteristics of different defect types and use them to classify new images. Using unsupervised learning methods, such as K-means clustering or Gaussian mixture model (GMM), image features are clustered to identify possible defect areas, and the defect type is determined through subsequent analysis. Statistical methods can be implemented by counting the frequency of occurrence of each defect type in the image sequence of the evaluation area, scanning the image and recording the location and type of each defect. Automated processing is performed by writing scripts or using image analysis software. The statistical data are associated with data mining technology to analyze the association rules between texture direction information and defect types, determine which texture features correspond to which defect types, and accurately identify and classify defects.
[0079] Optionally, see Figure 6 S410, based on the texture direction information and the evaluation area image sequence, sequentially determine the defect type and actual frequency of the casting inspection area corresponding to each casting inspection area image, and determine the estimated frequency threshold of the defect type of each casting inspection area based on the predefined evaluation rules, including:
[0080] S411, according to the texture direction information and the evaluation area image sequence, based on the order of dynamic sensitivity coefficients from large to small, the defect type and actual frequency of the casting inspection area corresponding to each casting inspection area image are determined in sequence.
[0081] It can be understood that according to the texture direction information and the evaluation area image sequence, the defect type and its actual frequency corresponding to each casting inspection area image are determined in turn based on the order of dynamic sensitivity coefficient from large to small. This can be achieved through data matching and sorting algorithms, and the areas with higher dynamic sensitivity coefficients are analyzed first. The images of each casting inspection area are detected and analyzed in turn based on the order of dynamic sensitivity coefficient from large to small. A defect feature library can be established in advance to clarify different types of casting defects (such as pores, cracks, inclusions, cold shuts, etc.) and their typical characteristics, including texture, shape, size, etc. Analyze the association between various defects and the texture direction of the casting surface, and sort all inspection areas from high to low according to the dynamic sensitivity coefficient. The high sensitivity coefficient area means that it is more sensitive to changes in process parameters and is more likely to be a high-incidence area of defects. Match the features of each frame of the image with the defect feature library, and the images of the highly sensitive areas are processed first to quickly identify key defects. Combine the texture direction information, image sequence analysis results and dynamic sensitivity coefficient to determine the defect type of each area. If the image features of a certain area are highly matched with a certain type of defect in the feature library, it is determined to be a defect of that type. For each casting inspection area, the number of times a specific defect type appears in the image sequence is recorded to count the actual frequency. A threshold can be set, such as only counting defect recognition results that exceed a certain confidence level, to reduce false positives.
[0082] S412, based on a predefined evaluation rule, determining whether the casting inspection area image currently being inspected is the casting inspection area image with the largest dynamic sensitivity coefficient.
[0083] It can be understood that the dynamic sensitivity coefficients of each casting inspection area image are compared based on a predefined evaluation rule, such as a comparison algorithm, to determine whether the casting inspection area image currently being inspected is the casting inspection area image with the largest dynamic sensitivity coefficient. The predefined evaluation rule can be a maximum value comparison rule, which directly compares the dynamic sensitivity coefficients of all areas to find the global maximum value. For example, for casting A:
[0084] Casting A area 1: dynamic sensitivity coefficient 0.85
[0085] Casting A area 2: dynamic sensitivity coefficient 0.92
[0086] Casting A area 3: dynamic sensitivity coefficient 0.78
[0087] The dynamic sensitivity coefficients of the three regions are compared, and the maximum value is determined to be 0.92. During detection, the dynamic sensitivity coefficient of the detection region is directly compared with the maximum value 0.92.
[0088] S413: If the casting inspection area image currently being inspected is the casting inspection area image with the largest dynamic sensitivity coefficient, a preset frequency threshold of the defect type is obtained as the estimated frequency threshold.
[0089] It can be understood that if the currently detected casting inspection area image is the casting inspection area image with the largest dynamic sensitivity coefficient, the preset frequency threshold of the defect type is obtained as the estimated frequency threshold. This can be achieved by looking up the preset rules, using the preset frequency threshold as a reference, and the maximum frequency allowed by the casting or other defined numbers can be used as the pre-frequency threshold to achieve flexible changes in detection.
[0090] Optionally, S410, based on the texture direction information and the evaluation area image sequence, sequentially determining the defect type and actual frequency of the casting inspection area corresponding to each casting inspection area image, and determining the estimated frequency threshold of the defect type of each casting inspection area based on a predefined evaluation rule, further comprising:
[0091] S414, if the casting inspection area image currently being inspected is not the casting inspection area image with the largest dynamic sensitivity coefficient, the absolute value of the difference between the expected frequency threshold value and the actual frequency of the defect type of the previous casting inspection area image is used as the expected frequency threshold value of the defect type of the casting inspection area currently being inspected.
[0092] It can be understood that when it is identified that the casting inspection area image currently being inspected is not the casting inspection area image with the largest dynamic sensitivity coefficient, the absolute value of the difference between the expected frequency threshold of the defect type of the previous casting inspection area image and the actual frequency is used as the expected frequency threshold of the defect type of the casting inspection area currently being inspected, which can be achieved through a preset calculation and comparison algorithm.
[0093] S420, determining preliminary evaluation data of each casting inspection area in turn according to the actual frequency and the estimated frequency threshold of the defect type of the casting inspection area corresponding to each casting inspection area image, to obtain a plurality of preliminary evaluation data.
[0094] It can be understood that according to the actual frequency and expected frequency threshold of the defect type in the casting inspection area corresponding to each casting inspection area image, a quantitative value of the casting inspection area corresponding to each casting inspection area image can be defined to reflect the inspection data of the casting inspection area, and the preliminary evaluation data of each casting inspection area can be determined in turn.
[0095] Optionally, see Figure 7 S420, according to the actual frequency and the estimated frequency threshold of the defect type of the casting inspection area corresponding to each casting inspection area image, determine the preliminary evaluation data of each casting inspection area in turn, and obtain multiple preliminary evaluation data, including:
[0096] S421, determining the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold according to the actual frequency of the defect type in the casting inspection area corresponding to each casting inspection area image and the expected frequency threshold; wherein the difference is used to reflect the numerical ratio of the difference between the actual frequency and the expected frequency threshold.
[0097] It can be understood that the difference between the total actual frequency and the total expected frequency threshold can be calculated based on the actual frequency and the expected frequency threshold of the defect type in the casting inspection area corresponding to each casting inspection area image, and the difference is divided by the threshold to obtain a proportional coefficient with a positive and negative relationship, and also obtain the difference between the actual frequency and the expected frequency threshold of the defect type in each area. The difference reflects the proportional relationship between the difference values of the actual frequency and the expected frequency threshold. For example, for a casting inspection area, the defect types and defect frequencies are K1 times for type A defects, K2 times for type B defects, and K3 times for type C defects. The thresholds for type A defects are Y1, Y2, and Y3 for type B defects. The difference of type A defects is X1=(K1-Y1) / Y1, the difference of type B defects is X2=(K2-Y2) / Y2, and the difference of type C defects is X3=(K3-Y3) / Y3. Since the size relationship between K and Y is random, the difference value of each type of defect may be positive or negative, and its theoretical value range is [-1, ∞). The larger the difference, the more serious the defect, and the smaller the difference, the smaller the defect.
[0098] S422, determining preliminary evaluation data of the casting inspection area corresponding to each casting inspection area image according to the difference between the actual frequency of the defect type of each casting inspection area and the expected frequency threshold, and obtaining a plurality of preliminary evaluation data.
[0099] It can be understood that, based on the positive or negative value of the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold, a quality score can be assigned to each casting inspection area to obtain the quality score of each casting inspection area and use it as preliminary evaluation data for each area.
[0100] Exemplarily, S422, based on the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold, determine the preliminary evaluation data of the casting inspection area corresponding to each casting inspection area image, and obtain multiple preliminary evaluation data, including:
[0101] S4221, assign quality points to each casting inspection area based on the positive or negative value of the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold, and obtain the quality score of each casting inspection area, and use the quality score of each casting inspection area as the preliminary evaluation data of each casting inspection area.
[0102] It can be understood that the points are assigned based on the cumulative positive and negative values of the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold. For example, for a casting inspection area, the difference of type A defects is X1=(K1-Y1) / Y1, the difference of type B defects is X2=(K2-Y2) / Y2, and the difference of type C defects is X3=(K3-Y3) / Y3. Since the difference value of each type of defect may be positive or negative, its theoretical value range is [-1, ∞). The larger the difference, the more serious the defect, and the smaller the difference, the more serious the defect. The smaller it is, the negative sign can be added in the scoring calculation, so that the larger the quality score, the smaller the degree of defect and the higher the quality; the smaller the quality score, the higher the degree of defect and the lower the quality. The score of type A is T1=-100*X1=-100(K1-Y1) / Y1, the score of type B is T2=-100*X2=-100(K2-Y2) / Y2, and the score of type C is T3=-100*X3=100(K3-Y3) / Y3. At this time, the scoring range of each defect type is (-∞, 100). If the quality score is accumulated, the quality score of this area is T=T 1+ T 2+ T3=(-100*X1)+(-100*X2)+(+100*X3)=(-100(K1-Y1) / Y1)+(-100(K2-Y2) / Y2)+(-100(K3-Y3) / Y3), thus each area is calculated and the quality score of each casting inspection area can be obtained in the end, and the quality score of each casting inspection area is used as the preliminary evaluation data of each casting inspection area.
[0103] S500, performing data evaluation based on a plurality of preliminary evaluation data to obtain final evaluation data; wherein the final evaluation data is used to reflect the detection result of the casting quality.
[0104] It can be understood that data evaluation can be performed based on multiple preliminary evaluation data, and the mathematical expectation value of all preliminary evaluation data can be calculated through comprehensive analysis using statistical analysis and mathematical modeling techniques. Then, based on the mathematical expectation value and the preset quality mapping relationship, the final evaluation data is obtained through the decision algorithm, thereby reflecting the detection results of the casting quality.
[0105] In one possible implementation, see Figure 8 , S500, performing data evaluation based on multiple preliminary evaluation data to obtain final evaluation data, including:
[0106] S510, determining a mathematical expectation value of all preliminary evaluation data based on a plurality of preliminary evaluation data.
[0107] It can be understood that the mathematical expectation of all preliminary evaluation data can be calculated through statistical analysis methods to provide a statistical basis for the final casting quality evaluation. The mathematical expectation refers to the weighted average of random variables, and the weight is the corresponding probability. For discrete random variables, it is the probability weighted average of all possible values; for continuous random variables, it is the integral of its probability density function. Since the preliminary evaluation data is discrete, the mathematical expectation calculation formula can be simplified to , X i is the quality score of the ith inspection area, and N is the total number of inspection areas. By calculating the mathematical expectation of all preliminary evaluation data, an average index of the overall quality of a casting can be obtained. The mathematical expectation reflects the average quality level of the casting under the existing conditions. The larger the mathematical expectation, the better the casting quality, and the smaller the mathematical expectation, the worse the casting quality.
[0108] S520, obtaining final evaluation data according to a mapping relationship between a mathematical expectation value and a preset quality.
[0109] It can be understood that according to the mathematical expectation value, different quality levels can be corresponded in advance and the mapping relationship can be set. Through the decision algorithm, the final evaluation data can be obtained to reflect the detection results of the casting quality. Through the implementation of the above detailed steps and sub-steps, the production process data, environmental parameter data and high-definition image data of the casting can be systematically obtained and analyzed, so as to accurately evaluate the quality of the casting, ensure the effective monitoring and optimization of the production process, improve the detection efficiency, and meet the detection needs of modern large-scale production.
[0110] Optionally, see Fig. 9 , the casting quality inspection method based on machine vision also includes:
[0111] S600, counting all defect types and total frequencies identified during the inspection cycle of each casting to determine defect distribution information;
[0112] It can be understood that after the inspection is completed, the data can be classified according to the defect type, and the total frequency of each defect can be counted. The defect data can be classified using predefined defect types (such as cracks, pores, shrinkage holes, etc.). The total number of occurrences of each defect type in the inspection cycle is counted. The distribution of each defect type in different locations and different time periods is counted to form defect distribution information. For example, the distribution of defects in different areas of the casting is counted, and the distribution of defects at different time points in the inspection cycle is counted.
[0113] S700, summarizes the final evaluation data and defect distribution information of each casting to form a detailed casting quality inspection summary report.
[0114] It can be understood that the defect distribution information of each casting is summarized with the final evaluation data to form a comprehensive quality inspection data set. The defect frequency statistics are integrated with the final evaluation data of the casting. Based on the summarized data, a detailed casting quality inspection summary report is generated. The report should contain the quality evaluation results, defect distribution information, statistical analysis, etc. of each casting. Including evaluation data statistics, defect distribution charts, quality analysis conclusions, etc. It can be generated in PDF, Excel or other suitable formats for sharing and archiving.
[0115] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0116] Corresponding to the casting quality inspection method based on machine vision described in the above embodiment, the embodiment of the present application also provides a casting quality inspection system based on machine vision, and each unit of the system can implement each step of the casting quality inspection method based on machine vision. Fig.10 A structural block diagram of a casting quality inspection system based on machine vision 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.
[0117] Reference Fig.10 , the casting quality inspection system based on machine vision includes:
[0118] An acquisition unit, used to acquire production process data of the casting, high-definition image data of the casting surface, and environmental parameter data; wherein the production process data is used to reflect the process conditions of the casting, and the environmental parameter data is used to reflect the casting environment of the casting;
[0119] A sequence unit, used to obtain an evaluation area image sequence based on the production process data, the environmental parameter data and the high-definition image data; the evaluation area image sequence is used to reflect the impact of external conditions on different areas of the casting;
[0120] A texture unit, used to identify and extract casting surface texture features from the evaluation area image sequence to obtain texture direction information; the texture direction information is used to reflect the directional distribution of the casting surface structure;
[0121] A preliminary evaluation unit, configured to obtain a plurality of preliminary evaluation data based on the texture direction information and the evaluation area image sequence and based on predefined evaluation rules;
[0122] The final evaluation unit is used to perform data evaluation based on the multiple preliminary evaluation data to obtain final evaluation data; wherein the final evaluation data is used to reflect the detection result of the casting quality.
[0123] It should be noted that the information interaction, execution process, etc. between the above-mentioned systems / 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.
[0124] 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 system 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 system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0125] The present application also provides a casting quality inspection device based on machine vision. Fig.11 This is a schematic diagram of the structure of a casting quality inspection device based on machine vision provided in one embodiment of the present application. Fig.11 As shown, the casting quality inspection device 6 based on machine vision in 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 casting quality inspection device 6 based on machine vision implements the steps in any of the above-mentioned casting quality inspection method embodiments based on machine vision, or implements the functions of each unit in the above-mentioned system embodiments.
[0126] 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 casting quality inspection device 6 based on machine vision.
[0127] The casting quality inspection equipment based on machine vision can be a variety of intelligent inspection equipment. The casting quality inspection equipment based on machine vision can include image acquisition equipment (camera or other imaging equipment), input and output equipment, communication equipment, computing equipment, and display equipment. The computing equipment can be a computer, notebook, PDA, cloud server and other computing equipment. The computing equipment of the casting quality inspection equipment based on machine vision may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art can understand that Fig.11 It is only an example of the casting quality inspection device 6 based on machine vision and does not constitute a limitation of the casting quality inspection device 6 based on machine vision. 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.
[0128] 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.
[0129] In some embodiments, the memory 61 may be an internal storage unit of the casting quality inspection device 6 based on machine vision, such as a hard disk or memory of the casting quality inspection device 6 based on machine vision. In other embodiments, the memory 61 may also be an external storage device of the casting quality inspection device 6 based on machine vision, 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 (Flash Card), etc. equipped on the casting quality inspection device 6 based on machine vision. Further, the memory 61 may also include both the internal storage unit of the casting quality inspection device 6 based on machine vision 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.
[0130] 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.
[0131] An embodiment of the present application provides a computer program product. When the computer program product runs on a casting quality inspection device based on machine vision, the casting quality inspection device based on machine vision implements the steps in any of the above method embodiments.
[0132] 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, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. 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 casting quality inspection equipment based on machine vision, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0133] 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.
[0134] 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.
[0135] In the embodiments provided in the present application, it should be understood that the disclosed casting quality inspection system based on machine vision / casting quality inspection equipment and method based on machine vision can be implemented in other ways. For example, the above-described casting quality inspection system based on machine vision / casting quality inspection equipment based on machine vision is merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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.
[0136] 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.
[0137] 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 casting quality inspection method based on machine vision, It is characterized in that include: Acquire production process data of castings, high-definition image data of the casting surface, and environmental parameter data; wherein the production process data is used to reflect the process conditions of the castings, and the environmental parameter data is used to reflect the casting environment of the castings; According to the production process data, the environmental parameter data and the high-definition image data, an evaluation area image sequence is obtained; the evaluation area image sequence is used to reflect the influence of external conditions on different areas of the casting; Identifying and extracting casting surface texture features from the evaluation area image sequence to obtain texture direction information; the texture direction information is used to reflect the directional distribution of the casting surface structure; According to the texture direction information and the evaluation area image sequence, a plurality of preliminary evaluation data are obtained based on predefined evaluation rules; Performing data evaluation based on the plurality of preliminary evaluation data to obtain final evaluation data; wherein the final evaluation data is used to reflect the detection result of the casting quality; Wherein, obtaining the evaluation area image sequence based on the production process data, the environmental parameter data and the high-definition image data includes: Divide the high-definition image data into regions according to the production process data and the environmental parameter data to obtain partition feature data; wherein the partition feature data is used to reflect the defect-prone areas on the casting surface; Based on the partition feature data, the high-definition image data is regionally positioned to obtain a plurality of casting inspection area images; wherein the casting inspection area images are used to reflect the defect characteristics of the corresponding casting inspection area; Determine the dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image according to the plurality of casting inspection area images; the dynamic sensitivity coefficient is used to reflect the reaction of the casting inspection area to the change of external conditions; According to the dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image, an evaluation area image sequence is obtained; wherein the evaluation area image sequence sequentially includes the casting inspection area images corresponding to the casting inspection areas with the dynamic sensitivity coefficients from large to small.
2. The casting quality detection method based on machine vision as claimed in claim 1, It is characterized in that The step of determining the dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image based on the plurality of casting inspection area images comprises: Analyze the surface change dynamic information of the casting inspection area corresponding to each casting inspection area image according to the plurality of casting inspection area images; wherein the surface change dynamic information is used to reflect the evolution trend of the casting inspection area; According to the surface change dynamic information of the casting inspection area corresponding to each of the casting inspection area images, the dynamic sensitivity coefficient of the casting inspection area corresponding to each of the casting inspection area images is obtained.
3. The casting quality detection method based on machine vision as claimed in claim 1, It is characterized in that The step of obtaining a plurality of preliminary evaluation data based on the texture direction information and the evaluation area image sequence and based on predefined evaluation rules includes: Determine the defect type and actual frequency of each casting inspection area image corresponding to each casting inspection area image in turn according to the texture direction information and the evaluation area image sequence, and determine the estimated frequency threshold of the defect type of each casting inspection area based on the predefined evaluation rule; According to the actual frequency and the expected frequency threshold of the defect type in the casting inspection area corresponding to each casting inspection area image, preliminary evaluation data of each casting inspection area is determined in turn to obtain a plurality of preliminary evaluation data.
4. The casting quality detection method based on machine vision as claimed in claim 3, It is characterized in that The method of determining the defect type and actual frequency of the casting inspection area corresponding to each casting inspection area image in sequence according to the texture direction information and the evaluation area image sequence, and determining the estimated frequency threshold of the defect type of each casting inspection area based on the predefined evaluation rule, comprises: According to the texture direction information and the evaluation area image sequence, the defect type and actual frequency of the casting inspection area corresponding to each casting inspection area image are determined in descending order based on the dynamic sensitivity coefficient; Based on the predefined evaluation rule, determining whether the casting inspection area image currently being inspected is the casting inspection area image with the largest dynamic sensitivity coefficient; If the casting inspection area image currently being inspected is the casting inspection area image with the largest dynamic sensitivity coefficient, a preset frequency threshold of the defect type is obtained as the estimated frequency threshold.
5. The casting quality detection method based on machine vision as claimed in claim 4, It is characterized in that The method further comprises: determining the defect type and actual frequency of each casting inspection area image corresponding to each casting inspection area image in turn according to the texture direction information and the evaluation area image sequence, and determining the estimated frequency threshold of the defect type of each casting inspection area based on the predefined evaluation rule. If the casting inspection area image currently being detected is not the casting inspection area image with the largest dynamic sensitivity coefficient, the absolute value of the difference between the expected frequency threshold value and the actual frequency of the defect type in the previous casting inspection area image is used as the expected frequency threshold value of the defect type in the casting inspection area currently being detected.
6. The casting quality detection method based on machine vision as claimed in claim 3, It is characterized in that According to the actual frequency and the expected frequency threshold of the defect type in the casting inspection area corresponding to each casting inspection area image, preliminary evaluation data of each casting inspection area is determined in sequence to obtain a plurality of preliminary evaluation data, including: Determine the difference between the actual frequency and the expected frequency threshold of the defect type in each casting inspection area according to the actual frequency and the expected frequency threshold of the defect type in each casting inspection area corresponding to each casting inspection area image; wherein the difference is used to reflect the difference numerical ratio between the actual frequency and the expected frequency threshold; According to the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold, the preliminary evaluation data of the casting inspection area corresponding to each casting inspection area image is determined to obtain a plurality of preliminary evaluation data.
7. The casting quality detection method based on machine vision as claimed in claim 6, It is characterized in that According to the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold, the preliminary evaluation data of the casting inspection area corresponding to each casting inspection area image is determined to obtain a plurality of preliminary evaluation data, including: A quality score is assigned to each casting inspection area based on the positive or negative value of the difference between the actual frequency of the defect type in each casting inspection area and the expected frequency threshold, to obtain the quality score of each casting inspection area, and the quality score of each casting inspection area is used as preliminary evaluation data for each casting inspection area.
8. The casting quality detection method based on machine vision as claimed in claim 6, It is characterized in that The data evaluation is performed based on the plurality of preliminary evaluation data to obtain final evaluation data, including: Determine the mathematical expectation value of all the preliminary evaluation data based on the plurality of preliminary evaluation data; According to the mathematical expectation value and the preset quality mapping relationship, the final evaluation data is obtained; And / or, the method further comprises: Collect statistics on all defect types and total frequencies identified during the inspection cycle of each casting to determine defect distribution information; The final evaluation data of each casting and the defect distribution information are summarized to form a detailed casting quality inspection summary report.
9. A casting quality inspection system based on machine vision, It is characterized in that include: An acquisition unit, used to acquire production process data of the casting, high-definition image data of the casting surface, and environmental parameter data; wherein the production process data is used to reflect the process conditions of the casting, and the environmental parameter data is used to reflect the casting environment of the casting; A sequence unit, used to obtain an evaluation area image sequence based on the production process data, the environmental parameter data and the high-definition image data; the evaluation area image sequence is used to reflect the impact of external conditions on different areas of the casting; A texture unit, used to identify and extract casting surface texture features from the evaluation area image sequence to obtain texture direction information; the texture direction information is used to reflect the directional distribution of the casting surface structure; A preliminary evaluation unit, configured to obtain a plurality of preliminary evaluation data based on the texture direction information and the evaluation area image sequence and based on predefined evaluation rules; A final evaluation unit, used to perform data evaluation based on the plurality of preliminary evaluation data to obtain final evaluation data; wherein the final evaluation data is used to reflect the detection result of the casting quality; Wherein, the sequence unit is also used for: Divide the high-definition image data into regions according to the production process data and the environmental parameter data to obtain partition feature data; wherein the partition feature data is used to reflect the defect-prone areas on the casting surface; Based on the partition feature data, the high-definition image data is regionally positioned to obtain a plurality of casting inspection area images; wherein the casting inspection area images are used to reflect the defect characteristics of the corresponding casting inspection area; Determine the dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image according to the plurality of casting inspection area images; the dynamic sensitivity coefficient is used to reflect the reaction of the casting inspection area to the change of external conditions; According to the dynamic sensitivity coefficient of the casting inspection area corresponding to each casting inspection area image, an evaluation area image sequence is obtained; wherein the evaluation area image sequence sequentially includes the casting inspection area images corresponding to the casting inspection areas with the dynamic sensitivity coefficients from large to small.
10. A casting quality inspection device based on machine vision, 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 processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Die casting surface defect detection method and system based on machine vision
CN110006907A
Intelligent visual evaluation and calibration method for to-be-polished area of casting
CN115661076A
Casting surface defect detection method based on computer vision
CN116758061A
Surface image recognition method and system for aluminum alloy casting
CN117372410A
Die-casting alloy workpiece defect detection method and system based on visual identification
CN118130477A
Cited By
Continuous casting diagnostic system
WO2026229716A1
