Product testing method, system, equipment and storage medium for cosmetic mirror production line

Through the method of combining laser and galvanometer with camera, the problem of not being able to determine the installation angle of the mirror and frame in the cosmetic mirror product inspection is solved, and efficient detection of the cosmetic mirror is achieved, and detection efficiency and accuracy are improved.

CN118604004BActive Publication Date: 2024-11-19FOSHAN HONGWEI ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411076379.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-19
Estimated Expiration
2044-08-07

Smart Images

  • Figure CN118604004B_ABST
    Figure CN118604004B_ABST
Patent Text Reader

Abstract

The present invention discloses a product detection method, system, equipment and storage medium for a makeup mirror production line, and belongs to the field of makeup mirror technology. The present invention is provided with a laser, a galvanometer and a camera, and the product detection method for the makeup mirror production line comprises the following steps: controlling the laser to emit a laser toward the galvanometer, and controlling the galvanometer according to the galvanometer control data, so that the laser is incident on the mirror position of the assembled makeup mirror at a preset angle, and the preset angle is different from the angle at which the camera shoots the makeup mirror; obtaining the first image data and the second image data shot by the camera; determining the spot size data of the light spot according to the first image data, and determining the mirror angle of the mirror surface of the makeup mirror according to the spot size data, and using the mirror angle as the assembly verification information of the mirror surface and the outer shell of the makeup mirror; determining the surface abnormality information of the makeup mirror according to the second image data. The detection efficiency of the makeup mirror is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cosmetic mirrors, and in particular to a product detection method, system, equipment and storage medium for a cosmetic mirror production line. Background Art

[0002] As users' requirements for makeup mirror products gradually increase, it is necessary to perform defect detection on assembled products. At present, the common visual inspection scheme is generally to illuminate the makeup mirror with an LED light source and use a high-resolution camera to determine whether there are defects, flaws and stains on the mirror surface. However, this visual inspection scheme can only detect whether there are defects, flaws and stains on the surface of the makeup mirror, and cannot simultaneously determine whether the installation angle of the mirror and the frame is accurate, resulting in low inspection efficiency.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a product inspection method, system, device and storage medium for a cosmetic mirror production line, aiming to improve the inspection efficiency of the cosmetic mirror products.

[0005] To achieve the above object, the present invention provides a product inspection method for a cosmetic mirror production line, wherein the production line is provided with a laser, a galvanometer and a camera, and the product inspection method for the cosmetic mirror production line comprises the following steps:

[0006] Control the laser to emit laser light toward the galvanometer, and control the galvanometer according to the galvanometer control data, so that the laser light is incident on the mirror surface position of the assembled makeup mirror at a preset angle, and the preset angle is different from the angle at which the camera photographs the makeup mirror;

[0007] Acquire first image data and second image data captured by a camera, wherein a first exposure time of the first image data is shorter than a second exposure time of the second image data;

[0008] Determine spot size data of the light spot according to the first image data, determine a mirror angle of the mirror surface of the makeup mirror according to the spot size data, and use the mirror angle as assembly verification information of the mirror surface of the makeup mirror and a shell of the makeup mirror;

[0009] Surface abnormality information of the makeup mirror is determined according to the second image data, where the surface abnormality information is defect information.

[0010] Optionally, before the step of controlling the galvanometer according to the galvanometer control data, the method further includes:

[0011] Determine and generate the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot;

[0012] controlling the camera to capture third image data, and determining whether the makeup mirror is at a target position according to the third image data;

[0013] When the makeup mirror is not at the target position, adjusting the relative position between the makeup mirror and the camera, and returning to the step of controlling the camera to capture the third image data;

[0014] When the makeup mirror is at the target position, it is determined to execute the step of controlling the galvanometer according to the galvanometer control data.

[0015] Optionally, before the step of determining and generating the galvanometer control data according to the mirror shape of the cosmetic mirror and the preset size of the laser spot, the method further includes:

[0016] Determining a preset size of the laser spot according to the distance between the galvanometer and the makeup mirror at the target position and the initial spot emitted by the laser;

[0017] The step of determining and generating the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot comprises:

[0018] Generate a laser scanning path according to the preset size and the mirror shape;

[0019] The galvanometer control data is determined according to the scanning path.

[0020] Optionally, the step of acquiring the first image data and the second image data taken by a camera includes:

[0021] Determine the first moment data of the laser spot at each position of the mirror surface of the makeup mirror and the total time data of the laser spot on the mirror surface according to the galvanometer control data;

[0022] Determine the shooting time and exposure time of the first image data according to the first moment data;

[0023] The shooting time and exposure time of the second image data are determined according to the total time data.

[0024] Optionally, the step of determining the mirror angle of the mirror surface of the cosmetic mirror according to the light spot size data comprises:

[0025] When the spot size data is larger than the preset size of the laser spot, determining that the angle between the mirror and the laser is smaller than the standard angle, and determining the mirror angle according to the spot size data;

[0026] When the spot size data is equal to the preset size of the spot of the laser, determining that the angle between the mirror and the laser is equal to the standard angle, and determining the mirror angle according to the standard angle;

[0027] When the spot size data is smaller than the preset size of the laser spot, it is determined that the angle between the mirror and the laser is greater than the standard angle, and the mirror angle is determined according to the spot size data.

[0028] Optionally, the step of determining the surface abnormality information of the cosmetic mirror according to the second image data comprises:

[0029] extracting data values ​​of the second image data according to an edge extraction algorithm, and generating the edge image;

[0030] Abnormal information of the surface of the cosmetic mirror is determined according to the edge image.

[0031] Optionally, after the step of determining the spot size data of the light spot according to the first image data, and determining the mirror angle of the mirror surface of the cosmetic mirror according to the spot size data, the step further includes:

[0032] generating a mirror flattening curve according to the mirror angles of the mirror at different positions of the makeup mirror;

[0033] The flatness information of the mirror surface of the makeup mirror is determined according to the change of the flatness curve, and the surface abnormality information of the makeup mirror is determined according to the flatness information and the second image data.

[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a product detection system for a cosmetic mirror production line, the production line is provided with a laser, a galvanometer and a camera, and the product detection system for the cosmetic mirror production line comprises:

[0035] a control module, used to control the laser to emit laser light toward the galvanometer, and control the galvanometer according to the galvanometer control data, so that the laser light is incident on the mirror surface position of the assembled makeup mirror at a preset angle, and the preset angle is different from the angle at which the camera photographs the makeup mirror;

[0036] A shooting module, used for acquiring first image data and second image data shot by a camera, wherein a first exposure time length of the first image data is greater than a second exposure time length of the second image data;

[0037] a calculation module, configured to determine spot size data of the light spot according to the first image data, determine a mirror angle of the mirror surface of the makeup mirror according to the spot size data, and use the mirror angle as assembly verification information of the mirror surface of the makeup mirror and a shell of the makeup mirror;

[0038] The recognition module is used to determine the surface abnormality information of the makeup mirror according to the second image data, and the surface abnormality information is defect information.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides a product inspection device for a makeup mirror production line, the device comprising: a memory, a processor, and a product inspection program for the makeup mirror production line stored in the memory and executable on the processor, the product inspection program for the makeup mirror production line being configured to implement the steps of the product inspection method for the makeup mirror production line described in any one of the above-mentioned items.

[0040] In addition, to achieve the above-mentioned purpose, the present invention also provides a storage medium, on which a product inspection program for a makeup mirror production line is stored. When the product inspection program for the makeup mirror production line is executed by a processor, the steps of the product inspection method for the makeup mirror production line described in any one of the above-mentioned items are implemented.

[0041] The present invention proposes a product inspection method for a makeup mirror production line. The method controls the laser to emit laser toward the galvanometer, and controls the galvanometer according to galvanometer control data. A new light source lighting method is adopted. In this method, two different first image data and second image data can be collected. While determining the mirror angle of the makeup mirror according to the different first image data and second image data, surface abnormality information of the makeup mirror can also be determined, so that the two inspection requirements can be completed in real time, thereby improving the inspection efficiency of the makeup mirror assembly production line. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a structural schematic diagram of a product testing device for a cosmetic mirror production line in a hardware operating environment involved in an embodiment of the present invention;

[0043] Figure 2 It is a flow chart of a first embodiment of a product inspection method for a cosmetic mirror production line of the present invention;

[0044] Figure 3 It is a flow chart of a second embodiment of a product inspection method for a cosmetic mirror production line of the present invention;

[0045] Figure 4 It is a schematic flow chart of a third embodiment of a product inspection method for a cosmetic mirror production line of the present invention;

[0046] Figure 5 It is a schematic flow chart of a fourth embodiment of a product inspection method for a cosmetic mirror production line of the present invention;

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of product testing equipment for a makeup mirror production line in the hardware operating environment involved in an embodiment of the present invention.

[0050] like Figure 1 As shown, the product inspection equipment of the cosmetic mirror production line may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, an interactive device 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The interactive device 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional interactive device 1003 may also be connected to the communication bus through a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0051] In addition, it should be noted that the product inspection equipment of the cosmetic mirror production line includes: a camera, a laser emitting device, and a galvanometer, etc., and optionally, a total reflection mirror and a beam expander, wherein the beam expander can change the diameter of the laser beam. Optionally, it also includes structural components connected to the cosmetic mirror production line.

[0052] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the product inspection equipment of the cosmetic mirror production line, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0053] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a product detection program for a makeup mirror production line.

[0054] exist Figure 1In the product inspection device of the makeup mirror production line shown, the network interface 1004 is mainly used for data communication with other devices; the interactive device 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the product inspection device of the makeup mirror production line of the present invention can be set in the product inspection device of the makeup mirror production line, and the product inspection device of the makeup mirror production line calls the product inspection program of the makeup mirror production line stored in the memory 1005 through the processor 1001, and executes the product inspection method of the makeup mirror production line provided by the embodiment of the present invention.

[0055] The embodiment of the present invention provides a product detection method for a cosmetic mirror production line, referring to Figure 2 , Figure 2 The present invention is a flowchart of a first embodiment of a product inspection method for a cosmetic mirror production line.

[0056] In this embodiment, the product testing method of the cosmetic mirror production line includes:

[0057] Step S10, controlling the laser to emit laser light toward the galvanometer, and controlling the galvanometer according to the galvanometer control data, so that the laser light is incident on the mirror surface position of the assembled makeup mirror at a preset angle, and the preset angle is different from the angle at which the camera photographs the makeup mirror;

[0058] At present, the makeup mirror includes a reflective lens and a plastic shell. During the production process, the reflective lens is installed on the plastic shell to complete the assembly. In this process, the problems include collision of the lens, substandard installation, and excessive tolerance of the shell, which leads to abnormal makeup mirror products. In this embodiment, the makeup mirror is transported on the production line, and when the makeup mirror reaches the target position, the makeup mirror is detected in real time. Specifically, the laser can use a common 532nm wavelength laser, and the galvanometer here includes two lenses that achieve total reflection of the 532nm wavelength. The two lenses are respectively installed on the X-axis and the Y-axis. The angles of the X-axis and the Y-axis are controlled according to the galvanometer control data to control the mirror position of the laser on the makeup mirror. It should be noted that in practice, the makeup mirror is placed flat on the production line, and the distance between the galvanometer and the makeup mirror is far, so the incident angles of different mirror positions of the makeup mirror are the same. When the distance between the galvanometer and the makeup mirror is less than the first distance value, it is necessary to calibrate based on the standard makeup mirror. The preset angle here is the angle between the makeup mirror and the incident direction of the laser, and the preset angle is generally 45°.

[0059] Step S20, acquiring first image data and second image data taken by a camera, wherein a first exposure time of the first image data is shorter than a second exposure time of the second image data;

[0060] It should be noted that in the present embodiment, the galvanometer is controlled by the galvanometer control data, and the laser is moved on the surface of the lens. In addition, the camera does not shoot the laser reflected on the mirror surface, but shoots the scattered light of the laser on the mirror surface. The sources of scattering include the scattering of the mirror and the scattering of the reflective layer of the mirror. This method can prevent excessive light from entering the camera sensor, causing the camera to be overexposed or the sensor to fail. In addition, in some cases where anti-glare mirrors are required, special coatings will be used to reduce the intensity of reflected light, which requires corresponding adjustment of the laser parameters. It should be noted that the camera here can be a single camera or two cameras. In an embodiment based on two cameras, the camera that shoots the first image data needs to have a higher frame rate. In an embodiment based on one camera, different shooting parameters can be set, and the first image data and the second image data can be shot in different ways.

[0061] Step S30, determining the spot size data of the light spot according to the first image data, and determining the mirror angle of the mirror surface of the makeup mirror according to the spot size data, and using the mirror angle as assembly verification information of the mirror surface of the makeup mirror and the shell of the makeup mirror;

[0062] The light spot in the first image data can be an elliptical light spot or a circular light spot. The light spot size data is determined by the number of pixels occupied by the diameter of the circular light spot, or by the number of pixels occupied by the axis of the elliptical light spot. The mirror angle of the mirror surface of the makeup mirror is determined according to the light spot size data. The assembly verification information here is used to determine whether the assembly of the mirror surface of the makeup mirror and the shell of the makeup mirror is qualified. Generally, the qualified is determined by comparing the preset standard assembly angle with the mirror angle;

[0063] Step S40: determining surface abnormality information of the makeup mirror according to the second image data, wherein the surface abnormality information is defect information.

[0064] The second image data here can be optionally taken synchronously with the first image data, and the exposure time of the second image data is longer than that of the first image data. Optionally, the exposure time of the second image data is the time for the galvanometer control data to control the laser to complete one scan of the makeup mirror. Of course, for the uniformity of the image, the laser can also complete multiple scans of the makeup mirror during the exposure time. The defects here can be defects of the mirror surface, or defects caused by burrs of the plastic shell. The flaws here can be scratches on the mirror surface. In addition, the flaws here can also be uneven mirror surfaces. Of course, in actual production, whether the mirror surface is flat is detected after the lens is produced. In this embodiment, the process of detecting the mirror surface can also be performed in this step. The stains here can include stains such as dust particles.

[0065] In this embodiment, the laser is controlled to emit laser toward the galvanometer, and the galvanometer is controlled according to the galvanometer control data. A new light source lighting method is adopted. In this method, two different first image data and second image data can be collected. While determining the mirror angle of the makeup mirror according to the different first image data and second image data, surface abnormality information of the makeup mirror can also be determined, so that the detection of two different detection items can be completed in real time, thereby improving the detection efficiency of the makeup mirror assembly production line.

[0066] Further, based on the first embodiment, a second embodiment of the product detection method of the cosmetic mirror production line of the present invention is proposed. In this embodiment, referring to Figure 3 , before the step of controlling the galvanometer according to the galvanometer control data, it also includes:

[0067] Step S101, determining and generating the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot;

[0068] The preset size here can be obtained based on theoretical calculations. For example, when a circular laser spot with a diameter of 1 cm is irradiated onto the mirror surface of a makeup mirror at a 45-degree angle, the size of the spot will change. This is because the projection of the laser spot on the surface of the object will be deformed due to the angle. Through geometric optical calculations, it can be obtained that the major axis of the formed elliptical spot is 1 cm and the minor axis is In addition, the preset number of pixels occupied by the light spot corresponding to the preset size is determined according to the relationship between the number of pixels and the distance. It should be noted that in addition to the mirror shape of the makeup mirror, the control data of the galvanometer also needs to be determined according to the area of ​​the mirror surface of the makeup mirror. In this process, the control data of the galvanometer can be made more accurate through experiments, tests, calibration, etc.

[0069] Step S102, controlling the camera to capture third image data, and determining whether the makeup mirror is at a target position according to the third image data;

[0070] It should be noted that, in this embodiment, step S102 is performed after step S101. Of course, in other embodiments, when the galvanometer control data has been determined, step S102 can be directly performed. The third image data here is the image data of the target position, and the shooting range of the third image data here can be larger than the range of the first image data, and the shooting range of the third image data can also be larger than the range of the second image data. Its purpose is not to handle abnormal conditions of the photographed makeup mirror, but only for positioning.

[0071] Step S103, when the makeup mirror is not at the target position, adjusting the relative position between the makeup mirror and the camera, and returning to the step of controlling the camera to capture the third image data;

[0072] In this embodiment, the time interval between two adjacent third image data can be controlled by the production line manager. Generally, it can be set to shoot one third image data per second, so as to save shooting costs. The makeup mirror is transported on the production line. Here, adjusting the relative position between the makeup mirror and the camera specifically refers to adjusting the running state of the assembly line on the production line, including the forward and backward movement of the crawler belt of the assembly line, so as to achieve the adjustment of the relative position between the makeup mirror and the camera. Optionally, the mechanical arm on the production line is controlled to adjust the position of the makeup mirror.

[0073] Step S104, when the makeup mirror is at the target position, determining to execute the step of controlling the galvanometer according to the galvanometer control data.

[0074] In this embodiment, the galvanometer control data is generated based on the mirror shape of the makeup mirror and the preset size of the laser spot, thereby improving the uniformity and accuracy of the galvanometer control laser scanning on the mirror surface of the makeup mirror, and controlling the camera to capture third image data, determining whether the makeup mirror is in the target position based on the third image data, and executing the step of controlling the laser to emit laser toward the galvanometer only when the makeup mirror is in the target position, thereby saving detection resources of the makeup mirror.

[0075] Furthermore, before the step of determining and generating the galvanometer control data according to the mirror shape of the cosmetic mirror and the preset size of the laser spot, the step further includes:

[0076] Determining a preset size of the laser spot according to the distance between the galvanometer and the makeup mirror at the target position and the initial spot emitted by the laser;

[0077] It should be noted that laser is generally understood as parallel light, but the laser emitted by the actual laser often has a certain divergence angle. When the distance between the galvanometer and the makeup mirror at the target position is large, it is necessary to calculate the actual laser spot irradiated to the makeup mirror with the divergence angle. Of course, it should also be noted that when the distance between the galvanometer and the makeup mirror at the target position is small, or when the production line manager does not consider it, the size of the initial laser spot is used as the size of the spot incident on the makeup mirror.

[0078] The step of determining and generating the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot comprises:

[0079] Generate a laser scanning path according to the preset size and the mirror shape;

[0080] The galvanometer control data is determined according to the scanning path.

[0081] It should be noted that in order to ensure that the time of laser irradiation in the scanning path is the same, the scanning speed of different positions on the scanning path can also be adjusted so that the speed of some repeatedly scanned positions is correspondingly increased when the scanning passes. In addition, it should be noted that in this embodiment, since the scanning path for the same makeup mirror is the same, of course the difference is only in determining the initial point for starting the scan, and the initial point is related to the position of the makeup mirror and the angle of rotation, and the galvanometer control data is determined by path programming and testing. In some embodiments, optionally, after step S104, it also includes generating calibration parameters according to the deviation parameters of the makeup mirror at the target position, updating the galvanometer control data according to the calibration parameters, and then executing step S10 after the update.

[0082] In this embodiment, a laser scanning path is generated according to the preset size and the mirror shape; and the galvanometer control data is determined according to the scanning path, thereby ensuring that the galvanometer control data can control the laser to scan the makeup mirror according to the scanning path.

[0083] Further, based on the first embodiment or the second embodiment, a third embodiment of the product detection method of the cosmetic mirror production line of the present invention is proposed. In this embodiment, referring to Figure 4 , the step of acquiring the first image data and the second image data taken by the camera comprises:

[0084] Step S21, determining the first moment data of the laser spot at each position of the mirror surface of the makeup mirror and the total time data of the laser spot on the mirror surface according to the galvanometer control data;

[0085] Step S22, determining the shooting time and exposure time of the first image data according to the first moment data;

[0086] Step S23, determining the shooting time and exposure time of the second image data according to the total time data.

[0087] It should be noted that, in this embodiment, in order to ensure the accuracy of the first image data and the second image data, it is actually necessary to synchronize the galvanometer control data with the first image data and the second image data, respectively. This can generally be achieved by hardware triggering or software triggering. Specifically, the camera synchronously receives the galvanometer control data, determines the residence time of the laser at a specific position, that is, the first moment data, the initial time of the first moment data is the initial time of the camera exposure, and the end time of the first moment data is the end time of the camera exposure. Generally, the initial time of the first camera exposure of the camera to a makeup mirror can be used as the shooting time. Since the exposure time of the second image data is longer than the exposure time of the first image data, the camera needs to use different aperture sizes between shooting the first image data and the second image data.

[0088] In this embodiment, the shooting time and exposure time of the first image data are determined by the first moment data; and the shooting time and exposure time of the second image data are determined according to the total time data, thereby realizing real-time collection of image data, improving the efficiency of shooting image data, and thus improving detection efficiency.

[0089] Further, based on any of the above embodiments, a fourth embodiment of a product detection method for a cosmetic mirror production line of the present invention is proposed, such as Figure 5 As shown, in this embodiment, the step of determining the mirror angle of the mirror surface of the makeup mirror according to the light spot size data includes:

[0090] Step S31, when the spot size data is larger than the preset size of the laser spot, determining that the angle between the mirror and the laser is smaller than the standard angle, and determining the mirror angle according to the spot size data;

[0091] Step S32, when the spot size data is equal to the preset size of the laser spot, determining that the angle between the mirror and the laser is equal to the standard angle, and determining the mirror angle according to the standard angle;

[0092] Step S33, when the spot size data is smaller than the preset size of the laser spot, determining that the angle between the mirror and the laser is greater than a standard angle, and determining the mirror angle according to the spot size data.

[0093] In this embodiment, the spot size data here can specifically be the length of the axis that changes with the angle in the elliptical spot. When the length of the changing axis is greater than the length of the constant axis, it is the major axis; when the length of the changing axis is less than the length of the constant axis, it is the minor axis. When the length of the changing axis is equal to the length of the constant axis, it is the diameter of the circle. Specifically, the mirror angle can be determined according to the first corresponding relationship between the length of the changing axis and the angle and the length of the changing axis. This first corresponding relationship can be generated according to the test results. The first corresponding relationship can be a corresponding table, a corresponding function, etc.

[0094] In this embodiment, the mirror angle of the makeup mirror is determined according to the spot size data, so that the angle of the mirror of the makeup mirror can be determined when abnormal information is determined, thereby improving the detection efficiency of the makeup mirror.

[0095] Further, based on any of the above embodiments, a fifth embodiment of a product inspection method for a cosmetic mirror production line of the present invention is proposed, wherein the step of determining the surface abnormality information of the cosmetic mirror according to the second image data comprises:

[0096] extracting data values ​​of the second image data according to an edge extraction algorithm, and generating the edge image;

[0097] Abnormal information of the surface of the cosmetic mirror is determined according to the edge image.

[0098] Specifically, the Canny edge algorithm can be used to generate the edge image, and the abnormal information of the surface of the makeup mirror with abnormalities can be determined based on the edge image. In this embodiment, it is only necessary to determine the presence of abnormal information in the second image through the edge algorithm, and it is not necessary to specifically determine which type of abnormality it is. The edge extraction algorithm is efficient and has low computational cost. In other embodiments, the abnormal information of the surface of the makeup mirror can be determined by an image recognition algorithm. The image recognition algorithm includes: an algorithm based on template matching and an algorithm based on geometric features, so as to determine defects, flaws and stains in the second image. The corresponding abnormal information can be accurately identified, and of course, the CNN algorithm can also be used to identify the abnormal information in the second image data.

[0099] In this embodiment, the edge image can be efficiently generated according to the second image data through the edge extraction algorithm, and the surface abnormality information can be determined according to the edge image. Since the algorithm operates efficiently, the detection efficiency is improved.

[0100] Further, based on any of the above embodiments, a sixth embodiment of the product inspection method for a cosmetic mirror production line of the present invention is proposed, after the step of determining the spot size data of the light spot according to the first image data, and determining the mirror angle of the mirror surface of the cosmetic mirror according to the spot size data, the method further includes:

[0101] generating a mirror flattening curve according to the mirror angles of the mirror at different positions of the makeup mirror;

[0102] The flatness information of the mirror surface of the makeup mirror is determined according to the change of the flatness curve, and the surface abnormality information of the makeup mirror is determined according to the flatness information and the second image data.

[0103] It should be noted that the number of first image data here is multiple, and the shooting time matches the galvanometer control data, so that the mirror angle at different positions can be efficiently determined, and the mirror flatness curve is generated according to the mirror angle. Different from the deviation caused by installation, the deviation caused by installation is often the overall offset of the mirror flatness curve, and the mirror flatness curve is generally a straight line. When the mirror flatness curve is not a straight line, it is determined that there is an abnormality in the flatness of the mirror surface of the makeup mirror.

[0104] In this embodiment, a mirror flatness curve is generated according to the mirror angles of the mirror at different positions of the makeup mirror; the flatness information of the mirror surface of the makeup mirror is determined according to the change of the flatness curve, and the surface abnormality information of the makeup mirror is determined according to the flatness information and the second image data. In addition to detecting whether there is an abnormality in the mirror angle and whether there is surface abnormality information including defects, blemishes and stains, it is also possible to determine whether there is an abnormality in the flatness of the mirror surface, thereby achieving a set of detection equipment that can detect a variety of information of the makeup mirror, while realizing real-time detection and improving detection efficiency.

[0105] In addition, an embodiment of the present invention further provides a product inspection system for a cosmetic mirror production line, wherein the production line is provided with a laser, a galvanometer, and a camera, and the product inspection system for the cosmetic mirror production line includes:

[0106] a control module, used to control the laser to emit laser light toward the galvanometer, and control the galvanometer according to the galvanometer control data, so that the laser light is incident on the mirror surface position of the assembled makeup mirror at a preset angle, and the preset angle is different from the angle at which the camera photographs the makeup mirror;

[0107] A shooting module, used for acquiring first image data and second image data shot by a camera, wherein a first exposure time length of the first image data is greater than a second exposure time length of the second image data;

[0108] a calculation module, configured to determine spot size data of the light spot according to the first image data, determine a mirror angle of the mirror surface of the makeup mirror according to the spot size data, and use the mirror angle as assembly verification information of the mirror surface of the makeup mirror and a shell of the makeup mirror;

[0109] The recognition module is used to determine the surface abnormality information of the makeup mirror according to the second image data, and the surface abnormality information is defect information.

[0110] In addition, an embodiment of the present invention also proposes a product inspection device for a makeup mirror production line, the device comprising: a memory, a processor, and a product inspection program for the makeup mirror production line stored in the memory and executable on the processor, the product inspection program for the makeup mirror production line being configured to implement the steps of the product inspection method for the makeup mirror production line described in any one of the above items.

[0111] In addition, an embodiment of the present invention further proposes a storage medium, on which a product inspection program for a makeup mirror production line is stored. When the product inspection program for the makeup mirror production line is executed by a processor, the steps of the product inspection method for a makeup mirror production line described in any one of the above items are implemented.

[0112] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0113] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0115] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A product inspection method for a cosmetic mirror production line, characterized in that: The production line is provided with a laser, a galvanometer and a camera. The product inspection method of the cosmetic mirror production line includes the following steps: Control the laser to emit laser light toward the galvanometer, and control the galvanometer according to the galvanometer control data, so that the laser light is incident on the mirror surface position of the assembled makeup mirror at a preset angle, and the preset angle is different from the angle at which the camera photographs the makeup mirror; Acquire first image data and second image data captured by a camera, wherein a first exposure time of the first image data is shorter than a second exposure time of the second image data; Determine the spot size data of the light spot according to the first image data, determine the mirror angle of the mirror surface of the makeup mirror according to the spot size data, and use the mirror angle as assembly verification information of the mirror surface of the makeup mirror and the shell of the makeup mirror; specifically: the light spot in the first image data is an elliptical spot, the spot size data is determined by the number of pixels occupied by the axis of the elliptical spot, and the mirror angle of the mirror surface of the makeup mirror is determined according to the spot size data; the assembly verification information is used to determine whether the assembly of the mirror surface of the makeup mirror and the shell of the makeup mirror is qualified, and whether it is qualified is determined by comparing the preset standard assembly angle with the mirror angle; the spot size data is the length of the axis in the elliptical spot that changes with the angle; determining surface abnormality information of the makeup mirror according to the second image data, wherein the surface abnormality information is defect information; Before the step of controlling the galvanometer according to the galvanometer control data, the method further includes: Determine and generate the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot; controlling the camera to capture third image data, and determining whether the makeup mirror is at a target position according to the third image data; When the makeup mirror is not at the target position, adjusting the relative position between the makeup mirror and the camera, and returning to the step of controlling the camera to capture the third image data; When the makeup mirror is at the target position, determining to execute the step of controlling the galvanometer according to the galvanometer control data; Before the step of determining and generating the galvanometer control data according to the mirror shape of the cosmetic mirror and the preset size of the laser spot, the method further includes: Determining a preset size of the laser spot according to the distance between the galvanometer and the makeup mirror at the target position and the initial spot emitted by the laser; The step of determining and generating the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot comprises: Generate a laser scanning path according to the preset size and the mirror shape; Determining the galvanometer control data according to the scanning path; The step of acquiring the first image data and the second image data taken by the camera comprises: Determine the first moment data of the laser spot at each position of the mirror surface of the makeup mirror and the total time data of the laser spot on the mirror surface according to the galvanometer control data; Determine the shooting time and exposure time of the first image data according to the first moment data; Determine the shooting time and exposure time of the second image data according to the total time data; After the step of determining the spot size data of the light spot according to the first image data, and determining the mirror angle of the mirror surface of the makeup mirror according to the spot size data, the method further includes: generating a mirror flatness curve according to the mirror angles of the mirror surface at different positions of the makeup mirror; determining the flatness information of the mirror surface of the makeup mirror according to a change of the mirror flatness curve, and determining surface abnormality information of the makeup mirror according to the flatness information and the second image data.

2. The product testing method for a cosmetic mirror production line according to claim 1, characterized in that: The step of determining the mirror angle of the mirror surface of the cosmetic mirror according to the light spot size data comprises: When the spot size data is larger than the preset size of the laser spot, determining that the angle between the mirror and the laser is smaller than the standard angle, and determining the mirror angle according to the spot size data; When the spot size data is equal to the preset size of the spot of the laser, determining that the angle between the mirror and the laser is equal to the standard angle, and determining the mirror angle according to the standard angle; When the spot size data is smaller than the preset size of the laser spot, it is determined that the angle between the mirror and the laser is greater than the standard angle, and the mirror angle is determined according to the spot size data.

3. The product testing method for a cosmetic mirror production line according to claim 1, characterized in that: The step of determining the surface abnormality information of the makeup mirror according to the second image data comprises: extracting data values ​​of the second image data according to an edge extraction algorithm, and generating an edge image; Abnormal information of the surface of the cosmetic mirror is determined according to the edge image.

4. A product inspection system for a cosmetic mirror production line, characterized in that: The production line is equipped with lasers, galvanometers and cameras. The product inspection system of the cosmetic mirror production line includes: a control module, used to control the laser to emit laser light toward the galvanometer, and control the galvanometer according to the galvanometer control data, so that the laser light is incident on the mirror surface position of the assembled makeup mirror at a preset angle, and the preset angle is different from the angle at which the camera photographs the makeup mirror; A shooting module, used for acquiring first image data and second image data shot by a camera, wherein a first exposure time length of the first image data is greater than a second exposure time length of the second image data; A calculation module, used to determine the spot size data of the light spot according to the first image data, and determine the mirror angle of the mirror surface of the makeup mirror according to the spot size data, and use the mirror angle as assembly verification information of the mirror surface of the makeup mirror and the shell of the makeup mirror; specifically: the light spot in the first image data is an elliptical spot, the spot size data is determined by the number of pixels occupied by the axis of the elliptical spot, and the mirror angle of the mirror surface of the makeup mirror is determined according to the spot size data; the assembly verification information is used to determine whether the assembly of the mirror surface of the makeup mirror and the shell of the makeup mirror is qualified, and whether it is qualified is determined by comparing a preset standard assembly angle with the mirror angle; the spot size data is the length of the axis in the elliptical spot that changes with the angle; an identification module, configured to determine surface abnormality information of the makeup mirror according to the second image data, wherein the surface abnormality information is defect information; Before controlling the galvanometer according to the galvanometer control data, the method further includes: determining and generating the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot; controlling the camera to capture third image data, and determining whether the makeup mirror is at a target position according to the third image data; when the makeup mirror is not at the target position, adjusting the relative position between the makeup mirror and the camera, and returning to execute controlling the camera to capture the third image data; when the makeup mirror is at the target position, determining to execute the control of the galvanometer according to the galvanometer control data; Before generating the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot, the method further includes: determining the preset size of the laser spot according to the distance between the galvanometer and the makeup mirror at the target position and the initial spot emitted by the laser; The step of determining and generating the galvanometer control data according to the mirror shape of the makeup mirror and the preset size of the laser spot comprises: generating a scanning path of the laser according to the preset size and the mirror shape; and determining the galvanometer control data according to the scanning path; The acquiring of the first image data and the second image data captured by the camera comprises: determining the first moment data of the laser spot at each position of the mirror surface of the makeup mirror and the total time data of the laser spot on the mirror surface according to the galvanometer control data; determining the shooting time and exposure time of the first image data according to the first moment data; and determining the shooting time and exposure time of the second image data according to the total time data; After determining the spot size data of the light spot according to the first image data, and determining the mirror angle of the mirror surface of the makeup mirror according to the spot size data, the method further includes: generating a mirror flatness curve according to the mirror angles of the mirror surface at different positions of the makeup mirror; determining the flatness information of the mirror surface of the makeup mirror according to a change of the flatness curve, and determining surface abnormality information of the makeup mirror according to the flatness information and the second image data.

5. A product inspection device for a cosmetic mirror production line, characterized in that: The device comprises: a memory, a processor, and a product inspection program for a makeup mirror production line stored in the memory and executable on the processor, wherein the product inspection program for the makeup mirror production line is configured to implement the steps of the product inspection method for a makeup mirror production line according to any one of claims 1 to 3.

6. A storage medium, characterized in that: The storage medium stores a product inspection program for a makeup mirror production line, and when the product inspection program for the makeup mirror production line is executed by the processor, the steps of the product inspection method for a makeup mirror production line according to any one of claims 1 to 3 are implemented.