CN115469653A - Path planning method, terminal device and computer readable storage medium - Google Patents
Path planning method, terminal device and computer readable storage medium Download PDFInfo
- Publication number
- CN115469653A CN115469653A CN202211009962.4A CN202211009962A CN115469653A CN 115469653 A CN115469653 A CN 115469653A CN 202211009962 A CN202211009962 A CN 202211009962A CN 115469653 A CN115469653 A CN 115469653A
- Authority
- CN
- China
- Prior art keywords
- camera
- detected
- defect
- position information
- combination scheme
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000007547 defect Effects 0.000 claims abstract description 206
- 238000012163 sequencing technique Methods 0.000 claims description 5
- 238000001514 detection method Methods 0.000 abstract description 26
- 238000010586 diagram Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000006386 memory function Effects 0.000 description 1
- 238000012634 optical imaging Methods 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0231—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
- G05D1/0246—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0212—Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
- G05D1/0223—Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving speed control of the vehicle
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0259—Control of position or course in two dimensions specially adapted to land vehicles using magnetic or electromagnetic means
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0276—Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle
- G05D1/0285—Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle using signals transmitted via a public communication network, e.g. GSM network
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Aviation & Aerospace Engineering (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Electromagnetism (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
The application discloses a path planning method, a terminal device and a computer readable storage medium, wherein the path planning method comprises the following steps: acquiring a current position of a camera, wherein the camera at least comprises a first camera and a second camera; acquiring position information of a plurality of to-be-detected defect positions of a plate body to be detected, and acquiring a plurality of combination schemes for distributing the position information to a first camera and a second camera; calculating a path cost of each combination scheme, wherein the path cost at least comprises a first path length of the first camera and a second path length of the second camera; and acquiring a combination scheme with the minimum path cost, and planning the path of the first camera and the second camera according to the combination scheme with the minimum path cost. By the method, the position information can be distributed to the first camera and the second camera according to the combination scheme with the minimum path cost, so that the acquisition path of the first camera and the second camera is the shortest, the image acquisition time is shortened, and the detection efficiency is improved.
Description
Technical Field
The present application relates to the field of path planning technologies, and in particular, to a path planning method, a terminal device, and a computer-readable storage medium.
Background
In recent years, visual systems are increasingly popularized in human production and life, and are increasingly widely applied in the fields of industrial detection, positioning navigation, dynamic tracking, three-dimensional reconstruction and the like. Among them, defect detection based on a vision system plays an important role in the production process of industrial products.
In the current detection method, an optical imaging technology (usually using a camera and a lens) is mostly adopted to obtain an image of a detected object, and then a certain image processing algorithm is used to obtain a defect position from the shot image. When a plurality of defects exist on a single detected object, in order to further detect the plurality of defects, the images of the plurality of defects are required to be re-acquired.
However, as the number of defects increases, the time for acquiring the image by the camera becomes longer, which is not beneficial to improving the detection efficiency, and therefore, a multi-camera path planning method is needed to be suitable for the detection scene of the multi-camera.
Disclosure of Invention
In order to solve the above problems, the present application provides a path planning method, a terminal device, and a computer-readable storage medium.
In order to solve the above problem, the present application provides a path planning method, including: acquiring a current position of cameras, the cameras including at least a first camera and a second camera; acquiring position information of a plurality of to-be-detected defect positions of a plate to be detected, and acquiring a plurality of combination schemes for distributing the position information to the first camera and the second camera, wherein each combination scheme comprises the position information of all to-be-detected defect positions and the camera distributed to each to-be-detected defect position; calculating a path cost of each combination scheme, wherein the path cost at least comprises a first path length from the current position of the first camera to all the to-be-detected defect positions allocated to the first camera in the combination scheme, and a second path length from the current position of the second camera to all the to-be-detected defect positions allocated to the second camera in the combination scheme; and acquiring the combination scheme with the minimum path cost, and planning the path of the first camera and the second camera according to the combination scheme with the minimum path cost.
The method for acquiring the position information of the plurality of to-be-detected defect positions of the to-be-detected plate body and acquiring a plurality of combination schemes for distributing the position information to the first camera and the second camera comprises the following steps: distributing a first to-be-detected defect position set corresponding to the first camera and a second to-be-detected defect position set corresponding to the second camera based on the position information of the plurality of to-be-detected defect positions; acquiring a first combination scheme of the first camera according to the first set of defect positions to be detected, and acquiring a second combination scheme of the second camera according to the second set of defect positions to be detected; acquiring a combination scheme of the first camera and the second camera based on the first combination scheme and the second combination scheme.
Wherein the acquiring a first combination scheme of the first camera according to the first set of defect positions to be detected comprises: sequencing the first to-be-detected defect position set according to the position relation of the to-be-detected defects in a first direction, wherein the first direction is perpendicular to the running direction of the first camera; and distributing the acquisition sequence and the acquisition positions of the first camera according to the sorted first set of the positions of the defects to be detected to form a first combination scheme of the first camera.
The sorting the first defect position set to be detected according to the position relation of the defects to be detected in the first direction includes: when the positions of the defects to be detected in the first direction are not coincident, sorting the first defect position set to be detected according to the position relation of the defects to be detected in the first direction; when the positions of the defects to be detected in the first direction are overlapped, sorting the first defect position set to be detected according to the position relation of the defects to be detected in the first direction and the overlapped position relation of the defects to be detected in the second direction, wherein the second direction is the running direction of the first camera.
The plate body to be detected comprises a first plane and a second plane which are opposite, and the position information of a plurality of defect positions to be detected of the plate body to be detected comprises first position information of a plurality of first defect positions to be detected corresponding to the first plane and second position information of a plurality of second defect positions to be detected corresponding to the second plane; the camera still includes third camera and fourth camera, first camera with the second camera set up in the one side of the first plane of the plate body that awaits measuring, the third camera with the fourth camera set up in the one side of the second plane of the plate body that awaits measuring.
The method comprises the following steps of obtaining position information of a plurality of to-be-detected defect positions of a to-be-detected plate body, and obtaining a plurality of combination schemes for distributing the position information to a first camera and a second camera, wherein the steps comprise: creating a plurality of tree nodes, wherein the tree nodes include at least a first tree node for storing the first camera and a second tree node for storing the second camera; recursing a plurality of the position information to construct a plurality of layers of child nodes of the first tree node and the second tree node according to the plurality of the position information; and traversing the first tree node and the second tree node to obtain a plurality of combination schemes of the first camera and the second camera.
Wherein, a plurality of position information that wait to detect the defect position of plate body that awaits measuring of acquireing includes: acquiring defect data of the plate body to be detected; collecting a positioning image of the plate body to be detected, and identifying a reference point on the positioning image; and acquiring position information of a plurality of to-be-detected defect positions of the to-be-detected plate body based on the defect data and the reference points.
After the step of planning the path of the first camera and the second camera according to the combination scheme with the minimum path cost, the path planning method further includes: generating a first control signal of the first camera and a second control signal of the second camera according to the combination scheme with the minimum path cost; controlling the first camera to sequentially run from the current position to the to-be-detected defect positions allocated to the first camera in the combined scheme based on the first control signal, and acquiring a first defect image of each to-be-detected defect position; and controlling the second camera to sequentially run from the current position to the to-be-detected defect positions allocated to the second camera in the combination scheme based on the second control signal, and acquiring a second defect image of each to-be-detected defect position.
In order to solve the above problem, the present application provides a terminal device, where the terminal device includes a processor and a memory connected to the processor, where the memory stores program data, and the processor retrieves the program data stored in the memory to execute the path planning method as described above.
To solve the above problem, the present application provides a computer-readable storage medium storing program instructions that are executed to implement the path planning method as described above.
The application provides a path planning method, a terminal device and a computer readable storage medium, wherein the path planning method comprises the steps of obtaining the current position of a camera, wherein the camera at least comprises a first camera and a second camera; acquiring position information of a plurality of to-be-detected defect positions of a plate body to be detected, and acquiring a plurality of combination schemes for distributing the position information to a first camera and a second camera, wherein each combination scheme comprises the position information of all to-be-detected defect positions and the camera distributed to each to-be-detected defect position; calculating the path cost of each combination scheme, wherein the path cost at least comprises a first path length from the current position of the first camera to all to-be-detected defect positions allocated to the first camera in the combination scheme, and a second path length from the current position of the second camera to all to-be-detected defect positions allocated to the second camera in the combination scheme; and acquiring a combination scheme with the minimum path cost, and planning the path of the first camera and the second camera according to the combination scheme with the minimum path cost. By the method, the position information can be distributed to the first camera and the second camera according to a combination scheme with the minimum path cost, so that the acquisition path of the first camera and the acquisition path of the second camera are shortest, the image acquisition time is shortened, and the detection efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. Wherein:
fig. 1 is a schematic flow chart of a first embodiment of a path planning method provided in the present application;
fig. 2 is a schematic flowchart of a second embodiment of a path planning method provided in the present application;
fig. 3 is a schematic flowchart of a third embodiment of a path planning method provided in the present application;
fig. 4 is a schematic flowchart of a fourth embodiment of a path planning method provided in the present application;
FIG. 5 is a block diagram of an embodiment of a terminal device provided herein;
FIG. 6 is a block diagram of an embodiment of a computer-readable storage medium provided herein.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive work based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that, if directional indications (such as up, down, left, right, front, back, 8230; etc.) are involved in the embodiment of the present invention, the directional indications are only used for explaining the relative positional relationship between the components, the motion situation, etc. in a specific posture (as shown in the figure), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in an embodiment of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The application firstly provides a path planning method, which is applied to a terminal device, in particular, the terminal device can be applied to the field of defect detection of a PCB (printed circuit board), the terminal device is used for planning a plurality of mobile paths of positions to be detected of the PCB, the mobile paths are acquired by a plurality of cameras, in one embodiment, the terminal device can be a defect detection device for rechecking the defects of the PCB detected by an AOI (automated optical inspection) detection system, and in other embodiments, the terminal device can also be connected with the defect detection device and used for providing a path planning device for the defect detection device.
The terminal equipment of the application can be a server, and can also be a system in which the server and a local terminal are matched with each other. Accordingly, each part, for example, each unit, sub-unit, module, and sub-module, included in the terminal device may be all disposed in the server, or may be disposed in the server and the local terminal, respectively.
Further, the server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules, for example, software or software modules for providing distributed servers, or as a single software or software module, and is not limited herein. In some possible implementations, the attack protection method according to the embodiment of the present application may be implemented by a processor calling a computer readable instruction stored in a memory.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of a path planning method provided in the present application. As shown in fig. 1, the path planning method of the present embodiment includes the following steps:
step S11: a current position of a camera is acquired, the camera including at least a first camera and a second camera.
Specifically, the terminal device at least includes a first camera and a second camera, or the terminal device is connected to the first camera and the second camera, so as to plan the acquisition paths of the first camera and the second camera. When planning the path of the first camera and the second camera, the current positions of the first camera and the second camera need to be acquired.
The current position of the camera may be a final stop position when the first camera and the second camera acquire a defect image of the last board to be detected, or a position where the first camera and the second camera reset after acquiring the last board to be detected, which is not specifically limited.
Step S12: the method comprises the steps of obtaining position information of a plurality of to-be-detected defect positions of a plate body to be detected, and obtaining a plurality of combination schemes for distributing the position information to a first camera and a second camera, wherein each combination scheme comprises the position information of all to-be-detected defect positions and the camera distributed to each to-be-detected defect position.
And acquiring position information of the positions of the plurality of defects to be detected, wherein the position information is position coordinates corresponding to the plurality of defects on the plate body to be detected. In order to review a plurality of defects and further determine whether the plurality of defects are real defects, the defect detection device needs to acquire defect images of the plurality of defects again, and for this reason, the terminal device needs to distribute position information of a plurality of positions of the defects to be detected to the first camera and the second camera, so that the first camera and the second camera can re-acquire the positions of the plurality of defects to be detected.
Since each piece of position information can only be allocated to the first camera or the second camera, and the position information of the defect positions to be detected and the first camera and the second camera have multiple allocation modes, multiple combination schemes for allocating the position information to the first camera and the second camera can be obtained, each combination scheme should include all pieces of position information and the camera to which each piece of position information is allocated, that is, all pieces of position information in each combination scheme have corresponding allocated cameras, and the position information of the first camera and the second camera in each combination scheme is not repeated.
Step S13: and calculating the path cost of each combination scheme, wherein the path cost at least comprises a first path length from the current position of the first camera to all to-be-detected defect positions distributed to the first camera in the combination scheme, and a second path length from the current position of the second camera to all to-be-detected defect positions distributed to the second camera in the combination scheme.
After a plurality of combination schemes for distributing a plurality of position information to a first camera and a second camera are obtained, path costs of each combination scheme are respectively calculated, wherein the path costs comprise a first path length from the current position of the first camera to all to-be-detected defect positions distributed to the first camera in the combination scheme and a second path length from the current position of the second camera to all to-be-detected defect positions distributed to the second camera in the combination scheme.
The first camera or the second camera can be generated according to the distance between the position information and the camera according to the acquisition sequence when the position information in the combination scheme runs, and the camera can preferentially acquire the defect with the position closer to the position of the defect to be detected, so that the path cost of the combination scheme is lower.
Step S14: and acquiring a combination scheme with the minimum path cost, and planning the path of the first camera and the second camera according to the combination scheme with the minimum path cost.
And acquiring a combination scheme with the minimum path cost in all the combination schemes, and generating planned paths of the first camera and the second camera according to the moving sequence of the combination scheme with the minimum path cost so as to enable the first camera and the second camera to acquire defect images according to the planned paths.
In the embodiment of the application, the path cost of each combination scheme is calculated by obtaining a plurality of combination schemes for distributing the position information to the first camera and the second camera, and the combination scheme with the minimum path cost is selected to plan the paths of the first camera and the second camera, so that the path of the first camera and the second camera moving to the defect positions is the shortest, the time required by image acquisition is effectively reduced, and the defect detection efficiency is improved.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a second embodiment of the path planning method provided in the present application. As shown in fig. 2, in the present embodiment, step S12 further includes the following steps:
step S21: a first data set of a first camera and a second data set of a second camera are acquired based on a number of position information.
A number of position information is assigned to the first camera and the second camera to acquire a first data set of the first camera and a second data set of the second camera. And the intersection of the first data set and the second data set is an empty set, and the union of the first data set and the second data set comprises all the position information.
Step S22: a first combination scheme of the first camera is acquired from the first data set and a second combination scheme of the second camera is acquired from the second data set.
A first combination scheme of the first camera is acquired from the first data set and a second combination scheme of the second camera is acquired from the second data set, the first combination scheme comprising the first data set and an order in which the first camera runs the first data set, the second combination scheme comprising the second data set and an order in which the second camera runs the second data set.
Step S23: and acquiring a combination scheme of the first camera and the second camera based on the first combination scheme and the second combination scheme.
And acquiring the combination scheme of the first camera and the second camera according to the acquired first combination scheme and the acquired second combination scheme, and further acquiring a plurality of combination schemes for distributing the position information to the first camera and the second camera.
Therefore, in the above embodiment, by acquiring the first data set of the first camera and the second data set of the second camera, the first combination scheme of the first camera and the second combination scheme of the second camera are acquired, so as to plan the paths of the first camera and the second camera according to the first combination scheme and the second combination scheme, thereby improving the efficiency of defect detection.
Further, step S22 includes the steps of: sequencing a first defect position set to be detected according to the position relation of the defects to be detected in a first direction, wherein the first direction is perpendicular to the running direction of a first camera; and distributing the acquisition sequence and the acquisition position of the first camera according to the sorted first defect position set to be detected to form a first combination scheme of the first camera.
Specifically, in the process of conveying the plate body to be detected by the defect detection device, the defect detection device acquires an image of the plate body to be detected. The first camera and the second camera can slide along the vertical direction of the conveying direction through the sliding rail so as to acquire images of a plurality of position information of the plate body to be detected.
Before the plate body to be detected enters the image acquisition area, the position of the circuit board is adjusted through a baffle plate arranged on the defect detection device, so that the first direction of the coordinate system of the plate body to be detected is basically parallel to the vertical direction of the conveying direction, and when the position information of the first data set is unequal in the first direction, the combination scheme of the first camera and the second camera is obtained according to the sequence of the first direction of the position information.
In the above embodiment, the first defect position set to be detected is sorted according to the position relationship of the defects to be detected in the first direction, so that in the combination scheme, the defects with the closer defect positions to be detected are preferentially collected according to the distance relationship between the current position and the defect positions to be detected, and the computation load of the terminal device is reduced.
Referring to fig. 3, fig. 3 is a schematic flow chart of a third embodiment of the path planning method provided in the present application. As shown in fig. 3, in the present embodiment, the first direction is perpendicular to the moving direction of the first camera, the second direction is parallel to the moving direction of the first camera, and the step S22 of obtaining the first combination of the first camera according to the first set of defect positions to be detected further includes the steps of:
step S31: and when the positions of the plurality of defects to be detected in the first direction do not coincide, sequencing the first defect position set to be detected according to the position relation of the defects to be detected in the first direction.
When the data of the to-be-detected defects in the first to-be-detected defect position set in the first direction are not equal, for example, the position information of the to-be-detected defect position is represented by the position of a coordinate system formed by the first direction and the second direction, and if the coordinate values of the position information of two or more to-be-detected defect positions in the first to-be-detected defect position set in the first direction are not equal, the first to-be-detected defect position set is sorted according to the position relationship of the to-be-detected defects in the first direction.
Step S32: when the positions of a plurality of defects to be detected in the first direction coincide, sorting a first defect position set to be detected according to the position relation of the defects to be detected in the first direction and the position relation of the coincided defects to be detected in the second direction, wherein the second direction is the running direction of the first camera.
When the data of the to-be-detected defects in the first to-be-detected defect position set in the first direction are equal, or the coordinate values of the position information of more than two to-be-detected defect positions in the first to-be-detected defect position set in the first direction are equal, sorting the first to-be-detected defect position set according to the position relation of the to-be-detected defects in the first direction, and sorting the position information of the overlapped to-be-detected defect positions according to the position relation of the overlapped to-be-detected defects in the second direction.
Step S33: and distributing the acquisition sequence and the acquisition position of the first camera according to the sorted first defect position set to be detected to form a first combination scheme of the first camera.
And acquiring the sorted first defect position set to be detected, and distributing the acquisition sequence and the acquisition position of the first camera according to the sequence of the first defect position set to be detected and the current position of the first camera. Specifically, the acquisition order of the first camera may be assigned according to a distance relationship between the current position of the first camera and the position of the defect to be detected, so that when the first path length from the current position of the first camera to the position of the defect to be detected in the first set of defect positions to be detected is calculated, it is not necessary to calculate all sorting schemes of the plurality of positions of the defect to be detected in the first combination scheme.
In the above embodiment, the first defect position set to be detected is sorted according to the position relationship of the defects to be detected in the first direction, and when the positions in the first direction coincide, the first defect position set to be detected can be sorted according to the position relationship of the defects to be detected in the first direction and the coinciding position relationship of the defects to be detected in the second direction, so that it is not necessary to calculate all sorting schemes of the plurality of defect positions to be detected in the first combination scheme, the computation load of the terminal device is reduced, and the defect detection efficiency is improved.
Optionally, a specific implementation of the second combination scheme for obtaining the second camera according to the second set of defect positions to be detected is similar to steps S31 to S33, and is not described herein again.
Optionally, the board body to be detected includes a first plane and a second plane that are opposite to each other, and the position information of the plurality of defect positions to be detected of the board body to be detected includes first position information of a plurality of first defect positions to be detected corresponding to the first plane and second position information of a plurality of second defect positions to be detected corresponding to the second plane.
The first plane and the second plane of the plate body to be detected can be the upper surface and the lower surface of the plate body to be detected, and the plate body to be detected enters the defect detection device in a posture that the first plane faces upwards and the second plane faces downwards, so that the defect detection device can detect the defects of the first plane and the second plane of the plate body to be detected simultaneously.
Specifically, the camera still includes third camera and fourth camera, and first camera and second camera set up in the one side of the first plane of the plate body that awaits measuring, and third camera and fourth camera set up in the one side of the second plane of the plate body that awaits measuring. The first camera and the second camera are used for collecting images of defects of a first plane of a plate body to be detected, and the third camera and the fourth camera are used for collecting images of defects of a second plane of the plate body to be detected.
When the control terminal device acquires the combination scheme of the first plane and the combination scheme of the second plane, each defect position to be detected can only exist in the first plane or the second plane, so that classification can be performed when position information of a plurality of defect positions to be detected of the plate body to be detected is acquired, the position information of the defect position to be detected of the first plane and the position information of the defect position to be detected of the second plane are distinguished, and the first position information of the first plane and the position information of the second plane are acquired.
In the above embodiment, can carry out image acquisition through the defect of the first plane of first camera to the plate body that awaits measuring, third camera, fourth camera carry out image acquisition to the defect of the second plane of the plate body that awaits measuring to carry out defect detection to the first plane of the plate body that awaits measuring, second plane simultaneously, need not to detect the second plane again after detecting the first plane with the plate body upset that awaits measuring, avoid causing the damage to the circuit board when artifical or apparatus upset, improve detection efficiency.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a fourth embodiment of the path planning method provided in the present application. As shown in fig. 4, in this embodiment, a binary tree manner is used to obtain multiple combination schemes for allocating several pieces of position information to the first camera and the second camera, and specifically, step S12 further includes the following steps:
step S41: a plurality of tree nodes is created, wherein the tree nodes include at least a first tree node for storing a first camera and a second tree node for storing a second camera.
Specifically, when a plurality of combination schemes for distributing a plurality of position information to a first camera and a second camera are acquired, a plurality of tree nodes are created first, the number of the tree nodes corresponds to the number of the cameras, and the tree nodes at least include a first tree node for storing the first camera and a second tree node for storing the second camera.
Step S42: and recursing the plurality of position information to construct a plurality of layers of child nodes of the first tree node and the second tree node according to the plurality of position information.
When several pieces of position information are assigned to the first camera and the second camera, for a first tree node of the first camera, a plurality of child nodes need to be constructed from a plurality of pieces of position information that may be assigned. For example, the position information includes first position information, second position information, third position information, and fourth position information, and in a possible scheme, the first position information, the second position information, and the third position information are assigned to the first camera, each layer of the child nodes of the first tree node needs to include the first position information, the second position information, and the third position information, and the reference relationship between each layer of the child nodes of the first tree node is an order from the current position of the first camera to the first position information, the second position information, and the third position information.
Where recursion refers to a method in which a function calls itself as a subroutine. Recursion of the plurality of location information refers to a process of referring to the location information that has been previously allocated in the process of allocating the plurality of location information to the first tree node and the second tree node. And sequentially inserting a plurality of pieces of position information into the first tree node and the second tree node, and sequentially constructing child nodes of each layer of the first tree node and the second tree node according to the insertion sequence. Specifically, the tree node includes a plurality of layers of child nodes, and when each layer of child nodes of the tree node is searched, all child nodes before the layer of child nodes need to be referred to, that is, the plurality of layers of child nodes of the first tree node and the second tree node can be obtained by recursion of a plurality of pieces of position information.
Step S43: and traversing the first tree node and the second tree node to obtain a plurality of combination schemes of the first camera and the second camera.
After the multi-level child nodes of the first tree node and the multi-level child nodes of the second tree node are obtained, all objects of the first tree node and the second tree node are traversed to export all stored objects in the binary tree to form a combination scheme of the first camera and the second camera. The manner of traversal includes, but is not limited to, a backward traversal or a forward traversal.
In the above embodiment, a tree data structure of a binary tree is used to obtain a plurality of combination schemes for allocating a plurality of pieces of position information to the first camera and the second camera, so as to subdivide the plurality of pieces of position information into the first camera and the second camera, store related information allocated to the first camera and the second camera into child nodes, and traverse the tree nodes to obtain the combination schemes of the first camera and the second camera.
Optionally, when the board body to be measured includes the first plane and the second plane that are opposite to each other, and the camera includes the third camera and the fourth camera, the specific manner of obtaining the multiple combination schemes in the tree node manner is correspondingly adjusted.
Specifically, the first camera and the second camera are used for collecting images of defects of a first plane of the plate body to be detected, and the third camera and the fourth camera are used for collecting images of defects of a second plane of the plate body to be detected. Therefore, a plurality of combination schemes for distributing several pieces of position information to the first camera and the second camera can be obtained by constructing a tree structure of the quadtree. Wherein the tree nodes include a first tree node for storing a first camera, a second tree node for storing a second camera, a third tree node for storing a third camera, and a fourth tree node for storing a fourth camera. The specific steps of obtaining multiple combination schemes by constructing sub-nodes of each layer of tree nodes are similar to those in the above embodiments, and are not described herein again.
Optionally, step S11 further comprises the steps of: acquiring defect data of a plate body to be detected; collecting a positioning image of a plate body to be detected, and identifying a reference point on the positioning image; and acquiring position information of a plurality of to-be-detected defect positions of the plate body to be detected based on the defect data and the reference points.
The defect data is a detection result obtained after the plate body to be detected is optically detected by the AOI detection system, and the defect data comprises coordinate data of a plurality of defects of the plate body to be detected and a mapping relation between the plate body to be detected and the coordinate data.
The positioning image of the plate body to be detected corresponds to the actual plate body to be detected, and is used for identifying a reference point of the plate body to be detected in the positioning image, and determining position information of a plurality of defects in defect data in the actual plate body to be detected based on a mapping relation between the reference point and the plate body to be detected and coordinate data, so that when path planning is carried out on a combination scheme of subsequently distributing the plurality of position information to a first camera and a second camera, the first camera and the second camera can be positioned to a specific defect area according to the position information.
Optionally, after step S14, the path planning method may further include the following steps: generating a first control signal of a first camera and a second control signal of a second camera according to a combination scheme with the minimum path cost; controlling a first camera to sequentially run from the current position to the to-be-detected defect positions allocated to the first camera in the combination scheme based on a first control signal, and acquiring a first defect image of each to-be-detected defect position; and controlling the second camera to sequentially run to the to-be-detected defect positions allocated to the second camera in the combination scheme from the current position based on the second control signal, and acquiring a second defect image of each to-be-detected defect position.
After the combination scheme with the minimum path cost is obtained, a first control signal and a second control signal are generated to control the first camera and the second camera respectively, so that the time required by camera acquisition is reduced, and the defect detection speed is increased.
Referring to fig. 5, fig. 5 is a schematic frame diagram of a terminal device according to an embodiment of the present disclosure. As shown in fig. 5, the terminal device 100 includes a processor 101 and a memory 102 connected to the processor 101, wherein the memory 102 stores program data, and the processor 101 retrieves the program data stored in the memory 102 to execute the path planning method.
Optionally, in an embodiment, the processor 101 is configured to execute the sequence data to implement the following method: acquiring a current position of a camera, the camera including at least a first camera and a second camera; acquiring position information of a plurality of to-be-detected defect positions of a plate body to be detected, and acquiring a plurality of combination schemes for distributing the position information to a first camera and a second camera, wherein each combination scheme comprises the position information of all to-be-detected defect positions and the camera distributed to each to-be-detected defect position; calculating the path cost of each combination scheme, wherein the path cost at least comprises a first path length from the current position of the first camera to all to-be-detected defect positions allocated to the first camera in the combination scheme, and a second path length from the current position of the second camera to all to-be-detected defect positions allocated to the second camera in the combination scheme; and acquiring a combination scheme with the minimum path cost, and planning the path of the first camera and the second camera according to the combination scheme with the minimum path cost.
The processor 101 may also be referred to as a Central Processing Unit (CPU). The processor 101 may be an electronic chip having signal processing capabilities. The processor 101 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 102 may be a memory bank, a TF card, etc., and may store all information in the terminal device 100, including input raw data, computer programs, intermediate operation results, and final operation results, all of which are stored in the storage 102. Which stores and retrieves information based on the location specified by the processor 101. With the memory 102, the terminal device 100 has a memory function to ensure normal operation. The storage 102 of the terminal device 100 may be classified into a main storage (internal storage) and a sub storage (external storage) according to the purpose, and there is a classification method into an external storage and an internal storage. The external memory is usually a magnetic medium, an optical disk, or the like, and can store information for a long period of time. The memory refers to a storage component on the main board, which is used for storing data and programs currently being executed, but is only used for temporarily storing the programs and the data, and the data is lost when the power is turned off or the power is cut off.
Optionally, after the terminal device plans the path of the camera, the terminal device may further perform motion control on the first camera and the second camera according to the combination scheme with the minimum path cost, so that the first camera and the second camera can acquire the defect area of the board to be detected according to the scheme with the minimum path cost. The motion control function of the terminal device may be implemented by a motion control card, or may be implemented by other devices, which is not specifically limited herein.
Referring to fig. 6, fig. 6 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided in the present application. As shown in fig. 6, the computer readable storage medium 200 has stored therein program instructions 211 that are capable of implementing all of the methods described above.
The unit in which the functional units in the embodiments of the present application are integrated may be stored in the computer-readable storage medium 200 if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, and the computer-readable storage medium 200 includes several instructions in a program instruction 211, so as to enable a computer device (which may be a personal computer, a system server, or a network device, etc.), an electronic device (such as MP3, MP4, etc., and may also be a mobile terminal such as a mobile phone, a tablet computer, a wearable device, etc., or a desktop computer, etc.), or a processor (processor) to execute all or part of the steps of the method of the embodiments of the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media 200 (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It is to be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by the computer-readable storage medium 200. These computer-readable storage media 200 may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the program instructions 211, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer-readable storage media 200 may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the program instructions 211 stored in the computer-readable storage media 200 produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer-readable storage media 200 may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the program instructions 211 executed on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an embodiment of the present application, and is not intended to limit the scope of the present application, and all equivalent structures or equivalent processes performed by the present application and the contents of the attached drawings, which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.
Claims (10)
1. A method of path planning, comprising:
acquiring a current position of cameras, the cameras including at least a first camera and a second camera;
acquiring position information of a plurality of to-be-detected defect positions of a plate body to be detected, and acquiring a plurality of combination schemes for distributing the position information to the first camera and the second camera, wherein each combination scheme comprises the position information of all to-be-detected defect positions and the camera distributed to each to-be-detected defect position;
calculating a path cost of each combination scheme, wherein the path cost at least comprises a first path length from the current position of the first camera to all the to-be-detected defect positions allocated to the first camera in the combination scheme, and a second path length from the current position of the second camera to all the to-be-detected defect positions allocated to the second camera in the combination scheme;
and acquiring the combination scheme with the minimum path cost, and planning the path of the first camera and the second camera according to the combination scheme with the minimum path cost.
2. The path planning method according to claim 1, wherein the obtaining of the position information of the plurality of positions of the defect to be detected of the board body to be detected and obtaining of a plurality of combination schemes for allocating the plurality of position information to the first camera and the second camera comprises:
distributing a first to-be-detected defect position set corresponding to the first camera and a second to-be-detected defect position set corresponding to the second camera based on the position information of the plurality of to-be-detected defect positions;
acquiring a first combination scheme of the first camera according to the first set of defect positions to be detected, and acquiring a second combination scheme of the second camera according to the second set of defect positions to be detected;
acquiring a combination scheme of the first camera and the second camera based on the first combination scheme and the second combination scheme.
3. The path planning method according to claim 2, wherein the obtaining of the first combination of the first camera according to the first set of defect positions to be detected comprises:
sequencing the first defect position set to be detected according to the position relation of the defects to be detected in a first direction, wherein the first direction is perpendicular to the running direction of the first camera;
and distributing the acquisition sequence and the acquisition positions of the first camera according to the sorted first set of the positions of the defects to be detected to form a first combination scheme of the first camera.
4. The path planning method according to claim 3, wherein the sorting the first to-be-detected defect position set according to the position relationship of the to-be-detected defect in the first direction includes:
when the positions of the defects to be detected in the first direction are not coincident, sequencing the first defect position set to be detected according to the position relation of the defects to be detected in the first direction;
when the positions of the defects to be detected in the first direction are overlapped, sorting the first defect position set to be detected according to the position relation of the defects to be detected in the first direction and the overlapped position relation of the defects to be detected in the second direction, wherein the second direction is the running direction of the first camera.
5. The path planning method according to claim 1,
the plate body to be detected comprises a first plane and a second plane which are opposite, and the position information of a plurality of defect positions to be detected of the plate body to be detected comprises first position information of a plurality of first defect positions to be detected corresponding to the first plane and second position information of a plurality of second defect positions to be detected corresponding to the second plane;
the camera still includes third camera and fourth camera, first camera with the second camera set up in the one side on the first plane of the plate body that awaits measuring, the third camera with the fourth camera set up in the one side on the second plane of the plate body that awaits measuring.
6. The path planning method according to claim 1, wherein the step of obtaining position information of a plurality of to-be-detected defect positions of a board body to be detected and obtaining a plurality of combination schemes for distributing the position information to the first camera and the second camera comprises:
creating a plurality of tree nodes, wherein the tree nodes include at least a first tree node for storing the first camera and a second tree node for storing the second camera;
recursing a plurality of the position information to construct a plurality of layers of child nodes of the first tree node and the second tree node according to the plurality of the position information;
and traversing the first tree node and the second tree node to obtain a plurality of combination schemes of the first camera and the second camera.
7. The path planning method according to claim 1, wherein the obtaining of the position information of the plurality of to-be-detected defect positions of the board body to be detected includes:
acquiring defect data of the plate body to be detected;
collecting a positioning image of the plate body to be detected, and identifying a reference point on the positioning image;
and acquiring the position information of a plurality of to-be-detected defect positions of the plate body to be detected based on the defect data and the reference points.
8. The path planning method according to claim 1, wherein after the step of performing the path planning on the first camera and the second camera according to the combination scheme with the minimum path cost, the path planning method further comprises:
generating a first control signal of the first camera and a second control signal of the second camera according to the combination scheme with the minimum path cost;
controlling the first camera to sequentially run from the current position to the to-be-detected defect positions allocated to the first camera in the combined scheme based on the first control signal, and acquiring a first defect image of each to-be-detected defect position;
and controlling the second camera to sequentially run from the current position to the to-be-detected defect positions allocated to the second camera in the combination scheme based on the second control signal, and acquiring a second defect image of each to-be-detected defect position.
9. A terminal device, characterized in that the terminal device comprises a processor and a memory connected with the processor, wherein the memory stores program data, and the processor calls the program data stored in the memory to execute the path planning method according to any one of claims 1-8.
10. A computer-readable storage medium, in which program instructions are stored, which program instructions are executed to implement the path planning method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211009962.4A CN115469653A (en) | 2022-08-22 | 2022-08-22 | Path planning method, terminal device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211009962.4A CN115469653A (en) | 2022-08-22 | 2022-08-22 | Path planning method, terminal device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115469653A true CN115469653A (en) | 2022-12-13 |
Family
ID=84366602
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211009962.4A Pending CN115469653A (en) | 2022-08-22 | 2022-08-22 | Path planning method, terminal device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115469653A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101571493A (en) * | 2008-04-29 | 2009-11-04 | 台达电子工业股份有限公司 | Path planning method used after optical detection of defects |
CN106997494A (en) * | 2017-03-22 | 2017-08-01 | 北京京东尚科信息技术有限公司 | Logistics distribution planing method, Logistics Distribution Method and its device |
US10140875B1 (en) * | 2017-05-27 | 2018-11-27 | Hefei University Of Technology | Method and apparatus for joint optimization of multi-UAV task assignment and path planning |
CN111208815A (en) * | 2019-12-24 | 2020-05-29 | 浙江大华技术股份有限公司 | Method for distributing a plurality of handling tasks to a plurality of automated guided vehicles and related device |
CN111639811A (en) * | 2020-06-01 | 2020-09-08 | 中国农业大学 | Multi-agricultural-machine cooperative work remote management scheduling method based on improved ant colony algorithm |
CN112577970A (en) * | 2019-09-30 | 2021-03-30 | 深圳中科飞测科技股份有限公司 | Detection method, alignment method of detection equipment and detection equipment |
CN113074728A (en) * | 2021-03-05 | 2021-07-06 | 北京大学 | Multi-AGV path planning method based on jumping point routing and collaborative obstacle avoidance |
CN114782286A (en) * | 2022-06-21 | 2022-07-22 | 奥蒂玛光学科技(深圳)有限公司 | Defect repairing method, optical repairing device, electronic device and storage medium |
-
2022
- 2022-08-22 CN CN202211009962.4A patent/CN115469653A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101571493A (en) * | 2008-04-29 | 2009-11-04 | 台达电子工业股份有限公司 | Path planning method used after optical detection of defects |
CN106997494A (en) * | 2017-03-22 | 2017-08-01 | 北京京东尚科信息技术有限公司 | Logistics distribution planing method, Logistics Distribution Method and its device |
US10140875B1 (en) * | 2017-05-27 | 2018-11-27 | Hefei University Of Technology | Method and apparatus for joint optimization of multi-UAV task assignment and path planning |
CN112577970A (en) * | 2019-09-30 | 2021-03-30 | 深圳中科飞测科技股份有限公司 | Detection method, alignment method of detection equipment and detection equipment |
CN111208815A (en) * | 2019-12-24 | 2020-05-29 | 浙江大华技术股份有限公司 | Method for distributing a plurality of handling tasks to a plurality of automated guided vehicles and related device |
CN111639811A (en) * | 2020-06-01 | 2020-09-08 | 中国农业大学 | Multi-agricultural-machine cooperative work remote management scheduling method based on improved ant colony algorithm |
CN113074728A (en) * | 2021-03-05 | 2021-07-06 | 北京大学 | Multi-AGV path planning method based on jumping point routing and collaborative obstacle avoidance |
CN114782286A (en) * | 2022-06-21 | 2022-07-22 | 奥蒂玛光学科技(深圳)有限公司 | Defect repairing method, optical repairing device, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110210302A (en) | Multi-object tracking method, device, computer equipment and storage medium | |
CN110163889A (en) | Method for tracking target, target tracker, target following equipment | |
CN106033621B (en) | A kind of method and device of three-dimensional modeling | |
CN107920246B (en) | The gradient test method and device of camera module | |
CN104732210A (en) | Target human face tracking method and electronic equipment | |
CN109145860A (en) | Lane line tracking and device | |
CN110942474B (en) | Robot target tracking method, device and storage medium | |
CN113421242B (en) | Welding spot appearance quality detection method and device based on deep learning and terminal | |
CN112549034A (en) | Robot task deployment method, system, equipment and storage medium | |
CN108109176A (en) | Articles detecting localization method, device and robot | |
CN113362441A (en) | Three-dimensional reconstruction method and device, computer equipment and storage medium | |
CN113689471B (en) | Target tracking method, device, computer equipment and storage medium | |
CN113392794B (en) | Vehicle line crossing identification method and device, electronic equipment and storage medium | |
CN114463603B (en) | Training method and device for image detection model, electronic equipment and storage medium | |
CN114998743A (en) | Method, device, equipment and medium for constructing visual map points | |
CN115469653A (en) | Path planning method, terminal device and computer readable storage medium | |
CN112258647B (en) | Map reconstruction method and device, computer readable medium and electronic equipment | |
Zhang et al. | Reidentification-based automated matching for 3D localization of workers in construction sites | |
CN113658265A (en) | Camera calibration method and device, electronic equipment and storage medium | |
CN117474998A (en) | Goods shelf position detection method, device, equipment and storage medium | |
CN114359376A (en) | Parcel positioning method and device, electronic equipment and storage medium | |
CN109523530A (en) | A kind of micro strip circular pad detection method and system | |
CN114037921A (en) | Sag modeling method and system based on intelligent unmanned aerial vehicle identification | |
CN113887384A (en) | Pedestrian trajectory analysis method, device, equipment and medium based on multi-trajectory fusion | |
CN113177975A (en) | Depth calculation method and three-dimensional modeling method based on dome camera and laser radar |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |