Two-dimensional discrete space visual scanning method
By adopting a two-dimensional discrete space visual scanning method in the field of computer graphics processing and using a fine grid and a coarse grid system to perform two-level grid scanning, the problems of high computing resources and high hardware requirements in the prior art when processing first-person perspective data are solved, and fast response and efficient visual information acquisition are achieved.
Patent Information
- Application Number
- CN202411593690.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
AI Technical Summary
When processing large amounts of first-person perspective data, the prior art consumes a lot of computing resources, poor cross-platform compatibility, high hardware requirements, and difficult to respond quickly.
Two-dimensional discrete space visual scanning method is used to conduct two-level grid scanning by establishing a fine grid and a coarse grid system. The specific steps include building a scene matrix and field of view matrix, generating a thin grid and a thick grid field of view square matrix, performing two-level scans of a thick grid and a thin grid, and obtaining the scan results.
It reduces the amount of calculation required to obtain two-dimensional plane visual information around the scanning center, improves the computing speed, reduces hardware dependence, and can quickly obtain the first-person perspective of all individuals in a high-density group, which is suitable for the establishment of multi-agent models.
Smart Images

Figure CN119540384A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer graphics processing, and in particular to a two-dimensional discrete space visual scanning method. Background Art
[0002] Accurate environmental perception is crucial in today's industrial and technological fields, particularly in autonomous driving, robotic navigation, and multi-agent modeling. These technologies often rely on acquiring and analyzing large amounts of visual information to provide the necessary data input for related devices or models to function.
[0003] Visual perception in virtual scenes and controlling graphics rendering are relatively common methods, among which rasterization and ray tracing are widely used. There are also solutions for real-time 3D rendering through Unity and Unreal Engine. However, both of these methods place a heavy burden on computer equipment when processing large amounts of first-person perspective data. For example, Chinese patent application No. CN113240785B describes a multi-camera joint fast ray tracing method, system, and application, which demonstrates an improved ray tracing method that accelerates the ray search process and uses a variable step size guided by a distance field for occlusion judgment, selecting the optimal perspective for rendering, and achieving rapid reconstruction of scene images from a virtual perspective. However, processing large-scale first-person data places demands on hardware, and the computational burden is heavy, making it difficult to respond quickly. Currently, high computing resource consumption, cross-platform compatibility issues, and high hardware requirements remain urgent issues in virtual scene rendering. In particular, when processing large amounts of first-person perspective data, the problem of computing resource consumption is particularly prominent. Summary of the Invention
[0004] To overcome the shortcomings of the above-mentioned existing methods, the present invention proposes a two-dimensional discrete space visual scanning method, comprising the following steps:
[0005] S1: Establish a two-dimensional fine grid and coarse grid system, obtain the grid coordinates covered by the scanning ray and the mapping set between the fine grid and the coarse grid;
[0006] S2: Construct scene matrix and scene view matrix;
[0007] S3: Generate a fine grid field of view matrix V1: where the number of rows and columns of V1 is divisible by the side length d2 / d1 of the single-channel convolution kernel M, and the scanning center is located at the center of the fine grid field of view matrix V1, where d1 is the side length of the fine grid system and d2 is the side length of the coarse grid system;
[0008] S4: Generate a coarse grid visual field matrix V2: Use a single-channel convolution kernel M with a value of 1 and a size of (d2 / d1)*(d2 / d1) with a step size of d2 / d1 to convolve the fine grid visual field matrix V1 to obtain a coarse grid visual field matrix V2;
[0009] S5: Perform two-level scanning of coarse grid and fine grid to obtain scanning ray L i Scan Results i ;
[0010] S6: For each ray L i , execute step S5, and finally form the coordinate set S={S1, S2, ..., S m}, where m is the total number of scanning rays.
[0011] Furthermore, step S1 specifically includes:
[0012] S11: Constructing a fine grid system and a coarse grid system: Covering the scene in the fine grid system, wherein the fine grid system is a two-dimensional grid with a side length of d1; covering the scene in the coarse grid system, wherein the coarse grid system is a two-dimensional grid with a side length of d2; wherein d2 = (2N + 1)d1, N is a positive integer;
[0013] S12: Obtaining the grid coordinates covered by the scanning ray: Select a grid in the fine grid system as the coordinate origin O, establish a rectangular coordinate system, and ensure that the coordinate origin O is located in the coarse grid system; the position of a grid in the fine grid system and the coarse grid system relative to the coordinate origin O is the coordinate of the grid;
[0014] With the origin O as the center, emit m line segments of equal length into the space L={L1,L2,…,L m} as the scanning ray, define the fine grid scanning set T1={t1,t2,…,t m}, coarse grid scanning set T2 = {t′1, t′2, …, t′ m}, where t i is ray L i The coordinate set of the fine grids passed through in sequence in the fine grid system, t′ i For L i The coordinate set of the coarse grids that pass through in sequence under the coarse grid system; the ray L i The length of depends on the specific scanning range D;
[0015] S13: Obtain the mapping set of fine grids and coarse grids covered by the scanning ray: For each ray L i , its jth grid coordinate (x′ i,j ,y′i,j ), covering multiple fine grids, and the ray L i The fine grids passed through are saved as a mapping set R in the order from near to far from the scanning center. i ={r i,j ,j=1,…,n}, where n is the ray L i The number of coarse grids passed through; the mapping set of all rays constitutes the mapping set of fine grids and coarse grids R = {R1, R2…R m}.
[0016] Furthermore, step S2 specifically includes:
[0017] Construct a scene matrix: Cover the scene with an initial rectangle and divide the initial rectangle into two-dimensional grids with a side length of d1. The length and width of the initial rectangle have A grids and B grids respectively, forming an A*B scene matrix F. Fill the scene matrix F: the grids occupied by objects in the scene have the corresponding value in the matrix 1, otherwise it is 0;
[0018] Construct the scene field of view matrix E: expand the initial rectangle to form an extended rectangle: increase the length of N1*d1 on all four sides, where N1=D / d1, and form a scene field of view matrix E of (A+2N1)*(B+2N1) for the extended rectangle, where the expanded new matrix elements are assigned 0.
[0019] Furthermore, step S3 specifically includes:
[0020] S31: Determine a scanning center point P in the scene, and locate the element e defined by the scanning center point P in the scene field of view matrix E. With the element e as the center, together with N1 elements above, below, left, and right of the element e, form an initial field of view matrix;
[0021] S32: Modify the number of rows and columns of the initial field of view matrix so that the number of rows and columns can be divided by the side length d2 / d1 of the single-channel convolution kernel M, and obtain the fine grid field of view matrix V1.
[0022] Furthermore, step S5 specifically includes:
[0023] S51: For ray L i , for t′ in the coarse grid scan set T2 i The coordinates in the image are mapped to the coordinates of the origin at the scanning center, and the mapped coordinates are used as indexes to query the coarse grid field of view matrix V2. The matrix element values obtained form the matrix with t′ i The corresponding one-dimensional array g i ;
[0024] S52: Mapping set R i The element r ini,j Mapped to coordinates with the scan center as the origin Take the one-dimensional array g i The first non-zero element in , query its position (i, j) in the coarse grid view matrix V2 as the index, and find the corresponding And according to The recorded coordinate values are searched in the fine grid field of view matrix V1, and the first non-zero matrix element value is matched to The recorded coordinate values are used as the result of this scan S i .
[0025] This method employs two-level grid scanning, discretizing a two-dimensional scene into a grid. A coarse grid is used for preliminary scanning to determine the approximate extent of non-blank areas, followed by a fine grid for detailed scanning of the non-blank areas, capturing all visible elements within the scanned field of view. Compared to existing technologies, this method boasts fast computational speed, strong applicability, and minimal hardware dependency. It also captures the human visual perception of objects, such as larger objects near and smaller objects far away, object occlusion, and near-real and far-imaginary objects. It can rapidly capture the first-person perspective of all individuals in a high-density crowd, providing a methodological foundation for establishing vision-based multi-agent models. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of the two-dimensional discrete space visual scanning method of the present invention;
[0027] Figure 2 It is a schematic diagram of the coarse and fine grid system and the ray coverage grid;
[0028] Figure 3 It is a schematic diagram of the scene;
[0029] Figure 4 It is a schematic diagram of the scene matrix F;
[0030] Figure 5 It is a schematic diagram of the scene field of view matrix E;
[0031] Figure 6 It is a schematic diagram of convolving the fine grid visual field matrix V1 to obtain the coarse grid visual field matrix V2;
[0032] Figure 7 It is a schematic diagram of the scene scanning process;
[0033] Figure 8 It is a two-dimensional plan view of the second scene to be scanned (large scene) and a schematic diagram of the scanning results;
[0034] Figure 9 This is a schematic diagram comparing the running time of the present invention and other visual scanning algorithms. DETAILED DESCRIPTION
[0035] In order to introduce the main process of the two-dimensional discrete space visual scanning method of the present invention in detail, a scanning scene is set up. The scene is a rectangular room composed of solid walls and obstacles. The main steps of the two-level grid scanning method are described in detail below with reference to this scene. Figure 1-7 , the method mainly includes:
[0036] Step S1: Establish a two-dimensional fine grid and coarse grid system, obtain the grid coordinates covered by the scanning ray and the mapping set between the fine grid and the coarse grid. Specifically including:
[0037] Step S11: Construct a fine grid system and a coarse grid system: Cover the scene in the fine grid system, which is a two-dimensional grid with a side length of d1; cover the scene in the coarse grid system, which is a two-dimensional grid with a side length of d2; where d2 = (2N + 1)d1, where N is a positive integer, that is, d2 is an odd multiple of d1.
[0038] Step S12: Obtaining the grid coordinates covered by the scanning ray: Select a grid in the fine grid system as the coordinate origin O, establish a rectangular coordinate system, and ensure that the coordinate origin O is located in the coarse grid system; the position of a grid in the fine grid system and the coarse grid system relative to the coordinate origin O is the grid coordinate;
[0039] With the origin O as the center, emit m line segments of equal length into the space L={L1,L2,…,L m} as the scanning ray, define the fine grid scanning set T1={t1,t2,…,t m}, coarse grid scanning set T2 = {t′1, t′2, …, t′ m}, where t i is ray L i The coordinate set of the fine grids passed through in sequence in the fine grid system, t′ i For L i The coordinate set of the coarse grids that pass through in sequence under the coarse grid system; the ray L i The length of depends on the specific scanning range D.
[0040] See also Figure 2 , d1 = 0.1m, d2 = 0.3m, D = 5.4m, starting from the coordinate origin O, 7 rays are emitted in the first quadrant. For ray L1, it passes through multiple grids in the coarse grid system. In the coarse grid system, the coarse grid coordinate set it passes through is t1 = {(0,0), (1,0), (2,0)…(18,0)}, and in the fine grid system, the fine grid coordinate set it passes through is t′1 = {(0,0), (1,0), (2,0)…(54,0)}.
[0041] Step S13: Obtain a mapping set of fine grids and coarse grids covered by the scanning ray: For each ray L i , its jth grid coordinate (x′ i,j ,y′ i,j ), covering multiple fine grids, and the ray L i The fine grids passed through are saved as a mapping set R in the order from near to far from the scanning center. i ={r i,j ,j=1,…,n}, where n is the ray L i The number of coarse grids passed through; the mapping set of all rays constitutes the mapping set of fine grids and coarse grids R = {R1, R2…R m}.
[0042] like Figure 2 As shown, the coarse grid A on ray L1 is the i The 8th grid in the coarse grid system includes 9 fine grids. The ray L i Passing through three of them, the three fine grid coordinates are (22,0), (23,0), (24,0), then r 1,8 ={(22,0),(23,0),(24,0)}.
[0043] Step S2: Construct the scene matrix and scene view matrix. The specific method is as follows:
[0044] Step S21: Construct a scene matrix: Cover the scene with an initial rectangle and divide the initial rectangle into two-dimensional grids with a side length of d1. The length and width of the initial rectangle have A grids and B grids respectively, forming an A*B scene matrix F. Fill the scene matrix F: the grids occupied by objects in the scene have corresponding values in the matrix of 1, otherwise they are 0.
[0045] Step S22: Construct scene field of view matrix E: Expand the initial rectangle to form an extended rectangle: increase the length of N1*d1 on all sides, N1=D / d1, and the scanning range is the scanning ray L i The length of the extended rectangle is used to form a scene field of view matrix E of (A+2N1)*(B+2N1), where the expanded new matrix elements are assigned 0.
[0046] like Figure 3As shown in the figure, the original scene is 2.2m*2.2m, and the initial rectangle is also 2.2m*2.2m, thus covering the scene, d1=0.1m, and the scene matrix F is a 22*22 matrix. The scene matrix is filled, and the gray grid points correspond to the values in the matrix of 1, and the white grid points correspond to the values in the matrix of 0. The initial rectangle is expanded, N1=11, and the field of view matrix E is a 44*44 matrix. The scene matrix F and the field of view matrix E are respectively as follows: Figure 4 、 5 As shown:
[0047] Step S3: Generate a fine grid field of view matrix V1: wherein the number of rows and columns of V1 is divisible by the side length d2 / d1 of the single-channel convolution kernel M, and the scanning center is located at the center of the fine grid field of view matrix V1.
[0048] The specific steps are as follows:
[0049] Step S31: Determine the scanning center point P in the scene, and locate the element e defined by the scanning center point P in the scene field of view matrix E. With the element e as the center, together with N1 elements above, below, left, and right of the element e, form an initial field of view matrix;
[0050] Step S32: Modify the number of rows and columns of the initial field of view matrix so that the number of rows and columns can be divided by the side length d2 / d1 of the single-channel convolution kernel M, and obtain a fine grid field of view matrix V1.
[0051] like Figure 5 As shown, at the scanning center point P in the scene, the corresponding element e in the scene field of view matrix E is located at row 23 and column 22, N1=11, and with e as the center, 11 elements are selected from the top, bottom, left, and right to construct the initial field of view matrix (a 23*23 matrix). Figure 5 Indicated by dotted line.
[0052] d1=0.1m, d2=0.5m, d2 / d1=5. The number of rows and columns 23 cannot be divided by 5. Therefore, the initial field of view matrix is modified by expanding 1 row on the top and 1 column on the left and right to make it a 25*25 matrix. The expanded rows and columns are filled with 0, thus forming a fine grid field of view matrix V1.
[0053] Through the above operations, the number of rows and columns of the matrix V1 can be divided by the side length 5 of the single-channel convolution kernel M, and the scanning center is located at the center of the matrix V1. The fine grid field of view matrix V1 is Figure 5 The solid line in the middle.
[0054] Step S4: Generate a coarse grid field of view matrix V2: Use a single-channel convolution kernel M with a value of 1 and a size of (d2 / d1)*(d2 / d1) to convolve the fine grid field of view matrix V1 with a step size of d2 / d1 to obtain a coarse grid field of view matrix V2.
[0055] like Figure 6 As shown in the figure, the fine grid field of view matrix V1 is 25*25, and the coarse grid field of view matrix V2 obtained after convolution is a 5*5 matrix.
[0056] Step S5: Perform two-level scanning of coarse grid and fine grid to obtain scanning ray L i Scan Results i Specifically, the following steps are included:
[0057] Step S51: For ray L i , for t′ in the coarse grid scan set T2 i The coordinates in the image are mapped to the coordinates of the origin at the scanning center, and the mapped coordinates are used as indexes to query the coarse grid field of view matrix V2. The matrix element values obtained form the matrix with t′ i The corresponding one-dimensional array g i .
[0058] Since the coarse grid scan set T2 is the coordinate relative to the coordinate origin O, it does not necessarily coincide with the scan center P. Therefore, in order to obtain the information of the grid covered by the ray, it is necessary to replace t′ in T2 with i The coordinates in the coordinate map are mapped to the coordinates of the scanning center as the origin. Specifically, it is to query the coordinates of the scanning center P relative to the coordinate origin O, and then calculate t' i The coordinates in the coarse grid are translated, and the translated coordinates must be within the range of the coarse grid field of view matrix V2.
[0059] like Figure 7 As shown, for an area of 2.2m*2.2m, d2=0.5m, ray L i The coarse grid scanning set is t′1={(0,0),(1,0),(2,0)}. Assuming that the coordinates of point P relative to the origin are (3,3), then the set after translation of t′1 is {(3,3),(4,3),(5,3)}. Query the values of the matrix elements corresponding to the three positions (3,3),(4,3),(5,3) in V2 respectively, and we get g i ={0,0,5}.
[0060] Step S52: Mapping set R i The element r in i,j Mapped to coordinates with the scan center as the origin Take the one-dimensional array g i The first non-zero element in , query its position (i, j) in the coarse grid view matrix V2 as the index, and find the corresponding And according to The recorded coordinate values are searched in the fine grid field of view matrix V1, and the first non-zero matrix element value is matched to The recorded coordinate values are used as the result of this scan S i .
[0061] Since the mapping set R i The elements in are rays L i Therefore, the coordinate translation of the scanning center P relative to the coordinate origin O can be performed to obtain R i Every element r in i,j The coordinate set is based on the position of the scan center P, and uses this position as the index to find the corresponding matrix element value in the fine grid field of view matrix V1.
[0062] like Figure 7 As shown, R1={r 1,j ,j=1,2,3}, the corresponding coordinate set of the fine grid
[0063] The coordinates of the scanning center P are (13,13), r 1,j After mapping (coordinate translation):
[0064]
[0065]
[0066] Since the coordinates (5,3) of the first non-zero element 5 in the scan result array (0,0,5) of V2 obtained in step S51 have an index (1,3) in V2, the query The coordinate set {(21,13),(22,13),(23,13),(24,13),(25,13)} is indexed in the fine grid field of view matrix V1 to obtain a one-dimensional array of (0,0,1,0,0). The coordinate S of the first non-zero element is i =(23,13) as the scanning ray L i The scan result represents the i Looking in the direction of Figure 7 (as shown by the small black grid in the middle).
[0067] Step S6: For each ray L i , execute step S5, and finally form the coordinate set S={S1, S2, ..., S m}.
[0068] The present invention reduces the amount of calculation required to obtain two-dimensional planar visual information around the scanning center, effectively reducing the operation time: Specifically: 1. Pre-calculating and storing the grid coordinates covered by the scanning rays in the coarse and fine grids, avoiding the need to recalculate the coordinates used by the scanning rays for each scan, thereby improving the operation speed; 2. Convolving the discretized two-dimensional scene fine grid map into a coarse grid map and then using the coarse and fine two-level grids for hierarchical scanning, avoiding the ineffective scanning of blank areas when scanning with only the fine grid, thereby improving the operation efficiency.
[0069] The scanning effect of the present invention is described below with respect to the second scene to be scanned (large scene). Figure 8 The center left side shows a two-dimensional schematic diagram of a large scene. The scene is a rectangular room with a length of L = 14.3m and a width of W = 17.5m. The room is composed of solid walls and obstacles. The scene is discretized using multiple grids with a side length of d1 = 0.1m. The cross-shaped scanning center is marked.
[0070] The large scene is scanned with the scanning parameters of scanning range v = 9m, ray angle α = 2°, fine grid side length d1 = 0.1m, and coarse grid side length d2 = 0.5m. Figure 8 The middle right side is the scanning result of the algorithm of the present invention in this scene. The cross mark is the scanning center, and the several black dots in the figure are the scanned objects. Figure 8 The points scanned on the middle right side show that the points close to the scanning center are dense and the points far away are sparse, and there is at most one point in each straight line direction of the scanning center. This reflects that the algorithm of the present invention reflects the characteristics of object occlusion, near big and far small, visual limit, and near real and far virtual when performing scene scanning.
[0071] Table 1 is a comparison of the scanning time of the two-level grid scanning algorithm of the present invention and that of the single fine grid scanning algorithm. In this comparative test, in the same rectangular scene to be scanned with a length of L = 15m and a width of W = 15m, the scanning parameters were set with the same scanning ray angle α = 2°, the coarse grid side length d2 = 0.5m, and the fine grid side length d1 = 0.1m. 1000 scans were performed with different scanning field radiuses ranging from 3 meters to 21 meters and the same scanning center to obtain the average scanning time. As shown in Table 1, under any different scanning fields of view of the experiment, the average time of the algorithm of the present invention is better than the average time of single grid scanning and scanning using the ray polygon intersection method, and the time is only about 1 / 3 of the time of the single fine grid scanning algorithm and about 1 / 4 of the time of the ray polygon intersection method. This scene is a scene with a small number of objects, that is, a small number of polygons. If the scene is more complex, the advantage of the algorithm of the present invention will be more significant. Figure 9 As shown, the computation time of the algorithm of the present invention is less than that of the single grid scanning algorithm and the ray-polygon intersection method. It can be seen that the present invention can greatly reduce the time spent on scene scanning and effectively improve the efficiency of scene scanning.
[0072] Table 1 Comparison of running time of different scanning methods (unit: seconds)
[0073]
[0074]
[0075] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A two-dimensional discrete space visual scanning method, characterized in that: The following steps are involved: S1: Establish a two-dimensional fine grid and coarse grid system, obtain the grid coordinates covered by the scanning ray and the mapping set between the fine grid and the coarse grid; S2: Construct scene matrix and scene view matrix; S3: Generate a fine grid field of view matrix V1: where the number of rows and columns of V1 is divisible by the side length d2 / d1 of the single-channel convolution kernel M, and the scanning center is located at the center of the fine grid field of view matrix V1, where d1 is the side length of the fine grid system and d2 is the side length of the coarse grid system; S4: Generate a coarse grid view matrix V2: Use a single-channel convolution kernel M with a value of 1 and a size of (d2 / d1)*(d2 / d1) to convolve the fine grid view matrix V1 with a step size of d2 / d1 to obtain a coarse grid view matrix V2; S5: Perform two-level scanning of coarse grid and fine grid to obtain scanning ray L i Scan Results i ; S6: For each ray L i , execute step S5, and finally form a coordinate set S = {S1, S2, ..., S m }, where m is the total number of scanning rays.
2. The method according to claim 1, characterized in that Step S1 specifically includes: S11: Construct a fine grid system and a coarse grid system: Cover the scene in the fine grid system, where the fine grid system is a two-dimensional grid with a side length of d1; Cover the scene in the coarse grid system, where the coarse grid system is a two-dimensional grid with a side length of d2; where d2=(2N+1)d1, and N is a positive integer; S12: Obtaining the grid coordinates covered by the scanning ray: Select a grid in the fine grid system as the coordinate origin O, establish a rectangular coordinate system, and ensure that the coordinate origin O is located in the coarse grid system; in the fine grid system and the coarse grid system, the position of a grid relative to the coordinate origin O is the coordinate of the grid; With the origin O as the center, emit m line segments of equal length into space L = {L1, L2, ..., L m } as the scanning ray, define the fine grid scanning set T1 = {t1, t2, …, t m }, coarse grid scanning set T2 = {t′1, t′2, …, t′ m }, where t i For ray L i The coordinate set of the fine grids passed in sequence under the fine grid system, t′ i For L i The coordinate set of the coarse grids that pass through in sequence under the coarse grid system; ray L i The length of depends on the specific scanning range D; S13: Obtain the mapping set of fine grids and coarse grids covered by the scanning ray: For each ray L i , its jth grid coordinate (x′ i,j ,y′ i,j ), covering multiple fine grids, and the ray L i The fine grids passed by are saved as a mapping set R in the order from near to far from the scanning center. i = {r i,j ,j=1,…,n}, where n is the ray L i The number of coarse grids passed; the mapping set of all rays constitutes the mapping set of fine grids and coarse grids R = {R1, R2…R m }.
3. The method according to claim 2, characterized in that Step S2 specifically includes: Construct a scene matrix: Cover the scene with an initial rectangle and divide the initial rectangle into two-dimensional grids with a side length of d1. The length and width of the initial rectangle have A grids and B grids respectively, forming an A*B scene matrix F. Fill the scene matrix F: the corresponding value in the matrix is 1 for the grids occupied by objects in the scene, otherwise it is 0; Construct the scene field of view matrix E: expand the initial rectangle to form an extended rectangle: increase the length of N1*d1 on all sides, where N1=D / d1, and form a scene field of view matrix E of (A+2N1)*(B+2N1) for the extended rectangle, where the expanded new matrix elements are assigned 0.
4. The method according to claim 3, characterized in that: Step S3 specifically includes: S31: Determine a scanning center point P in the scene, and locate an element e defined by the scanning center point P in the scene field of view matrix E, and form an initial field of view matrix with the element e as the center, together with N1 elements above, below, left, and right of the element e; S32: Modify the number of rows and columns of the initial field of view matrix so that the number of rows and columns can be divided by the side length d2 / d1 of the single-channel convolution kernel M, and obtain a fine grid field of view matrix V1.
5. The method according to claim 4, characterized in that Step S5 specifically includes: S51: For ray L i , for t′ in the coarse grid scan set T2 i The coordinates in are mapped to the coordinates with the scanning center as the origin, and the mapped coordinates are used as indexes to query the coarse grid field of view matrix V2. The obtained matrix element values form a matrix with t′ i The corresponding one-dimensional array g i ; S52: Mapping set R i The element r in i,j Mapped to coordinates with the scan center as the origin Take the one-dimensional array g i The first non-zero element in , query its position (i, j) in the coarse grid view matrix V2 as the index, and find the corresponding And according to The recorded coordinate values are searched in the fine grid field of view matrix V1, and the first non-zero matrix element value is corresponding to The recorded coordinate values are used as the result of this scan. i .
Citation Information
Patent Citations
A multi-camera joint fast ray tracing method, system and application
CN113240785B