A multi-product compatible appearance defect detection method, device and medium
By combining a robotic arm with an integrating sphere screen light source and a processor, the compatibility and cost issues of detecting appearance defects in different products have been resolved, enabling efficient and low-cost multi-product inspection.
Patent Information
- Application Number
- CN202410500587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-04-24
AI Technical Summary
Existing technologies are insufficient for detecting appearance defects in different products, resulting in low compatibility and high cost of testing equipment.
A multi-product compatible appearance defect detection method is adopted, which utilizes a robotic arm, video acquisition device and integrating sphere screen light source. The processor acquires product size and light intensity, sets the light source intensity and pattern, and acquires and processes video to detect defects.
It enables efficient and low-cost inspection of appearance defects in different products, has strong compatibility, reduces manpower requirements, and improves inspection efficiency and product yield.
Smart Images

Figure CN119310083B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of visual detection, and in particular to a multi-product compatible appearance defect detection method, device and medium. BACKGROUND
[0002] Machine vision is to use a computer to identify the image of an object to realize the extension of human visual function, and this technology can solve many problems in industrial image detection. Visual detection technology is a new detection technology based on machine vision research. The detection system based on visual sensor has the advantages of strong anti-interference ability, high efficiency and simple composition, and can improve the flexibility and automation of production.
[0003] Most of the existing machine vision detection devices are non-standard designs, and basically can only detect the appearance defects of one product or one type of product, and have low compatibility. When detecting the appearance defects of different products, different visual detection devices need to be designed, and the detection cost is high. SUMMARY
[0004] Therefore, the embodiments of the present application aim to provide a multi-product compatible appearance defect detection method, device and medium, which can detect the appearance defects of different products, has strong compatibility and low detection cost.
[0005] In a first aspect, the embodiments of the present application provide a multi-product compatible appearance defect detection method applied to a multi-product compatible appearance defect detection system, wherein the multi-product compatible appearance defect detection system comprises a mechanical hand, a video acquisition device, an integrating sphere screen light source and a processor, and the multi-product compatible appearance defect detection method comprises the following steps:
[0006] The mechanical hand is used to grab a product to be detected and move the product to be detected to a preset position;
[0007] The processor is used to acquire the appearance size of the product to be detected, and determine the motion path of the product to be detected according to the appearance size;
[0008] The processor is used to acquire the surface light intensity of the first surface of the product to be detected, set the light emission intensity and light emission pattern of the integrating sphere screen light source according to the surface light intensity, and the integrating sphere screen light source emits light to the product to be detected through the light emission pattern;
[0009] The video acquisition device is used to acquire the motion video of the product to be detected on the motion path, and send the motion video to the processor;
[0010] The processor is used to detect the appearance defects of the product to be detected after processing the motion video.
[0011] In some optional embodiments, after the processor detects the appearance defects of the product to be detected according to the motion video, the method further comprises:
[0012] The processor selects a shooting point coordinate according to the motion video, the shooting point coordinate representing a coordinate of the mechanical arm;
[0013] The processor corrects the motion path according to the shooting point coordinate.
[0014] In some optional embodiments, the method further comprises:
[0015] The processor sets a moving speed of the mechanical arm according to the motion path and a pattern library, the pattern library storing a plurality of the light-emitting patterns;
[0016] The processor controls the integrating sphere screen light source to switch different light-emitting patterns at different shooting point positions, the shooting point positions representing a coordinate interval of the mechanical arm;
[0017] The processor acquires a plurality of video frame images of different shooting point positions from the motion video, and determines the light-emitting pattern corresponding to the video frame image according to the video frame image to retain or switch the light-emitting pattern.
[0018] In some optional embodiments, after the processor acquires the appearance size of the product to be detected, the method further comprises:
[0019] The processor acquires a new light-emitting pattern and / or a light-emitting pattern combination of different shooting point positions, the light-emitting pattern combination representing a set of a plurality of the light-emitting patterns, and the plurality of the light-emitting patterns in the set being switched in sequence at the corresponding shooting point positions;
[0020] The processor controls the integrating sphere screen light source to randomly switch the new light-emitting pattern or sequentially switch a plurality of the light-emitting patterns in the light-emitting pattern combination corresponding to the shooting point position when the mechanical arm is located at the shooting point position.
[0021] In some optional embodiments, the processor sets the light-emitting intensity and the light-emitting pattern of the integrating sphere screen light source according to the surface light intensity, comprising:
[0022] The processor determines a shooting surface definition of the product to be detected according to the surface light intensity, the shooting surface definition representing a definition of each part of a surface of the product to be detected after imaging;
[0023] The integral sphere screen light source is set according to the shooting surface definition, and the light-emitting pattern and the light-emitting intensity of each part of the light-emitting pattern are set so that the light-emitting pattern irradiates the shooting surface of the product to be detected after light emission, and each part of the shooting surface has a preset light intensity.
[0024] In some optional embodiments, after the integral sphere screen light source is set according to the surface light intensity, the method further comprises:
[0025] When the mechanical arm moves the first preset distance, the mechanical arm is controlled to rotate so that the second surface of the product to be detected is opposite the integral sphere screen light source.
[0026] The processor sets the light-emitting pattern and the light-emitting intensity of each part of the light-emitting pattern of the integral sphere screen light source according to the surface light intensity of the second surface of the product to be detected.
[0027] In some optional embodiments, the mechanical arm comprises at least a first six-axis mechanical arm and a second six-axis mechanical arm, and the method further comprises:
[0028] The first six-axis mechanical arm moves the product to be detected on the movement path.
[0029] When the first six-axis mechanical arm moves the first preset distance or rotates the product to be detected to make a plurality of surfaces other than the grabbing surface opposite the integral sphere screen light source, the second six-axis mechanical arm grabs the surface of the product to be detected that has been opposite the integral sphere screen light source, and the grabbing surface represents the surface of the product to be detected in contact with the first six-axis mechanical arm.
[0030] The second six-axis mechanical arm continues to move the product to be detected on the remaining movement path, so that the grabbing surface and other unshot surfaces of the product to be detected are opposite the integral sphere screen light source in turn, and the video acquisition device is used to shoot to obtain the motion video.
[0031] In some optional embodiments, after the processor processes the motion video, the appearance defects of the product to be detected are detected, and the method comprises:
[0032] The processor acquires video frame images of different surfaces of the product to be detected under different light-emitting patterns.
[0033] The processor detects the appearance defects of the product to be detected according to the video frame images.
[0034] In the case that the same unclear part exists in all the video frame images of the same surface, an error report is generated, the error report including the image, coordinates and the light emitting pattern of the unclear part.
[0035] In a second aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the method described above.
[0036] In a third aspect, an embodiment of the present application provides a computer readable storage medium, which stores a processor executable program, wherein the processor executable program, when executed by a processor, is used to execute the method described above.
[0037] The implementation of the embodiment of the present application has the following beneficial effects: the embodiment of the present application provides a multi-product compatible appearance defect detection method, comprising: grabbing a product to be detected by a mechanical hand and moving the product to be detected to a preset position; acquiring the appearance size of the product to be detected by the processor, and determining the motion path of the product to be detected according to the appearance size; acquiring the surface illumination intensity of the first surface of the product to be detected by the processor, and setting the light emitting intensity and light emitting pattern of the integrating sphere screen light source according to the surface illumination intensity, the integrating sphere screen light source emitting light to the product to be detected through the light emitting pattern; collecting the motion video of the product to be detected on the motion path by the video acquisition device, and sending the motion video to the processor; detecting the appearance defect of the product to be detected after the processor processes the motion video. Different products are grabbed by the mechanical hand, the processor sets different motions according to the appearance size of the product, and the light emitting pattern and light emitting intensity of the integrating sphere screen light source are set according to the illumination intensity of the product detection surface, so that the surface of the product is clearly photographed and then defect detection is performed, the appearance defect of different products can be detected, the compatibility is strong, and the detection cost is low. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a structural schematic diagram of a multi-product compatible appearance defect detection system provided by the embodiment of the present application;
[0039] Figure 2 is a flowchart of a multi-product compatible appearance defect detection method provided by the embodiment of the present application;
[0040] Figure 3 is a structural schematic block diagram of a computer device provided by the embodiment of the present application;
[0041] Reference signs: mechanical arm 101, suction cup 102, product to be detected 103, first video camera 201, second video camera 202, third video camera 203, integrating sphere screen light source 204, processor 301, mechanical arm communication line 302, video camera communication line 303, light source driving and communication line 304. DETAILED DESCRIPTION
[0042] Embodiments of the present application are described in detail below with reference to examples of embodiments shown in the accompanying drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are only used to explain the present application and cannot be understood as a limitation of the present application.
[0043] In the description of the present application, it should be understood that the orientation description, such as the orientation or position relationship indicated by up, down, front, back, left, right, etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as a limitation of the present application.
[0044] In the description of the present application, the meaning of several is one or more, and the meaning of multiple is more than two. Greater than, less than, more than, etc. are understood as not including the number, and above, below, etc. are understood as including the number. If it is described as first, second, it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the order of indicated technical features.
[0045] In the description of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and those skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.
[0046] First, the implementation environment of the present application is exemplarily described, and the present example is not a limitation on the specific device structure, but a specific implementation environment in which the technical solution of the present application can be executed. Referring to Figure 1 , Figure 1 The schematic diagram of the implementation environment of the embodiment of the present application, the multi-product compatible appearance defect detection system of the present embodiment includes a mechanical arm 101, a video acquisition device, an integrating sphere screen light source 204 and a processor 301. The mechanical arm 101 includes a multi-axis mechanical arm 101, and the present embodiment takes a six-axis mechanical arm as an example. The video acquisition device includes a plurality of video cameras, and the present embodiment takes three video cameras as an example, i.e. a first video camera 201, a second video camera 202 and a third video camera 203.
[0047] The integral sphere screen light source 204 displays a corresponding light-emitting pattern on the screen after receiving the processed control instructions through the light source drive and communication line 304; can provide four-color RGBW illumination, uses HDMI (High Definition Multimedia Interface) for high-speed pattern transmission, can improve the light-emitting pattern switching speed of the integral sphere screen light source 204, thereby improving the product testing efficiency; the integral sphere screen light source 204 can provide stereoscopic structured light illumination, adopts a hemispherical design, thereby simulating light incidence at various angles; simulates traditional light source illumination, and has wide applicability.
[0048] The six-axis robot: moves or rotates after receiving the control instructions of the processor 301 through the robot communication line 302.
[0049] The video camera: captures the video of the product surface illuminated by the integral sphere screen light source 204.
[0050] The processor 301: sends control instructions through the robot communication line 302 and the light source drive and communication line 304, receives the video captured by the video camera through the video camera communication line 303, and detects the appearance defects of the product after processing the video.
[0051] The control method of the embodiment of the present application will be further described below based on the implementation environment shown in the accompanying drawings. Figure 1
[0052] Refer to Figure 2 , Figure 2 A flowchart of a multi-product compatible appearance defect detection method provided by the embodiment of the present application, the multi-product compatible appearance defect detection method includes but is not limited to the following steps:
[0053] S201, the product to be detected 103 is grabbed by the robot 101, and the product to be detected 103 is moved to a preset position;
[0054] S202, the appearance size of the product to be detected 103 is acquired by the processor 301, and the motion path of the product to be detected 103 is determined according to the appearance size;
[0055] S203, the surface light intensity of the first surface of the product to be detected 103 is acquired by the processor 301, the light-emitting intensity and the light-emitting pattern of the integral sphere screen light source 204 are set according to the surface light intensity, and the integral sphere screen light source 204 emits light to the product to be detected 103 through the light-emitting pattern;
[0056] S204, the motion video of the product to be detected 103 on the motion path is collected by the video acquisition device, and the motion video is sent to the processor 301;
[0057] S205, detecting the appearance defects of the product 103 by processing the motion video by the processor 301.
[0058] It should be noted that the mechanical arm 101 adopts a multi-axis mechanical arm 101, and the embodiment adopts a six-axis mechanical arm. The six-axis mechanical arm can grasp the product 103 to be detected through the suction cup 102 arranged at the grasping position. The suction cup 102 can grasp products of different sizes, and has strong applicability. The video acquisition device directly obtains the video image stream of the product 103 to be detected through the video recording mode, avoids the traditional imaging switching time, and has high detection efficiency. The six-axis mechanical arm grasps the center position of the first surface of the product 103 to be detected, and moves the product 103 to be detected to a preset position. The preset position is the starting position of shooting, and is specifically set according to actual needs. The appearance size information of the product 103 to be detected is input into the processor 301. The processor 301 automatically generates a motion path of the product 103 to be detected according to the appearance size of the product 103 to be detected, so as to set different motion paths according to different products, and has strong applicability. A light intensity detector is arranged at the video acquisition device, or at other positions that do not affect the screen light source 204 of the integrating sphere. The specific position is not limited here. The light intensity detector detects the light intensity of each part of the detection surface (i.e. the surface opposite to the screen light source 204 of the integrating sphere) of the product 103 to be detected. By arranging the light intensity detector at the video acquisition device, the light intensity of the detection surface collected by the shooting angle of the video acquisition device can be detected. When the light intensity detector is arranged at other positions, the reflection of the detection surface is affected or changes when reaching the video acquisition device. The detection is more accurate. The light intensity and light pattern of the screen light source 204 of the integrating sphere are set according to the light intensity of the detection surface, so that each part of the detection surface is illuminated and has a corresponding light intensity. Then, the motion video of the product 103 to be detected on the motion path is collected by the video acquisition device, and the motion video is sent to the processor 301. The processor 301 extracts the video frame image of the corresponding position from the motion video, and detects the appearance defects of the product 103 to be detected through the video frame image. Only the appearance size parameters of the product need to be input, and the path can be automatically planned, the light intensity and light pattern of the screen light source 204 of the integrating sphere can be automatically set, the shooting can be automatically performed, and the effect can be automatically determined. The manpower is saved, and the product yield is improved.
[0059] In some optional embodiments, Figure 2 The step 205 shown includes but is not limited to: the processor 301 selects a shooting point coordinate meeting the shooting requirements according to the motion video. The shooting point coordinate represents the coordinate of the mechanical arm 101. The processor 301 corrects the motion path according to the shooting point coordinate.
[0060] Specifically, the shooting point coordinates are the coordinates of the six-axis robot corresponding to the video frame image intercepted by the processor 301. If the definition of the video frame image meets the preset requirement, the six-axis robot coordinates corresponding to the video frame image are retained, and if it does not meet the requirement, the six-axis robot coordinates are removed. The preset requirement can be definition score, defect obviousness, etc., which is not limited here. After processing the shooting point coordinates corresponding to the video frame images of the entire motion path, all shooting point coordinates meeting the requirement are obtained, and the shooting point coordinates are corrected to the motion path, that is, the corrected motion path only needs to pass through the shooting point coordinates meeting the requirement. In the next shooting of the same product, the corrected motion path is directly called, and shooting at the shooting point is ensured, so that the detection efficiency is greatly improved.
[0061] In some optional embodiments, the principle and formula for determining the motion path of the product 103 to be detected according to the appearance size are as follows:
[0062] The safe running space coordinate range of the six-axis robot is set in advance, the center position of the six-axis robot is denoted as x0, y0, z0, r0, u0, v0, the appearance size of the product is denoted as l0, w0, h0, and the coordinates of each corner point of the product are calculated according to the space matrix.
[0063] For example, the coordinates of the left upper corner of the product are calculated as follows:
[0064]
[0065]
[0066]
[0067] Thus, the coordinates (x1, y1, z1) of the left upper corner of the product are calculated, the coordinate set of the left upper corner of the product in the entire movement process is obtained, and the coordinates of the robot 101 are determined. The coordinates of the robot 101 can be automatically obtained or calculated according to the coordinates of the left upper corner of the product, and the motion path of the product is determined. The working distance and the field of view size of the video acquisition device are known, and the robot 101 can move completely in the camera field of view according to the default rule, that is, the product is photographed once, so that full coverage of the product appearance surface detection is realized.
[0068] In some optional embodiments, the method further includes: the processor 301 sets the moving speed of the robot 101 according to the motion path and the pattern library, and the pattern library stores a plurality of light emitting patterns; the processor 301 controls the integral sphere screen light source 204 to switch different light emitting patterns at different shooting point positions, and the shooting point position represents the coordinate interval of the robot 101; the processor 301 obtains a plurality of video frame images of different shooting point positions from the motion video, and determines the light emitting pattern corresponding to the video frame image to be retained or switched according to the video frame image.
[0069] Specifically, the processor 301 sets the moving speed of the mechanical arm 101 according to the pattern library. The faster the mechanical arm 101 moves, the fewer the light-emitting patterns switched in a unit moving distance. Therefore, the processor 301 sets the moving speed of the mechanical arm 101 to ensure that the light-emitting patterns in the pattern library can be switched in the moving path, so that the product 103 to be detected held by the mechanical arm 101 can be irradiated by the light-emitting patterns in the pattern library and photographed by the video acquisition device. Thus, it is convenient to find the light-emitting patterns suitable for different shooting points. After the video acquisition device photographs the moving video of the product 103 to be detected, the processor 301 extracts a plurality of video frame images of different shooting points from the moving video, and the different video frame images include different light-emitting patterns. That is, at least one video frame image is acquired to display the effect of a light-emitting pattern irradiating on the product 103 to be detected, so as to determine the imaging effect of the product 103 to be detected under the irradiation of the light-emitting pattern, and determine whether to retain the light-emitting pattern. The next detection of the same product can be quickly positioned and detected, and the detection efficiency is high.
[0070] In some optional embodiments, after the processor 301 acquires the appearance size of the product 103 to be detected, the processor 301 acquires a new light-emitting pattern and / or a light-emitting pattern combination of different shooting points. The light-emitting pattern combination represents a set of a plurality of light-emitting patterns, and the plurality of light-emitting patterns in the set are switched in turn at the corresponding shooting points. The processor 301 controls the integrating sphere screen light source 204 to randomly switch the new light-emitting pattern or sequentially switch the plurality of light-emitting patterns in the light-emitting pattern combination corresponding to the shooting point when the mechanical arm 101 is located at the shooting point.
[0071] Specifically, when the processor 301 acquires a new appearance size, the input interface can prompt whether to add a new light-emitting pattern. If there are other new light-emitting patterns and the new pattern is specified as the light-emitting pattern for detection, the new light-emitting pattern is randomly switched to irradiate the product 103 to be detected for photography. If the new pattern is added to the pattern library, the moving speed of the mechanical arm 101 is set as described in the above embodiments, and all the light-emitting patterns in the pattern library are sequentially irradiated on the product 103 to be detected for photography. The patterns in the pattern library can also be specified to be partially irradiated. The light-emitting patterns not specified are not switched by the integrating sphere screen light source 204 during the movement of the mechanical arm 101. The same set of light-emitting patterns can also be specified to be used at different shooting points, so that the set of light-emitting patterns is exhausted at different shooting points, that is, all the light-emitting patterns in the set are completely switched by the integrating sphere screen light source 204 at each shooting point.
[0072] In some optional embodiments, the light intensity and light pattern of the integrating sphere screen light source 204 are set according to the surface light intensity, including: determining the shooting surface definition of the product to be detected 103 according to the surface light intensity, the shooting surface definition representing the definition of each part of the surface of the product to be detected 103 after imaging; and setting the light pattern and the light intensity of each part of the light pattern of the integrating sphere screen light source 204 according to the shooting surface definition, so that the shooting surface of the product to be detected 103 is irradiated after the light pattern of the light pattern is emitted, and each part of the shooting surface has a preset light intensity.
[0073] Specifically, before the shooting of the collecting device, the light intensity of each part of the shooting surface of the product to be detected 103 (i.e. the surface light intensity, which indicates the light intensity of each part of the shooting surface) is detected by the light intensity detector arranged at the collecting device. The processor 301 compares the light intensity of each part with the preset light intensity, and sets the corresponding light pattern and light intensity of each part according to the comparison result; for example, if the light intensity of the shooting surface A area obtained by the processor 301 is less than the preset light intensity, it is detected whether the A light-emitting area of the integrating sphere screen light source 204 corresponding to the shooting surface A area emits light, if the A light-emitting area emits light, the light intensity of the A light-emitting area is enhanced, if the A light-emitting area does not emit light, the A light-emitting area is caused to emit light, and after the light of the A light-emitting area irradiates the shooting surface A area, the shooting surface A area detected by the light intensity detector has the preset light intensity; for example, if the light intensity of the shooting surface B area obtained by the processor 301 is greater than the preset light intensity, the light intensity of the B light-emitting area of the integrating sphere screen light source 204 corresponding to the shooting surface B area is detected, and the light intensity of the B light-emitting area is reduced by a corresponding degree according to the difference between the light intensity of the shooting surface B area and the preset light intensity, or the B light-emitting area of the integrating sphere screen light source 204 is closed, so that the shooting surface B area detected by the light intensity detector has the preset light intensity. The preset light intensity of the shooting surface B area and the preset light intensity of the shooting surface A area can be the same or different, which is set according to actual needs, and is not limited here. When the light intensity of the several areas of the shooting surface is processed, the several light-emitting areas of the integrating sphere screen light source 204 corresponding to the several areas of the shooting surface are obtained, and thus the light pattern and the light intensity are obtained.
[0074] In some optional embodiments, after the light intensity and the light pattern of the integrating sphere screen light source 204 are set according to the surface light intensity, including: in the case that the mechanical arm 101 moves a first preset distance, the mechanical arm 101 is controlled to rotate by the processor 301, so that the second surface of the product to be detected 103 is opposite to the integrating sphere screen light source 204; and the processor 301 sets the light pattern and the light intensity of each part of the light pattern of the integrating sphere screen light source 204 according to the surface light intensity of the second surface of the product to be detected 103.
[0075] Specifically, the robot 101 can rotate the product 103 to be detected, so that different surfaces of the product 103 to be detected are taken as the shooting surface. After the first surface is shot, the robot 101 runs a first preset distance and stops, rotates to the second surface of the product 103 to be detected, so that the second surface of the product 103 to be detected is opposite to the screen light source 204 of the integrating sphere as the shooting surface; and the robot 101 is restarted, and after the robot 101 moves, the corresponding light-emitting pattern and light-emitting intensity are set according to the light intensity of each part of the second surface of the product 103 to be detected, and the video acquisition device is used for shooting. The other surfaces are also opposite to the screen light source 204 of the integrating sphere as the shooting surface after the robot 101 rotates, which will not be described here.
[0076] In some optional embodiments, the robot 101 includes at least a first six-axis robot and a second six-axis robot, and the method further includes: moving the product 103 to be detected on the movement path by the first six-axis robot; in the case that the first six-axis robot moves a first preset distance or rotates the product 103 to be detected to make the surfaces other than the grasping surface opposite to the screen light source 204 of the integrating sphere, the surface that has been opposite to the screen light source 204 of the integrating sphere is grasped by the second six-axis robot on the product 103 to be detected, and the grasping surface represents the surface of the product 103 to be detected in contact with the first six-axis robot; the product 103 to be detected is moved on the remaining movement path by the second six-axis robot, so that the grasping surface and the other surfaces not yet shot of the product 103 to be detected are opposite to the screen light source 204 of the integrating sphere in turn, and the video acquisition device is used for shooting to obtain the motion video.
[0077] Specifically, the robot 101 includes at least two, that is, a first six-axis robot and a second six-axis robot, the product 103 to be detected is moved on the movement path by the first six-axis robot and is shot by the acquisition device; since the first six-axis robot contacts the product 103 to be detected when grasping the product 103 to be detected, the contact surface of the first six-axis robot cannot be rotated opposite to the screen light source 204 of the integrating sphere, or can be rotated but there is a blind area due to the grasping of the first six-axis robot, therefore, after the first six-axis robot rotates the product 103 to be detected to complete the shooting of the multiple surfaces (that is, opposite to the screen light source 204 of the integrating sphere), the surface of the product 103 to be detected that has been shot is grasped by the second six-axis robot, and the product 103 to be detected is moved on the remaining movement path, so that the surface of the product 103 to be detected that has not been shot is rotated opposite to the screen light source 204 of the integrating sphere to complete the shooting.
[0078] In some optional embodiments, the appearance defects of the product 103 to be detected are detected after the motion video is processed by the processor 301, including: the processor 301 acquires video frame images of different surfaces of the product 103 to be detected under different light emitting patterns; the processor 301 detects the appearance defects of the product 103 to be detected according to the video frame images; in the case that the same unclear part exists in all video frame images of the same surface, an error report is generated, and the error report includes the image, coordinates and light emitting pattern of the unclear part.
[0079] Specifically, after the processor 301 receives the motion video, a plurality of video frame images are intercepted from the motion video, and the plurality of video frame images contain video frame images of different surfaces of the product 103 to be detected under different light emitting patterns, so that whether the use of the light emitting pattern is appropriate is determined by detecting different video frame images, and if appropriate, it is retained and directly called when the same product is detected next time, so that the detection efficiency is high. And the appearance defects of the product 103 to be detected are detected from the appropriate video frame images. If there is a part that is blurred or cannot be photographed under the irradiation of different light emitting patterns, an error report is generated, and the error report is stored and sent to the mailbox of the technical personnel and the corresponding display interface, reminding the technical personnel to handle in time. The error report includes the image, specific coordinates and light emitting pattern of the unclear part.
[0080] The embodiment of the present application has the following beneficial effects: the embodiment of the present application provides a multi-product compatible appearance defect detection method, which comprises the following steps: a mechanical hand 101 is used to grab a product 103 to be detected and move the product 103 to be detected to a preset position; a processor 301 is used to acquire the appearance size of the product 103 to be detected, and determine the motion path of the product 103 to be detected according to the appearance size; the processor 301 is used to acquire the surface light intensity of the first surface of the product 103 to be detected, set the light-emitting intensity and light-emitting pattern of an integrating sphere screen light source 204 according to the surface light intensity, and the integrating sphere screen light source 204 emits light to the product 103 to be detected through the light-emitting pattern; a video acquisition device is used to acquire the motion video of the product 103 to be detected on the motion path, and send the motion video to the processor 301; and the processor 301 is used to detect the appearance defect of the product 103 to be detected after processing the motion video. The mechanical hand 101 is used to grab different products, the processor 301 sets different motions according to the appearance size of the products, and sets the light-emitting pattern and light-emitting intensity of the integrating sphere screen light source 204 according to the light intensity of the detection surface of the product, so that the surface of the product is clearly photographed and then defect detection is performed, the appearance defect of different products can be detected, the compatibility is strong, and the detection cost is low. Only the product size parameters need to be input, the path can be automatically planned, the photographing can be automatically performed, the effect can be automatically determined, the manpower can be saved, and the product yield can be improved. The video mode is adopted to directly acquire the video image stream, and the switching time of traditional imaging is avoided. The six-axis mechanical hand can be used for product space posture adjustment. The suction cup 102 is arranged at the grabbing position of the six-axis mechanical hand, and different products of different sizes can be flexibly compatible. The screen display light-emitting pattern of the integrating sphere screen light source 204 can simulate the seamless switching of the structured light and the traditional lighting environment.
[0081] As shown in the second aspect, Figure 3 The computer device can be a terminal. The computer device comprises a processor, a memory and a network interface connected through a system bus. The memory can comprise a non-volatile storage medium and an internal memory. The non-volatile storage medium can store an operating system and a computer program. The computer program comprises program instructions which, when executed, can cause the processor to perform any one of the industrial equipment visualization management methods. The processor is used to provide computing and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the computer program in the non-volatile storage medium to run. When the computer program is executed by the processor, the processor can perform any one of the industrial equipment visualization management methods. The network interface is used for network communication, such as sending assigned tasks. Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of part of the structure related to the present disclosure, and does not constitute a limitation on the computer device to which the present disclosure is applied. The specific computer device can comprise more structures than those shown in the figure.Figure 3 More or less components than those shown in the figures are implemented, or certain components are combined, or different component arrangements are provided. It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. In one embodiment, the processor is configured to run a computer program stored in the memory to perform the following steps: the mechanical hand 101 grasps the product to be detected 103 and moves the product to be detected 103 to a preset position; the processor 301 acquires the appearance size of the product to be detected 103, and determines the motion path of the product to be detected 103 according to the appearance size; the processor 301 acquires the surface light intensity of the first surface of the product to be detected 103, sets the light intensity and light pattern of the integrating sphere screen light source 204 according to the surface light intensity, and the integrating sphere screen light source 204 emits light to the product to be detected 103 through the light pattern; the video acquisition device acquires the motion video of the product to be detected 103 on the motion path, and sends the motion video to the processor 301; and the processor 301 detects the appearance defects of the product to be detected 103 after processing the motion video.
[0082] It can be seen that the contents in the above method embodiments are all applicable to the present device embodiments, the present device embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0083] In addition, the present application also discloses a computer program product or a computer program, which is stored in a computer readable storage medium. The processor of the computer device can read the computer program from the computer readable storage medium, and the processor executes the computer program, so that the computer device executes the above method. Similarly, the contents in the above method embodiments are all applicable to the present storage medium embodiments, the present storage medium embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0084] It is to be understood that all or some of the steps, systems, etc. in the methods disclosed above can be implemented in software, firmware, hardware, and any suitable combination thereof. Some or all of the physical components can be implemented in software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or in hardware, or in an integrated circuit, such as an application- specific integrated circuit. Such software can be distributed on computer readable media, which can comprise computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, computer storage media includes all computer-readable media in which data, computer executable instructions, or other computer readable data is permanently, non- transitorily, or semi-permanently stored or maintained. Computer storage media includes, but is not limited to, random access memory (RAM), read only memory (ROM), EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. Further, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
[0085] The above detailed description of the embodiments of the present application has been given in connection with the accompanying drawings, but the present application is not limited to the above-described embodiments, and various changes can be made within the scope of knowledge of those skilled in the art without departing from the spirit of the present application.
Claims
1. A multi-product compatible appearance defect detection method, characterized by, The application is applied to a multi-product compatible appearance defect detection system, which comprises a mechanical hand, a video acquisition device, an illumination intensity detector, an integrating sphere screen light source and a processor, the illumination intensity detector is arranged at the video acquisition device, the illumination intensity of each part of the detection surface of the product to be detected is detected through the illumination intensity detector, and the multi-product compatible appearance defect detection method comprises: The product to be detected is grabbed by the mechanical hand and moved to a preset position; The appearance size of the product to be detected is acquired by the processor, and the movement path of the product to be detected is determined according to the appearance size; The surface illumination intensity of the first surface of the product to be detected is acquired by the processor, and the luminous intensity and luminous pattern of the integrating sphere screen light source are set according to the surface illumination intensity, so that each part of the detection surface is illuminated and has a preset illumination intensity, and the integrating sphere screen light source emits light to the product to be detected through the luminous pattern; The movement video of the product to be detected on the movement path is acquired by the video acquisition device, and the movement video is sent to the processor; The appearance defect of the product to be detected is detected after the movement video is processed by the processor; The movement speed of the mechanical hand is set by the processor according to the movement path and the pattern library, and the pattern library stores a plurality of luminous patterns; by setting the movement speed of the mechanical hand, it is ensured that the luminous patterns in the pattern library can be switched in the movement path, and the product to be detected grabbed by the mechanical hand can be irradiated by the luminous patterns in the pattern library and photographed by the video acquisition device; The processor controls the integrating sphere screen light source to switch different luminous patterns at different shooting points, and the shooting point represents the coordinate interval of the mechanical hand; The processor acquires a plurality of video frame images of different shooting points from the movement video, and determines the luminous pattern corresponding to the video frame image to be retained or switched according to the video frame image; The setting of the luminous intensity and the luminous pattern of the integrating sphere screen light source according to the surface illumination intensity comprises: The shooting surface definition of the product to be detected is determined according to the surface illumination intensity, and the shooting surface definition represents the definition of each part of the surface of the product to be detected after imaging; The luminous pattern and the luminous intensity of each part of the luminous pattern of the integrating sphere screen light source are set according to the shooting surface definition, so that the shooting surface of the product to be detected is irradiated after the luminous pattern emits light, and each part of the shooting surface has a preset illumination intensity.
2. The method of claim 1, wherein, After the appearance defect of the product to be detected is detected by the processor after processing the movement video, it comprises: The processor selects a shooting point coordinate meeting the shooting requirement according to the movement video, and the shooting point coordinate represents the coordinate of the mechanical hand; The processor corrects the movement path according to the shooting point coordinate.
3. The method of claim 1, wherein, After the appearance size of the product to be detected is acquired by the processor, it comprises: The processor acquires a new light-emitting pattern and / or a combination of light-emitting patterns corresponding to different shooting positions, the combination of light-emitting patterns representing a set of multiple light-emitting patterns, and the multiple light-emitting patterns in the set are switched in turn at the corresponding shooting positions; The processor controls the integrating sphere screen light source to randomly switch the new light-emitting pattern or switch the multiple light-emitting patterns in the combination of light-emitting patterns corresponding to the shooting position in a case where the mechanical arm is located at the shooting position.
4. The method of claim 1, wherein, After the light-emitting intensity and the light-emitting pattern of the integrating sphere screen light source are set according to the surface light intensity, the method further includes: In a case where the mechanical arm moves by a first preset distance, the processor controls the mechanical arm to rotate so that a second surface of the product to be detected is relative to the integrating sphere screen light source; The processor sets the light-emitting pattern and the light-emitting intensity of each part of the light-emitting pattern of the integrating sphere screen light source according to the surface light intensity of the second surface of the product to be detected.
5. The method of claim 4, wherein, The mechanical arm includes at least a first six-axis mechanical arm and a second six-axis mechanical arm, and the method further includes: The first six-axis mechanical arm moves the product to be detected on the movement path; In a case where the first six-axis mechanical arm moves by the first preset distance or rotates the product to be detected to make a plurality of surfaces other than a grabbing surface relative to the integrating sphere screen light source, the second six-axis mechanical arm grabs the surface of the product to be detected that has been relative to the integrating sphere screen light source, and the grabbing surface represents a surface of the product to be detected in contact with the first six-axis mechanical arm; The second six-axis mechanical arm continues to move the product to be detected on the remaining movement path so that the grabbing surface and other surfaces not yet photographed of the product to be detected are relative to the integrating sphere screen light source in turn, and the video capture device photographs to obtain the motion video.
6. The method of claim 1, wherein, After the processor processes the motion video, the appearance defects of the product to be detected are detected, including: The processor acquires video frame images of different surfaces of the product to be detected under different light-emitting patterns; The processor detects the appearance defects of the product to be detected according to the video frame images; In a case where the same unclear part exists in all the video frame images of the same surface, an error report is generated, and the error report includes an image, coordinates, and the light-emitting pattern of the unclear part.
7. A computer device, wherein, The computer device includes a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program is executed by the processor to implement the steps of the method according to any one of claims 1-6.
8. A computer-readable storage medium having stored therein a program that is executable by a processor, the program comprising instructions for causing the processor to perform the method of any one of claims 1 to 7. The program executable by the processor when executed by the processor is used to execute the method according to any one of claims 1-6.
Citation Information
Patent Citations
Visual inspection method for appearance defects of reflective plane
CN112924468A
Method and device capable of realizing switching of multiple light sources
CN115665933A