WO2022227489A1 - Collision detection method and apparatus for objects, and device and storage medium - Google Patents

Collision detection method and apparatus for objects, and device and storage medium Download PDF

Info

Publication number
WO2022227489A1
WO2022227489A1 PCT/CN2021/130014 CN2021130014W WO2022227489A1 WO 2022227489 A1 WO2022227489 A1 WO 2022227489A1 CN 2021130014 W CN2021130014 W CN 2021130014W WO 2022227489 A1 WO2022227489 A1 WO 2022227489A1
Authority
WO
WIPO (PCT)
Prior art keywords
detected
objects
size information
predetermined
size
Prior art date
Application number
PCT/CN2021/130014
Other languages
French (fr)
Chinese (zh)
Inventor
曲达
Original Assignee
北京百度网讯科技有限公司
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 北京百度网讯科技有限公司 filed Critical 北京百度网讯科技有限公司
Priority to JP2022525298A priority Critical patent/JP7422222B2/en
Priority to EP21881357.4A priority patent/EP4102466A4/en
Priority to KR1020227014744A priority patent/KR20220063291A/en
Publication of WO2022227489A1 publication Critical patent/WO2022227489A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/003Reconstruction from projections, e.g. tomography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/21Collision detection, intersection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/004Annotating, labelling

Definitions

  • the present disclosure relates to the field of electronic technology, in particular to the technical field of intelligent transportation and map navigation, and more particularly to a method, device, device and storage medium for collision detection for objects.
  • panoramic technology is a new visual technology, which can bring users a new real sense of presence and interactive experience.
  • the panorama 2D image is usually mapped in the created 3D ball model to create a 3D scene.
  • markers and label information are usually added to the 3D ball model to provide guidance information to the user.
  • a collision detection method for object that improve detection accuracy.
  • a collision detection method for objects including: acquiring attribute information of two objects to be detected, the attribute information including the rotational position of the objects to be detected relative to a predetermined three-dimensional space and the objects to be detected.
  • a collision detection device for objects comprising: an information acquisition module configured to acquire respective attribute information of two objects to be detected, where the attribute information includes the relative relationship between the objects to be detected relative to a predetermined three-dimensional space The rotational position of the object to be detected and the size information of the object to be detected projected to the predetermined two-dimensional plane; the size information determination module is used to determine the size of the bounding box of each object to be detected based on the size information of each of the two objects to be detected.
  • the bounding box is centered on the rotational position of the object to be detected; and a collision result determination module for determining two to-be-detected objects according to the rotational position of the two to-be-detected objects and the size information of the bounding boxes of the two to-be-detected objects Detect collision results of objects.
  • an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor.
  • the at least one processor executes, so that the at least one processor can execute the collision detection method for an object provided by the present disclosure.
  • a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the collision detection method for an object provided by the present disclosure.
  • a computer program product including a computer program, which, when executed by a processor, implements the collision detection method for an object provided by the present disclosure.
  • FIG. 1 is a schematic diagram of an application scenario of a collision detection method, apparatus, electronic device, and storage medium for objects according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a method for collision detection for an object according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of the principle of determining a mapping relationship between a predetermined two-dimensional plane and a predetermined three-dimensional space according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of the principle of determining the size information of the bounding box of each object to be detected according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of the principle of determining a collision result of two objects to be detected according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of a principle of determining a collision result of two objects to be detected according to another embodiment of the present disclosure
  • FIG. 7 is a structural block diagram of a collision detection apparatus for an object according to an embodiment of the present disclosure.
  • FIG. 8 is a block diagram of an electronic device used to implement the collision detection method for an object according to an embodiment of the present disclosure.
  • the present disclosure provides a collision detection method for an object, which includes an information acquisition stage, a size information determination stage, and a collision result determination stage.
  • the information acquisition stage the respective attribute information of the two objects to be detected is acquired, the attribute information includes the rotational position of the object to be detected relative to the predetermined three-dimensional space and the size information of the object to be detected projected onto the predetermined two-dimensional plane.
  • the size information determination stage the size information of the bounding box of each object to be detected is determined based on the size information of each of the two objects to be detected, and the bounding box is centered on the rotational position of the object to be detected.
  • the collision result determination stage the collision result of the two objects to be detected is determined according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected.
  • FIG. 1 is a schematic diagram of an application scenario of a collision detection method, apparatus, electronic device, and storage medium for objects according to an embodiment of the present disclosure.
  • the application scenario 100 includes a server 110 and a terminal device 130 .
  • the terminal device 130 may be communicatively connected to the server 110 through a network, and the network may include a wired or wireless communication link.
  • the terminal device 130 may be a terminal device having a display screen with a panorama display function, including but not limited to a smart watch, a smart phone, a tablet computer, a laptop computer, and the like.
  • the terminal device 130 may be installed with various client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, social platform software or map navigation applications (just examples).
  • client applications such as shopping applications, web browser applications, search applications, instant messaging tools, social platform software or map navigation applications (just examples).
  • the server 110 may be a server that provides various services, such as a background management server that provides support for client applications installed on the terminal device 130 .
  • the server can be a cloud server, a distributed system server, or a server combined with blockchain.
  • the terminal device 130 may, for example, send a request for obtaining panoramic scene information to the server 110 in response to a user operation.
  • the server 110 may send the panorama model 120 to the terminal device 130 in response to the acquisition request, where the panorama model 120 includes the panorama image and tag information added to the objects in the panorama image, and the like.
  • the terminal device 130 may render the panorama scene in the running client application, and display the tag information added to the object near the displayed object. For example, for a train station in the displayed panoramic scene, a label 131 indicating "train station" may be displayed, and for a convenience store in the displayed panoramic scene, a label 132 indicating "convenience store" may be displayed.
  • the application scenario may further include a database 140 .
  • the database 140 stores a plurality of images that can be stitched into a panoramic image, or stores a panoramic image.
  • the server 110 may, for example, access the database 140 and build a panoramic model from the images obtained from the database 140 . Specifically, you can create a 3D ball model first, map the acquired image in the 3D ball model, and add labels to each object. At the same time, if there are many objects in the predetermined area, the server may also perform collision detection on multiple tags of multiple objects in the predetermined area, and determine the display rules of the multiple tags according to the collision detection results.
  • the display rule may also be carried in the panoramic model 120 constructed by the server 110, so that the terminal device can render and display the label of the object.
  • the collision detection method for objects provided by the present disclosure may be executed by the server 110 .
  • the collision detection device for objects provided by the present disclosure may be provided in the server 110 .
  • the collision detection method for objects provided by the present disclosure may also be performed by a server or server cluster that is different from the server 110 and can communicate with the server 110 .
  • the collision detection device for objects provided by the present disclosure may also be provided in a server or a server cluster that is different from the server 110 and can communicate with the server 110 .
  • FIG. 1 the number and type of servers, terminal devices and databases in FIG. 1 are merely illustrative. There can be any number and type of servers, terminal devices and databases according to implementation needs.
  • FIG. 2 is a flowchart of a collision detection method for an object according to an embodiment of the present disclosure.
  • the collision detection method 200 for an object in this embodiment may include operation S210 , operation S230 and operation S250 .
  • the attribute information may include a rotational position of the object to be detected relative to a predetermined three-dimensional space.
  • the predetermined three-dimensional space may be a 3D ball model created based on a 3D drawing protocol.
  • the 3D ball model can be constructed by calling a JavaScript Web Graphics Library (Web Graphics Library, WebGL).
  • the rotation position may be the position of the center point of the object to be detected relative to the center point of the 3D ball model.
  • the predetermined three-dimensional space is a three-dimensional space formed by the 3D ball model. It can be understood that, the above-mentioned construction method of the 3D ball model is only used as an example to facilitate understanding of the present disclosure, which is not limited in the present disclosure.
  • the rotational position may be determined according to the azimuth angle value, the pitch angle value and the distance of the center point of the object to be detected relative to the center point of the 3D ball model.
  • collision detection can be performed only on objects located in different azimuths, that is, two objects with different azimuth angle values and/or different pitch angle values can be regarded as objects to be detected. Whether or not the two objects to be detected will overlap when projected on a predetermined two-dimensional plane mainly depends on the azimuth angle value and the pitch angle value of the object to be detected. Therefore, the rotational position of this embodiment may only include the azimuth angle value and the pitch angle value of the center point of the object to be detected relative to the center point of the predetermined three-dimensional space.
  • the attribute information may further include size information of the object to be detected projected onto a predetermined two-dimensional plane.
  • the size information may include, for example, the display height and display width of the object to be detected in a predetermined two-dimensional plane.
  • the predetermined two-dimensional plane may be the plane where the display screen of the terminal device is located, and the terminal device is used for displaying a panoramic picture.
  • the object to be detected may be an object in a panoramic scene, or may be a tag added to an object in the panoramic scene.
  • size information of the bounding box of each object to be detected is determined based on the size information of each of the two objects to be detected.
  • the size information of the object to be detected in the predetermined two-dimensional plane can be converted into the size information in the predetermined three-dimensional space according to the mapping relationship between the predetermined three-dimensional space and the predetermined two-dimensional plane. Taking the rotation position of the object to be detected as the center, and according to the converted size information in the predetermined three-dimensional space, a bounding box when the object to be detected is mapped to the predetermined three-dimensional space is constructed.
  • the projected shape may be, for example, a rectangle, a circle, or an ellipse.
  • the above structure of the bounding box is only used as an example to facilitate understanding of the present disclosure, which is not limited in the present disclosure.
  • the location information of the bounding box is usually determined according to the positioning coordinates of the label relative to the upper left corner of the viewport and a predetermined size, That is, the bounding box is constructed based on a two-dimensional plane.
  • the position of the center point of the bounding box will change.
  • the center point of the bounding box is represented by the positioning coordinates of the bounding box relative to the upper left corner of the viewport, when the distance between the bounding box and the upper left corner of the viewport is farther, the calculation error of the positioning coordinates will be higher. .
  • the related art usually performs real-time collision detection on the labels of objects in the current field of view when switching the display area, so as to improve the detection accuracy, but this will undoubtedly result in high computational overhead, and the rendering efficiency of the display area after switching is low. The problem.
  • the size information of the bounding box in the predetermined three-dimensional space is obtained by converting based on the size information of the object to be detected in the predetermined two-dimensional plane, and the rotation position of the object to be detected is used as the center to construct the bounding box in the three-dimensional space.
  • the location information of the bounding box is not affected by changes in the field of view. Therefore, it is convenient to perform collision detection on tags in advance before rendering the entire panoramic scene. Compared with the technical solutions of related technologies that require real-time detection, the calculation overhead can be reduced to a certain extent, and the rendering efficiency of the pictures in the panoramic scene can be improved. Therefore, it is convenient for users to improve experience.
  • a collision result of the two objects to be detected is determined according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected.
  • the distance between the center points of the two bounding boxes is the distance between the two rotation positions.
  • the distance between the two rotation positions can be compared with the size of the space that can be enclosed by the two bounding boxes when the two bounding boxes fit together. The distance between the center points, you can determine that the two bounding boxes overlap.
  • the accuracy of the determined position information of the bounding box can be improved. Therefore, collision detection can be performed on all objects to be detected at one time when the panoramic scene is initialized, which can save computational overhead and improve the accuracy of collision detection.
  • FIG. 3 is a schematic diagram of the principle of determining a mapping relationship between a predetermined two-dimensional plane and a predetermined three-dimensional space according to an embodiment of the present disclosure.
  • the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional plane may be determined first. Based on the mapping relationship and the size information of the object to be detected projected onto the predetermined two-dimensional plane, the size information of the bounding box in the three-dimensional space is obtained by conversion.
  • the mapping relationship may, for example, represent a relationship between a unit length in a predetermined two-dimensional plane and a rotation angle in a predetermined three-dimensional space.
  • the viewing angle value of the center point of the predetermined three-dimensional space in the predetermined direction with respect to the predetermined two-dimensional plane and the width of the predetermined two-dimensional plane in the predetermined direction may be obtained.
  • the ratio of the viewing angle value to the width is used as the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional plane.
  • the embodiment 300 can obtain the viewing angle value a required for viewing the entire predetermined two-dimensional plane 320 in the width direction starting from the center point O of the predetermined three-dimensional space 310, or viewing in the height direction.
  • the viewing angle value of the center point of the predetermined three-dimensional space in the predetermined direction with respect to the predetermined two-dimensional plane is: in the camera projection matrix determined according to the predetermined three-dimensional space and the predetermined two-dimensional plane, the field of view in the horizontal direction ( Field of View, FOV) value or vertical field of view value.
  • FOV Field of View
  • the embodiment 300 can acquire the width a or the height b of a predetermined two-dimensional plane.
  • the width a and height b are the width and height of the display screen of the terminal device.
  • the aforementioned predetermined direction is the horizontal direction
  • the obtained width is a.
  • the aforementioned predetermined direction is the vertical direction
  • mapping relationship it is convenient to convert the size information of the object to be detected on the predetermined two-dimensional plane into the size information of the object to be detected in the predetermined three-dimensional space, thereby facilitating the construction of a bounding box of the object to be detected.
  • FIG. 4 is a schematic diagram of the principle of determining the size information of the bounding box of each object to be detected according to an embodiment of the present disclosure.
  • the rotational position of the object to be detected relative to the predetermined three-dimensional space may include a first rotation angle of the center point of the object to be detected relative to the first coordinate axis in the spherical coordinate system constructed based on the predetermined three-dimensional space and a second rotation angle relative to the second coordinate axis.
  • the first rotation angle and the second rotation angle are perpendicular to each other.
  • a spherical coordinate system can be established by taking the center point O of the 3D spherical model 410 as the coordinate origin. If the center point of the object to be detected is point p on the spherical surface, the rotation position of the object to be detected relative to the predetermined three-dimensional space includes: the rotation angle of point p relative to the X axis The rotation angle ⁇ of point p relative to the Y axis. Wherein, the rotation angle of point p relative to the X axis and the rotation angle relative to the Y axis can be determined according to the right-hand rotation rule.
  • the pointing direction of the thumb is perpendicular to the bending direction of the four fingers
  • the pointing direction of the thumb is the positive direction of the rotation axis
  • the bending direction of the four fingers is the positive rotation direction to determine the rotation angle relative to the rotation axis.
  • the present disclosure can also locate the rotation position according to the azimuth angle value and the pitch angle value of the center point of the object to be detected in the constructed spherical coordinate system, for example.
  • the conversion between the size information of the object to be detected projected to the predetermined two-dimensional plane and the size information of the object to be detected in the predetermined three-dimensional space can be realized.
  • the display form of the object to be detected in the predetermined two-dimensional space is usually in the form of a rectangular frame 420, and the size information of the object to be detected projected onto the predetermined two-dimensional plane may include the width of the object to be detected and the height of the object to be detected.
  • the size information projected to a predetermined two-dimensional plane includes a width c 431 and a height d 432 .
  • the center point p of the object to be detected is projected onto a predetermined two-dimensional plane corresponding to point p'.
  • the first size information of the bounding box of each object to be detected can be determined according to the width and mapping relationship of each object to be detected.
  • the first size information may represent half of the azimuth size of the bounding box in the spherical coordinate system constructed based on the predetermined three-dimensional space, that is, when the width is mapped to the predetermined three-dimensional space, the center point of the object to be detected is taken as the origin, in the horizontal direction The upper limit of the absolute value of the rotation angle.
  • the second size information of the bounding box of each object to be detected may be determined according to the height and mapping relationship of each object to be detected.
  • the second size information may, for example, represent the pitch size of the bounding box in the spherical coordinate system constructed based on the predetermined three-dimensional space, that is, when the height is mapped to the predetermined three-dimensional space, the center point of the object to be detected is taken as the origin, allowing rotation in the pitch direction The upper limit of the absolute value of the angle.
  • the first size information 451 and the second size information 452 determined above are the size information of the bounding box, and the object to be detected is in the predetermined three-dimensional space.
  • the coordinate value of the rotation position of , and the size information together constitute the bounding box information.
  • the bounding box of the object to be detected is a circle in a predetermined two-dimensional plane
  • the first size information 451 and the second size information 451 may also be determined.
  • the larger value in the two size information 452 is used as the size information of the bounding box of the object to be detected, so as to ensure that the bounding box can completely surround the object to be detected.
  • FIG. 5 is a schematic diagram of the principle of determining a collision result of two objects to be detected according to an embodiment of the present disclosure.
  • the embodiment 500 projects two bounding boxes of two objects to be detected onto a predetermined two-dimensional plane.
  • Plane for example, rectangle 510 and rectangle 520 can be obtained.
  • the two objects to be detected do not overlap when projected onto the predetermined two-dimensional plane, it is required that the rectangle 510 and the rectangle 520 do not overlap.
  • the rectangle 510 and the rectangle 520 need to meet the following conditions: the half width w 1 of the rectangle 510 and the half width w 2 of the rectangle 520 are less than or equal to the distance between the point p 1 ' and the point p 2 ' in the width direction, half of the rectangle 510 The height h 1 and the half height h 2 of the rectangle 520 are less than or equal to the distance between the point p 1 ' and the point p 2 ' in the height direction.
  • p 1 ' is the center point of the projection of one of the two objects to be detected on the predetermined two-dimensional plane (that is, the center point of the bounding box of the one of the objects to be detected projected to the predetermined two-dimensional plane)
  • p 2 ' is the center point of the projection of the other object to be detected on the predetermined two-dimensional plane (that is, the center point of the projection of the bounding box of the other object to be detected to the predetermined two-dimensional plane).
  • W 1 is the first size information of the bounding box of one of the objects to be detected
  • H 1 is the second size information of the bounding box of one of the objects to be detected
  • W 2 is the first size information of the bounding box of the other object to be detected
  • H 2 is the second size information of the bounding box of the other object to be detected.
  • ⁇ 1 is the first rotation angle of one of the objects to be detected, that is, the rotation angle relative to the Y axis described above, is the second rotation angle of one of the objects to be detected, that is, the rotation angle relative to the X-axis described above.
  • ⁇ 2 is the first rotation angle of the other object to be detected, that is, the rotation angle relative to the Y-axis described above, is the second rotation angle of the other object to be detected, that is, the rotation angle relative to the X-axis described above.
  • the first difference value diff ⁇ between the two first rotation angles of the two objects to be detected can be determined first, and the two first rotation angles of the two objects to be detected can be determined.
  • the second difference between the two rotation angles Based on the size of the bounding box determined above, determine the sum of the first size information of the two bounding boxes of the two objects to be detected, so as to obtain the first size sum (W 1 +W 2 ), and determine the size of the two objects to be detected.
  • the size relationship between the second size and (H 1 +H 2 ) determines the collision result of the two objects to be detected. If the first size sum (W 1 +W 2 ) is greater than the first difference diff ⁇ , or the second size sum (H 1 +H 2 ) is greater than the second difference Then it is determined that the collision result is a collision; otherwise, it can be determined that the collision result is a non-collision.
  • FIG. 6 is a schematic diagram of a principle of determining a collision result of two objects to be detected according to another embodiment of the present disclosure.
  • the embodiment 600 projects two bounding boxes of two objects to be detected onto a predetermined two-dimensional plane.
  • Dimension plane for example, circle 610 and circle 620 can be obtained.
  • the circle 610 and the circle 620 need to satisfy the following conditions: the radius r 1 of the circle 610 and the radius r 2 of the circle 620 are less than or equal to the distance between the point p 1 ′ and the point p 2 ′.
  • p 1 ' is the center point of the projection of one of the two objects to be detected on the predetermined two-dimensional plane (that is, the center point of the bounding box of the one of the objects to be detected projected to the predetermined two-dimensional plane)
  • p 2 ' is the center point of the projection of the other object to be detected on the predetermined two-dimensional plane (that is, the center point of the projection of the bounding box of the other object to be detected to the predetermined two-dimensional plane).
  • R 1 is the size information of the bounding box of one of the objects to be detected.
  • R 2 is the size information of the bounding box of the other object to be detected,
  • ⁇ 1 is the first rotation angle of one of the objects to be detected, that is, the rotation angle relative to the Y axis described above, is the second rotation angle of one of the objects to be detected, that is, the rotation angle relative to the X-axis described above.
  • ⁇ 2 is the first rotation angle of the other object to be detected, that is, the rotation angle relative to the Y-axis described above, is the second rotation angle of the other object to be detected, that is, the rotation angle relative to the X-axis described above.
  • the first difference value diff ⁇ between the two first rotation angles of the two objects to be detected can be determined first, and the two first rotation angles of the two objects to be detected can be determined.
  • the second difference between the two rotation angles Based on the size of the bounding box determined above, the sum of the size information of the two bounding boxes of the two objects to be detected is determined, and the size sum (R 1 +R 2 ) is obtained.
  • the first difference diff ⁇ and the second difference arithmetic square root of The size relationship between the size and (R 1 +R 2 ) determines the collision result of the two objects to be detected. If the sum of dimensions (R 1 +R 2 ) is greater than the arithmetic square root Then it is determined that the collision result is a collision; otherwise, it can be determined that the collision result is a non-collision.
  • the tag added to the entity in the panorama screen can be used as the object to be detected, and the collision detection method for objects described above can be used to perform collision detection on any two objects to be detected.
  • the tags that will overlap each other when the panorama is displayed For two tags that overlap each other, for example, a tag with a higher weight value may be selected from the two tags for display according to the pre-assigned weight value for the two tags.
  • the pre-allocated weight value can be set according to actual needs, for example, it can be set according to the click frequency. The higher the click frequency, the larger the pre-allocated weight value.
  • the present disclosure further provides a collision detection device for objects, which will be described in detail below with reference to FIG. 7 .
  • FIG. 7 is a structural block diagram of a collision detection apparatus for an object according to an embodiment of the present disclosure.
  • the collision detection apparatus 700 for objects in this embodiment may include an information acquisition module 710 , a size information determination module 730 and a collision result determination module 750 .
  • the information acquisition module 710 is configured to acquire respective attribute information of the two objects to be detected, the attribute information includes the rotational position of the objects to be detected relative to a predetermined three-dimensional space and size information of the objects to be detected projected onto a predetermined two-dimensional plane.
  • the information acquisition module 710 may be configured to perform, for example, the operation S210 described above, which will not be repeated here.
  • the size information determination module 730 is configured to determine size information of a bounding box of each object to be detected based on the size information of each of the two objects to be detected, the bounding box being centered on the rotational position of the object to be detected.
  • the size information determination module 730 may be configured to perform, for example, the operation S230 described above, which will not be repeated here.
  • the collision result determination module 750 is configured to determine the collision result of the two objects to be detected according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected. In an embodiment, the collision result determination module 750 may be configured to perform, for example, the operation S250 described above, which will not be repeated here.
  • the size information determination module 730 may include, for example, a mapping relationship determination submodule and a size information determination submodule.
  • the mapping relationship determination submodule is used to determine the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space.
  • the size information determination submodule is configured to determine the size information of the bounding box of each object to be detected based on the mapping relationship and the size information of each object to be detected.
  • the above-mentioned mapping relationship determination submodule includes a viewing angle value acquisition unit, a width acquisition unit, and a relationship determination unit.
  • the viewing angle value acquiring unit is used for acquiring the viewing angle value of the center point of the predetermined three-dimensional space in the predetermined direction with respect to the predetermined two-dimensional plane.
  • the width acquiring unit is used for acquiring the width of the predetermined two-dimensional plane in the predetermined direction.
  • the relationship determining unit is configured to determine the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space as the ratio of the viewing angle value to the width.
  • the above-mentioned rotational position of the object to be detected relative to the three-dimensional space includes: a center point of the object to be detected is in a spherical coordinate system constructed based on a predetermined three-dimensional space, and a first rotation with the first coordinate axis as the rotation axis angle; and a second rotation angle of the center point of the object to be detected in a spherical coordinate system constructed based on a predetermined three-dimensional space, with the second coordinate axis as the rotation axis.
  • the first coordinate axis and the second coordinate axis are perpendicular to each other.
  • the size information of the object to be detected projected onto the predetermined two-dimensional plane includes the width of the object to be detected and the height of the object to be detected.
  • the size information determination submodule may include, for example, an azimuth size determination unit and an elevation size determination unit.
  • the azimuth size determining unit is used to determine the first size information of the bounding box of each object to be detected according to the width and mapping relationship of each object to be detected, the first size information including the spherical coordinates of the bounding box constructed based on the predetermined three-dimensional space half of the azimuth dimension in the system.
  • the pitch size determination unit is used to determine the second size information of the bounding box of each object to be detected according to the height of each object to be detected and the mapping relationship, the second size information includes the spherical coordinates of the bounding box constructed based on the predetermined three-dimensional space Half the pitch size in the system.
  • the aforementioned collision result determination module may include, for example, a first difference determination submodule, a first size and determination submodule, and a first collision determination submodule.
  • the first difference determination submodule is used to determine the first difference between the two first rotation angles of the two objects to be detected, and to determine the second difference between the two second rotation angles of the two objects to be detected value.
  • the first size sum determination submodule is used to determine the sum of the first size information of the two bounding boxes of the two objects to be detected, and obtain the first size sum; and is used to determine the second size of the two bounding boxes of the two objects to be detected. The sum of the size information, the second size sum is obtained.
  • the first collision determination submodule is configured to determine the collision result of the two objects to be detected based on the size relationship between the first difference value and the first size sum and the size relationship between the second difference value and the second size sum.
  • the size information determination submodule further includes a size information determination unit for determining the larger value of the first size information and the second size information as size information of the bounding box of each object to be detected.
  • the above-mentioned collision result determination module includes a second difference determination submodule, a second size and determination submodule, and a second collision determination submodule.
  • the second difference determination submodule is used to determine the first difference between the two first rotation angles of the two objects to be detected, and to determine the second difference between the two second rotation angles of the two objects to be detected difference.
  • the second size sum determination submodule is used to determine the sum of the size information of the two bounding boxes of the two objects to be detected, and obtain the size sum.
  • the second collision determination sub-module is configured to determine the collision result of the two objects to be detected based on the magnitude relationship between the first difference value and the arithmetic square root of the second difference value and the size sum.
  • the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved are all in compliance with relevant laws and regulations, and do not violate public order and good customs.
  • the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
  • Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • the device 800 includes a computing unit 801 that can be executed according to a computer program stored in a read only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803 Various appropriate actions and handling. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored.
  • the computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804.
  • An input/output (I/O) interface 805 is also connected to bus 804 .
  • Various components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc. ; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, and the like.
  • the communication unit 809 allows the device 800 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
  • Computing unit 801 may be various general-purpose and/or special-purpose processing components with processing and computing capabilities. Some examples of computing units 801 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various specialized artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
  • the computing unit 801 performs the various methods and processes described above, such as collision detection methods for objects.
  • a collision detection method for an object may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 808 .
  • part or all of the computer program may be loaded and/or installed on device 800 via ROM 802 and/or communication unit 809.
  • ROM 802 and/or communication unit 809 When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the collision detection method for an object described above may be performed.
  • the computing unit 801 may be configured to perform a collision detection method for an object by any other suitable means (eg, by means of firmware).
  • Various implementations of the systems and techniques described herein above may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC systems on chips system
  • CPLD load programmable logic device
  • computer hardware firmware, software, and/or combinations thereof.
  • These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that
  • the processor which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
  • Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, performs the functions/functions specified in the flowcharts and/or block diagrams. Action is implemented.
  • the program code may execute entirely on the machine, partly on the machine, partly on the machine and partly on a remote machine as a stand-alone software package or entirely on the remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer.
  • a display device eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.
  • the systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  • a computer system can include clients and servers.
  • Clients and servers are generally remote from each other and usually interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
  • the server can be a cloud server, a distributed system server, or a server combined with blockchain.

Abstract

A collision detection method and apparatus for objects, and a device and a storage medium, applied to the technical field of electronics, and in particular to the technical field of intelligent traffic and map navigation. The specific implementation scheme of the collision detection method for the objects comprises: obtaining attribute information of each of two objects to be detected (S210), the attribute information comprising rotation positions of said objects relative to a predetermined three-dimensional space and size information of said objects projected to a predetermined two-dimensional plane; determining the size information of a bounding box of each of said objects on the basis of the size information of each of said objects in the said two objects (S230), the bounding box taking the rotation position of each of said objects as a center; and determining a collision result of said two objects according to the rotation positions of said two objects and the size information of the bounding boxes of said two objects (S250).

Description

针对物体的碰撞检测方法、装置、设备和存储介质Collision detection method, device, device and storage medium for objects
本申请要求于2021年04月26日递交的中国专利申请No.202110456769.4的优先权,其内容一并在此作为参考。This application claims the priority of Chinese Patent Application No. 202110456769.4 filed on April 26, 2021, the contents of which are incorporated herein by reference.
技术领域technical field
本公开涉及电子技术领域,具体涉及智能交通和地图导航技术领域,更具体地涉及一种针对物体的碰撞检测方法、装置、设备和存储介质。The present disclosure relates to the field of electronic technology, in particular to the technical field of intelligent transportation and map navigation, and more particularly to a method, device, device and storage medium for collision detection for objects.
背景技术Background technique
随着电子技术的发展,全景技术随之产生。全景技术是一种视觉新技术,能够给用户带来全新的真实现场感和交互式的感受。With the development of electronic technology, panoramic technology has emerged. Panorama technology is a new visual technology, which can bring users a new real sense of presence and interactive experience.
在设置全景展示时,通常是将全景二维图片在创建好的三维球模型中进行贴图以创建三维场景。在三维场景创建好之后,通常会在三维球模型上添加标记物和标签信息,以向用户提供导引信息等。When setting up a panorama display, the panorama 2D image is usually mapped in the created 3D ball model to create a 3D scene. After the 3D scene is created, markers and label information are usually added to the 3D ball model to provide guidance information to the user.
发明内容SUMMARY OF THE INVENTION
提供了一种提高检测准确性的针对物体的碰撞检测方法、装置、电子设备和存储介质。Provided are a collision detection method, device, electronic device and storage medium for objects that improve detection accuracy.
根据本公开的一个方面,提供了一种针对物体的碰撞检测方法,包括:获取两个待检测物体各自的属性信息,该属性信息包括待检测物体相对于预定三维空间的旋转位置和待检测物体投影至预定二维平面的尺寸信息;基于两个待检测物体中每个待检测物体的尺寸信息,确定每个待检测物体的包围盒的尺寸信息,该包围盒以待检测物体的旋转位置为中心;以及根据两个待检测物体的旋转位置和两个待检测物体的包围盒的尺寸信息,确定两个待检测物体的碰撞结果。According to one aspect of the present disclosure, there is provided a collision detection method for objects, including: acquiring attribute information of two objects to be detected, the attribute information including the rotational position of the objects to be detected relative to a predetermined three-dimensional space and the objects to be detected. The size information projected to a predetermined two-dimensional plane; based on the size information of each to-be-detected object in the two to-be-detected objects, determine the size information of the bounding box of each to-be-detected object, and the bounding box takes the rotation position of the to-be-detected object as and determining the collision result of the two objects to be detected according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected.
根据本公开的另一个方面,提供了一种针对物体的碰撞检测装置,包括:信息获取模块,用于获取两个待检测物体各自的属性信息,该属性信息包括待检测物体相对于预定三维空间的旋转位置和待检测物体投影至 预定二维平面的尺寸信息;尺寸信息确定模块,用于基于两个待检测物体中每个待检测物体的尺寸信息,确定每个待检测物体的包围盒的尺寸信息,该包围盒以待检测物体的旋转位置为中心;以及碰撞结果确定模块,用于根据两个待检测物体的旋转位置和两个待检测物体的包围盒的尺寸信息,确定两个待检测物体的碰撞结果。According to another aspect of the present disclosure, a collision detection device for objects is provided, comprising: an information acquisition module configured to acquire respective attribute information of two objects to be detected, where the attribute information includes the relative relationship between the objects to be detected relative to a predetermined three-dimensional space The rotational position of the object to be detected and the size information of the object to be detected projected to the predetermined two-dimensional plane; the size information determination module is used to determine the size of the bounding box of each object to be detected based on the size information of each of the two objects to be detected. size information, the bounding box is centered on the rotational position of the object to be detected; and a collision result determination module for determining two to-be-detected objects according to the rotational position of the two to-be-detected objects and the size information of the bounding boxes of the two to-be-detected objects Detect collision results of objects.
根据本公开的另一个方面,提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行本公开提供的针对物体的碰撞检测方法。According to another aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor. The at least one processor executes, so that the at least one processor can execute the collision detection method for an object provided by the present disclosure.
根据本公开的另一个方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行本公开提供的针对物体的碰撞检测方法。According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the collision detection method for an object provided by the present disclosure.
根据本公开的另一个方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现本公开提供的针对物体的碰撞检测方法。According to another aspect of the present disclosure, there is provided a computer program product, including a computer program, which, when executed by a processor, implements the collision detection method for an object provided by the present disclosure.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or critical features of embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become readily understood from the following description.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used for better understanding of the present solution, and do not constitute a limitation to the present disclosure. in:
图1是根据本公开实施例的针对物体的碰撞检测方法、装置、电子设备和存储介质的应用场景示意图;1 is a schematic diagram of an application scenario of a collision detection method, apparatus, electronic device, and storage medium for objects according to an embodiment of the present disclosure;
图2是根据本公开实施例的针对物体的碰撞检测方法的流程图;FIG. 2 is a flowchart of a method for collision detection for an object according to an embodiment of the present disclosure;
图3是根据本公开实施例的确定预定二维平面与预定三维空间之间的映射关系的原理示意图;3 is a schematic diagram of the principle of determining a mapping relationship between a predetermined two-dimensional plane and a predetermined three-dimensional space according to an embodiment of the present disclosure;
图4是根据本公开实施例的确定每个待检测物体的包围盒的尺寸信息的原理示意图;4 is a schematic diagram of the principle of determining the size information of the bounding box of each object to be detected according to an embodiment of the present disclosure;
图5是根据本公开实施例的确定两个待检测物体的碰撞结果的原理示意图;5 is a schematic diagram of the principle of determining a collision result of two objects to be detected according to an embodiment of the present disclosure;
图6是根据本公开另一实施例的确定两个待检测物体的碰撞结果的原理示意图;6 is a schematic diagram of a principle of determining a collision result of two objects to be detected according to another embodiment of the present disclosure;
图7是根据本公开实施例的针对物体的碰撞检测装置的结构框图;以及FIG. 7 is a structural block diagram of a collision detection apparatus for an object according to an embodiment of the present disclosure; and
图8是用来实现本公开实施例的针对物体的碰撞检测方法的电子设备的框图。FIG. 8 is a block diagram of an electronic device used to implement the collision detection method for an object according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding and should be considered as exemplary only. 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 present disclosure. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
本公开提供了一种针对物体的碰撞检测方法,包括信息获取阶段、尺寸信息确定阶段和碰撞结果确定阶段。在信息获取阶段中,获取两个待检测物体各自的属性信息,该属性信息包括待检测物体相对于预定三维空间的旋转位置和待检测物体投影至预定二维平面的尺寸信息。在尺寸信息确定阶段中,基于两个待检测物体中每个待检测物体的尺寸信息,确定每个待检测物体的包围盒的尺寸信息,该包围盒以待检测物体的旋转位置为中心。在碰撞结果确定阶段中,根据两个待检测物体的旋转位置和两个待检测物体的包围盒的尺寸信息,确定两个待检测物体的碰撞结果。The present disclosure provides a collision detection method for an object, which includes an information acquisition stage, a size information determination stage, and a collision result determination stage. In the information acquisition stage, the respective attribute information of the two objects to be detected is acquired, the attribute information includes the rotational position of the object to be detected relative to the predetermined three-dimensional space and the size information of the object to be detected projected onto the predetermined two-dimensional plane. In the size information determination stage, the size information of the bounding box of each object to be detected is determined based on the size information of each of the two objects to be detected, and the bounding box is centered on the rotational position of the object to be detected. In the collision result determination stage, the collision result of the two objects to be detected is determined according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected.
以下将结合图1对本公开提供的方法和装置的应用场景进行描述。The application scenarios of the method and apparatus provided by the present disclosure will be described below with reference to FIG. 1 .
图1是根据本公开实施例的针对物体的碰撞检测方法、装置、电子设备和存储介质的应用场景示意图。FIG. 1 is a schematic diagram of an application scenario of a collision detection method, apparatus, electronic device, and storage medium for objects according to an embodiment of the present disclosure.
如图1所示,该应用场景100包括服务器110和终端设备130。终端设备130可以通过网络与服务器110通信连接,网络可以包括有线或无线通信链路。As shown in FIG. 1 , the application scenario 100 includes a server 110 and a terminal device 130 . The terminal device 130 may be communicatively connected to the server 110 through a network, and the network may include a wired or wireless communication link.
用户例如可以使用终端设备130通过网络与服务器110交互,以接收或发送消息等。终端设备130可以为具有显示屏具有全景展示功能的终端设备,包括但不限于智能手表、智能手机、平板电脑和膝上型便携计算机 等等。For example, the user may use the terminal device 130 to interact with the server 110 through the network to receive or send messages and the like. The terminal device 130 may be a terminal device having a display screen with a panorama display function, including but not limited to a smart watch, a smart phone, a tablet computer, a laptop computer, and the like.
终端设备130例如可以安装有各种客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、社交平台软件或地图导航类应用等(仅为示例)。For example, the terminal device 130 may be installed with various client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, social platform software or map navigation applications (just examples).
服务器110可以是提供各种服务的服务器,例如对终端设备130安装的客户端应用提供支持的后台管理服务器。该服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。The server 110 may be a server that provides various services, such as a background management server that provides support for client applications installed on the terminal device 130 . The server can be a cloud server, a distributed system server, or a server combined with blockchain.
示例性地,终端设备130例如可以响应于用户操作向服务器110发送全景场景信息的获取请求。服务器110例如可以响应于该获取请求向终端设备130发送全景模型120,该全景模型120中包括全景图像和为全景图像中物体添加的标签信息等。终端设备130在接收到该全景模型120后,可以在运行的客户端应用中渲染全景场景,并在展示的物体附近展示向该物体添加的标签信息。例如,对于展示的全景场景中的火车站,可以展示有指示“火车站”的标签131,对于展示的全景场景中的便利店,可以展示有指示“便利店”的标签132。Exemplarily, the terminal device 130 may, for example, send a request for obtaining panoramic scene information to the server 110 in response to a user operation. For example, the server 110 may send the panorama model 120 to the terminal device 130 in response to the acquisition request, where the panorama model 120 includes the panorama image and tag information added to the objects in the panorama image, and the like. After receiving the panorama model 120, the terminal device 130 may render the panorama scene in the running client application, and display the tag information added to the object near the displayed object. For example, for a train station in the displayed panoramic scene, a label 131 indicating "train station" may be displayed, and for a convenience store in the displayed panoramic scene, a label 132 indicating "convenience store" may be displayed.
根据本公开的实施例,如图1所示,该应用场景中还可以包括数据库140。该数据库140中存储有能够拼接为全景图像的多个图像,或者存储有全景图像。服务器110例如可以访问数据库140,并根据从数据库140中获取的图像构建全景模型。具体可以先创建3D球模型,将获取的图像在该3D球模型中进行贴图,并为每个物体添加标签。同时,若在预定区域内的物体较多,服务器还可以对该预定区域内多个物体的多个标签进行碰撞检测,根据碰撞检测结果来确定多个标签的展示规则。在服务器110构建的全景模型120中,还可以携带有该展示规则,以便于终端设备对物体的标签进行渲染展示。According to an embodiment of the present disclosure, as shown in FIG. 1 , the application scenario may further include a database 140 . The database 140 stores a plurality of images that can be stitched into a panoramic image, or stores a panoramic image. The server 110 may, for example, access the database 140 and build a panoramic model from the images obtained from the database 140 . Specifically, you can create a 3D ball model first, map the acquired image in the 3D ball model, and add labels to each object. At the same time, if there are many objects in the predetermined area, the server may also perform collision detection on multiple tags of multiple objects in the predetermined area, and determine the display rules of the multiple tags according to the collision detection results. The display rule may also be carried in the panoramic model 120 constructed by the server 110, so that the terminal device can render and display the label of the object.
需要说明的是,本公开所提供的针对物体的碰撞检测方法可以由服务器110执行。相应地,本公开所提供的针对物体的碰撞检测装置可以设置于服务器110中。本公开所提供的针对物体的碰撞检测方法也可以由不同于服务器110且能够与服务器110通信的服务器或服务器集群执行。相应地,本公开所提供的针对物体的碰撞检测装置也可以设置于不同于服务器110且能够与服务器110通信的服务器或服务器集群中。It should be noted that the collision detection method for objects provided by the present disclosure may be executed by the server 110 . Correspondingly, the collision detection device for objects provided by the present disclosure may be provided in the server 110 . The collision detection method for objects provided by the present disclosure may also be performed by a server or server cluster that is different from the server 110 and can communicate with the server 110 . Correspondingly, the collision detection device for objects provided by the present disclosure may also be provided in a server or a server cluster that is different from the server 110 and can communicate with the server 110 .
应该理解,图1中的服务器、终端设备和数据库的数目和类型仅仅是示意性的。根据实现需要,可以具有任意数目和类型的服务器、终端设备和数据库。It should be understood that the number and type of servers, terminal devices and databases in FIG. 1 are merely illustrative. There can be any number and type of servers, terminal devices and databases according to implementation needs.
图2是根据本公开实施例的针对物体的碰撞检测方法的流程图。FIG. 2 is a flowchart of a collision detection method for an object according to an embodiment of the present disclosure.
如图2所示,该实施例的针对物体的碰撞检测方法200可以包括操作S210、操作S230和操作S250。As shown in FIG. 2 , the collision detection method 200 for an object in this embodiment may include operation S210 , operation S230 and operation S250 .
在操作S210,获取两个待检测物体各自的属性信息。In operation S210, respective attribute information of the two objects to be detected is acquired.
根据本公开的实施例,属性信息可以包括待检测物体相对于预定三维空间的旋转位置。该预定三维空间可以为基于3D绘图协议创建的3D球模型。该3D球模型具体可以通过调用JavaScript的Web图形库(Web Graphics Library,WebGL)来构建。旋转位置可以为待检测物体的中心点相对于该3D球模型的中心点的位置。其中,预定三维空间为该3D球模型构成的三维空间。可以理解的是,上述3D球模型的构建方法仅作为示例以利于理解本公开,本公开对此不做限定。According to an embodiment of the present disclosure, the attribute information may include a rotational position of the object to be detected relative to a predetermined three-dimensional space. The predetermined three-dimensional space may be a 3D ball model created based on a 3D drawing protocol. Specifically, the 3D ball model can be constructed by calling a JavaScript Web Graphics Library (Web Graphics Library, WebGL). The rotation position may be the position of the center point of the object to be detected relative to the center point of the 3D ball model. The predetermined three-dimensional space is a three-dimensional space formed by the 3D ball model. It can be understood that, the above-mentioned construction method of the 3D ball model is only used as an example to facilitate understanding of the present disclosure, which is not limited in the present disclosure.
示例性地,该旋转位置可以根据待检测物体的中心点相对于3D球模型的中心点的方位角值、俯仰角值和距离来确定。Exemplarily, the rotational position may be determined according to the azimuth angle value, the pitch angle value and the distance of the center point of the object to be detected relative to the center point of the 3D ball model.
示例性地,考虑到3D球模型中位于相同方位的、不重叠的两个物体虽然与中心点之间的距离不相等,但由于方位角值和俯仰角值相同,因此在投影至预定二维平面时会存在重叠,即该两个物体的碰撞检测结果为相碰撞。因此,该实施例可以仅对位于不同方位的物体进行碰撞检测,即将具有不同方位角值和/或不同俯仰角值的两个物体作为待检测物体。两个待检测物体投影至预定二维平面时是否会重叠,主要取决于待检测物体的方位角值和俯仰角值。因此,该实施例的旋转位置可以仅包括待检测物体的中心点相对于预定三维空间的中心点的方位角值和俯仰角值。Exemplarily, considering that two objects in the 3D spherical model that are located in the same azimuth and do not overlap, although the distance from the center point is not equal, since the azimuth angle value and the pitch angle value are the same, they are projected to a predetermined two-dimensional When the planes are overlapped, the collision detection result of the two objects is collision. Therefore, in this embodiment, collision detection can be performed only on objects located in different azimuths, that is, two objects with different azimuth angle values and/or different pitch angle values can be regarded as objects to be detected. Whether or not the two objects to be detected will overlap when projected on a predetermined two-dimensional plane mainly depends on the azimuth angle value and the pitch angle value of the object to be detected. Therefore, the rotational position of this embodiment may only include the azimuth angle value and the pitch angle value of the center point of the object to be detected relative to the center point of the predetermined three-dimensional space.
根据本公开的实施例,属性信息还可以包括待检测物体投影至预定二维平面的尺寸信息。该尺寸信息例如可以包括待检测物体在预定二维平面中的展示高度和展示宽度。该预定二维平面可以为终端设备的显示屏所在的平面,该终端设备用于展示全景画面。According to an embodiment of the present disclosure, the attribute information may further include size information of the object to be detected projected onto a predetermined two-dimensional plane. The size information may include, for example, the display height and display width of the object to be detected in a predetermined two-dimensional plane. The predetermined two-dimensional plane may be the plane where the display screen of the terminal device is located, and the terminal device is used for displaying a panoramic picture.
根据本公开的实施例,待检测物体可以是全景场景中的物体,也可以是向全景场景中的物体添加的标签。According to an embodiment of the present disclosure, the object to be detected may be an object in a panoramic scene, or may be a tag added to an object in the panoramic scene.
在操作S230,基于两个待检测物体中每个待检测物体的尺寸信息,确定每个待检测物体的包围盒的尺寸信息。In operation S230, size information of the bounding box of each object to be detected is determined based on the size information of each of the two objects to be detected.
根据本公开的实施例,可以根据预定三维空间与预定二维平面之间的映射关系,将待检测物体在预定二维平面的尺寸信息转换为预定三维空间中的尺寸信息。以待检测物体的旋转位置作为中心,根据转换得到的预定三维空间中的尺寸信息来构建待检测物体映射至预定三维空间时的包围盒。According to the embodiments of the present disclosure, the size information of the object to be detected in the predetermined two-dimensional plane can be converted into the size information in the predetermined three-dimensional space according to the mapping relationship between the predetermined three-dimensional space and the predetermined two-dimensional plane. Taking the rotation position of the object to be detected as the center, and according to the converted size information in the predetermined three-dimensional space, a bounding box when the object to be detected is mapped to the predetermined three-dimensional space is constructed.
示例性地,包围盒在投影至预定二维平面时,投影得到的形状例如可以为矩形、圆形或椭圆形等。以上包围盒的结构仅作为示例以利于理解本公开,本公开对此不做限定。Exemplarily, when the bounding box is projected onto a predetermined two-dimensional plane, the projected shape may be, for example, a rectangle, a circle, or an ellipse. The above structure of the bounding box is only used as an example to facilitate understanding of the present disclosure, which is not limited in the present disclosure.
示例性地,相关技术中,在待检测物体是向全景场景中的物体添加的标签时,通常根据标签相对于视口(viewpoint)左上角的定位坐标及预定尺寸来确定包围盒的位置信息,即该包围盒是基于二维平面构建的。如此,在全景场景中的展示区域发生变化时,该包围盒中心点的位置将发生变化。再者,由于该包围盒中心点由包围盒相对于视口左上角的定位坐标来表示,则在包围盒与视口左上角之间的距离越远时,该定位坐标的计算误差会越高。为了解决该问题,相关技术通常在切换展示区域时,对当前视野中物体的标签进行实时的碰撞检测,以此提高检测精度,但这无疑会存在计算开销大,切换后展示区域的渲染效率低的问题。Exemplarily, in the related art, when the object to be detected is a label added to an object in a panoramic scene, the location information of the bounding box is usually determined according to the positioning coordinates of the label relative to the upper left corner of the viewport and a predetermined size, That is, the bounding box is constructed based on a two-dimensional plane. In this way, when the display area in the panoramic scene changes, the position of the center point of the bounding box will change. Furthermore, since the center point of the bounding box is represented by the positioning coordinates of the bounding box relative to the upper left corner of the viewport, when the distance between the bounding box and the upper left corner of the viewport is farther, the calculation error of the positioning coordinates will be higher. . In order to solve this problem, the related art usually performs real-time collision detection on the labels of objects in the current field of view when switching the display area, so as to improve the detection accuracy, but this will undoubtedly result in high computational overhead, and the rendering efficiency of the display area after switching is low. The problem.
本公开实施例通过基于待检测物体在预定二维平面的尺寸信息来转换得到包围盒在预定三维空间的尺寸信息,并以待检测物体的旋转位置作为中心构建三维空间的包围盒,可以保证该包围盒的位置信息不受视野变化的影响。从而便于在渲染整个全景场景之前预先对标签进行碰撞检测,相较于相关技术需要实时检测的技术方案,可以在一定程度上降低计算开销,提高全景场景中画面的渲染效率,并因此便于提高用户体验。In the embodiment of the present disclosure, the size information of the bounding box in the predetermined three-dimensional space is obtained by converting based on the size information of the object to be detected in the predetermined two-dimensional plane, and the rotation position of the object to be detected is used as the center to construct the bounding box in the three-dimensional space. The location information of the bounding box is not affected by changes in the field of view. Therefore, it is convenient to perform collision detection on tags in advance before rendering the entire panoramic scene. Compared with the technical solutions of related technologies that require real-time detection, the calculation overhead can be reduced to a certain extent, and the rendering efficiency of the pictures in the panoramic scene can be improved. Therefore, it is convenient for users to improve experience.
在操作S250,根据两个待检测物体的旋转位置和两个待检测物体的包围盒的尺寸信息,确定两个待检测物体的碰撞结果。In operation S250, a collision result of the two objects to be detected is determined according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected.
根据本公开的实施例,可以根据两个包围盒的中心点之间的距离及两个包围盒的尺寸信息,来确定两个包围盒是否重叠。若两个包围盒重叠,可以确定两个待检测物体的碰撞结果为相碰撞。若两个包围盒不重叠,可 以确定两个待检测物体的碰撞结果为不相碰撞。According to an embodiment of the present disclosure, it can be determined whether two bounding boxes overlap according to the distance between the center points of the two bounding boxes and the size information of the two bounding boxes. If the two bounding boxes overlap, it can be determined that the collision result of the two objects to be detected is a collision. If the two bounding boxes do not overlap, it can be determined that the collision result of the two objects to be detected is non-collision.
示例性地,由于包围盒以待检测物体的旋转位置为中心点,则两个包围盒的中心点之间的距离即为两个旋转位置之间的距离。该实施例可以将两个旋转位置之间的距离与两个包围盒相贴合情况下所能围成空间的尺寸相比较,若该围成空间的宽度或高度的一半大于两个包围盒的中心点之间的距离,则可以确定两个包围盒重叠。Exemplarily, since the rotation position of the object to be detected is taken as the center point of the bounding box, the distance between the center points of the two bounding boxes is the distance between the two rotation positions. In this embodiment, the distance between the two rotation positions can be compared with the size of the space that can be enclosed by the two bounding boxes when the two bounding boxes fit together. The distance between the center points, you can determine that the two bounding boxes overlap.
综上分析,该实施例通过以待检测物体在预定三维空间的中心点作为中心包围盒的中心,在三维空间中构建包围盒,可以提高确定的包围盒的位置信息的精度。从而可以在全景场景初始化时一次性对所有待检测物体进行碰撞检测,可以节省计算开销,提高碰撞检测的精度。To sum up, in this embodiment, by taking the center point of the object to be detected in the predetermined three-dimensional space as the center of the central bounding box and constructing the bounding box in the three-dimensional space, the accuracy of the determined position information of the bounding box can be improved. Therefore, collision detection can be performed on all objects to be detected at one time when the panoramic scene is initialized, which can save computational overhead and improve the accuracy of collision detection.
图3是根据本公开实施例的确定预定二维平面与预定三维空间之间的映射关系的原理示意图。FIG. 3 is a schematic diagram of the principle of determining a mapping relationship between a predetermined two-dimensional plane and a predetermined three-dimensional space according to an embodiment of the present disclosure.
根据本公开的实施例,在确定包围盒的尺寸信息时,可以先确定预定二维平面与预定三维平面之间的映射关系。基于该映射关系和待检测物体投影至预定二维平面的尺寸信息,转换得到包围盒在三维空间的尺寸信息。According to the embodiments of the present disclosure, when determining the size information of the bounding box, the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional plane may be determined first. Based on the mapping relationship and the size information of the object to be detected projected onto the predetermined two-dimensional plane, the size information of the bounding box in the three-dimensional space is obtained by conversion.
示例性地,映射关系例如可以表示预定二维平面中的单位长度与预定三维空间中的旋转角度之间的关系。在确定映射关系时,可以获取预定三维空间的中心点在预定方向针对预定二维平面的视角值和预定二维平面在预定方向的宽度。将该视角值与该宽度的比值作为预定二维平面与预定三维平面之间的映射关系。Exemplarily, the mapping relationship may, for example, represent a relationship between a unit length in a predetermined two-dimensional plane and a rotation angle in a predetermined three-dimensional space. When determining the mapping relationship, the viewing angle value of the center point of the predetermined three-dimensional space in the predetermined direction with respect to the predetermined two-dimensional plane and the width of the predetermined two-dimensional plane in the predetermined direction may be obtained. The ratio of the viewing angle value to the width is used as the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional plane.
示例性地,如图3所示,该实施例300可以获取到从预定三维空间310的中心点O出发,在宽度方向观看整个预定二维平面320所需的视角值a,或者在高度方向观看整个预定二维平面320所需的视角值β。在一实施例中,预定三维空间的中心点在预定方向针对所述预定二维平面的视角值为:根据预定三维空间和预定二维平面确定的相机投影矩阵中,水平方向的视场角(Field of View,FOV)值或垂直方向的视场角值。在前述预定方向为水平方向时,获取的视角值即为a。在前述预定方向为垂直方向时,获取的视角值即为β。Exemplarily, as shown in FIG. 3 , the embodiment 300 can obtain the viewing angle value a required for viewing the entire predetermined two-dimensional plane 320 in the width direction starting from the center point O of the predetermined three-dimensional space 310, or viewing in the height direction. The viewing angle value β required for the entire predetermined two-dimensional plane 320 . In one embodiment, the viewing angle value of the center point of the predetermined three-dimensional space in the predetermined direction with respect to the predetermined two-dimensional plane is: in the camera projection matrix determined according to the predetermined three-dimensional space and the predetermined two-dimensional plane, the field of view in the horizontal direction ( Field of View, FOV) value or vertical field of view value. When the aforementioned predetermined direction is the horizontal direction, the obtained viewing angle value is a. When the aforementioned predetermined direction is the vertical direction, the obtained viewing angle value is β.
示例性地,如图3所示,该实施例300可以获取到预定二维平面的宽度a或者高度b。在一实施例中,该宽度a和高度b为终端设备的显示屏 的宽度和高度。在前述预定方向为水平方向时,获取的宽度即为a。在前述预定方向为垂直方向时,获取的宽度即为b。因此,可以确定预定二维平面与预定三维空间之间的映射关系M=a/a,或者M=β/b。Exemplarily, as shown in FIG. 3 , the embodiment 300 can acquire the width a or the height b of a predetermined two-dimensional plane. In one embodiment, the width a and height b are the width and height of the display screen of the terminal device. When the aforementioned predetermined direction is the horizontal direction, the obtained width is a. When the aforementioned predetermined direction is the vertical direction, the obtained width is b. Therefore, the mapping relationship M=a/a or M=β/b between the predetermined two-dimensional plane and the predetermined three-dimensional space can be determined.
通过该映射关系的确定,可以便于将待检测物体投影至预定二维平面的尺寸信息转换为待检测物体在预定三维空间的尺寸信息,并因此利于构建待检测物体的包围盒。Through the determination of the mapping relationship, it is convenient to convert the size information of the object to be detected on the predetermined two-dimensional plane into the size information of the object to be detected in the predetermined three-dimensional space, thereby facilitating the construction of a bounding box of the object to be detected.
图4是根据本公开实施例的确定每个待检测物体的包围盒的尺寸信息的原理示意图。FIG. 4 is a schematic diagram of the principle of determining the size information of the bounding box of each object to be detected according to an embodiment of the present disclosure.
根据本公开的实施例,前述待检测物体相对于预定三维空间的旋转位置可以包括待检测物体的中心点在基于预定三维空间构建的球坐标系中,相对于第一坐标轴的第一旋转角度和相对于第二坐标轴的第二旋转角度。该第一旋转角度与第二旋转角度相互垂直。According to an embodiment of the present disclosure, the rotational position of the object to be detected relative to the predetermined three-dimensional space may include a first rotation angle of the center point of the object to be detected relative to the first coordinate axis in the spherical coordinate system constructed based on the predetermined three-dimensional space and a second rotation angle relative to the second coordinate axis. The first rotation angle and the second rotation angle are perpendicular to each other.
示例性地,如图4所示的实施例400,可以以3D球模型410的中心点O为坐标原点,建立球坐标系。若待检测物体的中心点为球面上的p点,则该待检测物体相对于预定三维空间的旋转位置包括:p点相对于X轴的旋转角度
Figure PCTCN2021130014-appb-000001
p点相对于Y轴的旋转角度λ。其中,p点相对于X轴的旋转角度和相对于Y轴的旋转角度可以根据右手旋转定则来判定。具体地,使大拇指的指向方向与四指弯曲方向相垂直,以大拇指的指向方向为旋转轴的正方向,以四指弯曲方向作为旋转正方向来确定相对于旋转轴的转动角度。
Exemplarily, in the embodiment 400 shown in FIG. 4 , a spherical coordinate system can be established by taking the center point O of the 3D spherical model 410 as the coordinate origin. If the center point of the object to be detected is point p on the spherical surface, the rotation position of the object to be detected relative to the predetermined three-dimensional space includes: the rotation angle of point p relative to the X axis
Figure PCTCN2021130014-appb-000001
The rotation angle λ of point p relative to the Y axis. Wherein, the rotation angle of point p relative to the X axis and the rotation angle relative to the Y axis can be determined according to the right-hand rotation rule. Specifically, the pointing direction of the thumb is perpendicular to the bending direction of the four fingers, the pointing direction of the thumb is the positive direction of the rotation axis, and the bending direction of the four fingers is the positive rotation direction to determine the rotation angle relative to the rotation axis.
根据本公开的实施例,本公开例如还可以根据待检测物体的中心点在构建的球坐标系中的方位角值和俯仰角值,来定位旋转位置。According to an embodiment of the present disclosure, the present disclosure can also locate the rotation position according to the azimuth angle value and the pitch angle value of the center point of the object to be detected in the constructed spherical coordinate system, for example.
根据本公开的实施例,在确定了映射关系后,即可实现待检测物体投影至预定二维平面的尺寸信息与待检测物体在预定三维空间中的尺寸信息之间的转换。待检测物体在预定二维空间的展示形式通常为矩形框420形式,则待检测物体投影至预定二维平面的尺寸信息可以包括待检测物体的宽度和待检测物体的高度。例如,在如图4所示的实施例400中,投影至预定二维平面的尺寸信息包括宽度c 431和高度d 432。待检测物体的中心点p投影至预定二维平面对应至点p’。According to the embodiments of the present disclosure, after the mapping relationship is determined, the conversion between the size information of the object to be detected projected to the predetermined two-dimensional plane and the size information of the object to be detected in the predetermined three-dimensional space can be realized. The display form of the object to be detected in the predetermined two-dimensional space is usually in the form of a rectangular frame 420, and the size information of the object to be detected projected onto the predetermined two-dimensional plane may include the width of the object to be detected and the height of the object to be detected. For example, in the embodiment 400 shown in FIG. 4 , the size information projected to a predetermined two-dimensional plane includes a width c 431 and a height d 432 . The center point p of the object to be detected is projected onto a predetermined two-dimensional plane corresponding to point p'.
根据本公开的实施例,可以根据每个待检测物体的宽度和映射关系, 确定每个待检测物体的包围盒的第一尺寸信息。该第一尺寸信息例如可以表示包围盒在基于预定三维空间构建的球坐标系中的方位尺寸的一半,即将该宽度映射至预定三维空间时,以待检测物体的中心点为原点,在水平方向转动的角度绝对值的上限值。可以根据每个待检测物体的高度和映射关系,确定每个检测物体的包围盒的第二尺寸信息。该第二尺寸信息例如可以表示包围盒在基于预定三维空间构建的球坐标系中的俯仰尺寸,即将该高度映射至预定三维空间时,以待检测物体的中心点为原点,允许在俯仰方向转动的角度绝对值的上限值。According to an embodiment of the present disclosure, the first size information of the bounding box of each object to be detected can be determined according to the width and mapping relationship of each object to be detected. For example, the first size information may represent half of the azimuth size of the bounding box in the spherical coordinate system constructed based on the predetermined three-dimensional space, that is, when the width is mapped to the predetermined three-dimensional space, the center point of the object to be detected is taken as the origin, in the horizontal direction The upper limit of the absolute value of the rotation angle. The second size information of the bounding box of each object to be detected may be determined according to the height and mapping relationship of each object to be detected. The second size information may, for example, represent the pitch size of the bounding box in the spherical coordinate system constructed based on the predetermined three-dimensional space, that is, when the height is mapped to the predetermined three-dimensional space, the center point of the object to be detected is taken as the origin, allowing rotation in the pitch direction The upper limit of the absolute value of the angle.
示例性地,如图4所示,根据待检测物体的宽度c 431和前文确定的映射关系M 440,可以确定包围盒在基于预定三维空间构建的球坐标系中的方位尺寸为c*M,则第一尺寸信息451可以表示为W=0.5*c*M。根据待检测物体的高度d 432和前文确定的映射关系M 440,可以得到包围盒在基于预定三维空间构建的球坐标系中的俯仰尺寸为d*M,则第二尺寸信息452可以表示为H=0.5*d*M。Exemplarily, as shown in FIG. 4 , according to the width c 431 of the object to be detected and the mapping relationship M 440 determined above, it can be determined that the azimuth size of the bounding box in the spherical coordinate system constructed based on the predetermined three-dimensional space is c*M, Then the first size information 451 can be expressed as W=0.5*c*M. According to the height d 432 of the object to be detected and the mapping relationship M 440 determined above, it can be obtained that the pitch size of the bounding box in the spherical coordinate system constructed based on the predetermined three-dimensional space is d*M, then the second size information 452 can be expressed as H =0.5*d*M.
示例性地,在待检测物体的包围盒在预定二维平面为矩形时,前述确定的第一尺寸信息451和第二尺寸信息452即为包围盒的尺寸信息,待检测物体在预定三维空间中的旋转位置的坐标值和该尺寸信息共同构成包围盒信息。通过设置该在预定二维平面为矩形的包围盒,可以使得包围盒在完全包围待检测物体的同时,尽可能减小包围盒的尺寸,并因此可以提高确定的碰撞结果的精准度,避免对碰撞结果误判的情况。Exemplarily, when the bounding box of the object to be detected is rectangular in the predetermined two-dimensional plane, the first size information 451 and the second size information 452 determined above are the size information of the bounding box, and the object to be detected is in the predetermined three-dimensional space. The coordinate value of the rotation position of , and the size information together constitute the bounding box information. By setting the bounding box that is rectangular on the predetermined two-dimensional plane, the bounding box can completely surround the object to be detected, and at the same time, the size of the bounding box can be reduced as much as possible. Misjudgment of the collision result.
示例性地,在待检测物体的包围盒在预定二维平面中为圆形时,在确定了第一尺寸信息451和第二尺寸信息452后,例如还可以将该第一尺寸信息451和第二尺寸信息452中的较大值作为待检测物体的包围盒的尺寸信息,以此保证包围盒能够完全包围待检测物体。具体地,可以确定待检测物体的包围盒的尺寸信息为R=max(H,W)。Exemplarily, when the bounding box of the object to be detected is a circle in a predetermined two-dimensional plane, after the first size information 451 and the second size information 452 are determined, for example, the first size information 451 and the second size information 451 may also be determined. The larger value in the two size information 452 is used as the size information of the bounding box of the object to be detected, so as to ensure that the bounding box can completely surround the object to be detected. Specifically, it can be determined that the size information of the bounding box of the object to be detected is R=max(H, W).
图5是根据本公开实施例的确定两个待检测物体的碰撞结果的原理示意图。FIG. 5 is a schematic diagram of the principle of determining a collision result of two objects to be detected according to an embodiment of the present disclosure.
根据本公开的实施例,如图5所示,在包围盒投影至预定二维平面得到的形状为矩形时,该实施例500通过将两个待检测物体的两个包围盒投影至预定二维平面,例如可以得到矩形510和矩形520。为了使得两个待 检测物体投影至预定二维平面时不重叠,则需要该矩形510和矩形520不重叠。即需要矩形510与矩形520满足以下条件:该矩形510的一半宽w 1与矩形520的一半宽w 2小于或等于点p 1’与点p 2’在该宽度方向的距离,矩形510的一半高h 1与矩形520的一半高h 2小于或等于点p 1’与点p 2’在该高度方向的距离。其中,p 1’为两个待检测物体中其中一个待检测物体投影至预定二维平面的中心点(也即该其中一个待检测物体的包围盒投影至预定二维平面的中心点),p 2’为两个待检测物体中其中另一个待检测物体投影至预定二维平面的中心点(也即该其中另一个待检测物体的包围盒投影至预定二维平面的中心点)。将该条件根据映射关系映射至预定三维空间,即可得到以下条件: According to an embodiment of the present disclosure, as shown in FIG. 5 , when the shape obtained by projecting the bounding box onto a predetermined two-dimensional plane is a rectangle, the embodiment 500 projects two bounding boxes of two objects to be detected onto a predetermined two-dimensional plane. Plane, for example, rectangle 510 and rectangle 520 can be obtained. In order that the two objects to be detected do not overlap when projected onto the predetermined two-dimensional plane, it is required that the rectangle 510 and the rectangle 520 do not overlap. That is, the rectangle 510 and the rectangle 520 need to meet the following conditions: the half width w 1 of the rectangle 510 and the half width w 2 of the rectangle 520 are less than or equal to the distance between the point p 1 ' and the point p 2 ' in the width direction, half of the rectangle 510 The height h 1 and the half height h 2 of the rectangle 520 are less than or equal to the distance between the point p 1 ' and the point p 2 ' in the height direction. Wherein, p 1 ' is the center point of the projection of one of the two objects to be detected on the predetermined two-dimensional plane (that is, the center point of the bounding box of the one of the objects to be detected projected to the predetermined two-dimensional plane), p 2 ' is the center point of the projection of the other object to be detected on the predetermined two-dimensional plane (that is, the center point of the projection of the bounding box of the other object to be detected to the predetermined two-dimensional plane). By mapping this condition to a predetermined three-dimensional space according to the mapping relationship, the following conditions can be obtained:
(W 1+W 2)≤diffλ,其中,diffλ=|λ 12|; (W 1 +W 2 )≤diffλ, where diffλ=|λ 1 −λ 2 |;
Figure PCTCN2021130014-appb-000002
其中,
Figure PCTCN2021130014-appb-000003
Figure PCTCN2021130014-appb-000002
in,
Figure PCTCN2021130014-appb-000003
其中,W 1为其中一个待检测物体的包围盒的第一尺寸信息,H 1为其中一个待检测物体的包围盒的第二尺寸信息。W 2为其中另一个待检测物体的包围盒的第一尺寸信息,H 2为其中另一个待检测物体的包围盒的第二尺寸信息。λ 1为其中一个待检测物体的第一旋转角度,即前文描述的相对于Y轴的旋转角度,
Figure PCTCN2021130014-appb-000004
为其中一个待检测物体的第二旋转角度,即前文描述的相对于X轴的旋转角度。λ 2为其中另一个待检测物体的第一旋转角度,即前文描述的相对于Y轴的旋转角度,
Figure PCTCN2021130014-appb-000005
为其中另一个待检测物体的第二旋转角度,即前文描述的相对于X轴的旋转角度。
Wherein, W 1 is the first size information of the bounding box of one of the objects to be detected, and H 1 is the second size information of the bounding box of one of the objects to be detected. W 2 is the first size information of the bounding box of the other object to be detected, and H 2 is the second size information of the bounding box of the other object to be detected. λ 1 is the first rotation angle of one of the objects to be detected, that is, the rotation angle relative to the Y axis described above,
Figure PCTCN2021130014-appb-000004
is the second rotation angle of one of the objects to be detected, that is, the rotation angle relative to the X-axis described above. λ 2 is the first rotation angle of the other object to be detected, that is, the rotation angle relative to the Y-axis described above,
Figure PCTCN2021130014-appb-000005
is the second rotation angle of the other object to be detected, that is, the rotation angle relative to the X-axis described above.
该实施例在确定两个待检测物体的碰撞结果时,可以先确定两个待检测物体的两个第一旋转角度之间的第一差值diffλ,并确定两个待检测物体的两个第二旋转角度之间的第二差值
Figure PCTCN2021130014-appb-000006
基于前述确定的包围盒的尺寸,确定两个待检测物体的两个包围盒的第一尺寸信息的和,以得到第一尺寸和(W 1+W 2),并确定两个待检测物体的两个包围盒的第二尺寸信息的和,以得到第二尺寸和(H 1+H 2)。根据该第一差值diffλ与第一尺寸和(W 1+W 2)之间的大小关系,及第二差值
Figure PCTCN2021130014-appb-000007
与第二尺寸和(H 1+H 2)之间的大小关系,确定两个待检测物体的碰撞结果。若第一尺寸和(W 1+W 2)大于第一差值diffλ,或第二尺寸和(H 1+H 2)大于第二差值
Figure PCTCN2021130014-appb-000008
则确定碰撞结果为相碰撞,否则可以确定碰撞结果为不相碰撞。
In this embodiment, when determining the collision result of the two objects to be detected, the first difference value diffλ between the two first rotation angles of the two objects to be detected can be determined first, and the two first rotation angles of the two objects to be detected can be determined. The second difference between the two rotation angles
Figure PCTCN2021130014-appb-000006
Based on the size of the bounding box determined above, determine the sum of the first size information of the two bounding boxes of the two objects to be detected, so as to obtain the first size sum (W 1 +W 2 ), and determine the size of the two objects to be detected. The sum of the second size information of the two bounding boxes to obtain the second size sum (H 1 +H 2 ). According to the magnitude relationship between the first difference diffλ and the first size sum (W 1 +W 2 ), and the second difference
Figure PCTCN2021130014-appb-000007
The size relationship between the second size and (H 1 +H 2 ) determines the collision result of the two objects to be detected. If the first size sum (W 1 +W 2 ) is greater than the first difference diffλ, or the second size sum (H 1 +H 2 ) is greater than the second difference
Figure PCTCN2021130014-appb-000008
Then it is determined that the collision result is a collision; otherwise, it can be determined that the collision result is a non-collision.
图6是根据本公开另一实施例的确定两个待检测物体的碰撞结果的原理示意图。FIG. 6 is a schematic diagram of a principle of determining a collision result of two objects to be detected according to another embodiment of the present disclosure.
根据本公开的实施例,如图6所示,在包围盒投影至预定二维平面得到的形状为圆形时,该实施例600通过将两个待检测物体的两个包围盒投影至预定二维平面,例如可以得到圆610和圆620。为了使得两个待检测物体投影至预定二维平面时不重叠,则需要圆610和圆620不重叠。即需要圆610与圆620满足以下条件:圆610的半径r 1与圆620的半径r 2小于或等于点p 1’与点p 2’之间的距离。其中,p 1’为两个待检测物体中其中一个待检测物体投影至预定二维平面的中心点(也即该其中一个待检测物体的包围盒投影至预定二维平面的中心点),p 2’为两个待检测物体中其中另一个待检测物体投影至预定二维平面的中心点(也即该其中另一个待检测物体的包围盒投影至预定二维平面的中心点)。将该条件根据映射关系映射至预定三维空间,即可得到以下条件: According to an embodiment of the present disclosure, as shown in FIG. 6 , when the shape obtained by projecting the bounding box onto a predetermined two-dimensional plane is a circle, the embodiment 600 projects two bounding boxes of two objects to be detected onto a predetermined two-dimensional plane. Dimension plane, for example, circle 610 and circle 620 can be obtained. In order to make the two objects to be detected do not overlap when projected onto the predetermined two-dimensional plane, it is required that the circle 610 and the circle 620 do not overlap. That is, the circle 610 and the circle 620 need to satisfy the following conditions: the radius r 1 of the circle 610 and the radius r 2 of the circle 620 are less than or equal to the distance between the point p 1 ′ and the point p 2 ′. Wherein, p 1 ' is the center point of the projection of one of the two objects to be detected on the predetermined two-dimensional plane (that is, the center point of the bounding box of the one of the objects to be detected projected to the predetermined two-dimensional plane), p 2 ' is the center point of the projection of the other object to be detected on the predetermined two-dimensional plane (that is, the center point of the projection of the bounding box of the other object to be detected to the predetermined two-dimensional plane). By mapping this condition to a predetermined three-dimensional space according to the mapping relationship, the following conditions can be obtained:
Figure PCTCN2021130014-appb-000009
其中,diffλ=|λ 12|,
Figure PCTCN2021130014-appb-000010
Figure PCTCN2021130014-appb-000009
where diffλ=|λ 12 |,
Figure PCTCN2021130014-appb-000010
其中,R 1为其中一个待检测物体的包围盒的尺寸信息。R 2为其中另一个待检测物体的包围盒的尺寸信息,λ 1为其中一个待检测物体的第一旋转角度,即前文描述的相对于Y轴的旋转角度,
Figure PCTCN2021130014-appb-000011
为其中一个待检测物体的第二旋转角度,即前文描述的相对于X轴的旋转角度。λ 2为其中另一个待检测物体的第一旋转角度,即前文描述的相对于Y轴的旋转角度,
Figure PCTCN2021130014-appb-000012
为其中另一个待检测物体的第二旋转角度,即前文描述的相对于X轴的旋转角度。
Among them, R 1 is the size information of the bounding box of one of the objects to be detected. R 2 is the size information of the bounding box of the other object to be detected, λ 1 is the first rotation angle of one of the objects to be detected, that is, the rotation angle relative to the Y axis described above,
Figure PCTCN2021130014-appb-000011
is the second rotation angle of one of the objects to be detected, that is, the rotation angle relative to the X-axis described above. λ 2 is the first rotation angle of the other object to be detected, that is, the rotation angle relative to the Y-axis described above,
Figure PCTCN2021130014-appb-000012
is the second rotation angle of the other object to be detected, that is, the rotation angle relative to the X-axis described above.
该实施例在确定两个待检测物体的碰撞结果时,可以先确定两个待检测物体的两个第一旋转角度之间的第一差值diffλ,并确定两个待检测物体的两个第二旋转角度之间的第二差值
Figure PCTCN2021130014-appb-000013
基于前述确定的包围盒的尺寸,确定两个待检测物体的两个包围盒的尺寸信息的和,得到尺寸和(R 1+R 2)。根据该第一差值diffλ和第二差值
Figure PCTCN2021130014-appb-000014
的算术平方根
Figure PCTCN2021130014-appb-000015
Figure PCTCN2021130014-appb-000016
与尺寸和(R 1+R 2)之间的大小关系,确定两个待检测物体的碰撞结果。若尺寸和(R 1+R 2)大于算术平方根
Figure PCTCN2021130014-appb-000017
则确定碰撞结果为相碰撞,否则可以确定碰撞结果为不相碰撞。
In this embodiment, when determining the collision result of the two objects to be detected, the first difference value diffλ between the two first rotation angles of the two objects to be detected can be determined first, and the two first rotation angles of the two objects to be detected can be determined. The second difference between the two rotation angles
Figure PCTCN2021130014-appb-000013
Based on the size of the bounding box determined above, the sum of the size information of the two bounding boxes of the two objects to be detected is determined, and the size sum (R 1 +R 2 ) is obtained. According to the first difference diffλ and the second difference
Figure PCTCN2021130014-appb-000014
arithmetic square root of
Figure PCTCN2021130014-appb-000015
Figure PCTCN2021130014-appb-000016
The size relationship between the size and (R 1 +R 2 ) determines the collision result of the two objects to be detected. If the sum of dimensions (R 1 +R 2 ) is greater than the arithmetic square root
Figure PCTCN2021130014-appb-000017
Then it is determined that the collision result is a collision; otherwise, it can be determined that the collision result is a non-collision.
在一地图导航的全景场景中,可以将向全景画面中的实体添加的标签 作为待检测物体,采用前文描述的针对物体的碰撞检测方法对任意两个待检测物体进行碰撞检测。从而得到添加的所有标签中,在全景展示时会相互重叠的标签。对于会相互重叠的两个标签,例如可以根据为该两个标签预先分配的权重值,从两个标签中选择权重值高的标签进行展示。通过该方式,可以优化地图导航的全景场景中,当前视野内的整体视觉体验,并因此可以提高用户体验。可以理解的是,预先分配的权重值可以根据实际需求进行设定,例如可以根据点击频率进行设定,点击频率越高,则预先分配的权重值越大。In a panorama scene of map navigation, the tag added to the entity in the panorama screen can be used as the object to be detected, and the collision detection method for objects described above can be used to perform collision detection on any two objects to be detected. In this way, among all the added tags, the tags that will overlap each other when the panorama is displayed. For two tags that overlap each other, for example, a tag with a higher weight value may be selected from the two tags for display according to the pre-assigned weight value for the two tags. In this way, the overall visual experience in the current field of view in the panoramic scene of map navigation can be optimized, and thus the user experience can be improved. It can be understood that the pre-allocated weight value can be set according to actual needs, for example, it can be set according to the click frequency. The higher the click frequency, the larger the pre-allocated weight value.
可以理解的是,上述标签作为待检测物体的实例仅作为示例以利于理解本公开,本公开提供的针对物体的碰撞检测方法,可以应用于任意需要进行碰撞检测的场景中。It can be understood that the above tags are used as examples of objects to be detected only to facilitate understanding of the present disclosure, and the collision detection method for objects provided in the present disclosure can be applied to any scene requiring collision detection.
基于上述的针对物体的碰撞检测方法,本公开还提供了一种针对物体的碰撞检测装置,以下将结合图7对该装置进行详细描述。Based on the above-mentioned collision detection method for objects, the present disclosure further provides a collision detection device for objects, which will be described in detail below with reference to FIG. 7 .
图7是根据本公开实施例的针对物体的碰撞检测装置的结构框图。FIG. 7 is a structural block diagram of a collision detection apparatus for an object according to an embodiment of the present disclosure.
如图7所示,该实施例的针对物体的碰撞检测装置700可以包括信息获取模块710、尺寸信息确定模块730和碰撞结果确定模块750。As shown in FIG. 7 , the collision detection apparatus 700 for objects in this embodiment may include an information acquisition module 710 , a size information determination module 730 and a collision result determination module 750 .
信息获取模块710用于获取两个待检测物体各自的属性信息,该属性信息包括待检测物体相对于预定三维空间的旋转位置和待检测物体投影至预定二维平面的尺寸信息。在一实施例中,该信息获取模块710例如可以用于执行前文描述的操作S210,在此不再赘述。The information acquisition module 710 is configured to acquire respective attribute information of the two objects to be detected, the attribute information includes the rotational position of the objects to be detected relative to a predetermined three-dimensional space and size information of the objects to be detected projected onto a predetermined two-dimensional plane. In an embodiment, the information acquisition module 710 may be configured to perform, for example, the operation S210 described above, which will not be repeated here.
尺寸信息确定模块730用于基于两个待检测物体中每个待检测物体的尺寸信息,确定每个待检测物体的包围盒的尺寸信息,该包围盒以待检测物体的旋转位置为中心。在一实施例中,该尺寸信息确定模块730例如可以用于执行前文描述的操作S230,在此不再赘述。The size information determination module 730 is configured to determine size information of a bounding box of each object to be detected based on the size information of each of the two objects to be detected, the bounding box being centered on the rotational position of the object to be detected. In an embodiment, the size information determination module 730 may be configured to perform, for example, the operation S230 described above, which will not be repeated here.
碰撞结果确定模块750用于根据两个待检测物体的旋转位置和两个待检测物体的包围盒的尺寸信息,确定两个待检测物体的碰撞结果。在一实施例中,该碰撞结果确定模块750例如可以用于执行前文描述的操作S250,在此不再赘述。The collision result determination module 750 is configured to determine the collision result of the two objects to be detected according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected. In an embodiment, the collision result determination module 750 may be configured to perform, for example, the operation S250 described above, which will not be repeated here.
根据本公开的实施例,上述尺寸信息确定模块730例如可以包括映射关系确定子模块和尺寸信息确定子模块。映射关系确定子模块用于确定预 定二维平面与预定三维空间之间的映射关系。尺寸信息确定子模块用于基于映射关系和每个待检测物体的尺寸信息,确定每个待检测物体的包围盒的尺寸信息。According to an embodiment of the present disclosure, the size information determination module 730 may include, for example, a mapping relationship determination submodule and a size information determination submodule. The mapping relationship determination submodule is used to determine the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space. The size information determination submodule is configured to determine the size information of the bounding box of each object to be detected based on the mapping relationship and the size information of each object to be detected.
根据本公开的实施例,上述映射关系确定子模块包括视角值获取单元、宽度获取单元和关系确定单元。视角值获取单元用于获取预定三维空间的中心点在预定方向针对预定二维平面的视角值。宽度获取单元用于获取预定二维平面在预定方向的宽度。关系确定单元用于确定预定二维平面与预定三维空间之间的映射关系为视角值与宽度的比值。According to an embodiment of the present disclosure, the above-mentioned mapping relationship determination submodule includes a viewing angle value acquisition unit, a width acquisition unit, and a relationship determination unit. The viewing angle value acquiring unit is used for acquiring the viewing angle value of the center point of the predetermined three-dimensional space in the predetermined direction with respect to the predetermined two-dimensional plane. The width acquiring unit is used for acquiring the width of the predetermined two-dimensional plane in the predetermined direction. The relationship determining unit is configured to determine the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space as the ratio of the viewing angle value to the width.
根据本公开的实施例,上述待检测物体相对于三维空间的旋转位置包括:待检测物体的中心点在基于预定三维空间构建的球坐标系中,以第一坐标轴为旋转轴的第一旋转角度;以及待检测物体的中心点在基于预定三维空间构建的球坐标系中,以第二坐标轴为旋转轴的第二旋转角度。其中,第一坐标轴和第二坐标轴相互垂直。According to an embodiment of the present disclosure, the above-mentioned rotational position of the object to be detected relative to the three-dimensional space includes: a center point of the object to be detected is in a spherical coordinate system constructed based on a predetermined three-dimensional space, and a first rotation with the first coordinate axis as the rotation axis angle; and a second rotation angle of the center point of the object to be detected in a spherical coordinate system constructed based on a predetermined three-dimensional space, with the second coordinate axis as the rotation axis. Wherein, the first coordinate axis and the second coordinate axis are perpendicular to each other.
根据本公开的实施例,待检测物体投影至预定二维平面的尺寸信息包括待检测物体的宽度和待检测物体的高度。上述尺寸信息确定子模块例如可以包括方位尺寸确定单元和俯仰尺寸确定单元。方位尺寸确定单元用于根据每个待检测物体的宽度和映射关系,确定每个待检测物体的包围盒的第一尺寸信息,该第一尺寸信息包括包围盒在基于预定三维空间构建的球坐标系中的方位尺寸的一半。俯仰尺寸确定单元用于根据每个待检测物体的高度和映射关系,确定每个待检测物体的包围盒的第二尺寸信息,该第二尺寸信息包括包围盒在基于预定三维空间构建的球坐标系中的俯仰尺寸的一半。According to an embodiment of the present disclosure, the size information of the object to be detected projected onto the predetermined two-dimensional plane includes the width of the object to be detected and the height of the object to be detected. The size information determination submodule may include, for example, an azimuth size determination unit and an elevation size determination unit. The azimuth size determining unit is used to determine the first size information of the bounding box of each object to be detected according to the width and mapping relationship of each object to be detected, the first size information including the spherical coordinates of the bounding box constructed based on the predetermined three-dimensional space half of the azimuth dimension in the system. The pitch size determination unit is used to determine the second size information of the bounding box of each object to be detected according to the height of each object to be detected and the mapping relationship, the second size information includes the spherical coordinates of the bounding box constructed based on the predetermined three-dimensional space Half the pitch size in the system.
根据本公开的实施例,上述碰撞结果确定模块例如可以包括第一差值确定子模块、第一尺寸和确定子模块和第一碰撞确定子模块。第一差值确定子模块用于确定两个待检测物体的两个第一旋转角度之间的第一差值,并确定两个待检测物体的两个第二旋转角度之间的第二差值。第一尺寸和确定子模块用于确定两个待检测物体的两个包围盒的第一尺寸信息的和,得到第一尺寸和;并用于确定两个待检测物体的两个包围盒的第二尺寸信息的和,得到第二尺寸和。第一碰撞确定子模块用于基于第一差值与第一尺寸和之间的大小关系及第二差值与第二尺寸和之间的大小关系,确定两 个待检测物体的碰撞结果。According to an embodiment of the present disclosure, the aforementioned collision result determination module may include, for example, a first difference determination submodule, a first size and determination submodule, and a first collision determination submodule. The first difference determination submodule is used to determine the first difference between the two first rotation angles of the two objects to be detected, and to determine the second difference between the two second rotation angles of the two objects to be detected value. The first size sum determination submodule is used to determine the sum of the first size information of the two bounding boxes of the two objects to be detected, and obtain the first size sum; and is used to determine the second size of the two bounding boxes of the two objects to be detected. The sum of the size information, the second size sum is obtained. The first collision determination submodule is configured to determine the collision result of the two objects to be detected based on the size relationship between the first difference value and the first size sum and the size relationship between the second difference value and the second size sum.
根据本公开的实施例,上述尺寸信息确定子模块还包括尺寸信息确定单元,用于确定第一尺寸信息和第二尺寸信息中的较大值为每个待检测物体的包围盒的尺寸信息。According to an embodiment of the present disclosure, the size information determination submodule further includes a size information determination unit for determining the larger value of the first size information and the second size information as size information of the bounding box of each object to be detected.
根据本公开的实施例,上述碰撞结果确定模块包括第二差值确定子模块、第二尺寸和确定子模块和第二碰撞确定子模块。第二差值确定子模块用于确定两个待检测物体的两个第一旋转角度之间的第一差值,并用于确定两个待检测物体的两个第二旋转角度之间的第二差值。第二尺寸和确定子模块用于确定两个待检测物体的两个包围盒的尺寸信息的和,得到尺寸和。第二碰撞确定子模块用于基于第一差值和所述第二差值的算术平方根与尺寸和之间的大小关系,确定两个待检测物体的碰撞结果。According to an embodiment of the present disclosure, the above-mentioned collision result determination module includes a second difference determination submodule, a second size and determination submodule, and a second collision determination submodule. The second difference determination submodule is used to determine the first difference between the two first rotation angles of the two objects to be detected, and to determine the second difference between the two second rotation angles of the two objects to be detected difference. The second size sum determination submodule is used to determine the sum of the size information of the two bounding boxes of the two objects to be detected, and obtain the size sum. The second collision determination sub-module is configured to determine the collision result of the two objects to be detected based on the magnitude relationship between the first difference value and the arithmetic square root of the second difference value and the size sum.
本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved are all in compliance with relevant laws and regulations, and do not violate public order and good customs.
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
图8示出了可以用来实施本公开的针对物体的碰撞检测方法的示例电子设备800的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。8 shows a schematic block diagram of an example electronic device 800 that may be used to implement the method of collision detection for objects of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图8所示,设备800包括计算单元801,其可以根据存储在只读存储器(ROM)802中的计算机程序或者从存储单元808加载到随机访问存储器(RAM)803中的计算机程序,来执行各种适当的动作和处理。在RAM 803中,还可存储设备800操作所需的各种程序和数据。计算单元801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。As shown in FIG. 8 , the device 800 includes a computing unit 801 that can be executed according to a computer program stored in a read only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803 Various appropriate actions and handling. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input/output (I/O) interface 805 is also connected to bus 804 .
设备800中的多个部件连接至I/O接口805,包括:输入单元806,例如键盘、鼠标等;输出单元807,例如各种类型的显示器、扬声器等;存储单元808,例如磁盘、光盘等;以及通信单元809,例如网卡、调制解调器、无线通信收发机等。通信单元809允许设备800通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Various components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc. ; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 809 allows the device 800 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
计算单元801可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元801的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元801执行上文所描述的各个方法和处理,例如针对物体的碰撞检测方法。例如,在一些实施例中,针对物体的碰撞检测方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元808。在一些实施例中,计算机程序的部分或者全部可以经由ROM 802和/或通信单元809而被载入和/或安装到设备800上。当计算机程序加载到RAM 803并由计算单元801执行时,可以执行上文描述的针对物体的碰撞检测方法的一个或多个步骤。备选地,在其他实施例中,计算单元801可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行针对物体的碰撞检测方法。 Computing unit 801 may be various general-purpose and/or special-purpose processing components with processing and computing capabilities. Some examples of computing units 801 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various specialized artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as collision detection methods for objects. For example, in some embodiments, a collision detection method for an object may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 808 . In some embodiments, part or all of the computer program may be loaded and/or installed on device 800 via ROM 802 and/or communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the collision detection method for an object described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform a collision detection method for an object by any other suitable means (eg, by means of firmware).
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein above may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其 他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, performs the functions/functions specified in the flowcharts and/or block diagrams. Action is implemented. The program code may execute entirely on the machine, partly on the machine, partly on the machine and partly on a remote machine as a stand-alone software package or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a distributed system server, or a server combined with blockchain.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the present disclosure can be executed in parallel, sequentially, or in different orders. As long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, there is no limitation herein.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure should be included within the protection scope of the present disclosure.

Claims (19)

  1. 一种针对物体的碰撞检测方法,包括:A collision detection method for objects, comprising:
    获取两个待检测物体各自的属性信息,所述属性信息包括所述待检测物体相对于预定三维空间的旋转位置和所述待检测物体投影至预定二维平面的尺寸信息;Acquiring respective attribute information of the two objects to be detected, the attribute information includes the rotational position of the object to be detected relative to a predetermined three-dimensional space and size information of the object to be detected projected onto a predetermined two-dimensional plane;
    基于两个所述待检测物体中每个所述待检测物体的尺寸信息,确定每个所述待检测物体的包围盒的尺寸信息,所述包围盒以所述待检测物体的旋转位置为中心;以及Based on the size information of each of the two objects to be detected, the size information of the bounding box of each of the objects to be detected is determined, and the bounding box is centered on the rotational position of the object to be detected ;as well as
    根据两个所述待检测物体的旋转位置和两个所述待检测物体的包围盒的尺寸信息,确定两个所述待检测物体的碰撞结果。According to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected, a collision result of the two objects to be detected is determined.
  2. 根据权利要求1所述的方法,其中,确定每个所述待检测物体的包围盒的尺寸信息包括:The method according to claim 1, wherein determining the size information of the bounding box of each of the objects to be detected comprises:
    确定所述预定二维平面与所述预定三维空间之间的映射关系;以及determining a mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space; and
    基于所述映射关系和每个所述待检测物体的尺寸信息,确定每个所述待检测物体的包围盒的尺寸信息。Based on the mapping relationship and size information of each of the objects to be detected, the size information of the bounding box of each of the objects to be detected is determined.
  3. 根据权利要求2所述的方法,其中,所述确定所述预定二维平面与所述预定三维空间之间的映射关系包括:The method according to claim 2, wherein the determining the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space comprises:
    获取所述预定三维空间的中心点在预定方向针对所述预定二维平面的视角值;acquiring a viewing angle value of the center point of the predetermined three-dimensional space in a predetermined direction with respect to the predetermined two-dimensional plane;
    获取所述预定二维平面在所述预定方向的宽度;以及obtaining the width of the predetermined two-dimensional plane in the predetermined direction; and
    确定所述预定二维平面与所述预定三维空间之间的映射关系为所述视角值与所述宽度的比值。The mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space is determined as the ratio of the viewing angle value to the width.
  4. 根据权利要求2或3所述的方法,其中,所述待检测物体相对于三维空间的旋转位置包括:The method according to claim 2 or 3, wherein the rotational position of the object to be detected relative to the three-dimensional space comprises:
    所述待检测物体的中心点在基于所述预定三维空间构建的球坐标系中,以第一坐标轴为旋转轴的第一旋转角度;以及The center point of the object to be detected is in the spherical coordinate system constructed based on the predetermined three-dimensional space, and the first coordinate axis is the first rotation angle of the rotation axis; and
    所述待检测物体的中心点在基于所述预定三维空间构建的球坐标系中,以第二坐标轴为旋转轴的第二旋转角度,The center point of the object to be detected is in the spherical coordinate system constructed based on the predetermined three-dimensional space, and the second coordinate axis is the second rotation angle of the rotation axis,
    其中,所述第一坐标轴和所述第二坐标轴相互垂直。Wherein, the first coordinate axis and the second coordinate axis are perpendicular to each other.
  5. 根据权利要求4所述的方法,其中,所述待检测物体投影至所述预定二维平面的尺寸信息包括所述待检测物体的宽度和所述待检测物体的高度;确定针对每个所述待检测物体的包围盒的尺寸信息包括:The method according to claim 4, wherein the size information of the object to be detected projected to the predetermined two-dimensional plane includes the width of the object to be detected and the height of the object to be detected; The size information of the bounding box of the object to be detected includes:
    根据每个所述待检测物体的宽度和所述映射关系,确定每个所述待检测物体的包围盒的第一尺寸信息,所述第一尺寸信息包括所述包围盒在基于所述预定三维空间构建的球坐标系中的方位尺寸的一半;以及According to the width of each object to be detected and the mapping relationship, first size information of the bounding box of each object to be detected is determined, and the first size information includes the bounding box based on the predetermined three-dimensional half of the azimuth dimension in the spatially constructed spherical coordinate system; and
    根据每个所述待检测物体的高度和所述映射关系,确定每个所述待检测物体的包围盒的第二尺寸信息,所述第二尺寸信息包括所述包围盒在基于所述预定三维空间构建的球坐标系中的俯仰尺寸的一半。According to the height of each object to be detected and the mapping relationship, second size information of the bounding box of each object to be detected is determined, and the second size information includes the bounding box based on the predetermined three-dimensional Half of the pitch dimension in the spatially constructed spherical coordinate system.
  6. 根据权利要求5所述的方法,其中,确定所述两个待检测物体的碰撞结果包括:The method according to claim 5, wherein determining the collision result of the two objects to be detected comprises:
    确定两个所述待检测物体的两个第一旋转角度之间的第一差值,并确定两个所述待检测物体的两个第二旋转角度之间的第二差值;determining a first difference between two first rotation angles of the two objects to be detected, and determining a second difference between two second rotation angles of the two objects to be detected;
    确定两个所述待检测物体的两个包围盒的第一尺寸信息的和,得到第一尺寸和;并确定两个所述待检测物体的两个包围盒的第二尺寸信息的和,得到第二尺寸和;以及Determine the sum of the first size information of the two bounding boxes of the two objects to be detected, and obtain the first size sum; and determine the sum of the second size information of the two bounding boxes of the two objects to be detected, and obtain the second dimension and; and
    基于所述第一差值与所述第一尺寸和之间的大小关系及所述第二差值与所述第二尺寸和之间的大小关系,确定两个所述待检测物体的碰撞结果。Based on the size relationship between the first difference value and the first size sum and the size relationship between the second difference value and the second size sum, determine the collision result of the two objects to be detected .
  7. 根据权利要求5所述的方法,其中,确定每个所述待检测物体的包围盒的尺寸信息还包括:The method according to claim 5, wherein determining the size information of the bounding box of each of the objects to be detected further comprises:
    确定所述第一尺寸信息和所述第二尺寸信息中的较大值为每个所述待检测物体的包围盒的尺寸信息。A larger value of the first size information and the second size information is determined as the size information of the bounding box of each of the objects to be detected.
  8. 根据权利要求7所述的方法,其中,确定两个所述待检测物体的碰撞结果包括:The method according to claim 7, wherein determining the collision result of the two objects to be detected comprises:
    确定两个所述待检测物体的两个第一旋转角度之间的第一差值,并确定两个所述待检测物体的两个第二旋转角度之间的第二差值;determining a first difference between two first rotation angles of the two objects to be detected, and determining a second difference between two second rotation angles of the two objects to be detected;
    确定两个所述待检测物体的两个包围盒的尺寸信息的和,得到尺寸和;以及Determine the sum of the size information of the two bounding boxes of the two objects to be detected, and obtain the size sum; and
    基于所述第一差值和所述第二差值的算术平方根与所述尺寸和之间 的大小关系,确定两个所述待检测物体的碰撞结果。Based on the magnitude relationship between the arithmetic square root of the first difference value and the second difference value and the size sum, a collision result of the two objects to be detected is determined.
  9. 一种针对物体的碰撞检测装置,包括:A collision detection device for objects, comprising:
    信息获取模块,用于获取两个待检测物体各自的属性信息,所述属性信息包括所述待检测物体相对于预定三维空间的旋转位置和所述待检测物体投影至预定二维平面的尺寸信息;The information acquisition module is used to acquire the respective attribute information of the two objects to be detected, the attribute information includes the rotational position of the object to be detected relative to the predetermined three-dimensional space and the size information of the object to be detected projected to the predetermined two-dimensional plane ;
    尺寸信息确定模块,用于基于两个所述待检测物体中每个所述待检测物体的尺寸信息,确定每个所述待检测物体的包围盒的尺寸信息,所述包围盒以所述待检测物体的旋转位置为中心;以及A size information determination module, configured to determine size information of a bounding box of each of the objects to be detected based on the size information of each of the two objects to be detected, the bounding box being the size of the object to be detected The rotational position of the detected object is centered; and
    碰撞结果确定模块,用于根据两个所述待检测物体的旋转位置和两个所述待检测物体的包围盒的尺寸信息,确定两个所述待检测物体的碰撞结果。The collision result determination module is configured to determine the collision result of the two objects to be detected according to the rotational positions of the two objects to be detected and the size information of the bounding boxes of the two objects to be detected.
  10. 根据权利要求9所述的装置,其中,所述尺寸信息确定模块包括:The apparatus of claim 9, wherein the size information determination module comprises:
    映射关系确定子模块,用于确定所述预定二维平面与所述预定三维空间之间的映射关系;以及a mapping relationship determination submodule, configured to determine a mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space; and
    尺寸信息确定子模块,用于基于所述映射关系和每个所述待检测物体的尺寸信息,确定每个所述待检测物体的包围盒的尺寸信息。The size information determination submodule is configured to determine the size information of the bounding box of each of the objects to be detected based on the mapping relationship and the size information of each of the objects to be detected.
  11. 根据权利要求10所述的装置,其中,所述映射关系确定子模块包括:The apparatus according to claim 10, wherein the mapping relationship determination submodule comprises:
    视角值获取单元,用于获取所述预定三维空间的中心点在预定方向针对所述预定二维平面的视角值;a viewing angle value obtaining unit, configured to obtain a viewing angle value of the center point of the predetermined three-dimensional space in a predetermined direction with respect to the predetermined two-dimensional plane;
    宽度获取单元,用于获取所述预定二维平面在所述预定方向的宽度;以及a width acquiring unit, configured to acquire the width of the predetermined two-dimensional plane in the predetermined direction; and
    关系确定单元,用于确定所述预定二维平面与所述预定三维空间之间的映射关系为所述视角值与所述宽度的比值。A relationship determination unit, configured to determine the mapping relationship between the predetermined two-dimensional plane and the predetermined three-dimensional space as the ratio of the viewing angle value to the width.
  12. 根据权利要求10或11所述的装置,其中,所述待检测物体相对于三维空间的旋转位置包括:The device according to claim 10 or 11, wherein the rotational position of the object to be detected relative to the three-dimensional space comprises:
    所述待检测物体的中心点在基于所述预定三维空间构建的球坐标系中,以第一坐标轴为旋转轴的第一旋转角度;以及The center point of the object to be detected is in the spherical coordinate system constructed based on the predetermined three-dimensional space, and the first coordinate axis is the first rotation angle of the rotation axis; and
    所述待检测物体的中心点在基于所述预定三维空间构建的球坐标系中,以第二坐标轴为旋转轴的第二旋转角度,The center point of the object to be detected is in the spherical coordinate system constructed based on the predetermined three-dimensional space, and the second coordinate axis is the second rotation angle of the rotation axis,
    其中,所述第一坐标轴和所述第二坐标轴相互垂直。Wherein, the first coordinate axis and the second coordinate axis are perpendicular to each other.
  13. 根据权利要求12所述的装置,其中,所述待检测物体投影至所述预定二维平面的尺寸信息包括所述待检测物体的宽度和所述待检测物体的高度;所述尺寸信息确定子模块包括:The device according to claim 12, wherein the size information of the object to be detected projected onto the predetermined two-dimensional plane includes the width of the object to be detected and the height of the object to be detected; the size information determiner Modules include:
    方位尺寸确定单元,用于根据每个所述待检测物体的宽度和所述映射关系,确定每个所述待检测物体的包围盒的第一尺寸信息,所述第一尺寸信息包括所述包围盒在基于所述预定三维空间构建的球坐标系中的方位尺寸的一半;以及an azimuth size determination unit, configured to determine first size information of the bounding box of each object to be detected according to the width of each object to be detected and the mapping relationship, where the first size information includes the bounding box of the object to be detected half the azimuthal dimension of the box in the spherical coordinate system constructed based on the predetermined three-dimensional space; and
    俯仰尺寸确定单元,用于根据每个所述待检测物体的高度和所述映射关系,确定每个所述待检测物体的包围盒的第二尺寸信息,所述第二尺寸信息包括所述包围盒在基于所述预定三维空间构建的球坐标系中的俯仰尺寸的一半。a pitch size determination unit, configured to determine second size information of the bounding box of each object to be detected according to the height of each object to be detected and the mapping relationship, where the second size information includes the bounding box of the object to be detected Half of the pitch size of the box in the spherical coordinate system constructed based on the predetermined three-dimensional space.
  14. 根据权利要求13所述的装置,其中,所述碰撞结果确定模块包括:The apparatus according to claim 13, wherein the collision result determination module comprises:
    第一差值确定子模块,用于确定两个所述待检测物体的两个第一旋转角度之间的第一差值,并确定两个所述待检测物体的两个第二旋转角度之间的第二差值;The first difference determination submodule is used to determine the first difference between the two first rotation angles of the two objects to be detected, and to determine the difference between the two second rotation angles of the two objects to be detected. the second difference between;
    第一尺寸和确定子模块,用于确定两个所述待检测物体的两个包围盒的第一尺寸信息的和,得到第一尺寸和;并用于确定两个所述待检测物体的两个包围盒的第二尺寸信息的和,得到第二尺寸和;以及A first size sum determination sub-module is used to determine the sum of the first size information of the two bounding boxes of the two objects to be detected, and obtain the first size sum; and is used to determine the two of the two objects to be detected. summing the second size information of the bounding box to obtain a second size sum; and
    第一碰撞确定子模块,用于基于所述第一差值与所述第一尺寸和之间的大小关系及所述第二差值与所述第二尺寸和之间的大小关系,确定两个所述待检测物体的碰撞结果。The first collision determination sub-module is configured to determine two collisions based on the size relationship between the first difference value and the first size sum and the size relationship between the second difference value and the second size sum. collision result of the object to be detected.
  15. 根据权利要求13所述的装置,其中,所述尺寸信息确定子模块还包括:The apparatus according to claim 13, wherein the size information determination submodule further comprises:
    尺寸信息确定单元,用于确定所述第一尺寸信息和所述第二尺寸信息中的较大值为每个所述待检测物体的包围盒的尺寸信息。A size information determination unit, configured to determine the larger value of the first size information and the second size information as size information of the bounding box of each of the objects to be detected.
  16. 根据权利要求15所述的装置,其中,所述碰撞结果确定模块包括:The apparatus of claim 15, wherein the collision result determination module comprises:
    第二差值确定子模块,用于确定两个所述待检测物体的两个第一旋转角度之间的第一差值,并用于确定两个所述待检测物体的两个第二旋转角度之间的第二差值;The second difference determination submodule is used to determine the first difference between the two first rotation angles of the two objects to be detected, and to determine the two second rotation angles of the two objects to be detected the second difference between;
    第二尺寸和确定子模块,用于确定两个所述待检测物体的两个包围盒的尺寸信息的和,得到尺寸和;以及a second size sum determination submodule, configured to determine the sum of the size information of the two bounding boxes of the two objects to be detected, and obtain the size sum; and
    第二碰撞确定子模块,用于基于所述第一差值和所述第二差值的算术平方根与所述尺寸和之间的大小关系,确定两个所述待检测物体的碰撞结果。A second collision determination submodule, configured to determine a collision result of the two objects to be detected based on the magnitude relationship between the arithmetic square root of the first difference and the second difference and the sum of the sizes.
  17. 一种电子设备,包括:An electronic device comprising:
    至少一个处理器;以及at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1~8中任一项所述的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the execution of any one of claims 1 to 8 Methods.
  18. 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1~8中任一项所述的方法。A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
  19. 一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1~8中任一项所述的方法。A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
PCT/CN2021/130014 2021-04-26 2021-11-11 Collision detection method and apparatus for objects, and device and storage medium WO2022227489A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2022525298A JP7422222B2 (en) 2021-04-26 2021-11-11 Collision detection method, apparatus, electronic device, storage medium and computer program for object
EP21881357.4A EP4102466A4 (en) 2021-04-26 2021-11-11 Collision detection method and apparatus for objects, and device and storage medium
KR1020227014744A KR20220063291A (en) 2021-04-26 2021-11-11 Method for detecting collision with an object, apparatus, electronic device, storage medium and computer program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110456769.4A CN113077548B (en) 2021-04-26 2021-04-26 Collision detection method, device, equipment and storage medium for object
CN202110456769.4 2021-04-26

Publications (1)

Publication Number Publication Date
WO2022227489A1 true WO2022227489A1 (en) 2022-11-03

Family

ID=76618937

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/130014 WO2022227489A1 (en) 2021-04-26 2021-11-11 Collision detection method and apparatus for objects, and device and storage medium

Country Status (2)

Country Link
CN (1) CN113077548B (en)
WO (1) WO2022227489A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113077548B (en) * 2021-04-26 2024-01-05 北京百度网讯科技有限公司 Collision detection method, device, equipment and storage medium for object
CN114898076B (en) * 2022-03-29 2023-04-21 北京城市网邻信息技术有限公司 Model label adding method and device, electronic equipment and storage medium
CN116049505B (en) * 2023-04-03 2023-06-23 杭州美创科技股份有限公司 Screen space tag collision detection method and device, computer equipment and storage medium
CN116541939B (en) * 2023-05-25 2024-01-30 驻马店市博瑞建筑工程有限公司 Collision detection method and system in bridge design

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102914267A (en) * 2012-09-27 2013-02-06 无锡天授信息科技有限公司 System and method for detecting size of moving object
CN105469406A (en) * 2015-11-30 2016-04-06 东北大学 Bounding box and space partitioning-based virtual object collision detection method
CN111437522A (en) * 2020-04-24 2020-07-24 上海联影医疗科技有限公司 Anti-collision method, device, equipment and storage medium
CN112245923A (en) * 2020-10-20 2021-01-22 珠海天燕科技有限公司 Collision detection method and device in game scene
CN113077548A (en) * 2021-04-26 2021-07-06 北京百度网讯科技有限公司 Collision detection method, device, equipment and storage medium for object

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9196083B2 (en) * 2012-01-16 2015-11-24 Intel Corporation Time-continuous collision detection using 3D rasterization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102914267A (en) * 2012-09-27 2013-02-06 无锡天授信息科技有限公司 System and method for detecting size of moving object
CN105469406A (en) * 2015-11-30 2016-04-06 东北大学 Bounding box and space partitioning-based virtual object collision detection method
CN111437522A (en) * 2020-04-24 2020-07-24 上海联影医疗科技有限公司 Anti-collision method, device, equipment and storage medium
CN112245923A (en) * 2020-10-20 2021-01-22 珠海天燕科技有限公司 Collision detection method and device in game scene
CN113077548A (en) * 2021-04-26 2021-07-06 北京百度网讯科技有限公司 Collision detection method, device, equipment and storage medium for object

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "AR Foundation - Rotating, Translating (Shifting), and Scaling an Object", GRASSOFSKY, 27 March 2021 (2021-03-27), XP055939637, Retrieved from the Internet <URL:www.cnblogs.com/grass-and-moon/p/14585077.html> *

Also Published As

Publication number Publication date
CN113077548A (en) 2021-07-06
CN113077548B (en) 2024-01-05

Similar Documents

Publication Publication Date Title
WO2022227489A1 (en) Collision detection method and apparatus for objects, and device and storage medium
EP3910543A2 (en) Method for training object detection model, object detection method and related apparatus
CN112771573A (en) Depth estimation method and device based on speckle images and face recognition system
WO2017092251A1 (en) Method for detecting collision between cylindrical collider and convex body in real-time virtual scene, and terminal and storage medium
US9245366B1 (en) Label placement for complex geographic polygons
JP7277548B2 (en) SAMPLE IMAGE GENERATING METHOD, APPARATUS AND ELECTRONIC DEVICE
CN115100643B (en) Monocular vision positioning enhancement method and equipment fusing three-dimensional scene semantics
CN114993328B (en) Vehicle positioning evaluation method, device, equipment and computer readable medium
CN114565916A (en) Target detection model training method, target detection method and electronic equipment
JP7262530B2 (en) Location information generation method, related device and computer program product
JP7351892B2 (en) Obstacle detection method, electronic equipment, roadside equipment, and cloud control platform
CN112509135B (en) Element labeling method, element labeling device, element labeling equipment, element labeling storage medium and element labeling computer program product
EP4102466A1 (en) Collision detection method and apparatus for objects, and device and storage medium
CN113837194A (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN111400537B (en) Road element information acquisition method and device and electronic equipment
US20230169680A1 (en) Beijing baidu netcom science technology co., ltd.
WO2023138467A1 (en) Virtual object generation method and apparatus, device, and storage medium
CN109493423B (en) Method and device for calculating midpoint positions of two points on surface of three-dimensional earth model
CN114723894B (en) Three-dimensional coordinate acquisition method and device and electronic equipment
CN115346020A (en) Point cloud processing method, obstacle avoidance method, device, robot and storage medium
CN114998433A (en) Pose calculation method and device, storage medium and electronic equipment
US20240153128A1 (en) Method of detecting collision of objects, device, and storage medium
CN114329032A (en) Image matching pixel retrieval method, device and storage medium
US20220155087A1 (en) Map data processing method, device, storage medium and program product
CN112465692A (en) Image processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022525298

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20227014744

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 17773328

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2021881357

Country of ref document: EP

Effective date: 20220429

NENP Non-entry into the national phase

Ref country code: DE