Cake mold production defect identification method and system based on machine vision

By extracting and splicing repeated area images of cake molds and calculating the mean entropy value of the grayscale run matrix using a method based on machine vision, the problem of the complicated three-dimensional mold defect detection process in the existing technology is solved, and the accuracy and accuracy of detection are improved. efficiency.

CN119359667AInactive Publication Date: 2025-01-24YANGJIANG HUAQIANG IND CO LTD

Patent Information

Application Number
CN202411424684.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, defect detection of three-dimensional stereo molds requires analysis of multi-angle images, resulting in complex calculation and processing processes, large data volume and low efficiency.

Method used

Using a machine -based method, by obtaining the view of the cake mold, the duplicate area of ​​the view of the adjacent frame is extracted, the image stitching is performed, and the average value of the entropy value of the gray -range matrix in the optimal image is calculated to determine the defect recognition results.

Benefits of technology

It reduces the number of repeated calculations, streamlines the calculation process, reduces the amount of calculation, and improves the accuracy and efficiency of defect identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359667A_ABST
    Figure CN119359667A_ABST
Patent Text Reader

Abstract

The invention relates to the field of mold defect recognition, in particular to a cake mold production defect recognition method and system based on machine vision, and the method comprises the steps: obtaining a view of a cake mold, and extracting a repeated region of views of adjacent frames; after repeated areas are screened, image splicing is carried out to obtain an optimal image; wherein each view corresponds to one brightness image, brightness values of the brightness images are clustered to obtain a brightness value clustering cluster, pixel point clustering clusters of the corresponding views are found according to the brightness value clustering cluster, edge detection is performed on the views to obtain the edge of the image formed by pixel points in the same pixel point clustering cluster, and the edge of the image formed by the pixel points in the same pixel point clustering cluster is obtained. Repeated areas corresponding to the maximum edge number are screened out to be spliced; and calculating an entropy mean value of the gray scale run length matrix in the optimal image, and determining a defect identification result according to the entropy mean value. The cake mold defect detection device has the effect of simplifying the cake mold defect detection treatment process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of mold defect recognition, and in particular to a method and system for identifying cake mold production defects based on machine vision. Background Art

[0002] Cake molds are usually made of metal, such as aluminum alloy, carbon steel or stainless steel, because metal has good thermal conductivity, which helps to evenly heat the cake during baking. Cake molds may have cracks due to welding defects or coating defects during the production process, which will affect the subsequent use and sale of the molds, so it is necessary to conduct defect detection on the finished products during the production process.

[0003] In the prior art, a Chinese patent with patent publication number CN110335274A discloses a three-dimensional mold defect detection method and device, including obtaining multiple photographs corresponding to the three-dimensional mold, the photographs including the image of the three-dimensional mold or the image of the product component obtained using the three-dimensional mold, and the shooting angle of each of the photographs is different; extracting a target image from the multiple photographs, the target image being the image of the three-dimensional mold or the image of the product component obtained using the three-dimensional mold; using the target image as the input of a defect detection model, and using the defect detection model to determine the defect information of the three-dimensional mold; and outputting the defect information of the three-dimensional mold.

[0004] In the prior art, for three-dimensional molds, it is necessary to analyze images from multiple angles separately. For example, it is necessary to take multiple photos to completely obtain the side image of the mold, and then analyze the defect characteristics of each photo one by one. In this process, it may be necessary to repeat the same processing steps for each image, and the same algorithm needs to be run multiple times. The calculation and processing process is complicated, and the amount of data processed is large. Summary of the invention

[0005] In order to reduce the problem of complicated processing in defect detection caused by repeated processing, the present application provides a method and system for identifying cake mold production defects based on machine vision.

[0006] In the first aspect, the present application provides a method for identifying defects in cake mold production based on machine vision, which adopts the following technical solutions: A method for identifying defects in cake mold production based on machine vision comprises the following steps: obtaining a view of a cake mold, extracting repeated areas of views of adjacent frames; performing image stitching after screening repeated areas to obtain an optimal image; wherein each view corresponds to a brightness image, clustering the brightness values ​​of the brightness image to obtain brightness value clustering clusters, finding pixel point clustering clusters of the corresponding view according to the brightness value clustering clusters, performing edge detection on the view to obtain the edges of an image composed of pixels in the same pixel point clustering cluster, screening repeated areas corresponding to the maximum number of edges for stitching; calculating the entropy value mean of the grayscale run matrix in the optimal image, and determining a defect identification result according to the entropy value mean.

[0007] The beneficial effect is: mapping the brightness value clusters formed by pixels with similar brightness values ​​in the brightness map to the pixels of the view, and then performing edge detection and other processing and analysis can reduce the reflection effect caused by position changes on defect recognition and improve the accuracy of defect recognition. The repeated area is the image area that can show the clearest texture. Extracting and screening the repeated area can facilitate subsequent image stitching calculations, reduce overly complex repetitions, and reduce the amount of calculation. Stitching analysis of images can optimize and streamline processing steps and reduce the complexity of the calculation process caused by too many images.

[0008] Optionally, in obtaining a view of the cake mold, the cake mold is rotated around its own axis, and a preset image acquisition device is fixedly set to acquire the view.

[0009] The beneficial effects are: providing a method for obtaining a view of the cake mold, making the rotation of the cake mold more convenient, simplifying the operation process, and only requiring controlling the placement of the mold and starting the rotation, thereby reducing the technical requirements for the operation.

[0010] Optionally, in acquiring the view of the cake mold, the cake mold is fixed, and a preset image acquisition device is rotated around the axis of the cake model to acquire the view.

[0011] The beneficial effects are: providing another way to obtain a view of a cake mold, providing greater flexibility for the movement of the acquisition device, and adjusting the shooting distance and angle as needed to better capture the details of the mold.

[0012] Optionally, the brightness values ​​of the brightness map are clustered to obtain brightness value clusters, and the clustering algorithm is a K-means clustering algorithm or a DBSCAN clustering algorithm.

[0013] Optionally, the entropy value of the grayscale run matrix in the optimal image is calculated, and the defect identification result is determined according to the entropy value, including the steps of: extracting the angle between the extension direction of each edge in the optimal image and the horizontal direction, sorting the angles from large to small according to the number of edges included, and obtaining an angle set; taking a preset number of angles in the sorted angle set as the statistical angles of the grayscale run matrix, and constructing the grayscale run matrix; calculating the mean entropy value of each grayscale run matrix, and in response to the mean entropy value being less than a preset coefficient threshold, the quality of the cake mold is unqualified.

[0014] The beneficial effects are: by calculating the mean entropy value of the grayscale run matrix, quantifying the texture complexity and information uncertainty of the image, the distribution and degree of defects in the image can be evaluated. The angle between the extension direction of each edge in the optimal image and the horizontal direction is extracted, and the angles are sorted from large to small according to the number of edges included to obtain an angle set. The purpose is to accurately extract the texture features of the corresponding angles on the cake mold, which is more in line with the actual cake mold and makes the recognition result more accurate.

[0015] Optionally, the view of the cake mold is a front view, a side view, a top view or a bottom view.

[0016] The beneficial effect is that the cake mold can be analyzed from multiple perspectives to identify whether there are defects in the side wall, bottom surface and interior of the guarantee mold.

[0017] In the second aspect, the present application provides a cake mold production defect recognition system based on machine vision, which adopts the following technical solutions: A machine vision-based cake mold production defect recognition system includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the machine vision-based cake mold production defect recognition method is implemented.

[0018] The beneficial effect is: the above-mentioned machine vision-based cake mold production defect identification method is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.

[0019] This application has the following technical effects: 1. Select the repeated area of ​​the image for image stitching. The repeated area is the image area that can show the clearest texture. Defect recognition is performed on the stitched image to reduce the number of repeated calculations, streamline the calculation process, and reduce the amount of calculation.

[0020] 2. Map the brightness value clusters formed by pixels with similar brightness values ​​in the brightness map to the pixels of the view, and then perform edge detection and other processing and analysis to reduce the reflection effect caused by position changes on defect recognition and improve the accuracy of defect recognition. The repeated area is the image area that can show the clearest texture. Extracting and screening the repeated area can facilitate subsequent image stitching calculations, reduce the occurrence of complex repetitions, and reduce the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-restrictive manner, and the same or corresponding numbers represent the same or corresponding parts.

[0022] Figure 1 This is a method flow chart of the method for identifying cake mold production defects based on machine vision in an embodiment of the present application.

[0023] Figure 2 This is an example diagram showing repeated areas in the method for identifying defects in cake mold production based on machine vision in an embodiment of the present application.

[0024] Figure 3 This is a method flow chart of step S3 in the method for identifying cake mold production defects based on machine vision in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0026] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0027] The present application embodiment discloses a method for identifying cake mold production defects based on machine vision, referring to Figure 1 , comprising steps S1 to S3: S1: Get the view of the cake mold and extract the repeated areas of the views of adjacent frames.

[0028] The view and brightness map of the cake mold are collected by setting an image acquisition device, and the view is an RGB (Red Green Blue) image. The view of the cake mold is a front view, a side view, a top view or a bottom view. The cake mold of this application is set to a round or square chiffon cake mold. Taking a round chiffon cake mold as an example, the front view and side view are rectangular images, and the top view and bottom view are circular images.

[0029] In one embodiment, the cake mold is rotated around its own axis, and the image acquisition device is fixedly arranged to acquire the view.

[0030] Specifically, a rotating disk is provided on the belt conveyor, and a tray that can rotate around its own axis is provided on the rotating disk. The cake mold to be inspected is placed on the tray. When the belt conveyor sends the rotating disk to the acquisition area of ​​the image acquisition device, the image acquisition device is set on the side or top of the mold, the belt conveyor pauses the transmission, the tray rotates, and the image acquisition device performs video acquisition of the cake mold, and then the belt conveyor transmits again. This embodiment can capture the front view, side view and top view.

[0031] One or more image acquisition devices can be set, and multiple image acquisition devices are arranged in sequence along the transmission direction of the belt conveyor, so that views of the same cake mold under different light angles can be obtained.

[0032] When the image acquisition device is placed on the top of the rotating disk, the cake mold is placed on the rotating disk with the bottom facing up or the top facing up, and the top image and the bottom image of the cake mold can be respectively acquired.

[0033] In one embodiment, the cake mold may be fixed and the image acquisition device may be rotated around the axis of the cake model to acquire the view.

[0034] Specifically, a hanging conveyor is provided, and an inner hanging clamp is provided on the conveying chain of the hanging conveyor. At least two clamping claws of the inner hanging clamp abut against the inner wall of the cake mold to fix the cake mold on the clamping claws. The cake mold is moved by the hanging conveyor, and the image acquisition device is provided around the cake mold or directly below the cake mold.

[0035] The image acquisition device can be rotated around the mold or rotated by itself directly below the cake mold to capture the side wall image and bottom image of the cake mold. This embodiment can capture the front view, side view and bottom view.

[0036] This application takes the side view or front view of the mold side as an example, and other views are not repeated.

[0037] In one embodiment, a video image is first captured, and then frame extraction is performed to obtain a view and a bright image of each frame.

[0038] Calculate the ratio of repeated areas of adjacent image frames using the following formula: ,in is the ratio of repeated areas in adjacent image frames, is the time difference between adjacent frames, i.e. the frequency of frame extraction. is the angular velocity of the rotating base. The settings are consistent with Required to be a positive integer.

[0039] The side unfolded view of the mold is a rectangle, and the front view or side view is a rectangle. The horizontal proportion of the image in the direction opposite to the rotation direction of the cake mold is The region is a repeating region, for example, Figure 2 , if the cake mold rotates counterclockwise, the horizontal proportion of the mold image in the clockwise direction is The part is the repeated region. is a non-repeating area on the image.

[0040] S2: After screening the repeated areas, image stitching is performed to obtain the optimal image.

[0041] The screening method is as follows: obtain the brightness map corresponding to the view, one brightness map for each view, cluster the brightness values ​​of the brightness map to obtain brightness value clusters, find the corresponding pixel clusters of the view based on the brightness value clusters, perform edge detection on the view to obtain the edge of the image composed of pixels in the same pixel cluster. Mapping the brightness value clusters formed by pixels with similar brightness values ​​in the brightness map to the pixels of the view can reduce the reflection effect caused by position changes.

[0042] The brightness values ​​of the brightness image are clustered to obtain brightness value clusters. The clustering algorithm is a K-means clustering algorithm or a DBSCAN clustering algorithm. Both the K-means clustering algorithm and the DBSCAN clustering algorithm are prior arts and will not be described in detail here.

[0043] The edge detection algorithm is a canny edge algorithm, or may be other edge detection algorithms applicable to the present application. The canny edge algorithm is a prior art and will not be described in detail here.

[0044] The repeated areas corresponding to the maximum number of edges screened out are stitched. The repeated areas corresponding to the maximum number of edges represent the image with the clearest texture. Specifically, when the mold rotates, there are repeated areas and non-repeated areas in both the previous frame view and the next frame view. Compared with the two frames of images, the non-repeated area in the previous frame view is at one end of the view, and the non-repeated area in the next frame view is at the other end of the view. After the mold rotates one circle, the repeated areas corresponding to the maximum number of edges screened out are stitched, that is, each clearest repeated image is found and stitched in the order of the mold side unfolded view.

[0045] Similarly, for circular areas such as the bottom of a cake mold, the repeating area is fan-shaped, and multiple repeating areas can be spliced ​​into a circle.

[0046] The stitched image provides a complete and coherent image for defect identification, reducing the complexity of the steps in image processing. Only one identification process is required for the stitched image.

[0047] S3: Calculate the mean entropy value of the grayscale run matrix in the optimal image, and determine the defect recognition result according to the mean entropy value.

[0048] The grayscale run-length matrix is ​​a tool used in texture analysis to describe the distribution characteristics of grayscale patterns in an image. By calculating the mean entropy value of the grayscale run-length matrix and quantifying the texture complexity and information uncertainty of the image, the distribution and degree of defects in the image can be evaluated.

[0049] Reference Figure 3 , step S3 includes steps S30 to S32, which are specifically as follows: S30: extracting the angles between the extending directions of each edge in the optimal image and the horizontal direction, and sorting the angles from large to small according to the number of edges included, to obtain an angle set.

[0050] S31: Taking a preset number of angles in the sorting of the angle set as statistical angles of the grayscale run-length matrix to construct the grayscale run-length matrix.

[0051] For example, the preset number of angles may be the first The number of preset angles can be adjusted according to the actual application scenario, which will not be described in detail here. These angles represent the directions in which the edges in the image are most densely distributed. The method for constructing a grayscale run matrix is ​​a prior art and will not be described in detail here. For example, a grayscale run matrix corresponding to an angle of 0°, a grayscale run matrix corresponding to an angle of 45°, etc. are obtained.

[0052] S32: Calculate the mean entropy value of each grayscale run matrix, and in response to the mean entropy value being less than a preset coefficient threshold, the quality of the cake mold is unqualified.

[0053] First, the entropy value of the grayscale run matrix is ​​calculated, and then the mean of the entropy value is calculated. The calculation method of the entropy value of the grayscale run matrix is ​​the existing technology and will not be described here.

[0054] When the mean entropy value is less than the preset coefficient threshold, the quality of the cake mold is unqualified.

[0055] When the mean entropy value is greater than or equal to the preset coefficient threshold, the quality of the mold is qualified.

[0056] An embodiment of the present application also discloses a machine vision-based cake mold production defect identification system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a machine vision-based cake mold production defect identification method according to the present application is implemented.

[0057] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0058] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0059] Although this specification has shown and described a plurality of embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein may be adopted.

[0060] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for identifying defects in cake mold production based on machine vision, characterized in that: Includes steps: Get the view of the cake mold and extract the repeated area of ​​the views of adjacent frames; After screening the repeated areas, image stitching is performed to obtain the optimal image; Each view corresponds to a brightness map. The brightness values ​​of the brightness map are clustered to obtain brightness value clusters. The corresponding pixel clusters of the view are found based on the brightness value clusters. The view is edge detected to obtain the edges of the image composed of pixels in the same pixel cluster. The repeated areas corresponding to the maximum number of edges are selected for splicing. The entropy mean of the grayscale run matrix in the optimal image is calculated, and the defect recognition result is determined according to the entropy mean.

2. The method for identifying cake mold production defects based on machine vision according to claim 1, characterized in that: In acquiring the view of the cake mold, the cake mold is rotated around its own axis, and a preset image acquisition device is fixedly set to acquire the view.

3. The method for identifying cake mold production defects based on machine vision according to claim 1, characterized in that: In acquiring the view of the cake mold, the cake mold is fixed, and a preset image acquisition device is rotated around the axis of the cake model to acquire the view.

4. The method for identifying cake mold production defects based on machine vision according to claim 1, characterized in that: The brightness values ​​of the brightness image are clustered to obtain brightness value clusters, and the clustering algorithm is a K-means clustering algorithm or a DBSCAN clustering algorithm.

5. The method for identifying cake mold production defects based on machine vision according to claim 1, characterized in that: When performing edge detection on a view, the edge detection algorithm is a canny edge algorithm.

6. The method for identifying cake mold production defects based on machine vision according to any one of claims 1 to 5, characterized in that: Calculating the entropy value of the grayscale run matrix in the optimal image and determining the defect recognition result according to the entropy value includes the following steps: Extract the angle between the extension direction of each edge in the optimal image and the horizontal direction, sort the angles from large to small according to the number of edges included, and obtain an angle set; Taking a preset number of angles in the sorting of the angle set as the statistical angles of the grayscale run matrix, constructing the grayscale run matrix; The mean entropy value of each grayscale run matrix is ​​calculated, and in response to the mean entropy value being less than a preset coefficient threshold, the quality of the cake mold is unqualified.

7. The method for identifying cake mold production defects based on machine vision according to claim 1, characterized in that: The views of the cake mold are front view, side view, top view or bottom view.

8. The cake mold production defect recognition system based on machine vision is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for identifying defects in cake mold production based on machine vision according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Three-dimensional mold defect detection method and device

    CN110335274A

  • Precise identification method for automobile parts

    CN115082418A

  • Defect identification method for strip steel surface

    CN115953398A

  • Intelligent display method for gas inspection based on image enhancement

    CN116309191A

  • Core rod surface defect detection image preprocessing method and system

    CN117994202A

Cited By

  • AI-based pastry quality detection method and system

    CN120182964A