Detection camera path planning method and device, computer device and storage medium

By adjusting the coverage relationship between the detection window and the target, establishing affiliation relationships, and optimizing window planning, the problem of limited detection efficiency of AOI equipment was solved. This enabled unique imaging of each target and reduced movement paths, thereby improving detection efficiency.

CN121007845BActive Publication Date: 2026-01-06SHENZHEN ZHENHUAXING INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511539053.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-06
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

Existing AOI equipment cannot dynamically adjust the number and position of windows based on the distribution of the targets to be detected during the detection path planning, which limits the improvement of detection efficiency.

Method used

By adjusting the coverage relationship between the detection window and the detection target, an attribution relationship is established, and the window is optimized based on the updated attribution relationship to dynamically plan the detection path.

Benefits of technology

This ensures that each target is captured only once, avoiding duplicate detection, reducing the length of the detection camera's movement path, and improving detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121007845B_ABST
    Figure CN121007845B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of detection camera path planning method, device, computer equipment and storage medium, the method comprises: obtaining to be detected region, and multiple detection targets are included in to be detected region;To be detected region is divided into multiple detection windows, multiple detection windows cover to be detected region;According to the covering relationship between detection window and detection target, adjust detection window, so that the detection window after adjustment covers all at least one detection target and the part not covered any detection target, establish the attribution between detection window and detection target;Update attribution, so that one detection target and one detection window have attribution, and according to the updated attribution, adjust detection window, obtain optimization window;According to optimization window, planning detection path;Wherein, adjust detection window includes new detection window, delete detection window or move the position of detection window.The present application can improve detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of detection, and more particularly to a method, apparatus, computer device, and storage medium for camera path planning. Background Technology

[0002] AOI (Automated Optical Inspection) equipment is widely used in surface defect detection and feature recognition of industrial products such as printed circuit boards (PCBs), becoming an important inspection tool to ensure product quality.

[0003] Since the area captured by the inspection camera of an AOI device is limited, it is necessary to control the inspection camera to move to the position of each target to acquire images. Traditional inspection path planning methods mainly divide the circuit board into multiple static inspection windows based on fixed rules and plan the movement path of the inspection camera in a preset order. However, when there are many targets to be inspected and their distribution density is uneven, the division of inspection windows lacks flexibility. It is impossible to dynamically adjust the number and position of windows according to the target distribution, increase the inspection path length, and the fixed path planning limits the potential for improving inspection efficiency. Summary of the Invention

[0004] To solve the above-mentioned technical problems, or at least partially solve them, the present invention provides a method, apparatus, computer device, and storage medium for detecting camera path planning.

[0005] In a first aspect, the present invention provides a method for detecting camera path planning, the method comprising:

[0006] Obtain the region to be detected, which includes multiple detection targets;

[0007] The area to be detected is divided into multiple detection windows, and the multiple detection windows cover the area to be detected.

[0008] Based on the coverage relationship between the detection window and the detection target, the detection window is adjusted so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, thereby establishing the attribution relationship between the detection window and the detection target;

[0009] The attribution relationship is updated so that there is an attribution relationship between a detection target and a detection window, and the detection window is adjusted according to the updated attribution relationship to obtain an optimized window;

[0010] Based on the optimized window, plan the detection path;

[0011] The adjustment of the detection window includes creating a new detection window, deleting a detection window, or moving the position of the detection window.

[0012] Optionally, the step of adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0013] If the first detection window does not cover any of the detection targets, then the first detection window is deleted.

[0014] Optionally, the step of adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0015] If the second detection window covers part of the second detection target, a third detection window is created, so that the third detection window covers the entire second detection target, and the entire second detection target is located within the preset range of the third detection window;

[0016] Delete the second detection window;

[0017] Determine whether the third detection window still covers part or all of the third detection target;

[0018] If the third detection window also covers the entirety of the third detection target, then an attribution relationship is established between the third detection window and the second detection target, and the third detection target.

[0019] Optionally, if the third detection window also covers a portion of the third detection target, then:

[0020] A new fourth detection window is created, which covers the entire third detection target, and the entire third detection target is located within a preset range of the fourth detection window;

[0021] Move the position of the third detection window so that it does not cover any of the other detection targets besides the second detection target;

[0022] Establish the attribution relationship between the third detection window and the second detection target.

[0023] Optionally, the step of adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0024] If the fifth detection window covers the entirety of the fourth detection target but does not cover any part of any of the aforementioned detection targets, then:

[0025] Move the position of the fifth detection window so that all of the fourth detection target is within the preset range of the fifth detection window;

[0026] Determine whether the fifth detection window, after being moved, still covers part or all of the fifth detection target;

[0027] If the moved fifth detection window still covers the entirety of the fifth detection target, then an attribution relationship is established between the fifth detection window and the fourth and fifth detection targets.

[0028] Optionally, the step of adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0029] If the sixth detection window covers the entirety of the fifth detection target and also covers a portion of the sixth detection target, then:

[0030] Move the position of the sixth detection window so that all of the fifth detection target is within the preset range of the sixth detection window;

[0031] Determine whether the moved sixth detection window still covers part or all of the sixth detection target;

[0032] If the moved sixth detection window still covers the entire sixth detection target, then the attribution relationship between the sixth detection window and the fifth and sixth detection targets is established.

[0033] Optionally, updating the attribution relationship to establish an attribution relationship between a detection target and a detection window, and adjusting the detection window based on the updated attribution relationship to obtain an optimized window, includes:

[0034] In the current affiliation update, any of the aforementioned detection windows is used as the verification window;

[0035] Obtain the attribution relationship between the verification window and the detection target;

[0036] If all detected targets that have a relationship with the verification window have already been assigned to other detection windows outside the verification window, then the verification window is deleted.

[0037] If any of the detection targets that have an affiliation with the verification window have no affiliation with any of the other detection windows outside the verification window, then the verification window is retained.

[0038] After traversing all the detection windows, it is determined whether the convergence condition is met. If the convergence condition is met, all the verification windows retained in the current attribution relationship update are used as the optimization windows.

[0039] If the convergence condition is not met, the next attribution update will be performed until the convergence condition is met.

[0040] The convergence condition is as follows: the number of times the attribution relationship is updated reaches a preset number, or the number of all verification windows retained after the current attribution relationship update is unchanged from the number of all verification windows retained after the previous N attribution relationship updates. .

[0041] Secondly, a camera path planning device is provided, the device comprising:

[0042] A region acquisition unit is used to acquire a region to be detected, wherein the region to be detected includes multiple detection targets;

[0043] A partitioning unit is used to divide the area to be detected into multiple detection windows, wherein the multiple detection windows cover the area to be detected.

[0044] The attribution unit is used to adjust the detection window according to the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, thereby establishing the attribution relationship between the detection window and the detection target;

[0045] An update unit is used to update the attribution relationship so that there is an attribution relationship between a detection target and a detection window, and to adjust the detection window according to the updated attribution relationship to obtain an optimized window;

[0046] The planning unit is used to plan the detection path based on the optimization window;

[0047] The adjustment of the detection window includes creating a new detection window, deleting a detection window, or moving the position of the detection window.

[0048] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any of the preceding claims.

[0049] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the preceding claims.

[0050] This invention provides a method, apparatus, computer device, and storage medium for camera path planning. The method includes: acquiring a region to be detected, which includes multiple detection targets; dividing the region to be detected into multiple detection windows, each detection window covering the region; adjusting the detection windows according to the coverage relationship between the detection windows and the detection targets, such that the adjusted detection windows cover the entirety of at least one detection target and the portion not covering any detection target, establishing an attribution relationship between the detection windows and the detection targets; updating the attribution relationship so that a detection target has an attribution relationship with a detection window, and adjusting the detection windows according to the updated attribution relationship to obtain an optimized window; and planning a detection path based on the optimized window. The adjustment of the detection windows includes creating new detection windows, deleting detection windows, or moving the position of detection windows. In this embodiment of the invention, the optimized window includes, but is not limited to, the entirety of at least one detected target, excluding any part of any detected target. That is, it covers only complete detected targets and avoids covering incomplete ones. Furthermore, each detected target belongs to only one detection window. Based on the detection path planned according to the aforementioned detection windows, the image obtained after the detection camera takes a picture includes every detected target, and each detected target appears only once, ensuring that no detected targets are missed or detected repeatedly. In addition, in this embodiment of the invention, incomplete detected targets are also avoided, thus eliminating the need for image stitching in subsequent processing. Therefore, the method of this invention can dynamically adjust the number and position of windows according to the target distribution, reducing the length of the detection camera's movement path and improving detection efficiency. Attached Figure Description

[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1The diagram shown illustrates the application environment of the detection camera path planning method according to an embodiment of the present invention.

[0054] Figure 2 The diagram shown is a schematic flowchart of the detection camera path planning method according to an embodiment of the present invention.

[0055] Figure 3 The diagram shown is a schematic representation of the detection window in an embodiment of the present invention.

[0056] Figure 4 The diagram shown is a schematic representation of the detection window and detection target according to an embodiment of the present invention.

[0057] Figure 5 The diagram shown is a schematic representation of the detection window and detection target according to an embodiment of the present invention.

[0058] Figure 6 The diagram shown is a schematic representation of the detection window and detection target according to an embodiment of the present invention.

[0059] Figure 7 The diagram shown is a schematic flowchart of the detection camera path planning method according to an embodiment of the present invention.

[0060] Figure 8 The diagram shown is a structural block diagram of the detection camera path planning device according to an embodiment of the present invention.

[0061] Figure 9 The diagram shown is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] Figure 1 This is a diagram illustrating the application environment of a camera path planning method in one embodiment. (Refer to...) Figure 1 This camera path planning method is applied to a camera path planning system. The method includes a terminal 110 and / or a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; a mobile terminal can be at least one of a mobile phone, tablet, or laptop. The server 120 can be a standalone server or a server cluster consisting of multiple servers.

[0064] Figure 2 The image shows a camera path planning method according to an embodiment of the present invention. The method includes:

[0065] Step 210: Obtain the area to be detected, which includes multiple detection targets;

[0066] Step 220: Divide the area to be detected into multiple detection windows, and the multiple detection windows cover the area to be detected;

[0067] Step 230: Based on the coverage relationship between the detection window and the detection target, adjust the detection window so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establish the attribution relationship between the detection window and the detection target;

[0068] Step 240: Update the attribution relationship so that there is an attribution relationship between a detection target and a detection window, and adjust the detection window according to the updated attribution relationship to obtain an optimized window;

[0069] Step 250: Plan the detection path according to the optimized window;

[0070] The adjustment of the detection window includes creating a new detection window, deleting a detection window, or moving the position of the detection window.

[0071] The method of this invention, after dividing the detection window, adjusts the detection window according to the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover any part of any detection target. An attribution relationship is established between the detection window and the detection target, and the attribution relationship is updated so that one detection target has an attribution relationship with one detection window. Based on the updated attribution relationship, the detection window is adjusted to obtain an optimized window. In this embodiment, the obtained optimized window includes only the entirety of at least one detection target, and does not include any part of any detection target. That is, it only covers complete detection targets and does not cover incomplete detection targets. Furthermore, each detection target belongs to only one detection window. According to the detection path planned by the detection window, the image obtained after the detection camera takes a picture includes every detection target, and each detection target appears only once, meaning no detection target is missed and no detection is repeated. In addition, in this embodiment, incomplete detection targets will not appear, so image stitching is not required in subsequent processing. Therefore, the real-time method of this invention can dynamically adjust the number and position of windows according to the target distribution, reduce the movement path length of the detection camera, and improve detection efficiency.

[0072] In this embodiment of the invention, step 210 involves dividing the area to be detected into multiple detection windows, with the multiple detection windows covering the area to be detected, including:

[0073] The width of the detection window is greater than or equal to the width of at least two detection targets plus a first redundancy, and the length of the field of view of the detection camera is greater than or equal to the length of at least two detection targets plus a second redundancy.

[0074] Figure 3 The diagram shown is a schematic representation of the detection window in an embodiment of the present invention. Figure 3 As shown, detection windows can be non-overlapping, but multiple detection windows can completely cover the detection area.

[0075] Figure 3 The detection window and detection target diagram shown can include several types: the detection window shown in 310 has no detection target; the detection window shown in 320 covers part of a detection target, that is, it covers half of the detection target; the detection window shown in 330 covers the entire detection target, that is, it covers a complete detection target; and the detection window shown in 340 covers the entire detection target and part of another detection target.

[0076] The following sections will explain each of the four scenarios mentioned above.

[0077] In step 230, adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0078] If the first detection window does not cover any of the detection targets, then the first detection window is deleted.

[0079] If the detection window shown in 310 does not cover any detection target, delete the detection window directly.

[0080] The detection window shown in 320 covers a portion of the target, that is, half of the target, as shown below:

[0081] In step 230, adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0082] If the second detection window covers part of the second detection target, a third detection window is created, so that the third detection window covers the entire second detection target, and the entire second detection target is located within the preset range of the third detection window;

[0083] Delete the second detection window;

[0084] Determine whether the third detection window still covers part or all of the third detection target;

[0085] If the third detection window also covers the entirety of the third detection target, then an attribution relationship is established between the third detection window and the second detection target, and the third detection target.

[0086] In this embodiment of the invention, if the third detection window also covers a portion of the third detection target, then:

[0087] A new fourth detection window is created, which covers the entire third detection target, and the entire third detection target is located within a preset range of the fourth detection window;

[0088] Move the position of the third detection window so that it does not cover any of the other detection targets besides the second detection target;

[0089] Establish the attribution relationship between the third detection window and the second detection target.

[0090] In this embodiment of the invention, the detection window is typically larger than at least two detection targets, and the preset range of the detection window can be the upper left corner of the detection window. (See reference) Figure 4 As shown, the second detection window is 412, the newly created third detection window is 413, and the second detection target is 420.

[0091] The second detection window 412 only covers a part of the second detection target 420. Therefore, a new third detection window 413 is created to cover the entire second detection target 420, and the second detection target 420 is placed in the upper left corner of the third detection window 413.

[0092] In this embodiment of the invention, if the detection window is relatively large, for example, if the detection window can cover four detection targets, then the third detection window 413 may also cover other detection targets, for example... Figure 4 The detection targets are 430 and 440. The third detection window 413 covers all of the detection targets 420 and 430, therefore, the affiliation relationship between the third detection window 413 and the detection targets 420 and 430 is established.

[0093] However, the third detection window 413 covers part of 440, so a new detection window 414 needs to be created so that the detection target 440 is in the upper left part of the detection window 414, establishing the ownership relationship between the detection target 440 and the detection window 414. Repeat the above judgment process until the newly created detection window covers the entire detection target without covering any part of it.

[0094] After creating the detection window 414, the position of the detection window 413 needs to be moved so that it only includes the entirety of the detection target 420 and the entirety of the detection target 430, but does not include the portion of the detection target 440.

[0095] However, during the process of moving the detection window 414, it may not be possible to cover all of the detection targets 420 and 430. In this case, the detection window 414 needs to be adjusted further. The adjustment method is as described above and will not be repeated here.

[0096] In this embodiment of the invention, the detection window shown in 330 covers the entirety of a detection target, that is, when it covers a complete detection target,

[0097] In step 230, adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0098] If the fifth detection window covers the entirety of the fourth detection target but does not cover any part of any of the aforementioned detection targets, then:

[0099] Move the position of the fifth detection window so that all of the fourth detection target is within the preset range of the fifth detection window;

[0100] Determine whether the fifth detection window, after being moved, still covers part or all of the fifth detection target;

[0101] If the moved fifth detection window still covers the entirety of the fifth detection target, then an attribution relationship is established between the fifth detection window and the fourth and fifth detection targets.

[0102] refer to Figure 5 As shown in (a), the detection window 511 covers the detection target 520. Now, move the position of the detection window 511 so that the detection target 520 is located in the upper left part of the detection window 511, as shown in (a). Figure 5As shown in (b) above. At this point, it is determined whether the detection window 511 still covers part or all of other detection targets. If it covers part of other detection targets, a new detection window is created; if it covers all of other detection targets, the relationship between the detection window and all the covered detection targets can be found in [reference]. Figure 4 As shown.

[0103] In this embodiment of the invention, the detection window shown in 340 covers the entirety of one detection target and a portion of another detection target, as follows:

[0104] In step 230, adjusting the detection window based on the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the portion of any detection target, and establishing the attribution relationship between the detection window and the detection target, includes:

[0105] If the sixth detection window covers the entirety of the fifth detection target and also covers a portion of the sixth detection target, then:

[0106] Move the position of the sixth detection window so that all of the fifth detection target is within the preset range of the sixth detection window;

[0107] Determine whether the moved sixth detection window still covers part or all of the sixth detection target;

[0108] If the moved sixth detection window still covers the entire sixth detection target, then the attribution relationship between the sixth detection window and the fifth and sixth detection targets is established.

[0109] Figure 6 The diagram shown is a schematic representation of the detection window and the detection target according to an embodiment of the present invention. Figure 7 As shown Figure 3 The detection window and the detection target shown are obtained after applying the method of this embodiment of the invention, according to Figure 7 and Figure 3 The comparison shows that the number of detection windows is significantly reduced after applying the method of the present invention.

[0110] Figure 7 The flowchart shown is an application scenario of the method of this invention, as illustrated in the figure. Figure 7 As shown, the method includes:

[0111] Step 710: Determine the coverage relationship between the detection window and the detection target; if it covers the entire detection target, proceed to step 720; if it covers only part of the detection target, proceed to step 740.

[0112] Step 720: Move the detection window so that the detection target is within the preset range of the detection window, and determine the coverage relationship between the moved detection window and other detection targets; if it covers all other detection targets, proceed to step 730; if it covers part of other detection targets, proceed to step 740.

[0113] Step 730: Establish the attribution relationship between the detection window and all covered detection targets;

[0114] Step 740: Create a new detection window, ensuring that the partially covered detection targets are within the preset range of the newly created detection window, then proceed to step 750.

[0115] Step 750: Determine the coverage relationship between the newly created detection window and other detection targets. If it covers all other detection targets, proceed to step 730; if it covers only a portion of other detection targets, repeat step 740.

[0116] In this embodiment of the invention, step 240, updating the attribution relationship to establish an attribution relationship between a detection target and a detection window, and adjusting the detection window based on the updated attribution relationship to obtain an optimized window, includes:

[0117] In the current affiliation update, any of the aforementioned detection windows is used as the verification window;

[0118] Obtain the attribution relationship between the verification window and the detection target;

[0119] If all detected targets that have a relationship with the verification window have already been assigned to other detection windows outside the verification window, then the verification window is deleted.

[0120] If any of the detection targets that have an affiliation with the verification window have no affiliation with any of the other detection windows outside the verification window, then the verification window is retained.

[0121] After traversing all the detection windows, it is determined whether the convergence condition is met. If the convergence condition is met, all the verification windows retained in the current attribution relationship update are used as the optimization windows.

[0122] If the convergence condition is not met, the next attribution update will be performed until the convergence condition is met.

[0123] The convergence condition is as follows: the number of times the attribution relationship is updated reaches a preset number, or the number of all verification windows retained after the current attribution relationship update is unchanged from the number of all verification windows retained after the previous N attribution relationship updates. .

[0124] In this embodiment of the invention, updating the attribution relationship is a cyclic / iterative process. Each time the attribution relationship is updated, some verification windows can be deleted until the convergence condition is met, and each detection target belongs to only one detection window.

[0125] In this embodiment of the invention, step 250, planning the detection path according to the optimized window, includes:

[0126] The detection path is planned based on the preset algorithm and the optimization window.

[0127] The preset algorithms include greedy algorithms, genetic algorithms, LKH algorithms, and other types of path planning algorithms, which will not be elaborated here.

[0128] The detection path of this invention can reduce the probability and number of times the target is repeatedly photographed, reduce the distance the camera moves, reduce the number of times the camera takes pictures, and improve detection efficiency.

[0129] like Figure 8 As shown, the present invention also provides a camera path planning device, the device comprising:

[0130] The region acquisition unit 810 is used to acquire a region to be detected, wherein the region to be detected includes multiple detection targets;

[0131] The dividing unit 820 is used to divide the area to be detected into multiple detection windows, and the multiple detection windows cover the area to be detected.

[0132] The attribution unit 830 is used to adjust the detection window according to the coverage relationship between the detection window and the detection target, so that the adjusted detection window covers the entirety of at least one detection target and does not cover the part of any detection target, thereby establishing the attribution relationship between the detection window and the detection target;

[0133] The updating unit 840 is used to update the attribution relationship so that there is an attribution relationship between a detection target and a detection window, and to adjust the detection window according to the updated attribution relationship to obtain an optimized window;

[0134] Planning unit 850 is used to plan a detection path based on the optimization window;

[0135] The adjustment of the detection window includes creating a new detection window, deleting a detection window, or moving the position of the detection window.

[0136] In this embodiment of the invention, the home unit 830 is used for:

[0137] If the first detection window does not cover any of the detection targets, then the first detection window is deleted.

[0138] In this embodiment of the invention, the home unit 830 is further configured to:

[0139] If the second detection window covers part of the second detection target, a third detection window is created, so that the third detection window covers the entire second detection target, and the entire second detection target is located within the preset range of the third detection window;

[0140] Delete the second detection window;

[0141] Determine whether the third detection window still covers part or all of the third detection target;

[0142] If the third detection window also covers the entirety of the third detection target, then an attribution relationship is established between the third detection window and the second detection target, and the third detection target.

[0143] In this embodiment of the invention, the home unit 830 is further configured to:

[0144] A new fourth detection window is created, which covers the entire third detection target, and the entire third detection target is located within a preset range of the fourth detection window;

[0145] Move the position of the third detection window so that it does not cover any of the other detection targets besides the second detection target;

[0146] Establish the attribution relationship between the third detection window and the second detection target.

[0147] In this embodiment of the invention, the home unit 830 is further configured to:

[0148] If the fifth detection window covers the entirety of the fourth detection target but does not cover any part of any of the aforementioned detection targets, then:

[0149] Move the position of the fifth detection window so that all of the fourth detection target is within the preset range of the fifth detection window;

[0150] Determine whether the fifth detection window, after being moved, still covers part or all of the fifth detection target;

[0151] If the moved fifth detection window still covers the entirety of the fifth detection target, then an attribution relationship is established between the fifth detection window and the fourth and fifth detection targets.

[0152] In this embodiment of the invention, the home unit 830 is further configured to:

[0153] If the sixth detection window covers the entirety of the fifth detection target and also covers a portion of the sixth detection target, then:

[0154] Move the position of the sixth detection window so that all of the fifth detection target is within the preset range of the sixth detection window;

[0155] Determine whether the moved sixth detection window still covers part or all of the sixth detection target;

[0156] If the moved sixth detection window still covers the entire sixth detection target, then the attribution relationship between the sixth detection window and the fifth and sixth detection targets is established.

[0157] In this embodiment of the invention, the updating unit 840 is further configured to:

[0158] In the current affiliation update, any of the aforementioned detection windows is used as the verification window;

[0159] Obtain the attribution relationship between the verification window and the detection target;

[0160] If all detected targets that have a relationship with the verification window have already been assigned to other detection windows outside the verification window, then the verification window is deleted.

[0161] If any of the detection targets that have an affiliation with the verification window have no affiliation with any of the other detection windows outside the verification window, then the verification window is retained.

[0162] After traversing all the detection windows, it is determined whether the convergence condition is met. If the convergence condition is met, all the verification windows retained in the current attribution relationship update are used as the optimization windows.

[0163] If the convergence condition is not met, the next attribution update will be performed until the convergence condition is met.

[0164] The convergence condition is as follows: the number of times the attribution relationship is updated reaches a preset number, or the number of all verification windows retained after the current attribution relationship update is unchanged from the number of all verification windows retained after the previous N attribution relationship updates. .

[0165] The embodiments of the present invention can reduce the probability and number of times the target is repeatedly photographed, reduce the distance the camera moves, reduce the number of times the camera takes pictures, and improve detection efficiency.

[0166] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the following method: acquiring a region to be detected, the region including multiple detection targets; dividing the region to be detected into multiple detection windows, the multiple detection windows covering the region to be detected; adjusting the detection windows according to the coverage relationship between the detection windows and the detection targets, such that the adjusted detection windows cover all of at least one detection target and do not cover any portion of any detection target, establishing an attribution relationship between the detection windows and the detection targets; updating the attribution relationship, such that one detection target has an attribution relationship with one detection window, and adjusting the detection windows according to the updated attribution relationship to obtain an optimized window; planning a detection path according to the optimized window; wherein, adjusting the detection windows includes creating new detection windows, deleting detection windows, or moving the position of detection windows.

[0167] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the following method: acquiring a region to be detected, the region including multiple detection targets; dividing the region to be detected into multiple detection windows, the multiple detection windows covering the region to be detected; adjusting the detection windows according to the coverage relationship between the detection windows and the detection targets, such that the adjusted detection windows cover all of at least one detection target and do not cover any part of any detection target, establishing an attribution relationship between the detection windows and the detection targets; updating the attribution relationship, such that one detection target has an attribution relationship with one detection window, and adjusting the detection windows according to the updated attribution relationship to obtain an optimized window; planning a detection path according to the optimized window; wherein, adjusting the detection windows includes creating a new detection window, deleting a detection window, or moving the position of a detection window.

[0168] The aforementioned camera path planning method achieves the beneficial effect of solving the technical problems raised in the background art.

[0169] Figure 2 and Figure 7 This is a flowchart illustrating a camera path planning method in one embodiment. It should be understood that, although... Figure 2 and Figure 7 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2and Figure 7 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0170] Figure 9 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 Server 120 in the middle. For example... Figure 9 As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a camera path planning method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute the camera path planning method. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0171] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0173] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0174] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method of detecting camera path planning, characterized by, The method comprises: acquiring a to-be-detected region, the to-be-detected region comprising a plurality of detection targets; dividing the to-be-detected region into a plurality of detection windows, the plurality of detection windows covering the to-be-detected region; adjusting the detection windows according to a covering relationship between the detection windows and the detection targets, so that the adjusted detection windows cover all of at least one detection target and none of any detection target, and establishing an attribution relationship between the detection windows and the detection targets; updating the attribution relationship so that one detection target has an attribution relationship with one detection window, and adjusting the detection windows according to the updated attribution relationship to obtain optimized windows; planning a detection path according to the optimized windows; wherein the adjusting the detection windows comprises newly creating a detection window, deleting a detection window, or moving the position of a detection window, and the adjusting the detection windows according to the covering relationship between the detection windows and the detection targets, so that the adjusted detection windows cover all of at least one detection target and none of any detection target, and establishing an attribution relationship between the detection windows and the detection targets comprises: if a first detection window does not cover any detection target, deleting the first detection window; if a second detection window covers part of a second detection target, newly creating a third detection window so that the third detection window covers all of the second detection target and all of the second detection target is located within a preset range of the third detection window, deleting the second detection window, judging whether the third detection window still covers part or all of a third detection target, if the third detection window still covers all of the third detection target, establishing an attribution relationship between the third detection window and the second detection target and the third detection target; if the third detection window still covers part of the third detection target, then: newly creating a fourth detection window so that the fourth detection window covers all of the third detection target and all of the third detection target is located within a preset range of the fourth detection window, moving the position of the third detection window so that the third detection window does not cover any detection target other than the second detection target, establishing an attribution relationship between the third detection window and the second detection target.

2. The method of claim 1, wherein, The adjusting the detection windows according to the covering relationship between the detection windows and the detection targets, so that the adjusted detection windows cover all of at least one detection target and none of any detection target, and establishing an attribution relationship between the detection windows and the detection targets comprises: if a fifth detection window covers all of a fourth detection target and none of any detection target, then: moving the position of the fifth detection window so that all of the fourth detection target is located within a preset range of the fifth detection window; judging whether the moved fifth detection window still covers part or all of a fifth detection target, If the fifth detection window after moving still covers the whole fifth detection target, the fifth detection window and the fourth and fifth detection targets are established in the belonging relationship.

3. The method of claim 1, wherein, The adjusting of the detection window according to the covering relationship between the detection window and the detection target, so that the detection window after adjustment covers the whole of at least one detection target and does not cover the part of any detection target, and the establishment of the belonging relationship between the detection window and the detection target, comprises: If the sixth detection window covers the whole fifth detection target and covers the part of the sixth detection target, then: Moving the position of the sixth detection window so that the whole fifth detection target is located within the preset range of the sixth detection window; Judging whether the sixth detection window after moving still covers the part or the whole of the sixth detection target; If the sixth detection window after moving still covers the whole sixth detection target, the sixth detection window and the fifth and sixth detection targets are established in the belonging relationship.

4. The method of claim 1, wherein, The updating of the belonging relationship, so that one detection target and one detection window have the belonging relationship, and the adjusting of the detection window according to the updated belonging relationship to obtain an optimized window, comprises: In the current belonging relationship updating, any detection window is obtained as a verification window; The belonging relationship between the verification window and the detection target is obtained; If all the detection targets having the belonging relationship with the verification window have been attributed to other detection windows outside the verification window, the verification window is deleted; If any of the detection targets having the belonging relationship with the verification window has no belonging relationship with other detection windows outside the verification window, the verification window is retained; After traversing all the detection windows, it is judged whether the convergence condition is met, if the convergence condition is met, all the verification windows retained in the current belonging relationship updating are taken as the optimized window, If the convergence condition is not met, the next belonging relationship updating is performed until the convergence condition is met; The convergence condition is that the number of home relation updates reaches a preset number, or the number of all the verification windows reserved after the current home relation update is unchanged compared with the number of all the verification windows reserved after the previous N home relation updates. .

5. A detecting camera path planning apparatus characterized by, The device comprises: A region acquisition unit is configured to acquire a to-be-detected region, and the to-be-detected region comprises a plurality of detection targets; A division unit is configured to divide the to-be-detected region into a plurality of detection windows, and the plurality of detection windows cover the to-be-detected region; A belonging unit is configured to adjust the detection window according to the covering relationship between the detection window and the detection target, so that the detection window after adjustment covers the whole of at least one detection target and does not cover the part of any detection target, and the belonging relationship between the detection window and the detection target is established; An updating unit is configured to update the belonging relationship, so that one detection target and one detection window have the belonging relationship, and the detection window is adjusted according to the updated belonging relationship to obtain an optimized window; A planning unit is configured to plan a detection path according to the optimized window. The adjusting the detection window comprises newly creating a detection window, deleting a detection window, or moving a position of a detection window.

6. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method in any one of claims 1 to 4 when executing the computer program.

7. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the method in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Measurement path optimizing system and method

    CN102467597A

  • Shooting path determination method, device and equipment for panel element detection

    CN114040120A