Image shooting method, automatic optical detection equipment and storage medium

By using programmable logic control modules to plan the trajectory by row and the high-speed motion function of the servo control system in the automatic optical detection device, the problem of increasing image acquisition time in fixed shooting mode is solved, and more efficient image acquisition and motion control is achieved , improves the working efficiency of the equipment.

CN118890549APending Publication Date: 2024-11-01GUANGZHOU LEICHEN INTELLIGENT EQUIP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310493013.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The existing automatic optical detection equipment uses fixed shooting to acquire images, which leads to an increase in time in the process of acceleration, constant speed, deceleration, and stationary motion system, reducing working efficiency.

Method used

The programmable logic control module is used to plan the shooting trajectory by row, and the high-speed motion function of the servo control system is used to trigger the camera to shoot images. The images obtained by splicing the upper computer reduce the camera's residence time in the preset shooting position and improve motion efficiency.

Benefits of technology

It reduces overall time-consuming, improves the working efficiency of automatic optical detection equipment, and has a more regular motion trajectory, reducing the number of acceleration, constant speed, deceleration, and static times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890549A_ABST
    Figure CN118890549A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic optical detection, and discloses an image shooting method, automatic optical detection equipment and a storage medium. The image shooting method comprises the steps that an upper computer issues an image shooting instruction to a programmable logic control module; the programmable logic control module calculates a shooting track according to the image shooting instruction and sends the shooting track to the servo control system, and the shooting track is planned according to rows; the servo control system moves according to the shooting track, when it is detected that the current position is consistent with a preset shooting position, a light source is triggered to be lightened, a camera is controlled to shoot images, and at least one preset shooting position image is obtained; and after the servo control system completes movement according to the shooting track, the upper computer performs splicing processing according to all the obtained preset shooting position images to obtain a target image. By implementing the image shooting method, the overall time consumption in the image acquisition process of the automatic optical detection equipment can be reduced, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic optical detection, and in particular to an image shooting method, automatic optical detection equipment and a storage medium. Background Art

[0002] Automated Optical Inspection (AOI) is an automated inspection device used in electronic manufacturing. It uses optical systems and computer vision technology to inspect the surface of circuit boards to detect defects, damage or errors. In actual application scenarios, factories need to monitor the data information of automatic optical inspection equipment and analyze this data information to better control the production process and quality of the production line.

[0003] At present, automatic optical inspection equipment generally uses a fixed-shot method to acquire images of the photographed object. The specific operation mode is: the camera is driven by a motion control system (generally a servo control system) to move according to the coordinates set by the user. When it reaches the target point, it stops moving and starts taking pictures, thereby acquiring the image required by the user. The implementation method and motion control of the fixed-shot mode are relatively simple, but the motion system needs to continuously accelerate, maintain a constant speed, decelerate, and stop, resulting in an increase in overall time consumption and a slower pace; and as the density of shooting points increases, the motion system is less able to accelerate to the maximum speed due to the shorter distance, resulting in a more obvious increase in overall time consumption, which reduces the working efficiency of the automatic optical inspection equipment. Summary of the invention

[0004] The embodiments of the present invention aim to provide an image capturing method, an automatic optical inspection device and a storage medium to solve the technical problem in the prior art that the fixed-shooting method is used, which increases the time consumption of image acquisition of the automatic optical inspection device and reduces the work efficiency.

[0005] In a first aspect, an embodiment of the present invention provides an image capturing method, which is applied to an automatic optical detection device, wherein the automatic optical detection device includes a programmable logic control module, a servo driver, a camera, a light source and a host computer, and the method includes: the automatic optical detection device, wherein the automatic optical detection device includes a programmable logic control module, a servo control system, a camera, a light source and a host computer, and the method includes: the host computer sends an image capturing instruction to the programmable logic control module; the programmable logic control module calculates a capturing trajectory according to the image capturing instruction, and sends the capturing trajectory to the servo control system, wherein the capturing trajectory is planned row by row; the servo control system moves according to the capturing trajectory, and when it is detected that the current position is consistent with the preset capturing position, the light source is triggered to light up, and the camera is controlled to capture the image to obtain at least one preset capturing position image; when the servo control system completes the movement according to the capturing trajectory, the host computer performs splicing processing according to all the acquired preset capturing position images to obtain the target image.

[0006] Optionally, the shooting trajectory is planned as m rows; the servo control system moves according to the shooting trajectory, including: the servo control system moves to the starting point of the first row according to the shooting trajectory and starts moving; when the movement of the first row is completed, the servo control system moves to the starting point of the next row and starts moving until all m rows have completed the movement; wherein, during the movement, the servo control system records the current position of the movement in real time.

[0007] Optionally, the servo control system runs to the starting point of the first row according to the shooting trajectory and starts moving, including: the servo control system runs to the starting point of the first row according to the shooting trajectory, and when receiving a shooting permission signal sent by the host computer, moves from the starting point of the first row to the end point of the first row.

[0008] Optionally, after the first row of movement is completed, the servo control system runs to the starting point of the next row and starts moving, including: when the first row of movement is completed, the host computer obtains all preset shooting position images of the first row; the host computer determines whether there is an image frame loss or multiple frame problem based on all the preset shooting position images; if not, the host computer sends a signal to allow shooting to the servo control system; when receiving the signal to allow shooting, the servo control system runs to the starting point of the next row and starts moving.

[0009] Optionally, the method further includes: if yes, the host computer sends a reshooting signal to the servo control system; when the servo control system receives the reshooting signal, it moves to the starting point of the first row and starts moving to regain the preset shooting position image.

[0010] Optionally, when receiving the signal allowing shooting, the servo control system runs to the starting point of the next row and starts moving, including: the servo control system determines whether the next row exceeds m rows, where m is greater than or equal to 1; if not, the servo control system runs to the starting point of the next row and starts moving.

[0011] Optionally, the servo control system moves according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, it triggers the light source to light up, and controls the camera to capture images, so as to obtain at least one preset shooting position image, including: the servo control system moves according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, it outputs n pulse signals to trigger the light source to light up, and controls the camera to capture images, so as to obtain n preset shooting position images.

[0012] Optionally, the preset shooting position is determined by the programmable logic control module according to the size of the object being photographed and camera parameters.

[0013] In a second aspect, an embodiment of the present invention provides a programmable logic control module, a servo control system, a camera, a light source and a host computer; the host computer is used to send an image shooting instruction to the programmable logic control module; the programmable logic control module is used to calculate a shooting trajectory according to the image shooting instruction and move, and send the shooting trajectory to the servo control system, and the shooting trajectory is planned by row; the servo control system is used to move according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, trigger the light source to light up, and control the camera to capture the image to obtain at least one preset shooting position image; the host computer is used to stitch all the preset shooting position images obtained after the servo control system completes the movement according to the shooting trajectory to obtain the target image.

[0014] In a third aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to enable an automatic optical inspection device to execute the image capturing method as described in the first aspect.

[0015] In the image shooting method provided in the embodiment of the present invention, the shooting trajectory is planned by row through the programmable logic control module, and the high-speed comparison function of the servo control system is used to trigger the camera to shoot images, so as to obtain at least one preset shooting position image. Finally, all the preset shooting position images are spliced ​​by the host computer to obtain the target image. The image can be obtained without the camera stopping at the preset shooting position, which reduces the time consumption. At the same time, the shooting movement by row makes the running trajectory more regular, and the overall number of acceleration, uniform speed, deceleration and stillness is reduced, and the time consumption is further reduced, which effectively improves the working efficiency of the automatic optical inspection equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0017] Figure 1 A schematic diagram of the structure of an automatic optical inspection device provided by an embodiment of the present invention;

[0018] Figure 2 A schematic diagram of a scene of a fixed-shot shooting method provided by an embodiment of the present invention;

[0019] Figure 3 A diagram showing the relationship between speed and time consumption of a fixed-shot shooting method provided by an embodiment of the present invention;

[0020] Figure 4 A schematic diagram of a scene of an image capturing method provided by an embodiment of the present invention;

[0021] Figure 5 A diagram showing the relationship between speed and time consumption of an image capturing method provided by an embodiment of the present invention;

[0022] Figure 6 A schematic diagram of a flow chart of an image capturing method provided by an embodiment of the present invention;

[0023] Figure 7 A schematic flow chart of another image capturing method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, and all are within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present invention do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0026] In order to more clearly describe the present application and to explain the embodiments of the present invention in more detail, the following will first introduce a method for taking an image using fixed-shot shooting. Figure 2 , is a scene schematic diagram of a fixed-shot shooting method provided by an embodiment of the present invention.

[0027] Figure 2 In the example, the user selected 21 components (white boxes in the figure) on the circuit board to acquire images. When using the fixed-shot shooting method, the motion needs to be stopped 21 times (the motion path is Figure 2 The white arrow in the middle) can obtain 21 images required by the user. At the same time, the camera needs to continuously experience the motion process of static, acceleration, uniform speed, deceleration, and static. The motion curve is as follows Figure 3 At this time, the low-speed state and the static state account for a large proportion of the process, a lot of time is consumed, the overall time consumption increases, the rhythm slows down, and as the density of shooting points increases, the motion system cannot accelerate to the maximum speed due to the shorter distance, and the motion efficiency cannot be improved, resulting in a more obvious phenomenon of increased time consumption; at the same time, the camera's motion trajectory is more messy, which also increases the time consumption.

[0028] In order to solve the above technical problems, the present invention provides an image capture method, which is based on the flying shooting method and can control the camera to quickly acquire images at high speed according to a predetermined trajectory, thereby reducing the overall time consumption and improving the efficiency of the automatic optical inspection equipment.

[0029] First, a schematic diagram of the structure of an automatic optical inspection device according to an embodiment of the present invention is introduced. Figure 1 The automatic optical inspection device 11 involved in the embodiment of the present invention includes an editable logic control module 111, a host computer 112, a camera 113, a servo control system 114, and a light source 115, wherein the servo control system 114 includes a servo driver 1141 and a servo motor 1142.

[0030] The programmable logic controller (PLC) 111 can be logically connected to the host computer 112 and the servo control system 114. The programmable logic control module 111 can receive control instructions from the host computer 112 and generate corresponding control signals to control the servo control system 114 to move.

[0031] The host computer 112 is mainly used to control the operation and operation of the automatic optical inspection device 11, such as starting and stopping inspection, adjusting equipment parameters and inspection conditions, and generating inspection reports and statistical reports according to inspection results. In one embodiment, the host computer 112 can send control instructions to the editable logic control module 111.

[0032] The camera 113 may be composed of a high-resolution charge-coupled device (CCD) camera or a complementary metal oxide semiconductor (CMOS) image sensor, and is used to capture high-definition images of the object. The camera 113 may be embedded in the servo motor 1141 to follow the servo motor 1141 to move and capture images. After capturing an image, the camera 113 may transmit the image to the host computer 112 via an image transmission line.

[0033] The light source 115 is mainly used to illuminate the surface of the object to be photographed so that the camera 113 can capture high-quality images. The light source 115 can illuminate the surface of the object to be photographed when receiving a high-speed trigger signal from the servo driver 1141.

[0034] The servo control system 114 mainly includes the servo controller 1141 and the servo motor 1142. The servo controller 1141 is the control center of the servo control system 113, which can convert the control signal of the editable logic control module 111 into the control signal of the servo motor 1142, and control the speed, position, torque and other parameters of the servo motor 1142. The servo motor 1142 can move according to the control signal of the servo controller 1141. In one embodiment, the servo motor 1142 can be powered by a three-phase AC power supply, and the speed, position, torque and other parameters of the servo motor 1142 can be controlled by the servo driver 1141.

[0035] It is understandable that, in addition to the above components, the automatic optical inspection device 11 may also include necessary components such as a conveyor belt and a robotic arm, and be configured with corresponding software programs, and the embodiment of the present invention does not impose any limitation on this.

[0036] The image capturing method provided by the present invention can be implemented by the above-mentioned automatic optical detection device 11. In one embodiment, the workflow of the method can be as follows:

[0037] Step 1: The host computer 112 issues an image shooting instruction. After receiving the image shooting instruction, the programmable logic control module 111 calculates the shooting trajectory, plans the shooting trajectory into m rows, and then moves to the starting point of the first row of flying shooting, and waits for the host computer 112 to send a shooting permission signal for the current row of images;

[0038] Step 2: After receiving the permission signal for shooting the current row of images, the programmable logic control module 111 controls the servo drive system to move from the current row starting point to the current row ending point;

[0039] In one embodiment, the host computer 112 can also perform multi-frame and frame loss problem judgment after each line of movement is completed. Figure 6 The steps for determining the multiple frame and frame loss problems may specifically include:

[0040] 601: the servo motor 1142 starts to move from the starting point of the nth row until it reaches the end point of the nth row;

[0041] 602: When the servo motor 1142 reaches the end point of the nth row, the host computer 112 determines whether there is a frame loss or multiple frame problem in the nth row based on all the acquired preset position images.

[0042] For example, the host computer 112 can use the actual size of the object being photographed, the camera angle of view (Angular Field Of View, FOV) and other data in advance to calculate the required number of frames for the current shooting line, and compare it with the number of pictures actually obtained after the shooting is completed to determine whether there is a frame loss or multiple frame problem. If so, step 603 can be executed, if not, step 604 can be executed.

[0043] 603: If there are multiple frames and frame loss problems, the host computer 112 sends a reselected shooting signal to the servo driver, so that the servo driver controls the servo motor 1142 to execute step 601 again;

[0044] 604: If there is no problem of multiple frames or frame loss, the host computer 112 sends a signal allowing shooting to the servo driver;

[0045] 605: The servo driver determines whether the next row (i.e., n+1) exceeds the planned m rows;

[0046] 606: If the number of planned m rows is exceeded, the current shooting process may be terminated, and a message may be fed back to the host computer 112;

[0047] 607: If the planned m rows are not exceeded, the system may move to the starting point of the n+1th row until reaching the end point of the n+1th row.

[0048] Step 3: During the movement, the servo driver 1141 in the servo drive system 114 can obtain the current position in real time, and output a pulse signal at a preset shooting position (for example, the center of the field of view of the camera 113, which can be calculated by the programmable logic control module 111 and then sent to the servo driver 1141), and trigger the camera 113 and the light source 115 to work and acquire an image;

[0049] In one embodiment, the servo driver 1141 can output n pulse signals in the row, and the camera 113 will synchronously generate n images and transmit them to the host computer 112 through the image transmission line;

[0050] Step 4: After the image acquisition of the row is completed, the programmable logic control module 111 can control the servo motor 1142 to run to the starting point of the next row, and wait for the host computer 112 to send a signal allowing the image to be taken, and repeat the same action in step 2.

[0051] Step 5: After running m lines, the host computer 112 completes the acquisition of the preset position image of the entire product. At this time, m*n is the total number of images acquired. The host computer 112 can stitch all the images together to form a complete product image.

[0052] For example, see Figure 4 , using the above-mentioned image capturing method, the user also selects 21 components on the captured circuit board, and the programmable logic control module 111 divides the 21 components into zones (i.e. Figure 4 The dotted box), and the shooting trajectory is planned as 2 lines, then the camera 113 only needs to move 3 times (i.e. Figure 4 The method reduces the number of acceleration, uniform speed, deceleration and stationary times of the overall system. The motion curve is shown in Figure 5 shown.

[0053] It can be seen intuitively that the time consumed by the system in low-speed and static states is significantly reduced compared to the fixed shooting method, which can effectively improve the overall rhythm of the equipment.

[0054] The following is a detailed description of the method embodiments of the present invention. Figure 7 , is a flow chart of an image capturing method provided by an embodiment of the present invention. The method is applied to an automatic optical detection device, which includes a programmable logic control module, a servo control system, a camera, a light source, and a host computer. The method may include:

[0055] S71: The host computer sends an image capture instruction to the programmable logic control module.

[0056] Optionally, the image capturing instruction may include basic information of the object, such as the size and shape of the object.

[0057] S72: The programmable logic control module calculates a shooting trajectory according to the image shooting instruction, and sends the shooting trajectory to the servo control system.

[0058] The shooting trajectory is planned row by row.

[0059] For example, when receiving the image shooting instruction, the programmable logic control module can read the basic information about the object in the image shooting instruction, divide the object into zones, and plan the shooting trajectory into relatively regular m rows according to the principle of the optimal path that can cover each zone, so as to shorten the travel route of the servo control system.

[0060] For example, Figure 4 As shown, the programmable logic control module divides the object into 10 areas ( Figure 4 White dotted box), and plan the shooting trajectory into 2 rows ( Figure 4 After the first row of movement is completed, the direction is reversed to complete the second row of movement to ensure that the shooting trajectory can cover each of the 10 areas.

[0061] S73: The servo control system moves according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, the light source is triggered to light up, and the camera is controlled to capture an image to obtain at least one preset shooting position image.

[0062] The servo control system may include a servo driver and a servo motor. The servo driver may drive the servo to move according to the shooting trajectory through a control signal.

[0063] In one embodiment, the preset shooting position is determined by the programmable logic control module according to the size of the object being photographed and camera parameters.

[0064] For example, the programmable logic control module can be determined according to parameters such as the size of the object and the FOV size of the camera. For example, the object can be divided into zones according to the size of the object, and the position of the camera in each zone at the center of the viewing angle is used as the preset shooting position.

[0065] In one embodiment, the shooting trajectory is planned as m lines. The servo control system moves according to the shooting trajectory, which may include:

[0066] S731: The servo control system runs to the starting point of the first row according to the shooting trajectory and starts moving.

[0067] In one embodiment, the step S731 may specifically include: the servo control system runs to the starting point of the first row according to the shooting trajectory, and when receiving a shooting permission signal sent by the host computer, moves from the starting point of the first row to the end point of the first row.

[0068] S732: After the first row of movement is completed, the servo control system moves to the starting point of the next row and starts moving until all m rows have completed the movement.

[0069] The servo control system records the current position of the movement in real time during the movement. Furthermore, the current position can be compared with the preset shooting position in real time to determine whether the current position is the preset shooting position.

[0070] In one embodiment, after the first row of movement is completed, the servo control system runs to the starting point of the next row and starts to move, which may include:

[0071] S7321: After the first row of movement is completed, the host computer obtains all preset shooting position images of the first row.

[0072] In one embodiment, each row may have multiple preset shooting positions, and each preset shooting position may capture multiple images. For example, five preset shooting positions may be set in the first row, and eight images may be captured at each preset shooting position. For example, when the servo control system detects that the current position is consistent with the preset shooting position, eight pulse signals may be output to trigger the light source to light up, and the camera may be controlled to capture images, thereby obtaining eight images of the preset shooting positions. In this way, the total number of images captured in the first row is 40.

[0073] S7322: The host computer determines whether there is a problem of frame loss or multiple frames based on all the preset shooting position images.

[0074] Optionally, the host computer can use data such as the actual size of the object being photographed and the camera FOV size to calculate the number of frames required for the current row in advance. After the shooting is completed, it is compared with the actual number of preset shooting positions obtained to determine whether there is a frame loss or multiple frame problem.

[0075] S7323: If not, the host computer sends a shooting permission signal to the servo control system.

[0076] S7324: When receiving the shooting permission signal, the servo control system runs to the starting point of the next line and starts moving.

[0077] It should be noted that, before the servo control system runs to the starting point of each row and starts the movement of the row, it may start the movement only after receiving the shooting permission signal for the row from the host computer.

[0078] In one embodiment, the step S7324 may specifically include: the servo control system determines whether the next row exceeds m rows, where m is greater than or equal to 1; if not, the servo control system runs to the starting point of the next row and starts moving.

[0079] For example, after receiving the signal allowing shooting from the host computer, the servo control system can also determine whether the number of rows in the next row exceeds the maximum number of rows (i.e., m rows). If it exceeds, the movement can be terminated and a message can be fed back to the host computer; if it does not exceed, the servo control system can run to the starting point of the next row and start moving.

[0080] In one embodiment, if the host computer determines that there are multiple frames or frame loss problems in the current line, the following steps may be performed:

[0081] S7325: If yes, the host computer sends a reshooting signal to the servo control system.

[0082] The reshooting signal is used to instruct the servo control system to move to the starting point of the current line and start moving again.

[0083] S7326: When receiving the reshooting signal, the servo control system moves to the starting point of the first row and starts moving to regain the preset shooting position image.

[0084] It should be noted that when the servo control system receives the re-shooting signal, the re-movement refers to the movement of the starting point of the first row. When it is detected that the current position is consistent with the preset shooting position, the light source is triggered to light up, and the camera is controlled to capture the image to obtain at least one preset shooting position image.

[0085] In one embodiment, after the image of a row is captured, the servo control system can move to the next row and repeat the steps shown in S7321-S7326 until all the planned m rows have completed the movement.

[0086] S74: When the servo control system completes the movement according to the shooting trajectory, the host computer performs splicing processing according to all the acquired images of the preset shooting positions to obtain a target image.

[0087] In one embodiment, when the servo control system completes the movement according to the shooting trajectory, the host computer can splice all the received preset shooting position images to obtain the target image (i.e., the complete image of the object being photographed), and provide it to the visual inspection algorithm for defect detection.

[0088] Optionally, during the stitching process, the host computer may perform deduplication processing on all acquired images of preset shooting positions, and may delete images with high similarity to obtain a target image with higher quality.

[0089] It can be seen that through the image shooting method provided by the embodiment of the present invention, the programmable logic control module plans the shooting trajectory by row, and uses the high-speed comparison function of the servo control system to trigger the camera to shoot images, and obtains at least one preset shooting position image. Finally, all the preset shooting position images are spliced ​​by the host computer to obtain the target image. The image can be acquired without the camera stopping at the preset shooting position, which reduces the time consumption. At the same time, the shooting movement by row makes the running trajectory more regular, and the overall number of acceleration, uniform speed, deceleration, and stillness is reduced, and the time consumption is further reduced, which effectively improves the working efficiency of the automatic optical inspection equipment.

[0090] The embodiment of the present invention also provides an automatic optical inspection device, which includes: a programmable logic control module, a servo control system, a camera, a light source and a host computer. The host computer is used to send an image shooting instruction to the programmable logic control module; the programmable logic control module is used to calculate a shooting trajectory according to the image shooting instruction and move, and send the shooting trajectory to the servo control system, and the shooting trajectory is planned by row; the servo control system is used to move according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, the light source is triggered to light up, and the camera is controlled to shoot an image to obtain at least one preset shooting position image; the host computer is also used to splice all the preset shooting position images acquired by the host computer after the servo control system completes the movement according to the shooting trajectory to obtain the target image.

[0091] In one embodiment, the automatic optical inspection device can be used to execute the image capturing method in any of the above method embodiments.

[0092] An embodiment of the present invention further provides a storage medium storing computer executable instructions. The computer executable instructions are executed by one or more processors, so that the one or more processors can execute the image capturing method in any of the above method embodiments.

[0093] An embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer device, the computer device executes any one of the image capture methods.

[0094] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image capturing method, characterized in that: The method is applied to an automatic optical detection device, which includes a programmable logic control module, a servo control system, a camera, a light source and a host computer. The method includes: The host computer sends an image capture instruction to the programmable logic control module; The programmable logic control module calculates a shooting trajectory according to the image shooting instruction, and sends the shooting trajectory to the servo control system, and the shooting trajectory is planned by row; The servo control system moves according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, the light source is triggered to light up, and the camera is controlled to shoot an image to obtain at least one preset shooting position image; When the servo control system completes the movement according to the shooting trajectory, the host computer performs splicing processing according to all the acquired images of the preset shooting positions to obtain the target image.

2. The method according to claim 1, characterized in that The shooting trajectory is planned to be m lines; the servo control system moves according to the shooting trajectory, including: The servo control system runs to the starting point of the first row according to the shooting trajectory and starts to move; When the first row is finished moving, the servo control system moves to the starting point of the next row and starts moving until all m rows have finished moving; Wherein, the servo control system records the current position of the movement in real time during the movement.

3. The method according to claim 2, characterized in that The servo control system runs to the first row starting point according to the shooting trajectory and starts to move, including: The servo control system runs to the starting point of the first row according to the shooting trajectory, and moves from the starting point of the first row to the ending point of the first row when receiving a shooting permission signal sent by the host computer.

4. The method according to claim 2, characterized in that When the first row moves, the servo control system moves to the starting point of the next row and starts moving, including: When the first row of movement is finished, the host computer acquires all preset shooting position images of the first row; The host computer determines whether there is a problem of image frame loss or multiple frames based on all the preset shooting position images; If not, the host computer sends a shooting permission signal to the servo control system; When receiving the shooting permission signal, the servo control system moves to the starting point of the next line and starts moving.

5. The method according to claim 4, characterized in that The method further comprises: If yes, the host computer sends a reshooting signal to the servo control system; When receiving the reshooting signal, the servo control system moves to the starting point of the first row and starts to move to re-obtain the preset shooting position image.

6. The method according to claim 4, characterized in that When receiving the shooting permission signal, the servo control system moves to the starting point of the next line and starts to move, including: The servo control system determines whether the next line exceeds m lines, where m is greater than or equal to 1; If not, the servo control system runs to the starting point of the next row and starts moving.

7. The method according to claim 1, characterized in that The servo control system moves according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, the light source is triggered to light up, and the camera is controlled to shoot an image to obtain at least one preset shooting position image, including: The servo control system moves according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, it outputs n pulse signals to trigger the light source to light up, and controls the camera to capture images, thereby obtaining n preset shooting position images.

8. The method according to claim 1, characterized in that The preset shooting position is determined by the programmable logic control module according to the size of the object being photographed and the camera parameters.

9. An automatic optical inspection device, characterized in that: include: Programmable logic control module, servo control system, camera, light source and host computer; The host computer is used to send an image capture instruction to the programmable logic control module; The programmable logic control module is used to calculate a shooting trajectory according to the image shooting instruction to move, and send the shooting trajectory to the servo control system, and the shooting trajectory is planned by row; The servo control system is used to move according to the shooting trajectory, and when it is detected that the current position is consistent with the preset shooting position, trigger the light source to light up, and control the camera to capture an image to obtain at least one preset shooting position image; The host computer is also used for performing splicing processing according to all acquired images of preset shooting positions to obtain a target image after the servo control system completes the movement according to the shooting trajectory.

10. A storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to enable an automatic optical detection device to execute the image capturing method according to any one of claims 1 to 8.