Mold cleanliness detection method, system, equipment and medium based on image processing
Through the detection method based on image processing, the cleanliness of molds are automatically detected, which solves the problems of low detection efficiency and poor accuracy in the prior art, and achieves efficient and accurate mold cleanliness detection.
Patent Information
- Application Number
- CN202510259743.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has low efficiency and poor accuracy when detecting the cleanliness of molds, and is especially unable to effectively detect water stains in the molds, making it difficult to meet the needs of industrial large-scale production.
The detection method based on image processing is adopted, by acquiring the detection image of the mold, extracting the mold image, performing grayscale processing and area division, and automatically detecting the grayscale values and edge lines of each detection area by machine vision detection method to determine the cleanliness of the mold.
It improves detection efficiency and accuracy, can detect stains and water stains in the mold more accurately, reduces labor costs, and meets the demand for mold inspection in large-scale industrial production.
Smart Images

Figure CN119785119A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image detection, and in particular to a mold cleanliness detection method, system, equipment and medium based on image processing. Background Art
[0002] In the process of industrialized production of hot pot soup base, the pursuit of high efficiency and large-scale output has become an important direction for the development of the industry. Among them, the molding mold is a key production tool. In order to reduce costs and improve production efficiency, it is usually used repeatedly and automatically transported. After completing the production of a hot pot soup base, the mold will first go through the cleaning and disinfection stage, and then be transported in sequence by an automatic conveyor to enter the next round of hot pot soup base automated processing process.
[0003] After cleaning and disinfection, ensuring the cleanliness of the mold is a key link in ensuring the quality of the hot pot base. Even if there is a very small amount of water stains or stains left inside the mold, it may be mixed into the hot pot base during the subsequent processing, which will seriously affect the quality of the hot pot base, reduce product quality and consumers' eating experience. At present, the conventional method of detecting the cleanliness of the mold is manual visual inspection, which mainly relies on the inspectors to use the naked eye to judge whether there are stains in the mold. However, in actual production, since the molds being transported are in a state of continuous motion and the number is huge, the inspectors face a large number of fast-moving molds for a long time for inspection, which is very easy to produce visual fatigue. This not only leads to low detection efficiency, but also makes it difficult to ensure the accuracy and comprehensiveness of the detection, and cannot meet the strict requirements of industrial large-scale production for mold detection.
[0004] More importantly, water stains may remain in the mold, and manual visual inspection cannot effectively detect water stains. Water is a transparent substance, and when it remains in the mold, it is difficult to accurately determine its presence with the naked eye, which makes it impossible to fully guarantee the quality of mold cleanliness inspection through manual visual inspection. This traditional inspection method has multiple limitations in inspection efficiency, accuracy, and water stain detection capabilities, which seriously hinders the improvement of the automation level of hot pot base production and product quality control.
[0005] Traditional machine vision inspection methods can facilitate stain detection for some objects with good surface flatness. However, since the inspection surface of the mold is a concave surface during inspection, water stains or stains remain inside, which are difficult to detect using existing traditional machine vision inspection methods and are prone to false detection. Summary of the invention
[0006] Therefore, in order to solve the above-mentioned deficiencies in manual inspection or traditional machine vision inspection methods when inspecting the cleanliness of packaging molds, the present invention provides a mold cleanliness inspection method, system, equipment and medium based on image processing to solve the above-mentioned problems.
[0007] In a first aspect, the present invention provides a mold cleanliness detection method based on image processing, comprising: Acquire a first detection image of the mold during the conveying process; Extracting a mold image from the first detection image to form a second detection image; Grayscale the second detection image, divide the second detection image into different detection areas according to the edge lines in the second detection image, and detect the grayscale values and edge lines of the different detection areas by a machine vision detection method; If the edge lines are all uninterrupted straight lines, and the grayscale values of each detection area are the same value in the detection area or similar values that change sequentially along the straight line direction, the mold passes the inspection. If there are discontinuous areas on the edge lines in the second detection image and / or the grayscale values of each detection area are different values in the detection area, the mold is marked as a suspected unqualified mold and subsequent processing is performed.
[0008] Furthermore, the obtaining of the first detection image of the mold during the conveying process is specifically to form the first detection image by photographing the conveyed mold.
[0009] Furthermore, the step of extracting the mold image from the first detection image to form the second detection image is to crop the area of the mold outer frame edge in the first detection image by an image processing method, remove image information outside the mold, and form a detection image of the mold.
[0010] Furthermore, the second detection image is gray-scaled, and the second detection image is divided into different detection areas according to the edge lines in the second detection image, and the grayscale values and edge lines of the different detection areas are detected by a machine vision detection method. Specifically, the second detection image is gray-scaled by an image processing method, and the second detection image is divided into different detection areas according to the edge lines of the mold, and the machine vision detection method detects the grayscale values of each detection area and the edge lines between each detection area.
[0011] Furthermore, if the edge lines are all uninterrupted straight lines, and the grayscale values of each detection area are the same value of the detection area or similar values that change sequentially along the straight line direction, then the mold passes the inspection. Specifically, the grayscale values of each detection area and the edge lines between the detection areas are detected by a machine vision inspection method. If each edge line is an uninterrupted straight line, and the grayscale value of each detection area is the same or the grayscale value of each detection area is a similar value that gradually decreases or increases in the horizontal, vertical or diagonal direction, then the mold inspection is qualified.
[0012] Furthermore, the subsequent processing is specifically as follows: after the suspected unqualified mold is transported to the secondary inspection station, it is fixed and subjected to secondary inspection by taking images, using image processing methods and machine vision inspection methods. If the edge lines in the second inspection image in the secondary inspection are all uninterrupted straight lines and the grayscale values of each inspection area are the same values of the inspection area or similar values that change uniformly along the straight line direction, the mark of the suspected unqualified mold disappears and it continues to be transported through inspection. If there are discontinuous areas on the edge lines in the second inspection image and / or the grayscale values of each inspection area are different values of the inspection area, the mold is discarded.
[0013] In a second aspect, the present invention provides a packaging mold cleanliness detection system based on image processing, comprising: Mould conveying module, which evenly and automatically conveys the moulds to be inspected; The fill light module provides light compensation to the mold to be inspected during transportation, so as to facilitate image capture; An image acquisition module is used to capture images of the mold; Image processing module, which crops and grayscales the captured image and divides it into different detection areas; The visual inspection module performs visual inspection on the grayscale processed image to detect the change in the grayscale value of each inspection area in the image and the integrity of the edges between different inspection areas; The rejection module pushes out the suspected unqualified molds detected by the visual inspection module and conducts secondary inspection or rejects them; The control module confirms and analyzes the grayscale value and edge integrity of the mold detected by the visual inspection module to control the operation of the rejection module.
[0014] In a third aspect, the present invention provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the mold cleanliness detection method based on image processing described in the first aspect of the present invention.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program for executing the mold cleanliness detection method based on image processing described in the first aspect of the present invention.
[0016] Compared with the prior art, the present invention has the following advantages: 1. Efficient and accurate: This detection method uses image extraction, grayscale processing and area division, and uses machine vision detection methods to automatically detect the grayscale value of each detection area and the edges between adjacent detection areas, so as to determine whether there are water stains and stains remaining in the mold. Compared with manual visual inspection, it greatly improves the detection efficiency and can more accurately detect stains and water stains in the mold to ensure the detection quality.
[0017] 2. Reduce costs: It effectively reduces labor intensity, avoids visual fatigue during manual visual inspection, reduces labor input, and thus reduces labor costs, saving a lot of manpower and material resources for the enterprise.
[0018] 3. Expand the detection scope: Compared with the traditional machine vision detection method, this detection method can detect objects with concave surfaces, solving the problem that water stains or stains on concave surfaces are difficult to be detected by traditional machine vision detection equipment, further improving the detection quality and making the detection results more comprehensive and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the specific embodiments of the present invention, they are used to explain the present invention, but do not constitute any limitation to the present invention. In the accompanying drawings: Figure 1 is a flow chart of the detection method of the present invention; Figure 2 It is a structural block diagram of the detection system in the present invention; Figure 3 A physical schematic diagram of the detection system of the present invention (the arrow in the figure indicates the moving direction of the mold); Figure 4 It is a schematic diagram of mold partitioning in the detection method of the present invention; Figure 5 It is a schematic diagram of a mold in the detection method of the present invention; Figure 6 It is a schematic diagram of a mold with a logo in the detection method of the present invention; In the figure: 1. automatic conveyor; 2. LED light; 3. CCD camera; 4. electronic computer; 5. drive assembly; 6. secondary inspection station; 7. mold; 701. first inspection area; 702. second inspection area; 703. third inspection area; 704. fourth inspection area; 705. fifth inspection area; 706. sixth inspection area; 10. mold conveying module; 20. fill light module; 30. image acquisition module; 40. image processing module; 50. visual inspection module; 60. rejection module; 70. control module. DETAILED DESCRIPTION
[0020] The technical solution of the present invention is further described in detail below through specific embodiments and in combination with the accompanying drawings; it should be understood that the specific implementation methods described herein are only used to illustrate and explain the present invention, and are not intended to limit the present invention in any way; the accompanying drawings in the present invention are only used to assist in the description of the embodiments and to facilitate understanding, and are not intended to limit the present invention in any way.
[0021] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so that people familiar with this technology can understand and read them, and are not used to limit the conditions under which the present invention can be implemented. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0022] As described in the background technology, the conventional method of detecting mold cleanliness is manual visual inspection, which mainly relies on the inspector to use the naked eye to judge whether there are stains in the mold. However, in actual production, since the molds being transported are in a state of continuous motion and the number is huge, the inspectors face a large number of fast-moving molds for a long time for inspection, which is very easy to produce visual fatigue. This not only leads to low inspection efficiency, but also makes it difficult to ensure the accuracy and comprehensiveness of the inspection, and cannot meet the strict requirements of industrial large-scale production for mold inspection.
[0023] In addition, there may be water stains left in the mold, which cannot be effectively detected by manual visual inspection. As a transparent substance, it is difficult to accurately determine the presence of water when it remains in the mold with the naked eye. This makes it impossible to fully guarantee the quality of mold cleanliness inspection through manual visual inspection. Traditional machine vision inspection methods cannot quickly detect water stains or stains left in the concave parts of the mold.
[0024] Based on the above reasons, in order to solve the above problems, the present invention provides the following technical solutions: Please refer to the attached Figure 1 , Attachment Figure 3 , Attachment Figure 4 and attached Figure 5 As shown, a packaging mold cleanliness detection method based on image processing includes: S100: Acquire a first detection image of the mold 7 during the conveying process; S200: extracting a mold image from the first detection image to form a second detection image; S300: grayscale the second detection image, divide the second detection image into different detection areas according to the edge lines in the second detection image, and detect the grayscale values and edge lines of the different detection areas by a machine vision detection method; S400: If the edge lines are all uninterrupted straight lines, and the grayscale values of each detection area are the same value in the detection area or similar values that change sequentially along the straight line direction, then the mold 7 passes the detection. If there are discontinuous areas on the edge lines in the second detection image and / or the grayscale values of each detection area are different values from those in the detection area, the mold is marked as a suspected unqualified mold and subsequent processing is performed.
[0025] Furthermore, the obtaining of the first detection image of the mold during the conveying process is specifically to form the first detection image by photographing the conveyed mold 7 .
[0026] More specifically, the mold 7 is transported individually and evenly through the automatic conveyor 1, and the concave surface of the mold 7 is kept facing upward during the transportation process. The shooting equipment arranged above the automatic conveyor 1 shoots the mold during transportation, and the captured image is synchronously transmitted to the image processing equipment for processing.
[0027] The conveying speed of the automatic conveyor 1 is determined by the clarity of the images taken by the photographing device, so as to ensure that the photographing device can ensure the clarity of the images taken by the mold 7 during the conveying process, thereby ensuring the subsequent inspection quality.
[0028] The photographing device can be a conventional CCD camera 3, and the image processing device is an image processing software of an electronic computer 4, such as Photoshop.
[0029] Furthermore, the extraction of the mold image in the first detection image to form the second detection image is specifically to crop the area of the outer frame edge of the mold 7 in the first detection image by an image processing method, eliminate the image information outside the mold, and form the detection image of the mold 7.
[0030] More specifically, the area of the outer frame edge of the mold 7 is cropped through the image processing equipment, and the area outside the mold 7 (i.e., the automatic conveyor area) is eliminated, and the image of the mold 7 is retained. Because the hot pot base packaging mold is a conventional square block, it is not only convenient for the image processing equipment to distinguish between the mold and the automatic conveyor on the outside, but also convenient for quick cropping.
[0031] Furthermore, the second detection image is gray-scaled, and the second detection image is divided into different detection areas according to the edge lines in the second detection image, and the grayscale values and edge lines of the different detection areas are detected by a machine vision detection method. Specifically, the second detection image is gray-scaled by an image processing method, and the second detection image is divided into different detection areas according to the edge lines of the mold, and the machine vision detection method detects the grayscale values of each detection area and the edge lines between each detection area.
[0032] Furthermore, in order to facilitate the detection of grayscale values in different detection areas, each detection area is divided into a grid to form multiple pixels of uniform size. Since the grayscale value of each pixel in the image is fixed, during the detection process, by detecting the grayscale values of multiple pixels in each detection area, it can be determined whether the grayscale values in the detection area are the same or change sequentially along a straight line. In one embodiment, since the concave surface of the mold 7 faces upward during transportation, the brightness of the inner wall and the bottom of the mold is different due to light reasons when the image is captured, so the grayscale values after grayscale processing are also different. Therefore, the mold is divided into different detection areas according to the side lines (i.e., edges) of the mold to ensure that the visual inspection equipment can separately inspect the detection areas with different grayscale values in the mold to avoid false detection.
[0033] Please refer to the attached Figure 4 and attached Figure 5 When the mold 7 is kept with the inner concave surface facing upward to shoot an image, its outer frame forms a first detection area 701, and the inner wall of the mold 7 forms a second detection area 702, a third detection area 703, a fourth detection area 704, and a fifth detection area 705 respectively. The bottom of the inner concave surface of the mold forms a sixth detection area 706. After grayscale processing, since the first detection area 701 and the sixth detection area 706 are planes, they will reflect light during shooting, so the grayscale value is small, while the second detection area 702, the third detection area 703, the fourth detection area 704, and the fifth detection area 705 are vertical surfaces or inclined surfaces. When the mold moves, shooting an image will cause part of the light to be reflected to the sixth detection area 706, so the grayscale value is large, and the grayscale value changes sequentially along the straight line direction.
[0034] Furthermore, if the edge lines are all uninterrupted straight lines, and the grayscale values of each detection area are the same value of the detection area or similar values that change sequentially along the straight line direction, then the mold 7 passes the inspection. Specifically, the grayscale values of each detection area and the edge lines between the detection areas are detected by a machine vision inspection method. If each edge line is an uninterrupted straight line, and the grayscale value of each detection area is the same or the grayscale value of each detection area is a similar value that changes sequentially (gradually decreases or gradually increases) along the straight line direction (horizontally or vertically or diagonally), then the mold inspection is qualified.
[0035] More specifically, when there are no stains or water stains in the mold, the grayscale values in each detection area in the mold are the same, or the grayscale values change sequentially along a straight line (because the inner wall of the mold is a vertical surface or an inclined surface, the grayscale values will change sequentially due to light during shooting), and the edges between different detection areas are uninterrupted, so the test result is passed.
[0036] When there are stains in the mold, because the mold is usually white, and the stains (hot pot base or residual liquid of cleaning fluid, etc.) are dark, the grayscale value of the stain is greater than the grayscale value of the mold after grayscale processing. If the stain is at the edge, the edge will be cut off. If the stain is in any detection area, when detecting the grayscale value of the area, the grayscale value near the stain and in the stain will change greatly, indicating that there is a stain remaining at that position and the test result is failed.
[0037] When there are water stains in the mold, if the water stains are at the edge position, refraction will occur under the irradiation of light, resulting in broken edge lines. Therefore, the edge lines of the images taken by the shooting equipment are broken. If the water stains are in any detection area, when detecting the grayscale value of the area, the presence of water stains will reflect light, causing the grayscale value of the position to become smaller after grayscale processing. Therefore, the grayscale value near and inside the water stains will change slightly, and the change is not sequential along the length direction, indicating that there are residual water stains at this position and the detection result is failure.
[0038] Therefore, in the second detection image after the grayscale processing, the grayscale values are in the following order from small to large: water stain grayscale value < mold grayscale value < stain grayscale value.
[0039] Because the bottom of the mold 7 may contain a raised logo (such as the attached Figure 6 As shown in the figure, after the image is captured and grayed out, the grayscale value displayed in the logo area may be greater than the grayscale value of the adjacent blank area (because the logo is raised, that is, when the image is captured, the logo is closer to the camera lens than the adjacent blank area, so the logo grayscale value is greater than the grayscale value of the adjacent blank area). Therefore, when performing grayscale value detection, false detection may be caused due to the grayscale value of the logo being greater than the grayscale value of the blank area, resulting in the mold 7 failing to pass the detection. Based on this, the grayscale value data of the mold 7 image with a logo shape (and a qualified mold) is pre-stored in the machine vision detection equipment to avoid false detection.
[0040] In the process of detecting water stains on the mold, because the logo is raised, that is, the water stains will flow to the outside of the logo during the transportation of the mold, in the process of detecting the gray value, the gray value of the water stain and the nearby area (that is, the mold and logo area) is different, and the size of the gray value is, water stain gray value < mold gray value < logo gray value, but because the water stain is between the mold and the logo, this change is not a similar value that changes sequentially in a straight line direction, so that the water stain can be detected to ensure the accuracy of the detection.
[0041] In the process of detecting stains on the mold, since the mold is usually white and the color of the logo is also white, and the logo is raised at the bottom of the mold, it means that the grayscale value of the logo area after the image grayscale processing is slightly larger than the grayscale value of the mold. However, the stain is dark, and its grayscale value is much larger than the grayscale value of the logo and the grayscale value of the mold. Therefore, the stain can be detected directly, thereby ensuring the accuracy of the detection.
[0042] During the image processing process, the logo may not be placed in sequence due to different placement directions of the mold. Since the shape of the mold is square, when cropping the image, the cropped image can be compared with the logo pre-stored in the machine vision inspection equipment through the image comparison method, so that the cropped image can be rotated to ensure that the cropped image logo and the logo in the machine vision inspection equipment maintain the same direction, which is convenient for subsequent grayscale processing and then detecting the grayscale value of each pixel.
[0043] Therefore, when the present detection method is used to detect the cleanliness of a mold with a logo, it is only necessary to store the image data of the clean mold with the logo in advance into the machine vision detection equipment, and the detection can be performed through the present detection method.
[0044] In order to avoid the mold corresponding to the image being blurred due to the shooting equipment during the conveying process, which may cause the subsequent image processing equipment and visual inspection equipment to mistakenly detect the mold as defective, the mold needs to be subsequently processed after being detected as a defective product, that is, the mold needs to be fixed and subjected to secondary inspection to ensure the inspection effect and avoid false detection.
[0045] Furthermore, the subsequent processing is specifically as follows: the suspected unqualified mold is transported to the secondary inspection station 6, fixed and subjected to secondary inspection by taking images, using image processing methods and machine vision inspection methods. If the edge lines in the second inspection image in the secondary inspection are all uninterrupted straight lines and the grayscale values of each inspection area are the same values of the inspection area or similar values that change uniformly along the straight line direction, the mark of the suspected unqualified mold disappears and the mold continues to be transported through the inspection. If there are discontinuous areas on the edge lines in the second inspection image and / or the grayscale values of each inspection area are different values of the inspection area, the mold is discarded.
[0046] More specifically, the suspected unqualified mold is pushed out from the automatic conveyor 1 by the driving component 5 (such as a cylinder, an electric push rod, etc.), and then the suspected unqualified mold is kept fixed and subjected to secondary inspection by a shooting device, an image processing device and a visual inspection device (the inspection method can refer to the above). If the inspection is qualified, the mark of the suspected unqualified mold disappears and is pushed back to the automatic conveyor through the driving component 5 and transported out. If it is unqualified, the mold 7 is discarded.
[0047] Embodiment 2, Please refer to the attached Figure 2 , Attachment Figure 3 and attached Figure 4 In order to realize automatic machine detection of mold cleanliness, this embodiment provides a packaging mold cleanliness detection system based on image processing, including: The mold conveying module 10 evenly and automatically conveys the mold to be inspected; The fill light module 20 performs light compensation on the mold to be inspected during transportation, so as to facilitate image capture; An image acquisition module 30 is used to capture images of the mold; An image processing module 40 is used to crop and grayscale the captured image and divide it into different detection areas; The visual inspection module 50 performs visual inspection on the grayscale processed image to detect the change in the grayscale value of each inspection area in the image and the integrity of the edges between different inspection areas.
[0048] The rejection module 60 pushes out the suspected unqualified molds detected by the visual inspection module and conducts secondary inspection or rejects them; The control module 70 confirms and analyzes the grayscale value and edge integrity of the mold detected by the visual inspection module to control the operation of the rejection module.
[0049] The mold conveying module is a conventional automatic conveyor, so as to smoothly and automatically convey the mold.
[0050] The fill light module 20 can be a conventional LED lamp 2 and is arranged just above the automatic conveyor 1 to provide light for the mold 7 being conveyed.
[0051] The image acquisition module 30 can be a shooting device for shooting images, such as a CCD camera 3 .
[0052] The image processing module 40 is a computer-aided software, such as Photoshop, which crops, partitions and grayscales the image.
[0053] The visual inspection module 50 is a grayscale sensor or a grayscale meter, which is based on the photoelectric effect and measures the grayscale value of the surface of the object and the integrity of the edge of the mold 7 , and is combined with the control module to analyze and process the image.
[0054] The rejection module 60 is a driving component 5 (such as a cylinder, an electric push rod, etc.) configured on the outside of the automatic conveyor, and is used to push the detected suspected unqualified molds to the outer end of the automatic conveyor or reject the unqualified molds.
[0055] Please refer to the attached Figure 3When the qualified mold is transported to the secondary inspection station 6, the driving component 5 does not move. When the suspected unqualified mold is transported to the secondary inspection station 6, the suspected unqualified mold is marked, so the driving component 5 moves to push the suspected unqualified mold on the automatic conveyor 1 to the secondary inspection station 6 for re-inspection. If the secondary inspection is a qualified mold, the mark of the suspected unqualified mold disappears, and the driving component 5 outside the secondary inspection station 6 moves to push the qualified mold to the automatic conveyor 1 or through another automatic conveyor (to avoid collision with the mold on the original automatic conveyor) for transportation. If the secondary inspection is an unqualified mold, the driving component 5 on the side of the outer side of the secondary inspection station 6 moves to remove the mold.
[0056] The control module 70 adopts a conventional MCU micro control unit.
[0057] The present invention also provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the mold cleanliness detection method based on image processing described in the present invention.
[0058] The processor is the control core (Control Unit) of the electronic device, which connects the various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory and calling data stored in the memory.
[0059] The memory includes at least one type of readable storage medium. In some embodiments, the memory may be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device.
[0060] Finally, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to execute the mold cleanliness detection method based on image processing described in the present invention.
[0061] Storage media include: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks, and other media that can store program codes.
[0062] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product.
[0063] The above description is a detailed description of the preferred feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modified changes completed under the technical spirit suggested by the present invention should fall within the patent scope covered by the present invention.
Claims
1. A mold cleanliness detection method based on image processing, characterized in that: include, Acquire a first detection image of the mold during the conveying process; Extracting a mold image from the first detection image to form a second detection image; Grayscale the second detection image, divide the second detection image into different detection areas according to the edge lines in the second detection image, and detect the grayscale values and edge lines of the different detection areas by a machine vision detection method; If the edge lines are all uninterrupted straight lines, and the grayscale values of each detection area are the same value in the detection area or similar values that change sequentially along the straight line direction, the mold passes the inspection. If there are discontinuous areas on the edge lines in the second detection image and / or the grayscale values of each detection area are different values in the detection area, the mold is marked as a suspected unqualified mold and subsequent processing is performed.
2. The mold cleanliness detection method based on image processing according to claim 1 is characterized in that: The obtaining of the first detection image of the mold during the conveying process specifically includes photographing the conveyed mold to form the first detection image.
3. The mold cleanliness detection method based on image processing according to claim 1 is characterized in that: The step of extracting the mold image from the first detection image to form the second detection image specifically includes cropping the area of the mold outer frame edge in the first detection image by an image processing method, removing image information outside the mold, and forming a detection image of the mold.
4. The mold cleanliness detection method based on image processing according to claim 1 is characterized in that: The second detection image is grayed, and the second detection image is divided into different detection areas according to the edge lines in the second detection image, and the grayscale values and edge lines of the different detection areas are detected by a machine vision detection method. Specifically, the second detection image is grayed by an image processing method, and the second detection image is divided into different detection areas according to the edge lines of the mold. The machine vision detection method detects the grayscale values of each detection area and the edge lines between each detection area.
5. The mold cleanliness detection method based on image processing according to claim 1 is characterized in that: If the edge lines are all uninterrupted straight lines, and the grayscale values of each detection area are the same value in the detection area or similar values that change sequentially along the straight line direction, then the mold passes the inspection. Specifically, the grayscale values of each detection area and the edge lines between the detection areas are detected by a machine vision inspection method. If each edge line is an uninterrupted straight line, and the grayscale value of each detection area is the same or the grayscale value of each detection area is a similar value that gradually decreases or increases in the horizontal, vertical or oblique direction, then the mold inspection is qualified.
6. The mold cleanliness detection method based on image processing according to claim 1 is characterized in that: The subsequent processing is specifically as follows: the suspected unqualified mold is transported to the secondary inspection station, fixed thereafter, and subjected to secondary inspection by taking images, using image processing methods, and using machine vision inspection methods; if the edge lines in the second inspection image in the secondary inspection are all uninterrupted straight lines and the grayscale values of each inspection area are the same values of the inspection area or similar values that change uniformly along the straight line direction, then the mark of the suspected unqualified mold disappears and the mold continues to be transported through the inspection; if the edge lines in the second inspection image have discontinuous areas and / or the grayscale values of each inspection area are different values of the inspection area, then the mold is discarded.
7. A mold cleanliness detection system based on image processing, applicable to the mold cleanliness detection method based on image processing as claimed in any one of claims 1 to 6, characterized in that: include, Mould conveying module, which evenly and automatically conveys the moulds to be inspected; The fill light module provides light compensation to the mold to be inspected during transportation, so as to facilitate image capture; An image acquisition module is used to capture images of the mold; Image processing module, which crops and grayscales the captured image and divides it into different detection areas; The visual inspection module performs visual inspection on the grayscale processed image to detect the change in the grayscale value of each inspection area in the image and the integrity of the edge lines between different inspection areas; The rejection module pushes out the suspected unqualified molds detected by the visual inspection module and conducts secondary inspection or rejects them; The control module confirms and analyzes the grayscale value and edge integrity of the mold detected by the visual inspection module to control the operation of the rejection module.
8. An electronic device, characterized in that: The electronic device includes at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the mold cleanliness detection method based on image processing as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the mold cleanliness detection method based on image processing as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Cleanness detection method, device and system and storage medium
CN114581403A
Intelligent feeding system and method
CN114677585A
Industrial glass defect detection method based on Visionmaster
CN119515825A
Detection method of pixel uneveness defection, detection device for pixel uneveness defection, detection program for pixel uneveness defection, and recording medium with the program stored
JP2006133196A