Visual inspection system and control method, device and storage medium thereof
By introducing workpiece sensing devices and encoder management mechanisms into the vision detection system, the problem of picture shooting deviation in dynamic visual detection is solved, and the efficiency and accuracy of the detection system are improved.
Patent Information
- Application Number
- CN202410558821.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-05-08
AI Technical Summary
The existing vision detection system is prone to image shooting deviations in dynamic vision detection, resulting in a decrease in the accuracy of image recognition detection.
A visual detection system is designed, including a first image acquisition device, a transmission device, a workpiece sensing device and a control device. The workpiece is sensed through the workpiece sensing device, the control device locks the signal receiving port, and sets the encoder of the transmission device to zero and counts again. When the encoder count reaches the preset code trigger value, the first image acquisition device is controlled to collect the workpiece picture for detection; when the count reaches the code lock value, the locking of the signal receiving port is released.
The workpiece is sensed through the workpiece sensing device to reset the encoder value, and accurately trigger the camera to shoot based on the preset coded trigger value, which improves system coordination and enhances the detection efficiency and accuracy of the visual detection system.
Smart Images

Figure CN118425045B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic detection technology, and in particular to a visual detection system and a control method, device and storage medium thereof. Background Art
[0002] The visual inspection system is an automated system that uses machines to replace human eyes for measurement and judgment. It obtains images or videos of the objects to be inspected through industrial cameras, lenses, light sources and other equipment, and then uses computer vision and image processing algorithms to process and analyze the images to achieve functions such as object recognition, detection, and positioning. The core of the visual inspection system is image processing technology, including steps such as image acquisition, preprocessing, feature extraction and analysis. The visual inspection system is an efficient and accurate automated inspection technology that can greatly improve production efficiency and product quality, and reduce labor costs and scrap rates. At present, in order to improve the efficiency of product visual inspection, dynamic visual inspection is usually achieved by coordinating multiple devices. Usually, a conveyor belt is used to carry the workpiece, and a camera gimbal is set on the conveyor belt to adjust the shooting according to the preset posture. Although this follow-up shooting method can improve the detection efficiency, it is prone to picture shooting deviation, thereby reducing the accuracy of subsequent image recognition detection. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a visual inspection system and a control method, device and storage medium thereof, which can improve the efficiency and accuracy of visual inspection.
[0004] On the one hand, an embodiment of the present invention provides a visual inspection system, comprising: a first image acquisition device, a conveying device, a workpiece sensing device and a control device, wherein the first image acquisition device, the conveying device and the workpiece sensing device are all connected to the control device, the first image acquisition device is arranged above the conveying device, the first image acquisition device comprises a plurality of posture-adjustable cameras, and the workpiece sensing device is arranged at a workpiece entrance side of the first image acquisition device;
[0005] The control device is used for:
[0006] Obtain the code trigger value, code lock value and camera control program according to the current workpiece type;
[0007] Monitor the sensing signal from the workpiece sensing device through the signal receiving port;
[0008] When the sensing signal is received, the signal receiving port is locked, and the encoder of the transmission device is reset to zero and then counted again;
[0009] When the encoder count reaches the encoding trigger value, the first image acquisition device is controlled to acquire a workpiece image for detection according to the camera control program;
[0010] When the encoder count reaches the encoder lock value, the signal receiving port is unlocked.
[0011] According to some embodiments of the present invention, the coding trigger value is pre-stored in the control device, and the coding trigger value is determined by the following steps:
[0012] Starting from receiving the sensing signal from the workpiece sensing device, controlling the first image acquisition device to take pictures according to the initial point position of the camera control program at every encoder value to obtain a plurality of first pictures;
[0013] A plurality of the first pictures are displayed to select a first picture that meets the requirements, and an encoder value corresponding to the selected first picture is used as the encoding trigger value.
[0014] According to some embodiments of the present invention, the code lock value is pre-stored in the control device, and the code lock value is determined by the following steps:
[0015] converting the encoder value into a unit distance according to the operating speed of the conveyor;
[0016] Get the workpiece length of the corresponding workpiece type;
[0017] A coding lock value is determined according to the workpiece length and the unit distance.
[0018] According to some embodiments of the present invention, the visual inspection system further includes a second image acquisition device and a robotic arm, the first image acquisition device, the conveying device and the workpiece sensing device are all arranged on the first workstation, the second image acquisition device is arranged on the second workstation, the second image acquisition device is used to acquire the upper surface image of the workpiece, the first image acquisition device is used to acquire the side image of the workpiece, the robotic arm is arranged between the first workstation and the second workstation, and the robotic arm is used to transport the workpiece on the second workstation to the first workstation.
[0019] According to some embodiments of the present invention, the control device is further used for:
[0020] Acquire the upper surface image of the workpiece by the second image acquisition device;
[0021] The type of the workpiece is determined according to the upper surface image of the workpiece.
[0022] According to some embodiments of the present invention, the control device verifies the camera control program through the following steps:
[0023] Controlling the first image acquisition device to acquire images of the calibration workpiece according to the camera control program to obtain a plurality of second images, wherein the joint inflection points of the calibration workpiece are provided with labels;
[0024] Performing label recognition on the plurality of second images respectively to obtain label recognition results;
[0025] The camera control program is verified according to the tag recognition result. When each tag in the tag recognition result is complete, the camera control program passes the verification.
[0026] According to some embodiments of the present invention, the control device verifies the mechanical state of the camera in the visual inspection system through the following steps:
[0027] Adjust the camera posture according to the self-checking point, and control the camera to shoot the calibration plate to obtain a calibration picture;
[0028] Determine calibration point search data according to the calibration image;
[0029] The calibration point data is compared with the template data. When the calibration point data is identical to the template data, the mechanical state of the camera passes the verification.
[0030] On the other hand, an embodiment of the present invention further provides a control method of a visual inspection system, comprising the following steps:
[0031] Obtain the code trigger value, code lock value and camera control program according to the current workpiece type;
[0032] Monitor the sensing signal from the workpiece sensing device through the signal receiving port;
[0033] When the sensing signal is received, the signal receiving port is locked, and the encoder of the transmission device is reset to zero and then counted again;
[0034] When the encoder count reaches the encoding trigger value, the first image acquisition device is controlled to acquire a workpiece image for detection according to the camera control program;
[0035] When the encoder count reaches the encoder lock value, the signal receiving port is unlocked.
[0036] On the other hand, an embodiment of the present invention further provides a control device for a visual inspection system, comprising:
[0037] at least one processor;
[0038] at least one memory for storing at least one program;
[0039] When the at least one program is executed by the at least one processor, the at least one processor implements the control method of the visual inspection system as described above.
[0040] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the control method of the visual inspection system as described above.
[0041] The above technical solution of the present invention has at least one of the following advantages or beneficial effects: the workpiece is sensed by the workpiece sensing device on the workpiece inlet side of the first image acquisition device, and when the control device receives the sensing signal through the signal receiving port, the signal receiving port is locked, and the encoder of the transmission device is reset to zero and then counted again, and when the encoder count reaches the encoding trigger value, the first image acquisition device is controlled to collect the workpiece image for detection according to the camera control program, and when the encoder count reaches the encoding lock value, the signal receiving port is unlocked. The workpiece is sensed by the workpiece sensing device to reset the encoder value, and then the camera is accurately triggered to shoot based on the preset encoding trigger value, so as to shoot the workpiece image that meets the requirements, and further by locking the signal receiving port within the encoding lock value, it is avoided that the encoder value is repeatedly reset to zero due to repeated sensing during the shooting of the same workpiece, which affects the subsequent camera shooting, and the system coordination is improved, thereby improving the detection efficiency and accuracy of the visual inspection system. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a schematic diagram of a visual inspection system provided by an embodiment of the present invention;
[0043] Figure 2 is a flow chart of a control method of a visual inspection system provided by an embodiment of the present invention;
[0044] Figure 3 is a camera self-test flow chart of a visual inspection system provided by an embodiment of the present invention;
[0045] Figure 4 is a schematic diagram of a calibration plate provided in an embodiment of the present invention;
[0046] Figure 5 It is a schematic diagram of the structure of a control device of a visual inspection system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar components or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0048] In the description of the present invention, it should be understood that descriptions involving orientation, such as up, down, left, right, etc., the orientations or positional relationships indicated are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0049] In the description of the present invention, if there is a description of first, second, etc., 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 the indicated technical features or implicitly indicating the sequence of the indicated technical features.
[0050] The embodiment of the present invention provides a visual inspection system, referring to Figure 1 The visual inspection system of the embodiment of the present invention includes a first image acquisition device 120, a conveying device 110, a workpiece sensing device 130 and a control device (not shown in the figure). The first image acquisition device, the conveying device and the workpiece sensing device are all connected to the control device. The first image acquisition device is arranged above the conveying device. The first image acquisition device includes a plurality of posture-adjustable cameras. The workpiece sensing device is arranged at the workpiece entrance side of the first image acquisition device.
[0051] In this embodiment, the first image acquisition device can be placed on the conveying device in the form of a gantry. Multiple cameras and multiple lighting panels are arranged on the top and side of the inner side of the first image acquisition device. The angles and postures of the multiple cameras are adjusted by a pan-tilt platform, which can be adjusted and controlled by a computer program. The camera can use an electric zoom lens. Compared with traditional lenses, it can be used normally without any debugging after replacing the detection head. There is no tedious work of adjusting the focal length and aperture of the lens for traditional lenses, ensuring the stability of the workstation operation; multiple angle-adjustable lighting panels are used to provide a uniform shooting light source. The conveying device is provided with an encoder, which can be installed at the position of the conveying drive motor, and can convert the transmitted linear displacement into a periodic electrical signal, and then convert this electrical signal into a counting pulse, and the number of pulses is used to represent the size of the displacement.
[0052] In this embodiment, the workpiece sensing device may be an infrared sensor, which is composed of an infrared transmitter, an infrared receiver and a processor. Figure 1As shown, the infrared transmitter and the infrared receiver are respectively arranged on both sides of the workpiece entrance side of the first image acquisition device. In the absence of shielding, the infrared receiver always receives the infrared rays emitted by the infrared transmitter. At this time, the processor does not generate a sensing signal. When the workpiece passes through the infrared sensor in the direction shown in the figure, the infrared rays are blocked and the infrared receiver cannot receive the infrared rays. At this time, the processor generates a sensing signal. It can be understood that the workpiece sensor can also be other types of position sensors that can sense the position of the workpiece.
[0053] Reference Figure 2 , the control device is used to perform the following steps:
[0054] Step S201, obtaining a code trigger value, a code lock value and a camera control program according to the current workpiece type;
[0055] Step S202, monitoring the sensing signal from the workpiece sensing device through the signal receiving port;
[0056] Step S203, when the sensing signal is received, the signal receiving port is locked, and the encoder of the transmission device is reset to zero and counted again;
[0057] Step S204, when the encoder count reaches the encoding trigger value, the first image acquisition device is controlled to acquire a workpiece image for detection according to the camera control program;
[0058] Step S205: when the encoder count reaches the encoder lock value, the signal receiving port is unlocked.
[0059] In this embodiment, the port of the control device receiving the sensing signal from the workpiece sensor device is the signal receiving port, and the control device can configure the signal receiving port to be locked or unlocked. When the signal receiving port is locked, the control device does not monitor the sensing signal of the workpiece sensor device.
[0060] In this embodiment, when the workpiece passes through the workpiece sensing device, the workpiece sensing device generates a sensing signal. After the control device detects the sensing signal, it resets the encoder value to zero and recounts, and locks the signal receiving port at the same time to avoid multiple triggering of the same workpiece in the future. When the encoder counts to the preset encoding trigger value, it indicates that the workpiece has been transported to a position that meets the shooting of the first image acquisition device. Then, the first image acquisition device is controlled to capture a workpiece image with a suitable viewing angle according to the camera control program to perform visual inspection of the workpiece. When the encoder counts to the preset encoding lock value, it indicates that the current workpiece has completely passed through the workpiece sensing device, and the signal receiving end can be unlocked to monitor the next workpiece entering the first image acquisition device. It can be understood that the camera control program in this embodiment is used to control multiple cameras in the first image acquisition device to shoot at preset time intervals and points (or angles).
[0061] According to some embodiments of the present invention, the coding trigger value is pre-stored in the control device, and the coding trigger value is determined by the following steps:
[0062] Step S301, starting from receiving the sensing signal from the workpiece sensing device, controlling the first image acquisition device to shoot according to the initial point position of the camera control program at every encoder value to obtain multiple first pictures;
[0063] Step S302 , displaying a plurality of first pictures to select a first picture that meets the requirements, and using the encoder value corresponding to the selected first picture as the encoding trigger value.
[0064] In this embodiment, during the actual visual inspection process, the workpiece moves with the conveyor, and it is necessary to configure corresponding shooting angles and shooting times for different types of workpieces to obtain workpiece images with the best shooting angle. After starting the camera control program, the camera can start shooting according to the initial point position of the camera control program, thereby automatically controlling the shooting angle and shooting time, and the timing of starting the camera control program can be determined by whether the encoder value reaches the encoding trigger value, and the preset encoding trigger value can be determined by the following method:
[0065] Starting from receiving the sensing signal from the workpiece sensing device, the first image acquisition device is controlled to shoot at the initial point of the camera control program at every encoder value to obtain multiple workpiece images with the same camera angle but different workpiece positions, namely, the first images. Multiple first images are displayed on the terminal so that the staff can select the image with the best viewing angle at the initial point from the multiple first images, and use the encoder value corresponding to the selected first image as the encoding trigger value, and then store the encoding trigger value in association with the workpiece type in the control device.
[0066] According to some embodiments of the present invention, the code lock value is pre-stored in the control device, and the code lock value is determined by the following steps:
[0067] Step S401, converting the encoder value into a unit distance according to the running speed of the conveying device;
[0068] Step S402, obtaining the workpiece length of the corresponding workpiece type;
[0069] Step S403, determining the encoding locking value according to the workpiece length and the unit distance.
[0070] In this embodiment, the workpiece sensor device is installed at a certain height. The principle is that when a workpiece blocks the sensor's radiation, it will send a signal to the system. Due to the irregular shape of the workpiece and the height fluctuations of the workpiece, the workpiece is triggered multiple times, causing the system to mistakenly identify that multiple different workpieces have entered, resulting in an abnormality. In this embodiment, the encoder value at the scene is converted into a unit distance in millimeters according to the transmission speed, and then the workpiece length is divided by the unit distance to obtain the encoding lock value. In the actual visual inspection process, the code can be counted from 0 when the workpiece is sensed. During the period of the encoding lock value, the infrared sensor signal is no longer received, forming a signal interlock.
[0071] According to some embodiments of the present invention, the visual inspection system further includes a second image acquisition device and a robotic arm, the first image acquisition device, the conveying device and the workpiece sensing device are all arranged on the first station, and the second image acquisition device is arranged on the second station. The second image acquisition device is used to acquire an image of the upper surface of the workpiece, the first image acquisition device is used to acquire an image of the side surface of the workpiece, the robotic arm is arranged between the first station and the second station, and the robotic arm is used to transport the workpiece on the second station to the first station.
[0072] After the workpiece enters the second station, the second image acquisition device above the second station captures the image of the upper surface of the workpiece. After the capture is completed, the robot arm grabs the workpiece on the second station and places it on the conveying device of the first station. The workpiece is transported by the conveying device, passes through the workpiece sensing device, and enters the first image acquisition device. The camera in the first image acquisition device captures the side image of the workpiece. Through the cooperation of the first image acquisition device and the second image acquisition device, the image acquisition work of each surface of the workpiece can be completed efficiently.
[0073] According to some embodiments of the present invention, the control device of the embodiment of the present application is also used for:
[0074] Step S501, acquiring an image of the upper surface of the workpiece by a second image acquisition device;
[0075] Step S502, determining the type of the workpiece according to the upper surface image of the workpiece.
[0076] In this embodiment, when visual inspection control is performed at the first workstation, it is necessary to first obtain the corresponding coding trigger value, coding lock value and camera control program according to the type of workpiece currently on the first workstation, and the workpiece type can be obtained by classifying and identifying the upper surface image captured by the second image acquisition device using an image classification model based on a convolutional neural network.
[0077] According to some embodiments of the present invention, the control device verifies the camera control program through the following steps:
[0078] Step S601, controlling the first image acquisition device to acquire images of the calibration workpiece according to the camera control program to obtain a plurality of second images, wherein the joint inflection points of the calibration workpiece are provided with labels;
[0079] Step S602, performing label recognition on the plurality of second images respectively to obtain label recognition results;
[0080] Step S603, verifying the camera control program according to the tag recognition result, and when each tag in the tag recognition result is complete, the camera control program passes the verification.
[0081] In this embodiment, the station personnel configure each camera in the first image acquisition device at multiple points according to the workpiece shooting requirements, and form a camera control program according to the data of each point of each configured camera. After the camera control program is generated, the camera control program needs to be verified to ensure that the full coverage of each workpiece can be achieved through the control of the camera control program. When verifying the camera control program, a label (such as a QR code) can be pasted at the joint inflection point of the corresponding type of workpiece, and then the workpiece is used as a calibration workpiece. After the calibration workpiece is sent into the conveying device, the first image acquisition device is controlled to perform image acquisition on the calibration workpiece according to the camera control program to obtain multiple second pictures of each camera at each point. The labels in the multiple second pictures are extracted by image processing technology to obtain label recognition results. When the label recognition results contain all the labels on the calibration workpiece, and each label is complete, the camera control program passes the verification. Otherwise, the camera control program fails the verification and the camera control program needs to be readjusted.
[0082] According to some embodiments of the present invention, the control device verifies the mechanical state of the camera in the visual inspection system through the following steps:
[0083] Step S701, adjusting the camera posture according to the self-checking point, and controlling the camera to shoot the calibration plate to obtain a calibration picture;
[0084] Step S702, determining calibration point search data according to the calibration image;
[0085] Step S703, comparing the calibration point data with the template data. When the calibration point data and the template data are identical, the mechanical state of the camera passes the verification.
[0086] In this embodiment, refer to Figure 3 , the process of the visual inspection system self-checking the camera is as follows:
[0087] It is determined by the IO signal whether the system self-check instruction is set. If the system self-check instruction is not set, the normal visual inspection process is entered; if the system self-check instruction is set, the visual system adjusts the camera posture according to the self-check point, and controls the camera to shoot the calibration plate to obtain a calibration picture; for example, refer to Figure 4 , the calibration plate consists of five reference dots, and the dot area is inversely colored to the background color; four of the five reference dots are located at the four corners of the center of the calibration plate, and the fifth reference point is located next to the lower reference dot; the lowest reference point in the center of the calibration plate is set as the coordinate origin; the direction of the coordinate origin pointing to the adjacent reference point is set as the X direction; the direction of the coordinate origin pointing to the uppermost reference point is set as the Y direction;
[0088] Determine the calibration point search data according to the calibration image, and compare the calibration point data with the template data;
[0089] When the calibration point data and the template data are different, it can be determined that the camera has mechanical abnormalities such as being loose or moving. Among them, the calibration point data and the template data can be used to first determine whether the shooting angle is offset. If the shooting angle offset indicates that the camera is loose, a pop-up alarm will be issued. If the shooting angle is not offset, indicating that the camera is not loose, further determine whether the camera is shifted. If the camera is shifted, translate the search box of all detection points.
[0090] The embodiment of the present invention further provides a control method for a visual inspection system. The control method for a visual inspection system in the embodiment of the present invention is the same as the method performed by the above control device, and is specifically as follows:
[0091] Obtain the code trigger value, code lock value and camera control program according to the current workpiece type;
[0092] Monitor the sensing signal from the workpiece sensing device through the signal receiving port;
[0093] When receiving the induction signal, the signal receiving port is locked, and the encoder of the transmission device is reset to zero and counted again;
[0094] When the encoder count reaches the encoding trigger value, the first image acquisition device is controlled to acquire a workpiece image for detection according to the camera control program;
[0095] When the encoder count reaches the encoder lock value, the signal receiving port is unlocked.
[0096] It can be understood that the contents of the method embodiment executed by the control device of the above-mentioned visual detection system are all applicable to the present embodiment, the functions specifically implemented by the present system embodiment are the same as those of the method embodiment executed by the above-mentioned control device, and the beneficial effects achieved are also the same as those achieved by the method embodiment executed by the above-mentioned control device.
[0097] Reference Figure 5 , Figure 5 Schematic diagram of a control device of a visual inspection system provided by an embodiment of the present invention. The control device of the visual inspection system of the embodiment of the present invention includes one or more control processors and a memory. Figure 5 A control processor and a memory are taken as an example.
[0098] The control processor and the memory can be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0099] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the control processor, and these remote memories may be connected to the control device of the visual inspection system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0100] Those skilled in the art will understand that Figure 5 The device structure shown in the figure does not constitute a limitation on the control device of the visual inspection system, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0101] The non-transient software program and instructions required to implement the control method of the control device applied to the visual inspection system in the above embodiment are stored in the memory, and when executed by the control processor, the control method applied to the control device in the above embodiment is executed.
[0102] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by one or more control processors, so that the one or more control processors can execute the control method in the above method embodiment.
[0103] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that 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 may include any information delivery media.
[0104] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present invention.
Claims
1. A visual inspection system, characterized in that: include: A first image acquisition device, a conveying device, a workpiece sensor device and a control device, wherein the first image acquisition device, the conveying device and the workpiece sensor device are all connected to the control device, the first image acquisition device is arranged above the conveying device, the first image acquisition device comprises a plurality of posture-adjustable cameras, and the workpiece sensor device is arranged at the workpiece entrance side of the first image acquisition device; the workpiece sensor device is a device adopting the principle of beam sensing; The control device is used for: Obtain the code trigger value, code lock value and camera control program according to the current workpiece type; Monitor the sensing signal from the workpiece sensing device through the signal receiving port; When the sensing signal is received, the signal receiving port is locked, and the encoder of the transmission device is reset to zero and then counted again; When the encoder count reaches the encoding trigger value, the first image acquisition device is controlled to acquire a workpiece image for detection according to the camera control program; When the encoder count reaches the encoding lock value, unlocking the signal receiving port; Wherein, the coding lock value is pre-stored in the control device, and the coding lock value is determined by the following steps: converting the encoder value into a unit distance according to the operating speed of the conveyor; Get the workpiece length of the corresponding workpiece type; A coding lock value is determined according to the workpiece length and the unit distance.
2. The visual inspection system according to claim 1, characterized in that: The coding trigger value is pre-stored in the control device, and the coding trigger value is determined by the following steps: Starting from receiving the sensing signal from the workpiece sensing device, controlling the first image acquisition device to take pictures according to the initial point position of the camera control program at every encoder value to obtain a plurality of first pictures; A plurality of the first pictures are displayed to select a first picture that meets the requirements, and an encoder value corresponding to the selected first picture is used as the encoding trigger value.
3. The visual inspection system according to claim 1, characterized in that: The visual inspection system also includes a second image acquisition device and a robotic arm. The first image acquisition device, the conveying device and the workpiece sensing device are all arranged on the first workstation. The second image acquisition device is arranged on the second workstation. The second image acquisition device is used to acquire the upper surface image of the workpiece. The first image acquisition device is used to acquire the side image of the workpiece. The robotic arm is arranged between the first workstation and the second workstation. The robotic arm is used to move the workpiece on the second workstation to the first workstation.
4. The visual inspection system according to claim 3, characterized in that: The control device is also used for: Acquire the upper surface image of the workpiece by the second image acquisition device; The type of the workpiece is determined according to the upper surface image of the workpiece.
5. The visual inspection system according to claim 1, characterized in that: The control device verifies the camera control program by the following steps: Controlling the first image acquisition device to acquire images of the calibration workpiece according to the camera control program to obtain a plurality of second images, wherein the joint inflection points of the calibration workpiece are provided with labels; Performing label recognition on the plurality of second images respectively to obtain label recognition results; The camera control program is verified according to the tag recognition result. When each tag in the tag recognition result is complete, the camera control program passes the verification.
6. The visual inspection system according to claim 1, characterized in that: The control device verifies the mechanical state of the camera in the visual inspection system through the following steps: Adjust the camera posture according to the self-checking point, and control the camera to shoot the calibration plate to obtain a calibration picture; Determine calibration point search data according to the calibration image; The calibration point data is compared with the template data. When the calibration point data is identical to the template data, the mechanical state of the camera passes the verification.
7. A control method for a visual inspection system, characterized in that: Applied to the visual inspection system of claim 1, the control method of the visual inspection system comprises the following steps: Obtain the code trigger value, code lock value and camera control program according to the current workpiece type; Monitor the sensing signal from the workpiece sensing device through the signal receiving port; When the sensing signal is received, the signal receiving port is locked, and the encoder of the transmission device is reset to zero and then counted again; When the encoder count reaches the encoding trigger value, the first image acquisition device is controlled to acquire a workpiece image for detection according to the camera control program; When the encoder count reaches the encoding lock value, unlocking the signal receiving port; Wherein, the coding lock value is pre-stored in the control device, and the coding lock value is determined by the following steps: converting the encoder value into a unit distance according to the operating speed of the conveyor; Get the workpiece length of the corresponding workpiece type; A coding lock value is determined according to the workpiece length and the unit distance.
8. A control device for a visual inspection system, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the control method of the visual inspection system as claimed in claim 7.
9. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the control method of the visual inspection system according to claim 7 when executed by the processor.
Citation Information
Patent Citations
Visual detection method for industrial process, control device, system and storage device
CN109642784A
Following type vehicle detection item picture acquisition device and method
CN115589534A