CN118261969A - Voxel visibility detection method and device - Google Patents

Voxel visibility detection method and device Download PDF

Info

Publication number
CN118261969A
CN118261969A CN202410396654.4A CN202410396654A CN118261969A CN 118261969 A CN118261969 A CN 118261969A CN 202410396654 A CN202410396654 A CN 202410396654A CN 118261969 A CN118261969 A CN 118261969A
Authority
CN
China
Prior art keywords
sampling
ray
voxel
point
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410396654.4A
Other languages
Chinese (zh)
Inventor
张政远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jd Yuansheng Technology Co ltd
Original Assignee
Beijing Jd Yuansheng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jd Yuansheng Technology Co ltd filed Critical Beijing Jd Yuansheng Technology Co ltd
Priority to CN202410396654.4A priority Critical patent/CN118261969A/en
Publication of CN118261969A publication Critical patent/CN118261969A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses a voxel visibility detection method and device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: acquiring rays emitted from a camera center point to corner points of voxels to be detected; respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected; voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray; and determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray. According to the method, a complex calculation process of judging whether a large number of rays and voxels intersect in the 3D space is avoided, the calculation complexity is greatly reduced, and the real-time performance is improved while the accuracy is ensured.

Description

Voxel visibility detection method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a voxel visibility detection method and apparatus.
Background
In the field of computer graphics, voxels are commonly used for describing and representing semantic and geometric information of a scene space, and when rendering in real time in a 3D (Three-dimensional) space, whether the voxels are in the visible range of a camera needs to be judged according to the position and orientation of the camera so as to avoid calculating and rendering ineffective or invisible voxels. Today, in real-time scenes, when judging the visibility of a voxel by ray casting, the basic principle is to emit rays from the point of view of an observer (generally referred to as a camera), judge whether the rays intersect with objects in the scene, and if so, the voxel is visible; otherwise, it is determined that the voxel is not visible.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
When the visibility of the voxels is judged by the ray casting method, rays of 8 angular points of the camera center and the voxels are required to be constructed, whether the rays intersect with other voxels or not is judged, the intersection of the rays and the voxels is complex in a 3D space, and the calculation complexity is high.
Disclosure of Invention
In view of this, the embodiment of the invention provides a method and a device for detecting voxel visibility, which can convert the problem of judging whether rays intersect voxels in a 3D space into the problem of judging whether sampling points on the rays are visible for the first time after voxelization, so that the complex calculation process of judging whether a large number of rays intersect voxels in the 3D space is avoided, the calculation complexity is greatly reduced, the accuracy is ensured, the instantaneity is improved, the obstacle detection efficiency is improved, and the safety of automatic driving is improved.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a voxel visibility detection method including:
Acquiring rays emitted from a camera center point to corner points of voxels to be detected;
respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected;
Voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray;
and determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray.
Optionally, sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, including: taking the center point of the camera as a starting point, taking the corner point of the voxel to be detected corresponding to the ray as an end point, and sampling at equal intervals with a specific step length to obtain a first sampling point set corresponding to the ray; deleting the corner point of the voxel to be detected from the first sampling point set under the condition that the first sampling point set comprises the corner point of the voxel to be detected, so as to obtain a sampling point set corresponding to the ray; and under the condition that the first sampling point set does not comprise the corner point of the voxel to be detected, taking the first sampling point set as the sampling point set corresponding to the ray.
Optionally, the specific step size is smaller than a grid side size of the voxel.
Optionally, determining the visibility of the voxel to be detected according to the sampling voxel set corresponding to each ray includes: determining the visibility of the voxels to be detected according to whether the sampling voxels in the sampling voxel set corresponding to each ray comprise point cloud data or not; for each ray, if all sampling voxels in a sampling voxel set corresponding to the ray do not comprise point cloud data, judging that the corner point corresponding to the ray is visible; and under the condition that the corner point is visible, judging that the voxel to be detected is visible.
Optionally, the method further comprises: pre-voxelized processing is carried out on the point cloud data to obtain a voxelized data set; and judging whether the sampling voxels comprise point cloud data according to the voxelized data set.
Optionally, the method further comprises: acquiring coordinates of a camera center point and coordinates of angular points of voxels to be detected; calculating the coordinates of each sampling point and the coordinates of sampling voxels corresponding to each sampling point according to the coordinates of the camera center point and the coordinates of the corner points of the voxels to be detected; and judging whether the sampling voxels comprise point cloud data according to the coordinates of each voxel in the voxelized data set and the coordinates of each sampling voxel.
According to another aspect of an embodiment of the present invention, there is provided a voxel visibility detection apparatus including:
the ray acquisition module is used for acquiring rays emitted from a camera center point to corner points of voxels to be detected;
the ray sampling module is used for respectively carrying out equidistant sampling on each ray with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected;
The voxelization processing module is used for voxelization of sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray;
and the voxel visibility judging module is used for determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray.
Optionally, the ray sampling module is further configured to: taking the center point of the camera as a starting point, taking the corner point of the voxel to be detected corresponding to the ray as an end point, and sampling at equal intervals with a specific step length to obtain a first sampling point set corresponding to the ray; deleting the corner point of the voxel to be detected from the first sampling point set under the condition that the first sampling point set comprises the corner point of the voxel to be detected, so as to obtain a sampling point set corresponding to the ray; and under the condition that the first sampling point set does not comprise the corner point of the voxel to be detected, taking the first sampling point set as the sampling point set corresponding to the ray.
According to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the voxel visibility detection method provided by the embodiment of the invention.
According to a further aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method for detecting voxel visibility provided by the embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of obtaining rays emitted from a camera center point to corner points of voxels to be detected; respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected; voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray; according to the technical scheme of determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray, the problem of judging whether the rays intersect the voxels in the 3D space is converted into the problem of judging whether the sampling points on the rays are visible for the first time after voxelization, so that the complex calculation process of judging whether a large number of rays intersect the voxels in the 3D space is avoided, the calculation complexity is greatly reduced, the accuracy is ensured, the instantaneity is improved, the obstacle detection efficiency is improved, and the safety of automatic driving is improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method of detecting voxel visibility according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a voxel visibility detection flow in accordance with one embodiment of the present invention;
FIG. 3 is a schematic diagram of the principle of voxel visibility detection in accordance with one embodiment of the present invention;
FIG. 4 is a schematic diagram of the main modules of a detection device for voxel visibility according to an embodiment of the invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the technical scheme disclosed by the invention, the aspects of acquisition, collection, updating, analysis, processing, use, transmission, storage and the like of the related user personal information all conform to the rules of related laws and regulations, are used for legal purposes, and do not violate the popular public order. Necessary measures are taken for the personal information of the user, illegal access to the personal information data of the user is prevented, and the personal information security, network security and national security of the user are maintained.
The invention converts the problem of judging whether the rays and the voxels intersect in the 3D space into the problem of judging whether the sampling points on the rays are visible for the first time after voxelization, thus avoiding the complex calculation process of judging whether a large number of rays and the voxels intersect in the 3D space, greatly reducing the calculation complexity, ensuring the precision and improving the instantaneity at the same time, thereby improving the obstacle detection efficiency and the safety of automatic driving.
Fig. 1 is a schematic diagram of the main steps of a method of detecting voxel visibility according to an embodiment of the invention. As shown in fig. 1, the voxel visibility detection method according to the embodiment of the present invention mainly includes the following steps S101 to S104.
Step S101: rays emitted from a camera center point to corner points of voxels to be detected are acquired. In the embodiment of the present invention, for example, in an automatic driving scenario, it is necessary to detect whether there is an obstacle in a certain range with the vehicle as the center origin. At this time, after the voxel processing is performed on the range, the obstacle is detected, that is, whether or not there is any voxel in the range. Then, all voxels within the detection range are voxels to be detected, and whether each voxel is visible or not can be detected by the detection method of the visibility of the voxels. In one embodiment of the invention, the detection range is assumed to be: -40m, -40m, -1m,40m,5.4m ], i.e. 40m in front of and behind the vehicle, 40m around, from-1 m up and down to 5.4m, if the volume size of each voxel grid is specified to be 0.2 x 0.2m, i.e.: if the side length of the voxel grid is 0.2m, the detection range can be divided into (80/0.2) ×80/0.2 (6.4/0.2) voxel grids according to the volume size of the voxel grid. In the radar coordinate system, the camera emits rays to each voxel to be detected, thereby forming a plurality of rays.
In an embodiment of the invention, rays emitted from the center point of the camera towards the 8 corner points of the voxel to be detected are considered when performing voxel visibility detection. The corner points are the salient feature points of the voxels, namely 8 vertexes of the cube corresponding to the voxels.
Step S102: and respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected. After 8 rays emitted from the center point of the camera to 8 corner points of the voxel to be detected are obtained, each ray needs to be processed respectively, and the voxel to be detected can be judged to be visible as long as one ray can judge that the corner point of the voxel to be detected is visible.
According to one embodiment of the present invention, each ray is sampled at equal intervals with a specific step length to obtain a sampling point set of each ray, including: taking the center point of the camera as a starting point, taking the corner point of the voxel to be detected corresponding to the ray as an end point, and sampling at equal intervals with a specific step length to obtain a first sampling point set corresponding to the ray; deleting the corner point of the voxel to be detected from the first sampling point set under the condition that the first sampling point set comprises the corner point of the voxel to be detected, so as to obtain a sampling point set corresponding to the ray; and under the condition that the first sampling point set does not comprise the corner point of the voxel to be detected, taking the first sampling point set as the sampling point set corresponding to the ray. In one embodiment, the specific step size is smaller than a grid side size of the voxel. Therefore, when sampling is performed, the sampled sampling point can cover each voxel of the space through which the ray passes.
Step S103: and voxelizing the sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray. In the voxel processing, the voxel grid corresponding to the sampling point may be defined as a sampling voxel corresponding to the sampling point, depending on which voxel grid the sampling point is located.
Step S104: and determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray.
According to an embodiment of the present invention, determining the visibility of the voxel to be detected according to the set of sampling voxels corresponding to each ray may specifically include: determining the visibility of the voxels to be detected according to whether the sampling voxels in the sampling voxel set corresponding to each ray comprise point cloud data or not; for each ray, if all sampling voxels in a sampling voxel set corresponding to the ray do not comprise point cloud data, judging that the corner point corresponding to the ray is visible; and under the condition that the corner point is visible, judging that the voxel to be detected is visible. If each sampling voxel does not comprise point cloud data in the sampling voxel set corresponding to one ray, each voxel is empty, and no shielding exists at the moment, so that the corner point corresponding to the ray is judged to be visible, and the voxel to be detected can be further judged to be visible. If any one of the sampling voxels corresponding to one ray includes point cloud data in the sampling voxel set, it is indicated that there is shielding at the moment, so that it is determined that the corner corresponding to the ray is invisible, at the moment, it is further determined whether the corner corresponding to the rest of the rays is visible or not, until it is determined whether the voxel to be detected is visible or not. If all the corner points corresponding to the 8 rays are invisible, judging that the voxel to be detected is invisible.
According to one embodiment of the invention, the method further comprises: pre-voxelized processing is carried out on the point cloud data to obtain a voxelized data set; and judging whether the sampling voxels comprise point cloud data according to the voxelized data set. Whether the point cloud data are included in each voxel in the detection range can be obtained through voxelization processing of the point cloud data in advance, and at the moment, whether the sampling voxels include the point cloud data can be judged according to whether the point cloud data are included in each voxel.
According to a further embodiment of the invention, the method further comprises: acquiring coordinates of a camera center point and coordinates of angular points of voxels to be detected; calculating the coordinates of each sampling point and the coordinates of sampling voxels corresponding to each sampling point according to the coordinates of the camera center point and the coordinates of the corner points of the voxels to be detected; and judging whether the sampling voxels in the sampling voxel set comprise point cloud data or not according to the coordinates of each voxel and the coordinates of each sampling voxel in the voxelized data set. Specifically, when judging whether the sampling voxels comprise point cloud data, determining the coordinates of a camera center point (i.e. a camera position) and the coordinates of each angular point of the voxels to be detected in a radar coordinate system, further calculating the coordinates of each sampling point by combining a specific step length during sampling, acquiring the coordinates of the voxels (i.e. sampling voxels) where the sampling points are located according to the coordinates of the sampling points, and finally determining whether the sampling voxels comprise point cloud data according to the coordinates of the sampling voxels and the coordinates of each voxel in a pre-generated voxelized data set, wherein if the sampling voxels do not comprise point cloud data, namely the sampling voxels are empty.
According to the technical scheme of the invention, the voxel visibility detection method can be applied to the field of automatic driving for roadblock detection, so that obstacle detection can be carried out by detecting the visibility of voxels. In the embodiment of the invention, the problem of judging whether the rays and the voxels intersect in the 3D space is converted into the problem of judging whether the sampling points on the rays are visible for the first time after voxelization, so that the complex calculation process of judging whether a large number of rays and the voxels intersect in the 3D space is avoided, the calculation complexity is greatly reduced, the accuracy is ensured, the real-time performance of voxel detection is improved, the obstacle detection efficiency is improved, and the automatic driving safety is improved.
Fig. 2 is a schematic diagram of a voxel visibility detection flow in accordance with one embodiment of the present invention. As shown in fig. 2, the voxel visibility detection process according to one embodiment of the present invention mainly includes the following steps:
Step 1: the camera center point coordinates p= { x_c, y_c, z_c }, all voxel sets v= { v_i } (i=0, 1., N), and solving for coordinates c= { x_ij, y_ij, z_ij } (i=0, 1..n, j=0, 1..7) of 8 corner points of each voxel;
Step 2: screening out voxels which are not marked with visible or not in the voxel set V (namely, eliminating empty voxels and marked voxels), and ending the flow if the voxel set V is empty; if the voxel set V is not empty, one voxel v_i is taken out, and the camera center point is connected to 8 corner points of the voxel v_i, so that 8 rays r= { r_i } (i=0, 1., 7) can be constructed;
Step 3: screening rays which are not processed from R, and if the screening result is null, judging that the voxel v_i is invisible; if the screening result is not null, taking out a ray r_i;
Step 4: starting from a camera center point, sampling the ray at equal intervals with a specific step length, stopping sampling before reaching the corner point to obtain a series of sampling points, voxelizing the sampling points to obtain sampling voxels, and judging whether the sampling voxels are empty or not. If they are all empty, indicating that the ray can pass through the voxel v_i, determining that the voxel v_i is visible, and returning to the step 2; if the sampling voxel is not empty, the ray is blocked, the voxel v_i cannot be penetrated, the corner corresponding to the ray is judged to be invisible, and the step 3 is returned to further judge whether other corner is visible.
Fig. 3 is a schematic diagram of the principle of voxel visibility detection in accordance with one embodiment of the present invention. As shown in fig. 3, assuming that the center point of the camera is P, it is now required to determine whether the voxel C is visible, specifically, the process is to send a ray from P to one corner Q of the voxel C and intercept the PQ line segment, sample the PQ with a fixed step length to obtain a series of sampling points (excluding the Q point), and then voxelize the sampling points, where these sampling points are included in the voxels a and B, and only need to determine whether the voxels a and B are empty. If the voxels A and B are empty, the P point can see the Q point of the voxel C, and all the corner points of the voxel C are judged in turn. If none of the 8 corner points is visible, voxel C is not visible, otherwise it is determined that voxel C is visible.
Fig. 4 is a schematic diagram of the main modules of a detection device for voxel visibility according to an embodiment of the invention. As shown in fig. 4, the voxel visibility detection apparatus 400 according to the embodiment of the present invention mainly includes a ray acquisition module 401, a ray sampling module 402, a voxelization processing module 403, and a voxel visibility determination module 404.
A ray acquisition module 401, configured to acquire a ray emitted from a center point of a camera to a corner point of a voxel to be detected;
The ray sampling module 402 is configured to sample each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, where the sampling point set does not include a corner point of the voxel to be detected;
a voxelization processing module 403, configured to voxeize sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray;
And a voxel visibility determination module 404, configured to determine the visibility of the voxel to be detected according to the sampled voxel set corresponding to each ray.
According to one embodiment of the invention, the ray sampling module 402 may also be configured to: taking the center point of the camera as a starting point, taking the corner point of the voxel to be detected corresponding to the ray as an end point, and sampling at equal intervals with a specific step length to obtain a first sampling point set corresponding to the ray; deleting the corner point of the voxel to be detected from the first sampling point set under the condition that the first sampling point set comprises the corner point of the voxel to be detected, so as to obtain a sampling point set corresponding to the ray; and under the condition that the first sampling point set does not comprise the corner point of the voxel to be detected, taking the first sampling point set as the sampling point set corresponding to the ray.
According to another embodiment of the invention, the specific step size is smaller than the grid side size of the voxel.
According to yet another embodiment of the present invention, voxel visibility determination module 404 may also be configured to: determining the visibility of the voxels to be detected according to whether the sampling voxels in the sampling voxel set corresponding to each ray comprise point cloud data or not; for each ray, if all sampling voxels in a sampling voxel set corresponding to the ray do not comprise point cloud data, judging that the corner point corresponding to the ray is visible; and under the condition that the corner point is visible, judging that the voxel to be detected is visible.
According to yet another embodiment of the present invention, voxel visibility determination module 404 may also be configured to: pre-voxelized processing is carried out on the point cloud data to obtain a voxelized data set; and judging whether the sampling voxels comprise point cloud data according to the voxelized data set.
According to a further embodiment of the invention, the voxel visibility detection apparatus 400 further comprises a coordinate processing module (not shown in the figure) for: acquiring coordinates of a camera center point and coordinates of angular points of voxels to be detected; calculating the coordinates of each sampling point and the coordinates of sampling voxels corresponding to each sampling point according to the coordinates of the camera center point and the coordinates of the corner points of the voxels to be detected; voxel visibility determination module 404 may also be configured to: and judging whether the sampling voxels comprise point cloud data according to the coordinates of each voxel in the voxelized data set and the coordinates of each sampling voxel.
According to the technical scheme of the embodiment of the invention, rays emitted from the center point of the camera to the corner points of the voxels to be detected are obtained; respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected; voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray; according to the technical scheme of determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray, the problem of judging whether the rays intersect the voxels in the 3D space is converted into the problem of judging whether the sampling points on the rays are visible for the first time after voxelization, so that the complex calculation process of judging whether a large number of rays intersect the voxels in the 3D space is avoided, the calculation complexity is greatly reduced, the accuracy is ensured, the instantaneity is improved, the obstacle detection efficiency is improved, and the safety of automatic driving is improved.
Fig. 5 shows an exemplary system architecture 500 of a voxel visibility detection method or voxel visibility detection apparatus to which embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is used as a medium to provide communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 505 via the network 504 using the terminal devices 501, 502, 503 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 501, 502, 503, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 501, 502, 503. The background management server can acquire rays sent from a camera center point to corner points of the voxels to be detected according to the received data such as the visibility judgment request of the voxels to be detected; respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected; voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray; and determining the visibility and other treatments of the voxels to be detected according to the sampling voxel set corresponding to each ray, and feeding back the treatment results (such as the visibility judgment result of the voxels to be detected, which is only an example) to the terminal equipment.
It should be noted that, the method for detecting voxel visibility provided in the embodiment of the present invention is generally performed by the server 505, and accordingly, the device for detecting voxel visibility is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use in implementing a terminal device or server in accordance with an embodiment of the present invention. The terminal device or server shown in fig. 6 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 601.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described units or modules may also be provided in a processor, for example, as: a processor includes a ray acquisition module, a ray sampling module, a voxelization processing module, and a voxel visibility determination module. The names of these units or modules do not in any way limit the unit or module itself, and for example, the voxel visibility determination module may also be described as "a module for determining the visibility of the voxel to be detected from the set of sampled voxels corresponding to each ray".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: acquiring rays emitted from a camera center point to corner points of voxels to be detected; respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected; voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray; and determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray.
According to the technical scheme of the embodiment of the invention, rays emitted from the center point of the camera to the corner points of the voxels to be detected are obtained; respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected; voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray; according to the technical scheme of determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray, the problem of judging whether the rays intersect the voxels in the 3D space is converted into the problem of judging whether the sampling points on the rays are visible for the first time after voxelization, so that the complex calculation process of judging whether a large number of rays intersect the voxels in the 3D space is avoided, the calculation complexity is greatly reduced, the accuracy is ensured, the instantaneity is improved, the obstacle detection efficiency is improved, and the safety of automatic driving is improved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for detecting voxel visibility, comprising:
Acquiring rays emitted from a camera center point to corner points of voxels to be detected;
respectively sampling each ray at equal intervals with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected;
Voxelization is carried out on sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray;
and determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray.
2. The method according to claim 1, wherein the step of sampling each ray at equal intervals in a specific step length to obtain the set of sampling points of each ray includes:
Taking the center point of the camera as a starting point, taking the corner point of the voxel to be detected corresponding to the ray as an end point, and sampling at equal intervals with a specific step length to obtain a first sampling point set corresponding to the ray;
Deleting the corner point of the voxel to be detected from the first sampling point set under the condition that the first sampling point set comprises the corner point of the voxel to be detected, so as to obtain a sampling point set corresponding to the ray;
and under the condition that the first sampling point set does not comprise the corner point of the voxel to be detected, taking the first sampling point set as the sampling point set corresponding to the ray.
3. A method according to claim 1 or 2, wherein the specific step size is smaller than the grid side size of the voxels.
4. The method according to claim 1, wherein determining the visibility of the voxel to be detected from the set of sampled voxels corresponding to each ray comprises:
determining the visibility of the voxels to be detected according to whether the sampling voxels in the sampling voxel set corresponding to each ray comprise point cloud data or not;
For each ray, if all sampling voxels in a sampling voxel set corresponding to the ray do not comprise point cloud data, judging that the corner point corresponding to the ray is visible;
and under the condition that the corner point is visible, judging that the voxel to be detected is visible.
5. The method according to claim 4, wherein the method further comprises:
pre-voxelized processing is carried out on the point cloud data to obtain a voxelized data set;
and judging whether the sampling voxels comprise point cloud data according to the voxelized data set.
6. The method of claim 5, wherein the method further comprises:
Acquiring coordinates of a camera center point and coordinates of angular points of voxels to be detected;
Calculating the coordinates of each sampling point and the coordinates of sampling voxels corresponding to each sampling point according to the coordinates of the camera center point and the coordinates of the corner points of the voxels to be detected;
And judging whether the sampling voxels comprise point cloud data according to the coordinates of each voxel in the voxelized data set and the coordinates of each sampling voxel.
7. A voxel visibility detection apparatus, comprising:
the ray acquisition module is used for acquiring rays emitted from a camera center point to corner points of voxels to be detected;
the ray sampling module is used for respectively carrying out equidistant sampling on each ray with a specific step length to obtain a sampling point set of each ray, wherein the sampling point set does not comprise the corner point of the voxel to be detected;
The voxelization processing module is used for voxelization of sampling points in the sampling point set of each ray to obtain a sampling voxel set corresponding to each ray;
and the voxel visibility judging module is used for determining the visibility of the voxels to be detected according to the sampling voxel set corresponding to each ray.
8. The apparatus of claim 7, wherein the ray sampling module is further to:
Taking the center point of the camera as a starting point, taking the corner point of the voxel to be detected corresponding to the ray as an end point, and sampling at equal intervals with a specific step length to obtain a first sampling point set corresponding to the ray;
Deleting the corner point of the voxel to be detected from the first sampling point set under the condition that the first sampling point set comprises the corner point of the voxel to be detected, so as to obtain a sampling point set corresponding to the ray;
and under the condition that the first sampling point set does not comprise the corner point of the voxel to be detected, taking the first sampling point set as the sampling point set corresponding to the ray.
9. An electronic device, comprising:
One or more processors;
Storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202410396654.4A 2024-04-02 2024-04-02 Voxel visibility detection method and device Pending CN118261969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410396654.4A CN118261969A (en) 2024-04-02 2024-04-02 Voxel visibility detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410396654.4A CN118261969A (en) 2024-04-02 2024-04-02 Voxel visibility detection method and device

Publications (1)

Publication Number Publication Date
CN118261969A true CN118261969A (en) 2024-06-28

Family

ID=91604902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410396654.4A Pending CN118261969A (en) 2024-04-02 2024-04-02 Voxel visibility detection method and device

Country Status (1)

Country Link
CN (1) CN118261969A (en)

Similar Documents

Publication Publication Date Title
CN110632608B (en) Target detection method and device based on laser point cloud
CN108629823B (en) Method and device for generating multi-view image
CN109255337B (en) Face key point detection method and device
CN113607185B (en) Lane line information display method, lane line information display device, electronic device, and computer-readable medium
CN109118456B (en) Image processing method and device
CN114399588B (en) Three-dimensional lane line generation method and device, electronic device and computer readable medium
CN110209748B (en) Method and apparatus for indexing geofences
CN110766348B (en) Method and device for combining goods picking tasks
CN114627239B (en) Bounding box generation method, device, equipment and storage medium
CN110633717A (en) Training method and device for target detection model
CN111815738A (en) Map construction method and device
CN110633716A (en) Target object detection method and device
CN109426878B (en) Method and apparatus for outputting information
CN113362090B (en) User behavior data processing method and device
CN112241977B (en) Depth estimation method and device for feature points
CN116205964A (en) Point cloud downsampling method and device based on horizontal distance
CN110895699B (en) Method and apparatus for processing feature points of image
CN118261969A (en) Voxel visibility detection method and device
CN111488890B (en) Training method and device for object detection model
CN110634159A (en) Target detection method and device
CN111782995A (en) Method and device for paging and loading graphics
CN110363834B (en) Point cloud data segmentation method and device
CN109657523B (en) Driving region detection method and device
CN113495278B (en) Method and device for enhancing point cloud data
CN114863025B (en) Three-dimensional lane line generation method and device, electronic device and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination