Dimension reduction method, device and equipment of three-dimensional obstacle frame and medium
By obtaining the position information and observation angle of the three-dimensional obstacle frame and adjusting the processing method of the minimum closure frame, the problem of inaccurate dimensional reduction results in the prior art is solved, and the accuracy of obstacle detection and image fusion effect are improved.
Patent Information
- Application Number
- CN202410211290.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-26
- Publication Date
- 2025-08-26
AI Technical Summary
In the prior art, the dimensionality reduction method of three-dimensional obstacle frames has a large difference between the size and actual size of the two-dimensional box, which affects the accuracy of obstacle detection.
By obtaining the position information of the three-dimensional obstacle frame, the observation viewing angle of the shooting device is determined, and the minimum closure frame is processed according to the observation viewing angle, and a two-dimensional obstacle frame is obtained that is closer to the actual two-dimensional obstacle frame.
The accuracy of obstacle detection is improved, making the two-dimensional obstacle frame and the two-dimensional image collected by the shooting equipment better.
Smart Images

Figure CN120543984A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of intelligent driving technology, and in particular to a dimensionality reduction method, device, equipment, and medium for three-dimensional obstacle frames. Background Art
[0002] With the development of intelligent driving technology, obstacle detection has become an essential component. Currently, obstacle detection is primarily achieved by analyzing information fused from point cloud and image data. Data fusion requires dimensionality unification: reducing 3D point cloud data to a 2D framework or upscaling 2D image data to a 3D space.
[0003] Since dimensionality reduction is easier than dimensionality increase and less information is lost during dimensionality reduction, dimensionality reduction from three dimensions to two dimensions is usually used for fusion.
[0004] In current technology, the method of reducing the dimensionality of the obstacle box corresponding to the three-dimensional point cloud data is to directly use the minimum closure box of the three-dimensional obstacle box as the reduced two-dimensional box. However, the size of the two-dimensional box obtained by this dimensionality reduction method is significantly different from the size of the actual two-dimensional box, which makes the data fusion result less accurate and thus affects the obstacle detection results. Summary of the Invention
[0005] In view of this, the present disclosure provides a dimensionality reduction method, apparatus, device and medium for a three-dimensional obstacle frame to solve the problem of inaccurate dimensionality reduction results caused by current dimensionality reduction methods.
[0006] In a first aspect, the present invention provides a dimensionality reduction method for a three-dimensional obstacle frame, the method comprising:
[0007] Obtain the 3D obstacle frame and its position information; perform dimensionality reduction on the 3D obstacle frame to obtain a minimum enclosing frame; determine the viewing angle of the 3D obstacle frame from the camera based on the position information; and process the minimum enclosing frame using a processing method corresponding to the viewing angle to obtain a 2D obstacle frame.
[0008] The dimensionality reduction method for a 3D obstacle frame provided in this embodiment, after performing dimensionality reduction processing on the 3D obstacle frame to obtain a minimum closed frame, does not directly use the minimum closed frame as the 2D obstacle frame. Instead, the position information of the 3D obstacle frame is used to determine the camera's viewing angle of the 3D obstacle frame. The minimum closed frame is then processed using a processing method corresponding to the viewing angle to obtain a 2D obstacle frame. Because image presentation changes with viewing angle, the 2D obstacle frame obtained in this embodiment better conforms to the characteristics of the viewing angle, is closer to the actual 2D obstacle frame, and has higher accuracy, which also enables better fusion with the 2D image captured by the camera.
[0009] In an optional implementation, after obtaining the 3D obstacle frame and the position information of the 3D obstacle frame, the method further includes:
[0010] Based on the position information, it is determined whether there are points outside the viewing angle in the 3D obstacle frame. Points outside the viewing angle are points outside the field of view of the shooting device. When there are points outside the viewing angle in the 3D obstacle frame, the points outside the viewing angle are shifted to reduce the dimensionality of the shifted 3D obstacle frame.
[0011] In an optional implementation, when there are points outside the viewing angle in the three-dimensional obstacle frame, the points outside the viewing angle are shifted, including:
[0012] When there is a point outside the viewing angle in the three-dimensional obstacle frame, three frame lines with the point outside the viewing angle as the vertex in the three-dimensional obstacle frame are obtained; when at least one of the three frame lines intersects with at least one coordinate axis of the camera coordinate system, the coordinates of the intersection are obtained; and the point outside the viewing angle is shifted based on the coordinates of the intersection.
[0013] The dimensionality reduction method for a 3D obstacle frame provided in this embodiment determines whether any points outside the viewing angle exist within the 3D obstacle frame after obtaining the 3D obstacle frame. If any points exist, the points are shifted and a new 3D obstacle frame is formed based on the shifted vertices. The newly formed 3D obstacle frame corresponds to the obstacle frame within the field of view of the current camera. Through this process, a 3D obstacle frame that matches the camera can be obtained, so that the minimum closed frame obtained after the dimensionality reduction process better conforms to the field of view of the current camera and is closer to the actual situation.
[0014] In an optional implementation, determining the viewing angle of the camera device for the three-dimensional obstacle frame based on the position information includes:
[0015] Based on the position information, the distance between the obstacle corresponding to the three-dimensional obstacle frame and the shooting device is determined; when the distance is greater than or equal to the preset distance threshold, the observation angle is determined to be a level viewing angle; when the distance is less than the preset distance threshold, the relative position of the three-dimensional coordinates of each vertex and the preset plane is determined; and the observation angle is determined based on the relative position.
[0016] In an optional embodiment, when the viewing angle is a level viewing angle, a processing method corresponding to the viewing angle is selected to process the minimum closed frame to obtain a two-dimensional obstacle frame, including:
[0017] The processing method corresponding to the head-on perspective is to directly determine the minimum closure frame as the two-dimensional obstacle frame.
[0018] In an optional embodiment, when the viewing angle is an upward viewing angle, a processing method corresponding to the viewing angle is selected to process the minimum closed frame to obtain a two-dimensional obstacle frame, including:
[0019] A first edge line, a second edge line, and a third edge line of a minimum closure frame are respectively shrunk, where the minimum closure frame includes the first edge line, the second edge line, the third edge line, and the fourth edge line; and a two-dimensional obstacle frame is formed by all the processed edge lines and the fourth edge line.
[0020] In an optional embodiment, when the viewing angle is a bird's-eye view, a processing method corresponding to the viewing angle is selected to process the minimum closed frame to obtain a two-dimensional obstacle frame, including:
[0021] All edge lines of the minimum closure frame are shrunk respectively; a two-dimensional obstacle frame is formed by all the processed edge lines.
[0022] The dimensionality reduction method for the three-dimensional obstacle frame provided in this embodiment processes the minimum closed frame according to a processing method corresponding to the observation perspective. Since this processing method combines the perspective characteristics of the observation perspective, the two-dimensional obstacle frame obtained by this method has higher accuracy.
[0023] In a second aspect, the present invention provides a dimensionality reduction device for a three-dimensional obstacle frame, the device comprising:
[0024] The acquisition module is used to obtain the three-dimensional obstacle frame and its position information; the dimensionality reduction processing module is used to perform dimensionality reduction processing on the three-dimensional obstacle frame to obtain a minimum closed frame; the determination module is used to determine the viewing angle of the camera device for the three-dimensional obstacle frame based on the position information; and the frame reduction processing module is used to select a processing method corresponding to the viewing angle to process the minimum closed frame to obtain a two-dimensional obstacle frame.
[0025] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to thereby perform the dimensionality reduction method of the three-dimensional obstacle box according to the first aspect or any corresponding embodiment thereof.
[0026] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the dimensionality reduction method of a three-dimensional obstacle box according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0028] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0029] Figure 1 A flowchart corresponding to the dimensionality reduction method of the three-dimensional obstacle frame provided in an embodiment of the present disclosure;
[0030] Figure 2 A flowchart corresponding to another dimensionality reduction method of a three-dimensional obstacle frame provided in an embodiment of the present disclosure;
[0031] Figure 3 A schematic diagram of a three-dimensional obstacle frame provided by an embodiment of the present disclosure projected onto a camera device;
[0032] Figure 4 A flowchart corresponding to another dimensionality reduction method of a three-dimensional obstacle frame provided in an embodiment of the present disclosure;
[0033] Figure 5 1 is a structural block diagram of a dimensionality reduction device for a three-dimensional obstacle frame provided by an embodiment of the present invention;
[0034] Figure 6 It is a schematic diagram of the hardware structure of the computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0036] The following description sets forth many specific details to facilitate a full understanding of the present disclosure. However, the present disclosure may also be implemented in other ways than those described herein. It is apparent that the embodiments described in the specification are only some of the embodiments of the present disclosure, not all of them. All other embodiments derived by those skilled in the art based on the embodiments of the present disclosure without inventive effort are also within the scope of protection of the present disclosure.
[0037] Before explaining the specific embodiments of the present invention, a brief description is given of the current generation and dimensionality reduction methods of three-dimensional obstacle frames. The point cloud data collected by the radar is processed using a deep learning detection algorithm to obtain three-dimensional obstacle frames corresponding to each obstacle. Then, the minimum closure frame corresponding to the three-dimensional obstacle frame is directly used as the two-dimensional obstacle frame after dimensionality reduction to fuse the two-dimensional obstacle frame after dimensionality reduction with the two-dimensional image collected by the camera. However, the two-dimensional obstacle frame obtained in this way is often much larger than the two-dimensional obstacle frame actually projected by the camera, resulting in poor fusion effect between the two-dimensional obstacle frame and the two-dimensional image. Based on this, the present invention provides a dimensionality reduction method, device, equipment and medium for a three-dimensional obstacle frame to solve the problem of inaccurate current dimensionality reduction results, so as to obtain a two-dimensional obstacle frame with higher accuracy, thereby better fusing the two-dimensional obstacle frame with the two-dimensional image collected by the camera.
[0038] In this embodiment, a dimensionality reduction method for a three-dimensional obstacle frame is provided, which can be used in a dimensionality reduction device for a three-dimensional obstacle frame. Figure 1 : is a flow chart of a dimensionality reduction method for a three-dimensional obstacle frame provided by an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps:
[0039] Step S101: Acquire a three-dimensional obstacle frame and position information of the three-dimensional obstacle frame.
[0040] Specifically, a 3D obstacle frame is detected using a deep learning detection algorithm based on radar-collected point cloud data of an obstacle. The 3D obstacle frame is a rectangular parallelepiped. The position information of the 3D obstacle frame can be any information that represents the position of the frame. For example, the position information can be the 3D coordinates of the 8 vertices of the 3D obstacle frame in the camera coordinate system. Alternatively, the position information can include the length, width, and height of the 3D obstacle frame, as well as the coordinates of pre-set vertices. This embodiment does not limit the specific content of the position information, as long as the position information uniquely represents the 3D obstacle frame.
[0041] Exemplarily, when the position information is the 8 vertices of the three-dimensional obstacle box, the coordinates of each vertex are obtained as follows: obtain the three-dimensional coordinates corresponding to each vertex in the radar coordinate system, use the camera external parameter pair to transform the three-dimensional coordinates corresponding to each vertex in the radar coordinate system, and obtain the three-dimensional coordinates corresponding to each vertex in the camera coordinate system.
[0042] Step S102: performing dimensionality reduction processing on the three-dimensional obstacle frame to obtain a minimum closure frame.
[0043] Specifically, the minimum closure box is the minimum rectangle that includes all projection points of the three-dimensional obstacle box.
[0044] Specifically, the dimensionality reduction processing method in this embodiment includes but is not limited to the OBB (Oriented Bounding Box) minimum bounding box algorithm.
[0045] Step S103: determining the viewing angle of the camera for the three-dimensional obstacle frame based on the position information.
[0046] Specifically, the relative position of the shooting device and the three-dimensional obstacle is first determined based on the position information; then the three-dimensional obstacle frame is projected onto the shooting device; finally, the observation angle of the shooting device for the three-dimensional obstacle frame is determined based on the relative position of the shooting device and the three-dimensional obstacle and the position of the projected image of the three-dimensional obstacle frame in the corresponding field of view of the shooting device.
[0047] Step S104 : Select a processing method corresponding to the viewing angle to process the minimum closure frame to obtain a two-dimensional obstacle frame.
[0048] Specifically, the observation perspective corresponds to the processing method, and the processing method is obtained through a large number of experiments combined with the observation characteristics corresponding to the observation perspective.
[0049] Specifically, since the final two-dimensional obstacle frame is used to fuse with the two-dimensional image captured by a certain shooting device, the minimum closure frame must be processed using a processing method corresponding to the observation angle to obtain the two-dimensional obstacle frame corresponding to the observation angle.
[0050] The dimensionality reduction method for a 3D obstacle frame provided in this embodiment, after performing dimensionality reduction processing on the 3D obstacle frame to obtain a minimum closed frame, does not directly use the minimum closed frame as the 2D obstacle frame. Instead, the position information of the 3D obstacle frame is used to determine the camera's viewing angle of the 3D obstacle frame. The minimum closed frame is then processed using a processing method corresponding to the viewing angle to obtain a 2D obstacle frame. Because image presentation changes with viewing angle, the 2D obstacle frame obtained in this embodiment better conforms to the characteristics of the viewing angle, is closer to the actual 2D obstacle frame, and has higher accuracy, which also enables better fusion with the 2D image captured by the camera.
[0051] In this embodiment, a dimensionality reduction method for a three-dimensional obstacle frame is provided, which can be used in a dimensionality reduction device for a three-dimensional obstacle frame. Figure 2 : is a flow chart of a dimensionality reduction method for a three-dimensional obstacle frame provided by an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0052] Step S201: Obtain the 3D obstacle frame and its location information. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0053] Step S202: Based on the position information, determine whether there is a point outside the viewing angle in the three-dimensional obstacle frame.
[0054] Specifically, when the position information includes the 3D coordinates of each vertex in the 3D obstacle frame, the 3D coordinates of each vertex are directly used to determine whether there are points outside the viewing angle in the 3D obstacle frame. When the position information does not include the 3D coordinates of each vertex, the 3D coordinates of each vertex can be first determined based on the position information, and then the 3D coordinates of each vertex can be used to determine whether there are points outside the viewing angle in the 3D obstacle frame. For example, if the position information includes the length, width, and height of the 3D obstacle frame and the 3D coordinates of the top-left vertex, the 3D coordinates of the eight vertices in the 3D obstacle frame are calculated based on the length, width, and height information and the 3D coordinates of the top-left vertex. The method for determining the 3D coordinates of each vertex based on the position information depends on the specific content of the position information. This embodiment is provided for illustrative purposes only and does not specifically limit the method.
[0055] Specifically, the point outside the viewing angle is a point outside the field of view of the shooting device.
[0056] Specifically, the 3D obstacle frame is projected onto the camera. The camera's internal parameters are used to convert the 3D coordinates of each vertex in the 3D obstacle frame into 2D image coordinates in the image coordinate system. Based on the 2D image coordinates, the vertices are determined to be within a preset coordinate range. If not, the vertex is determined to be outside the viewing angle. If within the preset coordinate range, the vertex is determined to be within the viewing angle. The preset coordinate range is the field of view of the camera.
[0057] For example, Figure 3 The figure shows the preset coordinate range OMNP corresponding to the camera, the projection of the 3D obstacle frame onto the camera, and the distribution of vertices within the 3D obstacle frame. The 2D image coordinates corresponding to each vertex are read to determine whether they are within the area covered by OMNP. Based on this determination, points outside the viewing angle are identified. In this embodiment, the points outside the viewing angle are vertices A, B, C, and C1.
[0058] Step S203 : When there are points outside the viewing angle in the three-dimensional obstacle frame, the points outside the viewing angle are shifted to perform dimensionality reduction processing on the shifted three-dimensional obstacle frame.
[0059] Specifically, the above step S203 includes:
[0060] Step S2031: When there is a point outside the viewing angle in the three-dimensional obstacle frame, three frame lines with the point outside the viewing angle as vertices in the three-dimensional obstacle frame are obtained.
[0061] For example, still taking the embodiment corresponding to step S202 as an example, if vertex A is a point outside the viewing angle, three frame lines with vertex A are obtained from the three-dimensional obstacle frame ABCD-A1B1C1D1, namely AB, AD, and AA1. If vertex C is a point outside the viewing angle, three frame lines with vertex C are obtained from the three-dimensional obstacle frame ABCD-A1B1C1D1, namely CB, CD, and C C1.
[0062] Step S2032: When at least one of the three frame lines intersects with at least one coordinate axis of the camera coordinate system, the coordinates of the intersection are obtained.
[0063] For example, still taking the embodiment in step S2031 as an example, Figure 3 As you can see, the frame line with vertex A intersects the coordinate axes at two points: frame line AD and frame line AA1 intersect the X-axis where OM is located. Obtain the coordinates corresponding to each intersection point. The frame line with vertex C intersects the coordinate axes at three points: frame line CD intersects the Y-axis where OP is located, and frame line CB intersects the X-axis and Y-axis respectively. Obtain the coordinates corresponding to each intersection point.
[0064] Step S2033: Shift the points outside the viewing angle based on the coordinates of the intersection point.
[0065] Specifically, when the intersection points corresponding to the frame lines with points outside the viewing angle as vertices are all on the same coordinate axis, the coordinate average is calculated based on the coordinates of all intersection points, the position corresponding to the coordinate average is determined as the target position, and the point outside the viewing angle is moved to the target position. When the intersection points corresponding to the frame lines with points outside the viewing angle as vertices are distributed on two coordinate axes, the point outside the viewing angle is moved to the coordinate origin. After all points outside the viewing angle are shifted, a new three-dimensional obstacle frame is formed based on all the vertices after the shifting process, so that the newly formed three-dimensional obstacle frame can be subsequently subjected to dimensionality reduction processing.
[0066] For example, if there are two intersection points between the frame line with A as the vertex and the coordinate axis, the coordinates of the two intersection points are set to (x1, y1) and (x2, y2) respectively, and the coordinate average is calculated based on (x1, y1) and (x2, y2), and (x 平均 ,y 平均 ), where x 平均 =(x1+x2) / 2,y 平均 =(y1+y2) / 2. Finally, shift the point outside the viewing angle to (x 平均 ,y 平均 ) at the corresponding target position.
[0067] For example, if the frame line with vertex C intersects the coordinate axes at three points, including two with the X axis and one with the Y axis, then we can simply move vertex C to the origin of the coordinate system (i.e., the position corresponding to point O).
[0068] Step S204: perform dimensionality reduction on the 3D obstacle frame to obtain the minimum closure frame. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0069] Step S205: Based on the position information, determine the viewing angle of the camera to the 3D obstacle frame. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0070] Step S206: Select a processing method corresponding to the viewing angle to process the minimum closed frame to obtain a two-dimensional obstacle frame. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0071] The dimensionality reduction method for a 3D obstacle frame provided in this embodiment determines whether any points outside the viewing angle exist within the 3D obstacle frame after obtaining the 3D obstacle frame. If any points exist, the points are shifted and a new 3D obstacle frame is formed based on the shifted vertices. The newly formed 3D obstacle frame corresponds to the obstacle frame within the field of view of the current camera. Through this process, a 3D obstacle frame that matches the camera can be obtained, so that the minimum closed frame obtained after the dimensionality reduction process better conforms to the field of view of the current camera and is closer to the actual situation.
[0072] In this embodiment, a dimensionality reduction method for a three-dimensional obstacle frame is provided, which can be used in a dimensionality reduction device for a three-dimensional obstacle frame. Figure 4 : is a flow chart of a dimensionality reduction method for a three-dimensional obstacle frame provided by an embodiment of the present invention, such as Figure 4 As shown, the process includes the following steps:
[0073] Step S401: Obtain the 3D obstacle frame and its position information. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0074] Step S402: Perform dimensionality reduction on the 3D obstacle frame to obtain the minimum closure frame. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0075] Step S403: Determine the viewing angle of the camera for the three-dimensional obstacle frame based on the position information.
[0076] Specifically, the above step S403 includes:
[0077] Step S4031: Determine the distance between the obstacle corresponding to the three-dimensional obstacle frame and the shooting device based on the position information.
[0078] Specifically, the 3D coordinates of each vertex of the 3D obstacle frame are first determined based on the position information. The specific determination method has been described in the embodiment corresponding to step S202 and will not be repeated here. Since the 3D coordinates of each vertex correspond to the 3D coordinate system of the camera, the coordinate origin is the position corresponding to the camera. The position of the obstacle corresponding to the 3D obstacle frame is determined based on the 3D coordinates of the four vertices on the lower surface of the 3D obstacle frame, and the distance between the obstacle's position and the coordinate origin is determined as the distance between the obstacle and the camera.
[0079] Exemplarily, the method of determining the obstacle position based on the three-dimensional coordinates of the four vertices on the lower surface of the three-dimensional obstacle frame can be to determine the center coordinates of the figure formed by the four vertices based on the three-dimensional coordinates of the four vertices, and determine the center coordinates as the position of the obstacle.
[0080] Step S4032: When the distance is greater than or equal to a preset distance threshold, the observation angle is determined to be a level viewing angle.
[0081] Specifically, the preset distance threshold is the minimum distance corresponding to maintaining a level viewing angle.
[0082] Exemplarily, the preset distance threshold is 20m. When the distance between the shooting device and the obstacle is greater than or equal to 20m, the observation angle is determined to be a level viewing angle.
[0083] Step S4033: When the distance is less than the preset distance threshold, the relative position of the three-dimensional coordinates of each vertex and the preset plane is determined.
[0084] Specifically, the relative positions of the three-dimensional coordinates of each vertex and the preset plane include three types, namely, the three-dimensional coordinates of the vertex are above the preset plane, the three-dimensional coordinates of the vertex are below the preset plane, and the three-dimensional coordinates of the vertex are in the preset plane.
[0085] Exemplarily, the preset plane may be a plane corresponding to y=-1m.
[0086] Step S4034: Determine the viewing angle based on the relative position.
[0087] Exemplarily, when the coordinates of all vertices are located above the preset plane, the viewing angle is determined to be an upward viewing angle; when the coordinates of at least one vertex are located below the preset plane, the viewing angle is determined to be a downward viewing angle.
[0088] Step S404: Select a processing method corresponding to the viewing angle to process the minimum closure frame to obtain a two-dimensional obstacle frame.
[0089] Specifically, when the observation perspective is a level-view perspective, a processing method corresponding to the level-view perspective is to directly determine the minimum enclosing frame as the two-dimensional obstacle frame.
[0090] Specifically, when the observation angle is an upward viewing angle, the first edge line, the second edge line and the third edge line of the minimum closed frame are respectively shrunk, and the minimum closed frame includes the first edge line, the second edge line, the third edge line and the fourth edge line; all the processed edge lines and the fourth edge line form a two-dimensional obstacle frame.
[0091] Exemplarily, the first edge line is the upper edge line of the minimum enclosing frame, the second edge line is the left edge line of the minimum enclosing frame, the third edge line is the right edge line of the minimum enclosing frame, and the fourth edge line is the lower edge line of the minimum enclosing frame. When the observation angle is an upward viewing angle, only the upper, left, and right edge lines of the minimum enclosing frame are shrunk, and the shrunk upper, left, and right edge lines and the original lower edge line form a two-dimensional obstacle frame. The shrunk distance d = (Hh) / 2, where H is the pixel height of the three-dimensional obstacle frame and h is the average of the four height lines between the upper and lower surfaces of the three-dimensional obstacle frame.
[0092] Specifically, when the observation perspective is a bird's-eye view, all edge lines of the minimum enclosing frame are respectively subjected to a shrinking process; and a two-dimensional obstacle frame is formed by all the processed edge lines.
[0093] For example, in a top-down perspective, when shrinking all edge lines of the minimum enclosing frame, the shrinking distance is still d=(Hh) / 2.
[0094] The dimensionality reduction method for the three-dimensional obstacle frame provided in this embodiment processes the minimum closed frame according to a processing method corresponding to the observation perspective. Since this processing method combines the perspective characteristics of the observation perspective, the two-dimensional obstacle frame obtained by this method has higher accuracy.
[0095] This embodiment also provides a dimensionality reduction device for a three-dimensional obstacle frame, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0096] This embodiment provides a dimensionality reduction device for a three-dimensional obstacle frame, such as Figure 5 Shown, including:
[0097] The acquisition module 501 is configured to acquire a three-dimensional obstacle frame and position information of the three-dimensional obstacle frame.
[0098] The dimensionality reduction processing module 502 is used to perform dimensionality reduction processing on the three-dimensional obstacle frame to obtain a minimum closure frame.
[0099] The determination module 503 is configured to determine the viewing angle of the camera for the three-dimensional obstacle frame based on the position information.
[0100] The shrinking frame processing module 504 is used to select a processing method corresponding to the observation angle to process the minimum closed frame to obtain a two-dimensional obstacle frame.
[0101] In some optional implementations, after obtaining module 501, the following steps are further included:
[0102] The judgment module is used to determine whether there are points outside the viewing angle in the three-dimensional obstacle frame based on the position information. The points outside the viewing angle are points outside the field of view of the shooting device. The shift module is used to shift the points outside the viewing angle when there are points outside the viewing angle in the three-dimensional obstacle frame, so as to perform dimensionality reduction processing on the three-dimensional obstacle frame after the shift processing.
[0103] In some optional embodiments, the shift module includes:
[0104] The first acquisition submodule is used to obtain three frame lines with the points outside the view angle as vertices in the three-dimensional obstacle frame when there is a point outside the view angle; the second acquisition submodule is used to obtain the coordinates of the intersection when at least one of the three frame lines intersects with at least one coordinate axis of the camera coordinate system; the shift submodule is used to shift the points outside the view angle based on the coordinates of the intersection.
[0105] In some optional implementations, the determining module 503 includes:
[0106] The first determination submodule is used to determine the distance between the obstacle corresponding to the three-dimensional obstacle frame and the shooting device based on the position information; the second determination submodule is used to determine that the observation angle is a level viewing angle when the distance is greater than or equal to a preset distance threshold; the judgment submodule is used to determine the relative position of the three-dimensional coordinates of each vertex and the preset plane when the distance is less than the preset distance threshold; and the fourth determination submodule is used to judge the observation angle based on the relative position.
[0107] In some optional implementations, when the viewing angle is a level viewing angle, the shrinking processing module 504 includes:
[0108] The fifth determining submodule is used for processing corresponding to the level-of-sight perspective by directly determining the minimum enclosing frame as the two-dimensional obstacle frame.
[0109] In some optional implementations, when the viewing angle is an upward viewing angle, the shrinking frame processing module 504 includes:
[0110] The first shrinking submodule is used to shrink the first edge line, the second edge line and the third edge line of the minimum closure frame respectively, and the minimum closure frame includes the first edge line, the second edge line, the third edge line and the fourth edge line; the first forming submodule is used to form a two-dimensional obstacle frame with all the processed edge lines and the fourth edge line.
[0111] In some optional implementations, when the viewing angle is a top-down viewing angle, the shrinking processing module 504 includes:
[0112] The second shrinking submodule is used to shrink all edge lines of the minimum closure frame respectively; the second forming submodule is used to form a two-dimensional obstacle frame from all processed edge lines.
[0113] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0114] The dimensionality reduction device of the three-dimensional obstacle frame in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0115] The embodiment of the present invention also provides a computer device having the above Figure 5 Dimensionality reduction device for the three-dimensional obstacle box shown.
[0116] See also Figure 6 , Figure 6 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0117] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0118] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0119] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0120] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0121] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0122] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0123] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0124] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A dimensionality reduction method for a three-dimensional obstacle frame, characterized in that: The method comprises: Obtaining a three-dimensional obstacle frame and position information of the three-dimensional obstacle frame; Performing dimensionality reduction processing on the three-dimensional obstacle frame to obtain a minimum closure frame; Based on the position information, determining an observation angle of the camera device for the three-dimensional obstacle frame; A processing method corresponding to the observation angle is selected to process the minimum closed frame to obtain a two-dimensional obstacle frame.
2. The method according to claim 1, characterized in that After acquiring the three-dimensional obstacle frame and the position information of the three-dimensional obstacle frame, the method further includes: Based on the position information, determining whether there is a point outside the viewing angle in the three-dimensional obstacle frame, where the point outside the viewing angle is a point outside the field of view of the shooting device; When there are points outside the viewing angle in the three-dimensional obstacle frame, a shift process is performed on the points outside the viewing angle, so as to perform a dimensionality reduction process on the shifted three-dimensional obstacle frame.
3. The method according to claim 2, characterized in that When there is a point outside the viewing angle in the three-dimensional obstacle frame, performing shift processing on the point outside the viewing angle includes: When there is a point outside the viewing angle in the three-dimensional obstacle frame, obtaining three frame lines in the three-dimensional obstacle frame with the point outside the viewing angle as a vertex; When at least one of the three frame lines intersects at least one coordinate axis of the camera coordinate system, obtaining coordinates of the intersection; The points outside the viewing angle are shifted based on the coordinates of the intersection point.
4. The method according to any one of claims 1 to 3, characterized in that The determining, based on the position information, an observation angle of a shooting device for the three-dimensional obstacle frame includes: determining a distance between the obstacle corresponding to the three-dimensional obstacle frame and the shooting device based on the position information; When the distance is greater than or equal to a preset distance threshold, determining that the observation angle is a level viewing angle; When the distance is less than the preset distance threshold, determining the relative position of the three-dimensional coordinates of each vertex and a preset plane; The viewing angle is determined based on the relative position.
5. The method according to claim 1, characterized in that When the viewing angle is a level viewing angle, the selecting a processing method corresponding to the viewing angle to process the minimum closed frame to obtain a two-dimensional obstacle frame includes: The processing method corresponding to the head-on viewing angle is to directly determine the minimum closed frame as the two-dimensional obstacle frame.
6. The method according to claim 1, characterized in that When the viewing angle is an upward viewing angle, the selecting a processing method corresponding to the viewing angle to process the minimum closed frame to obtain a two-dimensional obstacle frame includes: performing a frame shrinking process on a first edge line, a second edge line, and a third edge line of the minimum closed frame, respectively, where the minimum closed frame includes the first edge line, the second edge line, the third edge line, and the fourth edge line; The two-dimensional obstacle frame is formed by all processed edge lines and the fourth edge line.
7. The method according to claim 1, characterized in that When the viewing angle is a top-down viewing angle, the selecting a processing method corresponding to the viewing angle to process the minimum closed frame to obtain a two-dimensional obstacle frame includes: Performing frame shrinking processing on all edge lines of the minimum closed frame respectively; The two-dimensional obstacle frame is formed by all processed edge lines.
8. A dimensionality reduction device for a three-dimensional obstacle frame, characterized in that: The device comprises: An acquisition module, configured to acquire a three-dimensional obstacle frame and position information of the three-dimensional obstacle frame; A dimensionality reduction processing module, configured to perform dimensionality reduction processing on the three-dimensional obstacle frame to obtain a minimum closure frame; a determination module, configured to determine an observation angle of the camera device for the three-dimensional obstacle frame based on the position information; The shrinking frame processing module is used to select a processing method corresponding to the observation angle to process the minimum closed frame to obtain a two-dimensional obstacle frame.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the dimensionality reduction method of the three-dimensional obstacle box according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the dimensionality reduction method of a three-dimensional obstacle box according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for converting target 3D frame into 2D frame and related device
CN115984097A
Deep learning-based airport runway annotation data automatic generation method
CN116030124A
Image processing device, image processing method, and program
US20200110947A1