Field of view planning method, field of view planning device, field of view detection system and storage medium

CN123020983APending Publication Date: 2026-10-30深圳明锐理想科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611502064.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,这种规划方式在待划分对象呈不均匀分布时,会出现视场覆盖空白区域或者重复拍摄的问题,影响拍摄效率,且形成冗余数据占用存储资源与后续图像处理算力

Benefits of technology

[0015]本申请实施方式的有益效果是:区别于现有技术的情况,本申请实施方式提供一种视场规划方法、视场规划装置、视场检测系统及存储介质,通过以剩余待划分对象的实际分布为基准,沿预设覆盖方向迭代确定至少覆盖一个待划分对象的视场区域,减少了视场覆盖空白区域和重复拍摄的问题,并沿不同的预设覆盖方向分别覆盖、以视场区域数量最少的覆盖结果作为最终方案,减少了视场区域的数量,从而提高了拍摄效率,并减少了冗余数据对存储资源和图像处理算力的占用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020983A_ABST
    Figure CN123020983A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of visual detection, and discloses a field-of-view planning method, a field-of-view planning device, a field-of-view detection system and a storage medium. The actual distribution of remaining objects to be divided is taken as a benchmark, a field-of-view area covering at least one object to be divided is determined along a preset covering direction, the problems of field-of-view covering blank areas and repeated shooting are reduced, different preset covering directions are covered respectively, the covering result with the least number of field-of-view areas is taken as a final scheme, the number of field-of-view areas is reduced, the shooting efficiency is improved, and the occupation of storage resources and image processing capacity by redundant data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visual inspection technology, and in particular to a field of view planning method, a field of view planning device, a field of view inspection system, and a storage medium. Background Technology

[0002] In the fabrication and repair of precision components such as printed circuit boards (PCBs), panels, and semiconductor wafers, it is necessary to perform full-coverage visual inspection of the target area to be divided using the field of view (FOV) of an industrial camera. The area to be divided contains multiple objects to be inspected, such as electronic components on a circuit board, and the size of each individual object is smaller than the size of a single camera field of view. In actual inspection operations, the area to be divided of a target usually needs to be covered by stitching together several field of view areas, i.e., moving the camera to capture images of the area to be divided in sections.

[0003] Currently, camera motion field-of-view planning typically divides the area to be segmented into several equal-sized fields of view, and then controls the camera to take pictures sequentially in a fixed direction. However, when the objects to be segmented are unevenly distributed, this planning method can lead to problems such as the field of view covering blank areas or repeated shooting, affecting shooting efficiency and creating redundant data that consumes storage resources and subsequent image processing computing power. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a field-of-view planning method, a field-of-view planning device, a field-of-view detection system, and a storage medium, which are beneficial for improving field-of-view planning efficiency and coverage effect.

[0005] In a first aspect, embodiments of this application provide a field of view planning method, the method comprising: obtaining a set of objects to be divided; determining a field of view region along a preset coverage direction based on the set of objects to be divided and a preset field of view region size, wherein the field of view region covers at least one object to be divided; removing the object to be divided covered by the field of view region from the set of objects to be divided, and proceeding to the step of determining the field of view region along the preset coverage direction based on the set of objects to be divided and the preset field of view region size, until the set of objects to be divided is empty; recording the number of field of view regions determined along the preset coverage direction; repeating the above steps for different preset coverage directions; and determining the preset coverage direction with the fewest number of field of view regions as the target coverage direction.

[0006] In some embodiments, the preset coverage direction includes a first coverage direction and a second coverage direction; the step of determining the field of view along the preset coverage direction based on the set of objects to be divided and the preset field of view size includes: when the current field of view is the first field of view along the preset coverage direction, determining a first boundary between the first object to be divided and the current field of view along the first coverage direction, wherein the first object to be divided is the starting object to be divided in the set of objects to be divided along the first coverage direction; and determining a second boundary between the second object to be divided and the current field of view along the second coverage direction based on the first boundary, wherein the second object to be divided is the starting object to be divided in the set of objects to be divided along the second coverage direction.

[0007] In some embodiments, the preset coverage direction includes a first coverage direction and a second coverage direction; determining the field of view along the preset coverage direction based on the set of objects to be divided and the preset field of view size includes: when the field of view is not the first field of view along the preset coverage direction, determining whether there is a third object to be divided, the third object to be divided being an object to be divided that partially overlaps with the previous field of view along the first coverage direction; if there is a third object to be divided, determining the first boundary of the current field of view along the first coverage direction based on the third object to be divided and the preset field of view size; and determining the second boundary of the current field of view along the second coverage direction based on the first boundary, the fourth object to be divided being the starting object to be divided in the set of objects to be divided along the second coverage direction.

[0008] In some embodiments, the method further includes: if there is no third object to be divided, determining a fifth object to be divided and a first boundary of the current field of view along a first coverage direction, wherein the fifth object to be divided is the starting object to be divided in the set of objects to be divided along the first coverage direction, or the starting object to be divided in the extended region of the previous field of view along the first coverage direction; and based on the first boundary, determining a sixth object to be divided and a second boundary of the current field of view along a second coverage direction, wherein the sixth object to be divided is the starting object to be divided in the set of objects to be divided along the second coverage direction.

[0009] In some embodiments, the preset coverage direction includes two of the following: a first direction, the opposite direction of the first direction, a second direction, and the opposite direction of the second direction, wherein the first direction and the second direction are perpendicular to each other.

[0010] In some embodiments, obtaining the set of objects to be divided includes: obtaining image information of a region to be divided, wherein the region to be divided contains multiple objects to be divided; extracting coordinate information of the multiple objects to be divided based on the image information; and establishing an R-tree structure based on the coordinate information of the multiple objects to be divided to form a set of objects to be divided.

[0011] In some embodiments, the method further includes: recording the trajectory of the field of view area determined along different preset coverage directions; and determining the trajectory of the field of view area along the target coverage direction as the target trajectory.

[0012] Secondly, embodiments of this application provide a field-of-view planning device, comprising: an acquisition module for acquiring a set of objects to be divided; a first determination module for determining a field of view along a preset coverage direction based on the set of objects to be divided and a preset field of view size, wherein the field of view covers at least one object to be divided; an update module for removing objects to be divided covered by the field of view from the set of objects to be divided, and proceeding to the step of determining a field of view along a preset coverage direction based on the set of objects to be divided and the preset field of view size, until the set of objects to be divided is empty; a recording module for recording the number of field of view areas determined along the preset coverage direction; a repeating module for repeatedly executing the above steps for different preset coverage directions; and a second determination module for determining the preset coverage direction with the fewest field of view areas as the target coverage direction.

[0013] Thirdly, embodiments of this application provide a field-of-view detection system, comprising: a camera, the field of view of which is a preset field-of-view area size; at least one processor, communicatively connected to the camera; and a memory, communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described method.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions, which, when executed, implement the above-described method.

[0015] The beneficial effects of the embodiments of this application are as follows: Unlike the prior art, the embodiments of this application provide a field of view planning method, a field of view planning device, a field of view detection system, and a storage medium. By using the actual distribution of the remaining objects to be divided as a reference, the field of view area covering at least one object to be divided is iteratively determined along a preset coverage direction, which reduces the problem of blank areas in the field of view coverage and repeated shooting. Furthermore, by covering along different preset coverage directions and using the coverage result with the fewest field of view areas as the final solution, the number of field of view areas is reduced, thereby improving shooting efficiency and reducing the occupation of storage resources and image processing computing power by redundant data. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the drawings without creative effort.

[0017] Figure 1 This is a schematic diagram illustrating an application scenario of field planning provided in an embodiment of this application; Figure 2 This is a schematic flowchart of a field-of-view planning method provided in an embodiment of this application; Figure 3 yes Figure 2 A schematic diagram of a sub-process of step S10; Figure 4 This is a schematic diagram of image information of a circuit board provided in an embodiment of this application; Figure 5 yes Figure 2 A schematic diagram of a sub-process of step S20; Figure 6 This is a schematic diagram illustrating the determination of a field of view region provided in an embodiment of this application; Figure 7 yes Figure 2 A schematic diagram of a sub-process of step S20; Figure 8 This is a schematic diagram of the structure of a field-of-view planning device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a field-of-view detection system provided in an embodiment of this application. Detailed Implementation

[0018] To facilitate understanding of this application, a more detailed description is provided below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. It should be noted that, unless otherwise specified, the various features in the embodiments of this application can be combined with each other, all within the scope of protection of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish between identical or similar items with essentially the same function and effect.

[0019] In the inspection scenario during the circuit board manufacturing process, please refer to... Figure 1 The camera 10 is used to photograph the circuit board 20 for visual inspection. The field of view of the camera 10 is a field of view 30. The circuit board 20 has multiple objects to be divided, such as electronic components and solder joints. The size of a single object to be divided is smaller than the size of a single field of view 30 of the camera 10. In the inspection process, a circuit board 20 typically needs to be covered by several field of view 30s, i.e., the camera 10 is moved to photograph the circuit board 20 in sections. Since the objects to be divided are unevenly distributed on the circuit board 20, dividing the circuit board 20 into several equally sized field of view 30s would result in blank areas of field of view coverage or repeated shooting, affecting shooting efficiency and creating redundant data that consumes storage resources and subsequent image processing computing power.

[0020] To address the aforementioned technical issues, this application provides a field-of-view planning method, a field-of-view planning device, a field-of-view detection system, and a storage medium, which helps reduce the number of field-of-view regions, improve algorithm execution efficiency, and meet real-time detection requirements.

[0021] Please see Figure 2 , Figure 2 This is a flowchart illustrating a field-of-view planning method provided in an embodiment of this application.

[0022] like Figure 2 As shown, the field-of-view planning method includes the following steps: Step S10: Obtain the set of objects to be divided.

[0023] Specifically, please refer to the following: Figure 3 , Figure 3 yes Figure 2 A schematic diagram of a sub-process in step S10. Obtain the set of objects to be partitioned, including: Step S11: Obtain image information of the region to be divided. The region to be divided contains multiple objects to be divided.

[0024] In the circuit board inspection preparation stage, initial image acquisition is first performed on the circuit board 20. Depending on the inspection requirements, image information of the entire board or a portion thereof is acquired, and the acquisition range corresponding to this image information is the area to be divided. The area to be divided is all or part of the area on the circuit board 20 that needs to be visually inspected, and multiple objects to be divided are set on it, such as electronic components, solder joints, etc.

[0025] It should be noted that the purpose of initial image acquisition is to obtain the overall layout information of the area to be divided in advance, so as to determine the distribution location and coordinate range of each object to be divided, and to provide a data basis for subsequent field of view planning. Initial image acquisition can be completed using a scanning device or a camera, and its accuracy is no higher than that of the camera 10 when performing detection using the field of view planning method of this application. Since the initial image acquisition is only used to obtain the approximate distribution and relative positional relationship of the objects to be divided, rather than for fine defect detection, a lower-precision acquisition device can meet the data requirements of field of view planning, while reducing the equipment cost and acquisition time in the detection preparation stage.

[0026] Step S12: Extract the coordinate information of multiple objects to be segmented based on the image information.

[0027] Image processing algorithms are used to identify and extract the coordinate information of each object to be segmented from the image information. For each object to be segmented, the coordinate information includes the coordinates of the left boundary xi. min Upper boundary coordinates yi min , right boundary coordinates xi max and lower boundary coordinates yi max .like Figure 4 As shown, with the intersection of the upper left corner boundary of circuit board 20 as the origin of the coordinate system, each object to be divided corresponds to a rectangular region in the image information, and the rectangular region is determined by the above four boundary coordinates.

[0028] In some embodiments, the extracted coordinate information is further subjected to fitting optimization processing to improve the extraction accuracy and obtain optimized coordinate information. For example, for objects to be segmented with blurred edges, subpixel-level edge positions are extracted using edge detection operators such as the Canny operator, and then straight line fitting is performed on the edges to determine more accurate boundary coordinates.

[0029] Step S13: Based on the coordinate information of multiple objects to be divided, establish an R-tree structure to form a set of objects to be divided.

[0030] After obtaining the coordinate information of all objects to be partitioned, an R-tree structure is constructed, with each object to be partitioned as a node in the R-tree, forming a tree-like spatial index structure composed of all objects to be partitioned. The R-tree structure facilitates fast spatial neighborhood lookup and can efficiently query objects to be partitioned within a certain field of view, thereby accelerating object retrieval and deletion operations in the subsequent coverage process.

[0031] In some embodiments, the R-tree structure uses the minimum bounding rectangle (MBR) as the bounding rectangle of the node. Through hierarchical spatial partitioning, spatially similar objects to be partitioned are aggregated under the same node to reduce the spatial traversal range during querying.

[0032] Step S20: Based on the set of objects to be divided and the preset field of view size, determine the field of view along the preset coverage direction. The field of view shall cover at least one object to be divided.

[0033] Specifically, the preset coverage direction includes a first coverage direction and a second coverage direction. In some embodiments, the first coverage direction is a secondary direction, and the second coverage direction is the primary direction. When determining the field of view along the preset coverage direction, the second coverage direction is used as the primary advancement direction, and the first coverage direction is used as the auxiliary search direction. The position of each field of view is determined one by one, so that each field of view covers all objects to be divided in the set of objects to be divided. The preset field of view size refers to the field of view size that the camera 10 can cover in a single shot, that is, the field of view size of the camera 10. The preset field of view size is a parameter known before field of view planning, including the length L and width H of the field of view, and the preset field of view size is larger than the size of a single object to be divided, so that a single field of view can at least completely cover one object to be divided.

[0034] For example, the preset field of view size is in pixels, such as 4000×3000 pixels. Correspondingly, the size of the area to be divided and the coordinate information of each object to be divided are also uniformly converted to pixel units, so that the field of view and each object to be divided are under the same coordinate measurement system for coverage calculation. The preset field of view size can be determined by the imaging parameters of the camera 10, such as the resolution of the camera 10, the lens focal length, and the shooting working distance, and remains unchanged during the coverage process.

[0035] In some embodiments, please refer to the following: Figure 5 , Figure 5 yes Figure 2 A sub-process of step S20, which involves determining the field of view along a preset coverage direction based on the set of objects to be divided and the preset field of view size, further includes: Step S211: When the current field of view is the first field of view along the preset coverage direction, the first object to be divided and the first boundary of the current field of view along the first coverage direction are determined.

[0036] The first object to be partitioned is the initial object in the set of objects to be partitioned along the first covering direction (secondary direction). The boundary range of the set of objects to be partitioned is B=[x min y min x maxy max In B, the coordinates refer to the extreme values ​​of the boundary coordinates of all objects in the set to be partitioned. Specifically, x min The minimum value among the left boundary coordinates of all objects to be partitioned, y min x is the minimum value among the upper boundary coordinates of all objects to be partitioned. max The maximum value among the right boundary coordinates of all objects to be partitioned, y max This is the maximum value among the lower boundary coordinates of all objects to be divided. The enclosing boundary B is the smallest rectangular region that exactly encloses all objects to be divided.

[0037] In some embodiments, the preset coverage direction includes two of the following: a first direction, the opposite direction of the first direction, and a second direction and the opposite direction of the second direction, wherein the first direction and the second direction are perpendicular to each other. That is, the first coverage direction and the second coverage direction are perpendicular to each other, and the first coverage direction and the second coverage direction are two of the following: the first direction, the opposite direction of the first direction, and the opposite direction of the second direction. In some examples, the first direction refers to the positive y-axis direction of the coordinate system of the circuit board 20, parallel to the width direction of the field of view, and also parallel to the surface of the circuit board 20 from top to bottom. The second direction refers to the positive x-axis direction of the coordinate system of the circuit board 20, parallel to the length direction of the field of view, and also parallel to the surface of the circuit board 20 from left to right.

[0038] In some embodiments, the preset coverage direction includes eight combined directions, including: the primary direction is from top to bottom, and the secondary direction is from left to right or from right to left; the primary direction is from bottom to top, and the secondary direction is from left to right or from right to left; the primary direction is from left to right, and the secondary direction is from top to bottom or from bottom to top; the primary direction is from right to left, and the secondary direction is from top to bottom or from bottom to top.

[0039] In some embodiments, each coverage of the field of view along a preset coverage direction begins from one of the four corners of the surface of the circuit board 20.

[0040] For example, please refer to Figure 6 When the primary direction is from top to bottom and the secondary direction is from left to right, coverage begins from the upper left corner of the surface of circuit board 20. An initial candidate field of view F1 is defined, aligning the upper left corner of field of view F1 with the upper left corner of boundary range B. Within the range of F1, the left boundary coordinates xj are determined. min The smallest object to be partitioned is the first object to be partitioned, and based on its coordinates xj min Determine the first boundary of the current field of view along the first coverage direction. The first boundary includes the left boundary b0 and / or the right boundary b01 of the current field of view. b0 = xj min b01 = xj min + L.

[0041] Step S212: Based on the first boundary, determine the second object to be divided and the second boundary of the current field of view along the second coverage direction.

[0042] The second object to be partitioned is the initial object in the set of objects to be partitioned along the second coverage direction (main direction). After determining the first boundary, a search range is set along the second coverage direction, and the second object to be partitioned is determined within the search range. Specifically, taking the main direction as top to bottom and the secondary direction as left to right as an example, the first boundary is the left boundary of the field of view; the search range is defined as the area between the left and right boundaries of the field of view F, and extended from the current position in the opposite direction of the main direction by a field of view width H, i.e., a rectangular search range with length L and width 2H. The objects to be partitioned contained within this search range are queried using an R-tree, and the upper boundary coordinates yj are taken. min The smallest object to be divided is designated as the second object to be divided, which is the topmost object to be divided within the search range.

[0043] Furthermore, based on the coordinates of the second object to be divided and the preset field of view size, the second boundary of the current field of view along the second coverage direction is determined: the second boundary includes the upper boundary b1 and / or the lower boundary b11 of the current field of view; b1 is taken as the upper boundary coordinate yj of the second object to be divided. min This makes the current field of view region closest to the topmost object to be divided; the lower boundary b11 of the current field of view region is correspondingly yj. min The sum of the width and height H. Thus, the current field of view F is determined by its left boundary b0 and upper boundary b1, combined with the length L and width H of the field of view.

[0044] In addition, after determining the current field of view F each time, let F1=F. The field of view F1 is then used as the previous field of view when determining the next field of view, and is used to determine whether there are any objects to be divided that partially overlap with the previous field of view along the first coverage direction.

[0045] In some embodiments, please refer to the following: Figure 7 , Figure 7 yes Figure 2 A sub-process of step S20, which involves determining the field of view along a preset coverage direction based on the set of objects to be divided and the preset field of view size, further includes: Step S221: When the field of view is not the first field of view along the preset coverage direction, determine whether there is a third object to be divided.

[0046] The third object to be segmented is the object that partially overlaps with the previous field of view F1 along the first coverage direction. Specifically, the algorithm uses an R-tree to query the objects to be segmented that are not completely contained by F1, i.e., objects that intersect the boundary of F1 but are not completely covered by F1. When the first coverage direction is from left to right, the algorithm only considers the rectangles of objects to be segmented that intersect the right boundary of F1; these rectangles are the third objects to be segmented.

[0047] Step S222: If there is a third object to be divided, then determine the first boundary of the current field of view along the first coverage direction based on the third object to be divided and the preset field of view size; Based on the minimum left boundary coordinates of these third objects to be divided, the first boundary of the new field of view F is determined.

[0048] Step S223: Based on the first boundary, determine the second boundary of the fourth object to be divided and the current field of view along the second coverage direction.

[0049] The fourth object to be partitioned is the starting object along the second coverage direction in the set of objects to be partitioned. Based on the coordinates of the fourth object to be partitioned and the preset field-of-view size, the second boundary of the current field of view along the second coverage direction is determined. This process is similar to or the same as determining the second boundary in the first field of view; the second boundary is determined by querying within the corresponding search range using an R-tree and using the boundaries of the queried objects to be partitioned.

[0050] In some embodiments, step S20 further includes: Step S224: If there is no third object to be divided, then determine the fifth object to be divided and the first boundary of the current field of view along the first coverage direction.

[0051] The fifth object to be divided is either the initial object to be divided along the first coverage direction in the set of objects to be divided, or the initial object to be divided in the extension region of the previous field of view F1 along the first coverage direction. Specifically, the R-tree query can be used to check whether there are any remaining objects to be divided in the extension region of the previous field of view F1 along the first coverage direction, that is, the strip region that has the same span as the previous field of view F1 along the second coverage direction and extends along the first coverage direction, to determine whether the current coverage journey has been completed.

[0052] When there are no more objects to be divided in the extended region of the current field of view F1 along the first coverage direction, it indicates that the current coverage journey along the first coverage direction has been completed, and a new coverage journey needs to begin. At this time, the fifth object to be divided is the starting object to be divided in the set of objects to be divided along the first coverage direction. Taking the main direction as from top to bottom and the secondary direction as from left to right as an example, after the secondary direction has been completed once from left to right, the coverage is restarted along the secondary direction, and the fifth object to be divided is the left boundary coordinate xj among the remaining objects to be divided. minThe smallest object, i.e., the leftmost object.

[0053] If objects to be divided still exist in the extended region of the previous field of view F1 along the first coverage direction, it indicates that the current coverage journey has not yet been completed. However, the existing objects to be divided do not partially overlap with the previous field of view F1, meaning there is a blank area between the previous field of view F1 and the subsequent objects to be divided. At this point, starting from the boundary of the previous field of view F1 along the secondary direction, the search range is moved successively, each time by the size of one field of view region, until the objects to be divided are found. The left boundary coordinates xj of the first found object to be divided are then recorded. min The smallest object was determined to be the fifth object to be divided.

[0054] Then, based on the coordinates of the fifth object to be divided and the preset field of view size, the first boundary of the current field of view along the first coverage direction is determined.

[0055] Step S225: Based on the first boundary, determine the second boundary of the sixth object to be divided and the current field of view along the second coverage direction.

[0056] The sixth object to be partitioned is the starting object in the set of objects to be partitioned along the second coverage direction. Based on the coordinates of the sixth object to be partitioned and the preset field-of-view size, the second boundary of the current field of view along the second coverage direction is determined. This process is similar to or the same as determining the second boundary in the first field of view; it involves querying within the corresponding search range using an R-tree, and the second boundary is determined by the boundaries of the queried objects to be partitioned.

[0057] After determining the current field of view region F, let F1=F. The field of view region F1 is then used as the previous field of view region when determining the next field of view region.

[0058] Step S30: Remove the objects to be divided that are covered by the field of view from the set of objects to be divided, and proceed to step S20 until the set of objects to be divided is empty.

[0059] After determining a field of view region, the fast query capability of the R tree structure is used to remove all objects to be partitioned that are completely contained in the field of view region from the set of objects to be partitioned. Then, the next field of view region is determined until the set of objects to be partitioned is empty, that is, all objects to be partitioned are covered.

[0060] Step S40: Record the number of field of view areas determined along the preset coverage direction.

[0061] Specifically, when the set of objects to be divided is empty, it indicates that the coverage along the current preset coverage direction has been completed. The number of field of view areas determined along the current preset coverage direction is counted and recorded, and the position information of each field of view area is recorded as the coverage result corresponding to the current preset coverage direction.

[0062] Step S50: For different preset coverage directions, repeat steps S20 to S40.

[0063] Specifically, after completing coverage in a preset coverage direction and recording the number of corresponding field-of-view regions, the set of objects to be divided is restored to its initial state, containing all objects to be divided. Then, steps S20 to S40 are repeated along the next preset coverage direction until all preset coverage directions have been traversed. Taking a combination of 8 preset coverage directions as an example, coverage of the field-of-view regions is performed along each of the 8 combination directions, resulting in 8 sets of coverage results and the number of field-of-view regions corresponding to each set of coverage results.

[0064] It should be noted that in some embodiments, when restoring the set of objects to be partitioned, it is not necessary to rebuild the R-tree structure. The R-tree already built during the previous coverage process can be used, and only the removed objects to be partitioned are restored to the R-tree, or the coverage status of each object to be partitioned is reset to uncovered, and then the coverage of the next preset coverage direction can begin. The R-tree structure only needs to be built once in the entire multi-directional coverage process, reducing the overhead of repeated tree building and further improving the execution efficiency of the algorithm.

[0065] Step S60: Determine the preset coverage direction with the fewest fields of view areas as the target coverage direction.

[0066] Specifically, the number of field-of-view areas corresponding to each of the preset coverage directions is compared, and the preset coverage direction with the fewest field-of-view areas is determined as the target coverage direction. The coverage result corresponding to the target coverage direction is used as the final field-of-view area allocation scheme.

[0067] In this way, the determination of each field of view region is based on the initial object to be divided among the remaining objects to be divided along the preset coverage direction, so that the field of view region is close to the initial object to be divided. That is, when placing the field of view region, the local optimal choice in the current state is adopted, which reflects the greedy coverage strategy. Greedy coverage in a single direction usually only yields one set of coverage solutions, which is difficult to guarantee close to the optimal solution. The embodiments of this application perform greedy coverage along multiple preset coverage directions to obtain multiple sets of coverage results, and use the coverage result with the fewest field of view regions as the final field of view region allocation scheme. The best solution is selected from multiple greedy solutions, so that while maintaining the execution speed of the greedy algorithm, the number of field of view regions is close to the optimization level of the linear programming algorithm, thus balancing the coverage effect and the algorithm execution efficiency.

[0068] In some embodiments, the field-of-view planning method further includes: recording the trajectories of field-of-view areas determined along different preset coverage directions; and determining the trajectory of the field-of-view area along the target coverage direction as the target trajectory. The camera 10 is controlled to move along the target trajectory, and each field-of-view area is captured sequentially to achieve full-coverage visual detection of the area to be divided.

[0069] In this embodiment, by acquiring a set of objects to be divided, determining the field of view along a preset coverage direction based on the set of objects to be divided and a preset field of view size, and removing objects to be divided from the set of objects to be divided, the determination process is iteratively executed until the set of objects to be divided is empty. This ensures that each field of view is always determined based on the actual distribution position of the remaining objects to be divided, reducing the problems of blank areas in the field of view coverage and repeated shooting. Furthermore, coverage is performed along different preset coverage directions, and the number of field of view areas is recorded. The preset coverage direction with the fewest field of view areas is determined as the target coverage direction, further reducing the number of field of view areas in the final allocation scheme. On the one hand, this reduces the number of shots and movement required for the camera to complete full coverage detection of the area to be divided, improving shooting efficiency; on the other hand, it reduces the generation of redundant image data, lowering the occupation of storage resources and the computational consumption of subsequent image processing.

[0070] Secondly, based on the above content and the same concept, please refer to... Figure 8 This application provides a field of view planning device 100, which is used to implement the functions of the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments.

[0071] like Figure 8 As shown, the field-of-view planning device 100 includes an acquisition module 101, a first determination module 102, an update module 103, a recording module 104, a repeating module 105, and a second determination module 106. The acquisition module 101 acquires a set of objects to be divided. The first determination module 102 determines a field of view along a preset coverage direction based on the set of objects to be divided and a preset field of view area size, wherein the field of view area covers at least one object to be divided. The update module 103 removes objects covered by the field of view area from the set of objects to be divided, and then proceeds to the execution flow of the first determination module 102 until the set of objects to be divided is empty. The recording module 104 records the number of field of view areas determined along the preset coverage direction. The repeating module 105 repeats the operations of the above modules for different preset coverage directions. The second determination module 106 determines the preset coverage direction with the fewest field of view areas as the target coverage direction.

[0072] In this embodiment, the field planning device 100 can be a software module. The software module includes several instructions, which are stored in a memory. The processor can access the memory and call the instructions to execute them in order to complete the field planning methods of the above embodiments.

[0073] In the embodiments of this application, the field-of-view planning device 100 can also be constructed from hardware devices. For example, the field-of-view planning device 100 can be constructed from one or more chips, and the chips can work together to complete the field-of-view planning method described in the above embodiments. Furthermore, the field-of-view planning device 100 can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0074] The field-of-view planning device 100 in this application embodiment can be a component, integrated circuit, or chip in a terminal. This device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0075] The field-of-view planning device 100 in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit its use.

[0076] The field planning device 100 provided in this application embodiment can realize the various processes implemented in the method embodiment of this application, and will not be described again here to avoid repetition.

[0077] It should be noted that the above-described device can execute the field-of-view planning method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the device embodiments can be found in the field-of-view planning method provided in the embodiments of this application.

[0078] Thirdly, embodiments of this application provide a field-of-view detection system 200, please refer to... Figure 9 The field of view detection system 200 includes a camera 10, at least one processor 201, and a memory 202.

[0079] The field of view of camera 10 is a preset field of view area. At least one processor 201 is communicatively connected to camera 10 to control camera 10 to move along the target trajectory and perform segmented imaging of circuit board 20 to achieve visual inspection.

[0080] The memory 202 is communicatively connected to at least one processor 201, and stores instructions executable by the at least one processor 201. The at least one processor 201 and the memory 202 can be connected via a bus or other means. The memory 202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the field-of-view planning method in the embodiments of this application. The at least one processor 201 executes various functional applications and data processing of the field-of-view detection system 200 by running the non-volatile software programs, instructions, and modules stored in the memory 202, thereby implementing the field-of-view planning method of the embodiments of this application.

[0081] The memory 202 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some embodiments, the memory 202 may optionally include memory remotely disposed relative to at least one processor 201.

[0082] The field planning method in any embodiment of this application can be divided into one or more functional modules and stored in the memory 202. When executed by one or more processors 201, the field planning method in any embodiment of this application is executed.

[0083] This application also provides a computer-readable storage medium storing a computer program or instructions that, when executed, implement the field-of-view planning method in any of the above method embodiments. For example, one or more processors may execute the field-of-view planning method in any of the above method embodiments, or execute the various steps described above.

[0084] The apparatus or device embodiments described above are merely illustrative. The unit modules described as separate components may or may not be physically separate, and the components shown as module units may or may not be physical units; that is, they may be located in one place or distributed across multiple network module units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0085] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general-purpose hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A field-of-view planning method, characterized in that, include: Obtain the set of objects to be partitioned, wherein the set of objects to be partitioned is an R-tree structure; Based on the set of objects to be divided and the preset field of view size, the field of view is determined along the preset coverage direction, and the field of view covers at least one object to be divided; Remove the objects to be divided that are covered by the field of view from the set of objects to be divided, and proceed to the step of determining the field of view along the preset coverage direction based on the set of objects to be divided and the preset field of view size, until the set of objects to be divided is empty; Record the number of fields of view areas determined along the preset coverage direction; Repeat the above steps for different preset coverage directions; The target coverage direction is determined by the preset coverage direction that minimizes the number of fields of view areas. The preset coverage direction includes a first coverage direction and a second coverage direction. The step of determining the field of view along the preset coverage direction based on the set of objects to be divided and the preset field of view size includes: When the field of view is not the first field of view along the preset coverage direction, it is determined whether there is a third object to be divided. The third object to be divided is the object to be divided that partially overlaps with the previous field of view along the first coverage direction. If there is a third object to be divided, then the first boundary of the current field of view along the first coverage direction is determined based on the third object to be divided and the preset field of view size. Based on the first boundary, the fourth object to be divided and the second boundary of the current field of view along the second coverage direction are determined. The fourth object to be divided is the starting object to be divided in the set of objects to be divided along the second coverage direction. If there is no third object to be divided, then the fifth object to be divided and the first boundary of the current field of view along the first coverage direction are determined. The fifth object to be divided is the starting object to be divided in the set of objects to be divided along the first coverage direction, or the starting object to be divided in the extended region of the previous field of view along the first coverage direction. Based on the first boundary, the sixth object to be divided and the second boundary of the current field of view along the second coverage direction are determined. The sixth object to be divided is the starting object to be divided in the set of objects to be divided along the second coverage direction.

2. The method according to claim 1, characterized in that, The step of determining the field of view along a preset coverage direction based on the set of objects to be divided and a preset field of view size includes: When the current field of view is the first field of view along the preset coverage direction, the first object to be divided and the first boundary of the current field of view along the first coverage direction are determined. The first object to be divided is the starting object to be divided in the set of objects to be divided along the first coverage direction. Based on the first boundary, the second object to be divided and the second boundary of the current field of view along the second coverage direction are determined. The second object to be divided is the starting object to be divided in the set of objects to be divided along the second coverage direction.

3. The method according to claim 1, characterized in that, The preset coverage direction includes two of the following: a first direction, the opposite direction of the first direction, a second direction, and the opposite direction of the second direction, wherein the first direction and the second direction are perpendicular to each other.

4. The method according to claim 1, characterized in that, The process of obtaining the set of objects to be divided includes: Obtain image information of the region to be divided, which contains multiple objects to be divided. Based on the image information, extract the coordinate information of multiple objects to be segmented; Based on the coordinate information of multiple objects to be partitioned, an R-tree structure is established to form a set of objects to be partitioned.

5. The method according to claim 1, characterized in that, The method further includes: Record the trajectory of the field of view area determined along different preset coverage directions; The trajectory of the field of view along the target coverage direction is determined as the target trajectory.

6. A field-of-view planning device, characterized in that, include: The acquisition module is used to acquire a set of objects to be partitioned, wherein the set of objects to be partitioned is an R-tree structure; The first determining module is used to determine a field of view along a preset coverage direction based on the set of objects to be divided and a preset field of view size, wherein the field of view covers at least one object to be divided; wherein the preset coverage direction includes a first coverage direction and a second coverage direction, and the determination of the field of view along the preset coverage direction based on the set of objects to be divided and the preset field of view size includes: When the field of view is not the first field of view along the preset coverage direction, it is determined whether there is a third object to be divided. The third object to be divided is the object to be divided that partially overlaps with the previous field of view along the first coverage direction. If there is a third object to be divided, then the first boundary of the current field of view along the first coverage direction is determined based on the third object to be divided and the preset field of view size. Based on the first boundary, the fourth object to be divided and the second boundary of the current field of view along the second coverage direction are determined. The fourth object to be divided is the starting object to be divided in the set of objects to be divided along the second coverage direction. If there is no third object to be divided, then the fifth object to be divided and the first boundary of the current field of view along the first coverage direction are determined. The fifth object to be divided is the starting object to be divided in the set of objects to be divided along the first coverage direction, or the starting object to be divided in the extended region of the previous field of view along the first coverage direction. Based on the first boundary, the sixth object to be divided and the second boundary of the current field of view along the second coverage direction are determined. The sixth object to be divided is the starting object to be divided in the set of objects to be divided along the second coverage direction. The update module is used to remove the objects to be divided that are covered by the field of view from the set of objects to be divided, and then proceed to the step of determining the field of view along the preset coverage direction based on the set of objects to be divided and the preset field of view size, until the set of objects to be divided is empty; The recording module is used to record the number of fields of view areas determined along a preset coverage direction; The repeat module is used to repeat the above steps for different preset coverage directions; The second determining module is used to determine the preset coverage direction with the fewest fields of view as the target coverage direction.

7. A field-of-view detection system, characterized in that, include: A camera, wherein the field of view of the camera is a preset field of view area size; At least one processor is communicatively connected to the camera; A memory, communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions that, when executed, implement the method as described in any one of claims 1-5.