WO2022057308A1 - Display method and apparatus, display device, and computer-readable storage medium - Google Patents

Display method and apparatus, display device, and computer-readable storage medium Download PDF

Info

Publication number
WO2022057308A1
WO2022057308A1 PCT/CN2021/096358 CN2021096358W WO2022057308A1 WO 2022057308 A1 WO2022057308 A1 WO 2022057308A1 CN 2021096358 W CN2021096358 W CN 2021096358W WO 2022057308 A1 WO2022057308 A1 WO 2022057308A1
Authority
WO
WIPO (PCT)
Prior art keywords
pose
historical
display device
video frame
pose information
Prior art date
Application number
PCT/CN2021/096358
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 北京市商汤科技开发有限公司
Publication of WO2022057308A1 publication Critical patent/WO2022057308A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to a display method, an apparatus, a display device, and a computer-readable storage medium.
  • the existing three-dimensional model display method is to control the traveling position of the display device through the motor.
  • the corresponding Augmented Reality (AR) model is displayed according to the position information of the display device.
  • the disadvantage is that the display position of the AR model is bound to the initial position of the sliding display device. Once the initial position of the device changes, the display position of the AR model will also change, resulting in a delay between the AR model and the real scene, and the AR rendering effect is not good. good.
  • An embodiment of the present disclosure provides a display method, the method includes:
  • the augmented reality effect in which the real scene and the virtual object are superimposed is displayed through the display device.
  • the obtaining of the current pose information of the current video frame collected from the real scene includes:
  • the current video frame of the real scene is collected by the collection part of the display device;
  • the current video frame is processed using a positioning algorithm to obtain the current pose information of the current video frame in the camera sensor coordinate system.
  • the obtaining of the historical pose information of the historical video frame before the current video frame, based on the historical pose information and the current pose information, determining the virtual object pose data including:
  • the virtual object pose data is obtained based on the historical pose offset information and the current pose information.
  • determining the historical pose offset information based on the historical pose information includes:
  • the historical pose information includes the first pose information and the second pose information
  • the historical pose offset information is determined based on an offset between the second pose information and the first pose information.
  • determining the historical pose offset information based on the historical pose information includes:
  • the historical pose information includes the first pose information and the historical sensing position attitude information
  • the first sensing data includes the data of the initial video frame collected by the collecting part when the display device is started
  • the historical pose offset information is determined based on an offset between the first pose information and the historical sensed pose information.
  • the obtaining of the virtual object pose data based on the historical pose offset information and the current pose information includes:
  • the current pose information is offset to obtain corrected pose information
  • the virtual object pose data corresponding to the corrected pose information is determined.
  • the obtaining of the current pose information of the current video frame collected from the real scene includes:
  • the virtual object pose data includes: the coordinate position of each pixel constituting the virtual object; the virtual object is rendered in the current video frame corresponding to the display device by using the virtual object pose data, include:
  • the coordinate position of each pixel in the virtual object is mapped to the rendering engine coordinate system to obtain the target coordinate position of each pixel;
  • the virtual object is rendered at the target coordinate position in the current video frame.
  • Embodiments of the present disclosure provide a display device, which is used based on a display device, including:
  • the collection part is configured to obtain the current pose information of the current video frame collected from the real scene, and obtain the historical pose information of the historical video frame before the current video frame;
  • a processing part configured to determine virtual object pose data based on the historical pose information and the current pose information
  • a rendering part configured to use the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device;
  • the presentation part is configured to display, through the display device, an augmented reality effect in which the real scene and the virtual object are superimposed.
  • the augmented reality effect includes one of the following:
  • At least part of at least one real object in the real scene is occluded by the virtual object
  • the virtual object is rendered at the edge of the target real object in the real scene
  • the virtual object is rendered in the background area in the real scene.
  • the processing part is further configured to determine the virtual object model corresponding to the display object in the preset three-dimensional virtual scene based on the real scene image; the preset three-dimensional virtual scene is based on the real scene image.
  • the virtual model obtained by scene modeling; obtain the judgment result of whether the virtual object model has preset rendering data; in the case that the judgment result is characterized as the virtual object model has preset rendering data, the The preset rendering data is used as the virtual object data.
  • the processing part is further configured to determine the current pose information of the display object in the real scene according to the real scene image; the virtual object model corresponding to the current pose information in the preset three-dimensional virtual scene; the real coordinate system is the coordinate system corresponding to the real scene; the virtual coordinate system is the corresponding coordinate system of the preset three-dimensional virtual scene coordinate system.
  • the processing part is further configured to determine the position area corresponding to the current pose information in the preset three-dimensional virtual scene according to the preset mapping relationship between the real coordinate system and the virtual coordinate system;
  • the corresponding preset virtual model in the location area is used as the virtual object model.
  • the preset three-dimensional virtual scene is a model reconstructed in real time, or a model pre-stored in the cloud.
  • the image acquisition unit includes a binocular camera; the display device further includes a modeling part, and the acquisition part is further configured to determine the display object based on the display object included in the real scene image and the display device.
  • the modeling part Before describing the virtual object data matching the display object, obtain the image information and depth information of the real scene image through the binocular camera; the modeling part is also configured to be based on the image information and the depth information of the real scene image. depth information; three-dimensional modeling is performed on the display object in the real scene image to obtain the preset three-dimensional virtual scene.
  • the display device further includes an update part, and the update part is configured to display the augmented reality AR effect in which the real scene image and the virtual object are superimposed on the display device, During the movement of the display device, the collected real scene image is updated, and an updated virtual object is obtained based on the updated real scene image; the display part is also configured to display the real scene image on the display device in real time. An augmented reality AR effect in which the updated real scene image is superimposed with the updated virtual object.
  • At least one display device is arranged around the display object, and each display device in the at least one display device is used to collect the display in real time at the respective current position according to the respective collection direction of the display object.
  • the real scene image of the object is obtained, and the corresponding virtual object is obtained based on the real scene image collected respectively, and the augmented reality AR effect in which the corresponding real scene image and the virtual object are superimposed is displayed.
  • An embodiment of the present disclosure provides a display device that moves along a target trajectory, including:
  • a display screen configured to display an augmented reality effect in which the real scene and the virtual object are superimposed on the display device
  • a memory configured to store executable instructions
  • the processor When the processor is configured to execute the executable instructions stored in the memory, in combination with the display screen, the method described in the embodiments of the present disclosure is implemented.
  • Embodiments of the present disclosure provide a computer-readable storage medium, which stores executable instructions and is configured to implement the methods described in the embodiments of the present disclosure when executed by a processor.
  • the display device By obtaining the current pose information of the current video frame collected from the real scene, obtaining the historical pose information of the historical video frame before the current video frame, and determining the virtual object based on the historical pose information and the current pose information pose data, using the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device, so that no matter where the initial position of the display device is, the display device Both can adjust the display of virtual objects according to the offset of current pose information and historical pose information, display virtual objects to accurate positions, and improve the fusion of virtual objects and real scenes and the AR rendering effect.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure.
  • FIG. 4 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a device structure of a display device provided by an embodiment of the present disclosure.
  • FIG. 6a is a schematic diagram of the relationship between three camera coordinate systems according to an embodiment of the present disclosure.
  • FIG. 6b is a schematic diagram of a world coordinate system defined by a SLAM algorithm according to an embodiment of the present disclosure
  • 6c is a schematic diagram of the relationship between the world coordinate system and the visual space world coordinate system adopted by the rendering engine provided by the embodiment of the present disclosure
  • FIG. 7a is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure.
  • FIG. 7b is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure.
  • FIG. 7c is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure.
  • 7d is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure.
  • FIG. 8 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure.
  • FIG. 9 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure.
  • FIG. 10 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure.
  • FIG. 11 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure.
  • 12a is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure
  • 12b is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure
  • 12c is a schematic diagram of an optional effect of displaying the sand table model through a display screen provided by an embodiment of the present disclosure
  • 12d is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure
  • 12e is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure
  • FIG. 13a is a schematic diagram of a device structure of a display device provided by an embodiment of the present disclosure.
  • 13b is a schematic diagram of a device structure of a display device provided by an embodiment of the present disclosure.
  • FIG. 14 is an optional schematic structural diagram of a display device provided by an embodiment of the present disclosure.
  • FIG. 15 is an optional schematic structural diagram of a display device provided by an embodiment of the present disclosure.
  • first ⁇ second ⁇ third involved is only to distinguish similar objects, and does not mean For a specific ordering of objects, it is understood that “first ⁇ second ⁇ third” may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be performed in an order other than that shown or described.
  • Embodiments of the present disclosure provide a display method, apparatus, display device, and computer-readable storage medium, which can improve the intuitiveness and richness of display.
  • the display method provided by the embodiment of the present disclosure is applied to a display device.
  • the following describes an exemplary application of the display device provided by the embodiment of the present disclosure.
  • the display device provided by the embodiment of the present disclosure can be implemented as AR glasses, a notebook computer, a tablet computer, a desktop computer Computers, set-top boxes, mobile devices (eg, mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable game devices) and other various terminals with display screens.
  • Application scenarios of the embodiments of the present disclosure include but are not limited to object display scenarios, such as real estate sand table display, construction site building display, or other object display scenarios.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure.
  • the display screen 101 can be installed in a building and can slide along a preset track.
  • the display screen 101 may be positioned at the edge of the building or outside the building.
  • the display screen 101 can be used to collect the real scene image of the building, and superimpose the virtual effect related to the building on the real scene image of the building, thereby presenting the AR effect.
  • the display screen 101 when the display screen 101 slides to the building A, the display screen 101 collects a real image of the building A, and the building model of the building A can be determined as A' according to the real image of the building A, and the display screen 101 According to the preset rendering data corresponding to A', the virtual effect image of building A is obtained by rendering, and the virtual effect image of building A is superimposed on the real image of building A to display the AR effect.
  • the display screen 101 slides to the building B
  • the display screen 101 can obtain the real image of the building B, and determine the building model of the building B as B', and then superimpose the virtual effect image of the building B on the real image of the building B.
  • the content displayed on the screen is updated, and the AR effect on each moving position is displayed in real time during the movement of the display screen 101 .
  • FIG. 2 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure.
  • the display device in the embodiment of the present disclosure may also be a terminal device 102, and a user may hold or wear the terminal device 102 to enter between buildings , and by photographing the building, the terminal device 102 displays an AR effect in which the building image and the virtual effect image related to the building are superimposed.
  • FIG. 3 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure.
  • the display device 101 is set on a preset sliding track 102, the display device 101 can move along the sliding track 102, and the display device 101 is set In front of the display table, at least one target entity 103 is arranged on the display table, and a virtual object 104 is displayed on the display device 101 , and the virtual object 104 is used for explaining the target entity 103 .
  • a virtual effect image related to the target entity 103 may be displayed on the screen of the display device 101 based on the image of the target entity 103 collected during the movement of the display device 101 to present the target entity 103. AR effect superimposed with virtual effect image.
  • FIG. 4 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure, which will be described in conjunction with the steps shown in FIG. 4 .
  • Step S101 Obtain current pose information of a current video frame collected from a real scene.
  • the display method provided in the embodiment of the present disclosure is applied to a display device.
  • the display device 500 can be fixed on a bracket 530 with pulleys, movably connected with a preset sliding track 510 on the booth 520 , and can slide left and right along the preset sliding track 510 .
  • the display method provided in the embodiment of the present disclosure may also be applied to a scenario in which a user moves with a hand-held display device. When the user moves with the display device in hand, the display device displays virtual objects and real scenes for fusion.
  • the display method provided in the embodiments of the present disclosure is mainly used to solve the problem that when the movable display device is not started at the initial position, the virtual object displayed by the display device is difficult to be integrated with the real scene, and the AR rendering effect is not good.
  • the display device may collect an image of the current real scene through the acquisition part, and determine the current pose information of the display device according to the current video frame in the image or the image at the current moment.
  • the real scene may be a sand table model or other exhibits on a booth, a construction site in a building, an interior scene of a building, a street scene, or other objects, and the augmented reality is presented by superimposing virtual objects on the real scene. Effect.
  • the collection range of the collection part may include all the displayed objects, or may only include some of the displayed objects. The embodiment of the present disclosure does not limit the collection range of the collection part.
  • the pose information of the display device may include the location of the display component used to display the virtual object when the display device moves on the sliding track, when the user moves the display device by hand, or when the intelligent mobile display device navigates and moves autonomously. position and/or display angle.
  • the current pose information corresponding to the current video frame can be acquired through the acquisition part set on the display device.
  • the acquisition part in the embodiment of the present disclosure may include: a binocular camera, a sensor, a gyroscope, an inertial measurement unit (Inertial measurement unit, IMU), and the like.
  • GPS Global Positioning System
  • GLONASS Global Navigation Satellite System
  • angular velocity sensor for determining the display angle of the display device.
  • the display device needs to display a virtual object in the current video frame, it first needs to obtain the current pose information of the current video frame, and convert the current pose information to the current video frame. It is superimposed with the pose offset, and then the virtual object can be displayed at the position corresponding to the display object.
  • the collection part collects the video image in the real scene in real time, selects the video frame at the current moment of the video image as the current video frame, processes the current video frame, and obtains the current video frame. Current pose information.
  • the display device may use a positioning algorithm to process the current video frame to obtain current pose information of the current video frame.
  • the positioning algorithm is, for example, a map construction (simultaneous localization and mapping, SLAM) algorithm, and the SLAM algorithm can calculate the current pose information based on a pre-defined virtual coordinate system in combination with the current video frame.
  • the acquisition part may be a sensor provided on the display device. After the display device is turned on, the sensor acquires the position coordinate information of the display device in real time.
  • the current pose information corresponding to the current video frame may be the position coordinate information of the display device acquired by the sensor at the current moment.
  • the acquisition part may include an angle sensor disposed on the display device, and the angle sensor acquires display angle information of the display device in real time after the display device is turned on.
  • the current pose information corresponding to the current video frame may include the display angle information of the display device acquired by the angle sensor at the current moment.
  • the pose offset may be the difference between the position coordinate information when the display device is started at a non-initial position and the position coordinate information when the display device is started at the initial position.
  • the pose offset can also be the difference between the display angle information when the display device is started at a non-initial position when the display device is started at a non-initial position, and the display angle information when the display device is started at an initial position.
  • the current pose information corresponding to the current video frame may also include combination information of the position coordinate information obtained by the sensor and the display angle information obtained by the angle sensor.
  • Step S102 Obtain historical pose information of a historical video frame before the current video frame, and determine virtual object pose data based on the historical pose information and the current pose information.
  • the acquisition part for example, the binocular camera in the acquisition part
  • the historical video frames of the display device are acquired through the acquisition part set on the display device.
  • the historical video frame is a video frame at any moment before the current moment.
  • the display device can use a positioning algorithm to process the historical video frames to obtain historical pose information of the historical video frames.
  • the positioning algorithms are, for example, SLAM algorithms, visual positioning algorithms, and inertial sensor-based positioning algorithms, which are not limited in the embodiments of the present disclosure.
  • the display device processes the historical video frames through a visual positioning algorithm to obtain the first pose information of the historical video frames
  • the display device processes the historical video frames through the SLAM algorithm to obtain the second pose information of the historical video frames, and displays the information.
  • the device processes the inertial sensor data at the corresponding moment of the historical video frame through the positioning algorithm based on the inertial sensor to obtain the historical sensing pose information of the historical video frame.
  • the first pose information includes visual space pose information
  • the second pose information includes camera pose information
  • the historical sensing pose information includes inertial sensing pose information.
  • the processing part of the display device may calculate the offset based on the first pose information and the second pose information to obtain historical pose offset information.
  • the processing part of the display device acquires the current pose information and the historical pose offset information, and the processing part of the display device superimposes the current pose information on the historical pose offset information to obtain virtual object pose data .
  • the processing part sends the virtual object pose data to the rendering part of the display device, and the rendering part can render the virtual object at the corresponding position, which improves the fusion degree of the virtual object and the real scene and the AR rendering effect.
  • the virtual camera sensor coordinate system slam_c, the visual space coordinate system phy_c, the rendering engine camera coordinate system render_c, the camera sensor world coordinate system slam_w, the rendering engine camera world coordinate system render_w and the visual space world coordinate system phy_w can be defined respectively.
  • the camera sensor coordinate system slam_c is the camera coordinate system defined by the SLAM algorithm
  • the camera sensor world coordinate system slam_w is the world coordinate system defined by the SLAM algorithm
  • the visual space coordinate system phy_c is the camera coordinate system defined by the visual positioning algorithm
  • the system phy_w is the world coordinate system defined by the visual positioning algorithm
  • the rendering engine camera coordinate system render_c is the camera coordinate system defined by the rendering engine algorithm
  • the rendering engine camera world coordinate system render_w is the world coordinate system defined by the rendering engine algorithm.
  • the acquisition part on the display device includes a camera
  • the origins of the camera sensor coordinate system slam_c, the visual space coordinate system phy_c and the rendering engine camera coordinate system render_c defined based on the camera are coincident.
  • the camera sensor world coordinate system slam_w defined by the SLAM algorithm is related to the starting position of the SLAM algorithm, and the starting position is the origin position of the camera sensor world coordinate system slam_w.
  • the origin of the rendering engine camera world coordinate system render_w and the visual space world coordinate system phy_w can be any point in the real scene.
  • Xslam_c represents the X axis of the coordinate system
  • Yslam_c represents the Y axis of the coordinate system
  • Zslam_c represents the Z axis of the coordinate system.
  • the display device can calculate the current video frame or historical video frame through the SLAM algorithm, and obtain the current pose information or historical pose information of the current video frame or historical video frame in the camera sensor coordinate system slam_c.
  • Xphy_c represents the X axis of the coordinate system
  • Yphy_c represents the Y axis of the coordinate system
  • Zphy_c represents the Z axis of the coordinate system.
  • the display device may calculate the current video frame or the historical video frame through the visual positioning algorithm, and obtain the current pose information or historical pose information of the current video frame or the historical video frame in the visual space coordinate system phy_c.
  • render_c as shown in FIG.
  • Xrender_c represents the X axis of the coordinate system
  • Yrender_c represents the Y axis of the coordinate system
  • Zrender_c represents the Z axis of the coordinate system.
  • the display device obtains the historical pose offset information by calculating the historical pose information, and superimposes the historical pose offset information and the current pose information to obtain virtual object pose data.
  • the virtual object pose data includes the pose data of the virtual object in the camera sensor coordinate system slam_c, and the display device converts the virtual object pose data in the camera sensor coordinate system slam_c to the rendering engine camera coordinate system render_c to obtain the virtual object.
  • the target position coordinates of the object can then be rendered by the rendering engine at a position corresponding to the rendering engine coordinate system according to the target position coordinates of the virtual object.
  • Xslam_w, Yslam_w and Zslam_w are three coordinate axes.
  • Xphy_w, Yphy_w and Zphy_w are three coordinate axes.
  • the origins of the rendering engine camera world coordinate system render_w and the visual space world coordinate system phy_w coincide, that is, the rendering space and the physical space should have a one-to-one correspondence.
  • the historical pose information or current pose information in the visual space coordinate system phy_c includes the coordinate position of the display component of the display device in the visual space coordinate system phy_c, or includes the display component of the display device and the visual space coordinate system phy_c.
  • the included angle of each coordinate axis in or simultaneously includes the coordinate position of the display component of the display device in the visual space coordinate system phy_c and the included angle with each coordinate axis in the visual space coordinate phy_c, which is not specifically limited here.
  • the historical pose information of the historical video frames of the display device includes first pose information and second pose information.
  • the display device may calculate and obtain the first pose information of the historical video frame as (X1, Y1, Z1), and the second pose information as (X2, Y2, Z2).
  • X1 in the first pose information (X1, Y1, Z1) is the coordinate point of the historical video frame on the X axis in the visual space coordinate system phy_c
  • Y1 is the Y of the historical video frame in the visual space coordinate system phy_c
  • the coordinate point on the axis, Z1 is the coordinate point on the Z axis of the historical video frame in the visual space coordinate system phy_c.
  • X2 in the second pose information (X2, Y2, Z2) is the coordinate point of the historical video frame on the X axis in the camera sensor coordinate system slam_c
  • Y2 is the historical video frame on the Y axis in the camera sensor coordinate system slam_c
  • the coordinate point, Z2 is the coordinate point of the historical video frame on the Z axis in the camera sensor coordinate system slam_c.
  • Step S103 using the virtual object pose data to render the virtual object in the current video frame displayed by the display device.
  • the display object is associated with the display object in the real scene image.
  • the virtual object corresponding to the pose data of the virtual object is rendered at the display position.
  • the virtual object rendered by the display device according to the pose data of the virtual object may include at least one of the following:
  • the virtual scene effect corresponding to the display object when the sand table model on the booth is displayed through the display screen on the slide rail, the virtual object can be the completed effect corresponding to the building model in the sand table, and
  • the sand table area has different scene effects during the day and night.
  • the virtual detail map corresponding to the display object as shown in Figure 7b, when the car on the booth is displayed through the display screen on the slide rail, the display screen is not started at the initial position, when the current pose information and After the historical pose information is obtained, the pose information of the virtual object can be determined, so as to display the virtual virtual object.
  • the virtual object may be a detailed view of the structure inside the body part corresponding to the current position of the display screen.
  • the virtual three-dimensional animation effect corresponding to the display object can be the virtual three-dimensional animation effect 53 of the component on the car such as the steering wheel, and the display device can display the virtual three-dimensional animation effect 53 corresponding to the steering wheel component on the display screen.
  • the upper area is played, and the steering wheel is displayed in an all-round rotation.
  • the virtual label corresponding to the display object As shown in Fig. 7d, when displaying the sand table model on the booth through the display screen on the slide rail, the virtual object can display the description information corresponding to the building model in the form of a text label or a picture label.
  • the display device after the display device determines the pose data of the virtual object through the current pose information and the historical pose information, the display device can obtain the display position associated with the display object from the real scene image. In this way, according to the virtual object pose data After rendering, after obtaining the virtual object, the virtual object is correspondingly superimposed on the display position associated with the display object in the real scene image, and then cooperate with the setting of the transparency of the virtual object data to achieve the enhanced display AR in which the real scene image and the virtual object are superimposed. Effect.
  • the size of the virtual object and the display object in the real scene image is 1:1, and the virtual object is overlaid on the same position of the display object in the real scene image, so it is like the sand table completion effect, Virtual effects such as car body detail images can be overlaid and superimposed on part of the model image of the sand table, and displayed on the part of the car body image, thus presenting an AR effect in which the virtual image is further superimposed on the display object.
  • the AR effect in which the real scene image and the virtual object are superimposed may be displayed on the display screen on the display device.
  • the display device needs to determine the pose of the display device through the camera sensor coordinate system slam_c, so as to display the virtual object according to the pose of the display device.
  • the origin of the camera sensor coordinate system slam_c defined by the display device is not at the preset start position, resulting in an error in the positioning pose of the display device.
  • the processing part on the display device obtains the historical pose offset information when the display device is not started at the initial position by processing the historical pose information.
  • the historical pose information includes the first pose information and the second pose information
  • the first pose information includes the visual space pose information of the historical video frame in the visual space coordinate system phy_c
  • the visual space coordinate system phy_c is related to the real
  • the second pose information includes the camera pose information of historical video frames in the camera sensor coordinate system slam_c.
  • the display device may obtain historical pose offset information by calculating the first pose information and the second pose information.
  • the historical pose offset information is the offset information of the camera sensor coordinate system slam_c defined by the display device in the real scene when the display device is not started at the initial position.
  • the display device superimposes the current pose information and the historical pose offset information to correct the pose error of the display device, so as to determine the virtual object pose data.
  • the display position is further rendered, so that the display device can display the virtual object in the display position associated with the object in the real scene when it is started at any position, and then display the AR effect in which the virtual object and the real scene image are superimposed, so that the virtual object displayed by the display device can be displayed.
  • the object is highly integrated with the real scene, which optimizes the AR display effect.
  • FIG. 8 is an optional schematic flowchart of the display method provided by an embodiment of the present disclosure.
  • S101 shown in FIG. 4 can be implemented by S1011 to S1012 , which will be described in conjunction with each step. .
  • the display device after the display device is turned on, since the display device is not started at the initial position, the virtual object displayed by the display device will not be displayed at the corresponding position.
  • the video frame at the current moment after the display device is turned on is obtained through the acquisition part set on the display device.
  • the positioning algorithm in order to obtain the current pose information of the current video frame.
  • the positioning algorithm first extracts and matches the features of the current video frame, selects the key points of the current video frame, and then uses the basic matrix to calculate based on the relevant data of the key points to obtain the current pose information corresponding to the current video frame.
  • the positioning algorithm includes a SLAM positioning algorithm.
  • the display device can obtain the transformation matrix of the current pose information from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w through algorithm calculation, that is, the current pose information matrix.
  • the front pose information matrix is: Tslam_w_slam_c_X.
  • Tslam_w_slam_c_X represents the transformation matrix of the X-th video frame, that is, the pose information of the current video frame from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w.
  • FIG. 9 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure.
  • S101 shown in FIG. 4 can be implemented by S1013 to S1014 , which will be described in conjunction with each step. .
  • S1013 Acquire the first sensing data when the acquisition part of the display device collects the initial video frame, and the second sensor data when the acquisition part of the display device collects the current video frame.
  • a virtual sensing coordinate system imu_c may be defined first.
  • the sensing coordinate system imu_c is a coordinate system defined by the inertial sensor positioning algorithm, and the origin and coordinate axis of the sensing coordinate system imu_c are defined with reference to the camera sensor coordinate system slam_c in S102 .
  • the acquisition part which can be an inertial sensor set on the display device obtains the first sensing data of the initial video frame when the display device is turned on, and the second transmission of the current video frame after the display device is turned on for a period of time. sense data.
  • the first sensing data includes acceleration data and orientation data of the initial video frame
  • the second sensing data includes acceleration data and orientation data of the current video frame.
  • the processing part of the display device calculates and obtains the offset between the first sensing data and the second sensing data.
  • the display device can obtain the current pose information of the current video frame in the pre-established sensing coordinate system imu_c by calculating and converting the offset.
  • the display device can obtain the transformation matrix of the current pose information from the sensing coordinate system imu_c to the sensing world coordinate system imu_w through algorithm calculation, that is, the current pose information matrix.
  • the current pose matrix is: Timu_w_imu_c_X.
  • Timu_w_imu_c_X represents the transformation matrix of the X-th video frame, that is, the pose information of the current video frame from the sensing coordinate system imu_c to the sensing world coordinate system imu_w.
  • FIG. 8 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure.
  • S102 shown in FIG. 4 can be implemented by S1021 to S1022 , which will be described in conjunction with each step. .
  • the acquisition part of the display device acquires images of the real scene in real time, and the display device acquires historical video frames through the acquisition part set on the display device after the display device starts for a predetermined duration (usually set to a duration within 1-3 seconds).
  • the processing part of the display device processes the information of the historical video frame to obtain the first pose information and the second pose information of the historical video frame.
  • the processing part of the display device then calculates the historical pose offset information based on the first pose information and the second pose information of the historical video frame.
  • FIG. 10 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure.
  • S1021 shown in FIG. 8 can be implemented by S201 to S202 , which will be described in conjunction with each step. .
  • the first pose information of the historical video frame in the visual space coordinate system phy_c can be obtained by calculating through the visual positioning algorithm. Then, the historical video frame is calculated by the SLAM algorithm to obtain the second pose information of the historical video frame in the camera sensor coordinate system slam_c.
  • the first pose information includes the position coordinates of the historical video frame in the visual space coordinate system phy_c.
  • the second pose information includes the position coordinates of the historical video frame in the camera sensor coordinate system slam_c.
  • the display device can obtain the transformation matrix of the first pose information from the visual space coordinate system phy_c to the visual space world coordinate system phy_w through algorithm calculation, that is, the first pose information matrix.
  • the first pose information matrix is: Tphy_w_phy_c_N.
  • Tphy_w_phy_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the visual space coordinate system phy_c to the visual space world coordinate system phy_w.
  • the display device can obtain a transformation matrix of the second pose information from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w through algorithm calculation, that is, the second pose information matrix.
  • the second pose information matrix is: Tslam_w_slam_c_N.
  • Tslam_w_slam_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w.
  • the historical pose offset information may be an offset matrix Toffset 1.
  • Toffset 1 When calculating and obtaining the offset matrix Toffset 1, it is necessary to obtain the first pose information matrix, the second pose information matrix, and the camera sensor defined by the SLAM algorithm.
  • the third transformation matrix of phy_w The third transformation matrix of phy_w.
  • calculation formula (1) is:
  • Tphy_w_phy_c_N is the first pose information matrix
  • Tslam_w_slam_c_N is the second pose information matrix
  • Trotate_Y_UP is the first transformation matrix from the camera sensor coordinate system slam_c defined by the SLAM algorithm to the rendering engine camera coordinate system render_c.
  • the first transformation matrix Trotate_Y_UP can Make the Y direction of the camera sensor coordinate system slam_c defined by the SLAM algorithm consistent with the UP direction of the rendering engine camera coordinate system render_c.
  • Tphy_c_slam_c is the second conversion matrix from the camera sensor coordinate system slam_c defined by the SLAM algorithm to the visual space coordinate system phy_c
  • Trend_w_phy_w is the third conversion matrix from the rendering engine camera world coordinate system render_w to the visual space world coordinate system phy_w.
  • the display device can calculate through the first transformation matrix Trotate_Y_UP, the second transformation matrix Tphy_c_slam_c, the third transformation matrix Trend_w_phy_w, the first pose information matrix Tphy_w_phy_c_N and the second pose information matrix Tslam_w_slam_c_N, and realize the camera sensor coordinates slam_c, visual space coordinates
  • the alignment between the system phy_c and the rendering engine camera coordinate system render_c, and then the offset matrix Toffset 1 can be calculated.
  • the display device multiplies the third transformation matrix and the first attitude information matrix to obtain a first intermediate matrix, then multiplies the first intermediate matrix and the second transformation matrix to obtain a second intermediate matrix, and then multiplies the first intermediate matrix by the second transformation matrix.
  • the second intermediate matrix is multiplied by the first transformation matrix to obtain a third intermediate matrix.
  • FIG. 11 is an optional schematic flowchart of the display method provided by an embodiment of the present disclosure.
  • S1021 shown in FIG. 8 can be implemented through S301 to S304 , which will be described in conjunction with each step. .
  • the processing part can determine the pose information of the historical video frame in the visual space coordinate system phy_c, so as to obtain the first position of the historical video frame in the visual space coordinate system phy_c pose information.
  • the display device can obtain the transformation matrix of the first pose information from the visual space coordinate system phy_c to the visual space world coordinate system phy_w through algorithm calculation, that is, the first pose information matrix.
  • the first pose information matrix is: Tphy_w_phy_c_N.
  • Tphy_w_phy_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the visual space coordinate system phy_c to the visual space world coordinate system phy_w.
  • S302 Acquire third sensing data when the collection part of the display device collects historical video frames.
  • the display device after the display device is turned on, the display device is not started at the initial position.
  • the third sensing data of the historical video frames of the display device is acquired through the acquisition part (which may be an inertial sensor) provided on the display device.
  • the third sensory data includes acceleration data and orientation data of historical video frames.
  • the processing part of the display device calculates and obtains the offset between the first sensing data and the third sensing data.
  • the offset can be obtained by calculating and transforming the historical sensing pose information of the historical video frame in the pre-established sensing coordinate system imu_c.
  • the first sensing data includes the data of the initial video frame collected by the collecting part when the display device is started.
  • the display device can obtain the transformation matrix of the historical sensing pose information from the sensing coordinate system imu_c to the sensing world coordinate system imu_w through algorithm calculation, that is, the historical sensing pose information matrix.
  • the historical sensing pose information matrix is: Timu_w_imu_c_N.
  • Timu_w_imu_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the sensing coordinate system imu_c to the sensing world coordinate system imu_w.
  • the historical pose offset information may be an offset matrix Toffset 2 .
  • the display device calculates and obtains the offset matrix Toffset 2, it needs to obtain the first attitude information matrix, the historical sensing pose information matrix, and the first transformation matrix from the sensing coordinate system imu_c defined by the inertial sensor positioning algorithm to the rendering engine camera coordinate system render_c , the second transformation matrix of the sensor coordinate system imu_c defined by the inertial sensor positioning algorithm to the visual space coordinate system phy_c, and the third transformation matrix of the rendering engine camera world coordinate system render_w to the visual space world coordinate system phy_w.
  • the historical sensing pose information matrix is transformed into the visual space coordinate system phy_c corresponding to the first attitude information matrix based on the first transformation matrix, the second transformation matrix and the third transformation matrix, and the historical sensing pose information is converted into
  • the matrix information in the visual space coordinate system phy_c is calculated with the first pose information matrix, and the offset matrix Toffset 2 can be obtained.
  • Tphy_w_phy_c_N is the first pose information matrix
  • Timu_w_imu_c_N is the historical sensor pose information matrix
  • Trotate_Y_UP is the first transformation matrix from the sensor coordinate system imu_c defined by the inertial sensor positioning algorithm to the rendering engine camera coordinate system render_c, the first transformation The matrix Trotate_Y_UP can make the Y direction of the sensor coordinate system imu_c consistent with the UP direction of the rendering engine camera coordinate system render_c.
  • Tphy_c_imu_c is the second transformation matrix from the sensor coordinate system imu_c defined by the inertial sensor positioning algorithm to the visual space coordinate system phy_c
  • Trend_w_phy_w is the third transformation matrix from the rendering engine camera world coordinate system render_w to the visual space world coordinate system phy_w.
  • the display device can calculate through the first transformation matrix Trotate_Y_UP, the second transformation matrix Tphy_c_imu_c, the third transformation matrix Trend_w_phy_w, the first attitude information matrix Tphy_w_phy_c_N and the historical sensing pose information matrix Timu_w_imu_c_N, so as to realize the sensing coordinate system imu_c, visual
  • the alignment between the space coordinate system phy_c and the rendering engine camera coordinate system render_c, and then the offset matrix Toffset 2 can be calculated.
  • the display device multiplies the third transformation matrix and the first attitude information matrix to obtain a first intermediate matrix, then multiplies the first intermediate matrix and the second transformation matrix to obtain a second intermediate matrix, and then multiplies the first intermediate matrix by the second transformation matrix.
  • the second intermediate matrix is multiplied by the first transformation matrix to obtain a third intermediate matrix.
  • the third intermediate matrix is then multiplied by the inverse matrix of the historical sensing pose matrix to obtain the historical pose offset information, that is, the offset matrix Toffset 2.
  • the display device may obtain virtual object pose data by fusing current pose information and historical pose offset information.
  • the pose data view1 of the virtual object can be obtained by calculation through formula (3).
  • Formula (3) is:
  • Toffset 1 is the offset matrix calculated from S201 to S202
  • (Tslam_w_slam_c_X) -1 is the inverse matrix of the current pose information matrix calculated from S1011 to S1012.
  • the display device can calculate the pose data of the virtual object by multiplying Toffset 1 and (Tslam_w_slam_c_X) -1 , which is denoted as matrix view1.
  • the pose data view2 of the virtual object can be obtained by calculation through formula (4).
  • Formula (4) is:
  • Toffset 2 is the offset matrix calculated from S301 to S304
  • (Tslam_w_slam_c_X) ⁇ 1 is the inverse matrix of the current pose information matrix calculated from S1013 to S1014 .
  • the display device can calculate the virtual object pose data by multiplying Toffset 2 and (Tslam_w_slam_c_X) -1 , which is denoted as matrix view2.
  • FIG. 10 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure.
  • S103 shown in FIG. 4 can be implemented through S204 to S205 , which will be described in conjunction with each step. .
  • S204 Map the coordinate position of each pixel in the virtual object to the rendering engine coordinate system to obtain the target coordinate position of each pixel.
  • the pose data of the virtual object includes the coordinate position of each pixel of the virtual object.
  • the coordinate 1 of one of the marked pixel positions of the virtual object is (X3, Y3, Z3), and the coordinate 1 of the marked pixel position (X3, Y3, Z3) is the coordinate of the marked pixel in the camera sensor coordinate system slam_c, and X3 is the mark
  • Y3 is the coordinate of the marked pixel on the Y axis of the camera sensor coordinate system slam_c
  • Z3 is the coordinate of the marked pixel on the Z axis of the camera sensor coordinate system slam_c.
  • the display device After the display device obtains the virtual object pose data, the coordinate position of each pixel of the virtual object to be displayed is mapped to the rendering engine coordinate system render_c according to the coordinate position of the virtual object pose data, and each pixel of the virtual object to be displayed is obtained.
  • the target coordinate position in pixels.
  • the display device can map the coordinate 1 of the marked pixel to the target coordinate position in the rendering engine coordinate system render_c through coordinate transformation.
  • the target coordinate position is coordinate 2 (X4, Y4, Z4).
  • the coordinate 2 (X4, Y4, Z4) of the target coordinate position of the marked pixel is the coordinate of the target coordinate position in the rendering engine coordinate system render_c
  • X4 is the coordinate of the target coordinate position on the X axis of the rendering engine coordinate system render_c
  • Y4 is the coordinate of the target coordinate position on the Y axis of the rendering engine coordinate system render_c
  • Z4 is the coordinate of the marker pixel on the Z axis of the rendering engine coordinate system render_c.
  • the rendering engine of the display device obtains the target coordinate position of each pixel of the virtual object that needs to be displayed in the previous step, and the target coordinate position of each pixel of the virtual object to be displayed according to the preset Predetermined programs render virtual objects in real scenes.
  • the marked pixel is rendered by the rendering engine at a position with coordinates (X4, Y4, Z4).
  • FIG. 11 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure. Based on FIG. 4, after S104, S105-S106 may also be executed, which will be described in conjunction with each step.
  • the real scene image collected by the collecting part will also change.
  • the sand table model can be scanned through the camera on the back.
  • the real scene image collected by the camera will be updated in real time with the scanned position, and the display objects contained in the real scene image will also be updated in real time. Therefore, during the movement of the display device, The display device will update the collected real scene image, and obtain an updated virtual object based on the updated real scene image.
  • the display device will display the augmented reality AR effect in which the updated real scene image and the updated virtual object are superimposed in real time, so that during the movement of the display device, the display object can be displayed according to the collected display objects at each different moving position.
  • Different display parts display the smooth display effect of different AR images combining virtual and real in real time.
  • At least one display device may be arranged around the display object, and each display device in the at least one display device is configured to collect and display the display object in real time at the respective current position according to the respective collection direction of the display object.
  • the real scene image of the object is obtained, and the corresponding virtual object is obtained based on the real scene image collected respectively, and the augmented reality AR effect in which the corresponding real scene image and the virtual object are superimposed is displayed.
  • the virtual object pose data is determined through the current pose information and historical pose information of the display device, and the virtual object is displayed at the corresponding position.
  • a four-sided transparent glass room may be set up on the construction site, and a display screen that slides along a preset track may be set behind each glass wall , which is used for a comprehensive display of buildings at various locations on the construction site.
  • a sliding track may be set beside the booth where the sand table model is located, and a slidable display screen may be set on the sliding track as a display device, wherein the display screen includes a preset sliding track And a display screen with a camera, the front of the display screen is the screen part, facing the viewer, for the display of the final AR effect, and the back of the display screen is a camera for image acquisition of the sand table model. Since the sand table model occupies a large area, the display range of the display screen can be only a part of the sand table model, and the whole sand table model can be scanned by moving on the preset sliding track.
  • the camera behind the camera captures the image on the left side of the sand table model as the real scene image.
  • the virtual left sand table model matching the left sand table model is determined as the virtual object model, and the rendering data of the virtual sand table model associated with the virtual left sand table model is used as the virtual object model.
  • Object data so that the completed building diagram corresponding to the left sand table model can be rendered through the virtual sand table model rendering data, and the completed building diagram can be superimposed on the real left sand table model image and displayed on the display screen.
  • the virtual sand table model rendering data can also be set to two different types of virtual object data: daytime effect and nighttime effect. Rendering the virtual object according to the daytime effect can present the AR effect shown in FIG. 12c. Rendering virtual objects with night effect can present the AR effect as shown in Figure 12d.
  • display theme controls may also be correspondingly set on the display screen.
  • the display device can display the corresponding
  • virtual objects with different theme types are superimposed on the real sand table model image.
  • various virtual effect themes such as traffic analysis, regional planning, time display, enterprise introduction, etc. can be displayed.
  • the display device can present different AR effects combining virtual and real through virtual objects with different rendering effects, thereby enriching the display mode and improving the display effect.
  • the display methods provided by the embodiments of the present disclosure are as follows:
  • the binocular camera 123 on the display device acquires an image of a real scene in real time.
  • the display device 101 acquires the first pose information of the Nth video frame in the visual space coordinate system phy_c after the display device 101 is started through the binocular camera 123 provided on the display device 101 .
  • the second pose information of the Nth video frame in the camera sensor coordinate system slam_c is acquired through the binocular camera 123 provided on the display device 101 .
  • the display device 101 can obtain the pose offset information of the Nth video frame by converting the second pose information into the visual space coordinate system phy_c of the first pose information, and performing calculation with the first pose information.
  • the display device 101 acquires the current pose information of the N+X th video frame (current video frame) in the camera sensor coordinate system slam_c through the binocular camera 123 provided on the display device 101 .
  • the display device 101 can obtain the virtual object pose data by multiplying the inverse matrix of the current pose information and the historical pose offset information.
  • the virtual object may be the virtual car 122 .
  • the rendering engine of the display device 101 obtains the virtual car 122 pose data, renders the virtual car 122 based on the virtual car 122 pose data, and superimposes the virtual car 122 on the display position associated with the building model 121 to obtain the building model 121 and the virtual car. 122 superimposed enhanced display AR effects. The fusion degree of the virtual car 122 and the building model 121 and the AR rendering effect are improved.
  • the steps of another display method provided by an embodiment of the present disclosure may be as follows:
  • the display device 101 when the display device 101 starts at a non-initial position of the sliding track 125 , the display device 101 obtains the first sensor at the initial time T0 when the display device 101 starts up through the inertial sensor 124 provided on the display device 101 .
  • the first sensing data includes acceleration data and orientation data of the display device 101 at the initial time T0.
  • the display device 101 obtains the first pose information of the historical video frame corresponding to the historical time T1 before the current video frame in the visual space coordinate system phy_c through the binocular camera 123 provided on the display device 101 .
  • the display device 101 acquires the second sensing data of the historical time T1 corresponding to the historical video frame through the inertial sensor 124 provided on the display device 101 , and the second sensing data includes acceleration data and direction data of the historical time T1 . Then, by calculating the offset between the first sensing data and the second sensing data, historical sensing pose information can be obtained.
  • the display device 101 can obtain the historical pose offset information by converting the historical sensing pose information into the visual space coordinate system phy_c of the first pose information, and performing calculation with the first pose information.
  • the display device acquires third sensing data of the current time T2 of the display device 101 through the inertial sensor 124 provided on the display device 101 , and the third sensing data includes acceleration data and direction data at the current time.
  • the display device 101 can obtain the current pose information by calculating the offset between the first sensing data and the third sensing data.
  • the display device 101 can obtain the virtual object pose data by multiplying the inverse matrix of the current pose information and the historical pose offset information.
  • the virtual object may be the virtual car 122 .
  • the rendering engine of the display device 101 obtains the virtual car 122 pose data, renders the virtual car 122 based on the virtual car 122 pose data, and superimposes the virtual car 122 on the display position associated with the building model 121 to obtain the building model 121 and the virtual car. 122 superimposed enhanced display AR effects. The fusion degree of the virtual car 122 and the building model 121 and the AR rendering effect are improved.
  • FIG. 14 is a schematic diagram of an optional composition structure of the display device provided by the embodiment of the present disclosure.
  • the display device 455 includes:
  • the collection part 4551 is configured to obtain the current pose information of the current video frame collected from the real scene, and obtain the historical pose information of the historical video frame before the current video frame;
  • processing part 4552 configured to determine virtual object pose data based on historical pose information and current pose information
  • the rendering part 4553 is configured to use the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device;
  • the presentation part 4554 is configured to display the augmented reality effect in which the real scene and the virtual object are superimposed through the display device.
  • the acquisition part 4551 acquires images and videos in the real scene in real time.
  • the image video includes the current video frame and the historical video frame.
  • the processing part 4552 performs processing based on the current video frame and the historical video frame, and can obtain the current pose information and the historical pose information, respectively.
  • the processing part 4552 calculates the historical pose information to obtain historical pose offset information, and superimposes the current pose information and the historical pose offset information to obtain virtual object pose data.
  • the processing part 4552 sends the virtual object pose data to the rendering part 4553, and the rendering part 4553 renders the virtual object corresponding to the virtual object pose data in the current video frame corresponding to the display device.
  • the presentation section 4554 displays an augmented reality effect in which a real scene is superimposed with a virtual object.
  • the augmented reality effect includes one of the following:
  • At least part of at least one real object in the real scene is occluded by the virtual object
  • the virtual object is rendered at the edge of the target real object in the real scene
  • the virtual object is rendered in the background area in the real scene.
  • a real object in the real scene is combined with a virtual object to present an AR effect.
  • a real object in the real scene is combined with a virtual object enlarged in a certain proportion to present an AR effect.
  • the processing part 4552 is further configured to determine, based on the real scene image, a virtual object model corresponding to the display object in a preset three-dimensional virtual scene; the preset three-dimensional virtual scene is based on The virtual model obtained by modeling the real scene; obtaining the judgment result of whether the virtual object model has preset rendering data; in the case that the judgment result is characterized by the existence of preset rendering data in the virtual object model , using the preset rendering data as the virtual object data.
  • the processing part 4552 is further configured to determine the current pose information of the display object in the real scene according to the real scene image; according to the preset mapping between the real coordinate system and the virtual coordinate system determine the virtual object model corresponding to the current pose information in the preset three-dimensional virtual scene; the real coordinate system is the coordinate system corresponding to the real scene; the virtual coordinate system is the preset three-dimensional virtual scene The coordinate system corresponding to the virtual scene.
  • the processing part 4552 is further configured to determine the position area corresponding to the current pose information in the preset three-dimensional virtual scene according to the preset mapping relationship between the real coordinate system and the virtual coordinate system ; take the corresponding preset virtual model in the location area as the virtual object model.
  • the preset three-dimensional virtual scene is a model reconstructed in real time, or a model pre-stored in the cloud.
  • the acquisition part 4551 includes a binocular camera; the display device 455 further includes a modeling part, and the acquisition part 4551 is further configured to display objects included in the image based on the real scene , before determining the virtual object data matching the display object, obtain the image information and depth information of the real scene image through the binocular camera; the modeling part is further configured to be based on the real scene image 3D modeling of the display objects in the real scene image to obtain the preset 3D virtual scene.
  • the display device 455 further includes an update part, and the update part is configured to display, on the display device, an augmented reality AR effect in which the real scene image and the virtual object are superimposed, During the movement of the display device, the collected real scene image is updated, and an updated virtual object is obtained based on the updated real scene image; the display part 4554 is also configured to display on the display device The augmented reality AR effect in which the updated real scene image and the updated virtual object are superimposed is displayed in real time.
  • At least one display device is arranged around the display object, and each display device in the at least one display device is configured to collect all the displayed objects in real time at their respective current positions according to their respective collection directions for the display object.
  • the real scene image of the display object is described, and the corresponding virtual object is obtained based on the real scene image collected respectively, and the augmented reality AR effect in which the corresponding real scene image and the virtual object are superimposed is displayed.
  • the current pose information of the current video frame and the historical pose information of the historical video frames are obtained respectively through the acquisition part 4551 provided on the display device.
  • the processing part 4552 obtains the historical pose offset information when the display device 455 is not started at the initial position by processing the historical pose information.
  • the processing part 4552 superimposes the current pose information and the historical pose offset information to determine virtual object pose data, where the virtual object pose data includes the coordinate position of each pixel constituting the virtual object.
  • the rendering part 4553 further renders the display position associated with the display object in the real scene according to the pose data of the virtual object, so that the display device 455 can display the virtual object at the display position associated with the display object in the real scene no matter when it is started at any position, and then
  • the display part 4554 displays the augmented reality AR effect by superimposing the virtual object and the real scene image, so that the virtual object displayed by the display device and the real scene are seamlessly integrated.
  • the above-mentioned display method is implemented in the form of a software function part and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present disclosure essentially or the parts that make contributions to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions for A computer device (which may be a terminal, a server, etc.) is caused to execute all or part of the methods described in the various embodiments of the present disclosure.
  • the aforementioned computer-readable storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other media that can store program codes.
  • U disk mobile hard disk
  • read only memory Read Only Memory
  • ROM Read Only Memory
  • magnetic disk or optical disk and other media that can store program codes.
  • embodiments of the present disclosure are not limited to any particular combination of hardware and software.
  • an embodiment of the present disclosure further provides a computer program product, where the computer program product includes computer-executable instructions, and the computer-executable instructions are used to implement the steps in the presentation method provided by the embodiment of the present disclosure.
  • an embodiment of the present disclosure further provides a computer-readable storage medium, where computer-executable instructions are stored on the computer-readable storage medium, and the computer-executable instructions are used to implement the steps of the presentation method provided by the foregoing embodiments.
  • FIG. 15 is a schematic diagram of an optional composition structure of the display device provided by the embodiment of the present disclosure.
  • the display device 110 includes: a display screen 1101 ;
  • memory 1102 configured to store computer programs
  • processor 1103 When the processor 1103 is configured to execute the computer program stored in the memory 1102, in conjunction with the display screen 1101, the steps of the display methods provided in the above embodiments are implemented.
  • the display device 110 also includes a communication bus 1104 .
  • the communication bus 1104 is configured to enable connection communication between these components.
  • the display screen 1101 includes, but is not limited to, a liquid crystal display screen, an organic light-emitting diode display screen, a touch screen display screen, and the like, which is not limited in the embodiment of the present disclosure.
  • the memory 1102 is configured to store computer programs and applications by the processor 1101, and may also cache data to be processed or processed by the processor 1103 and various parts of the display device 110 (eg, image data, audio data, voice communication data, and video communication data). data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
  • the processor 1103 executes the program, the steps of any one of the above-mentioned methods are implemented.
  • the processor 1103 generally controls the overall operation of the display device 110 .
  • the above-mentioned processor 1103 may be an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (Programmable Logic Device) At least one of a Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PROM Programmable Logic Device
  • PLD Logic Device
  • FPGA Field Programmable Gate Array
  • CPU Central Processing Unit
  • controller a controller
  • microcontroller a microcontroller
  • the above-mentioned computer-readable storage medium/memory can be a read-only memory (Read Only Memory, ROM), a programmable read-only memory (Programmable Read-Only Memory, PROM), an erasable programmable read-only memory (Erasable Programmable Read-Only Memory) Memory, EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Magnetic Random Access Memory (FRAM), Flash Memory (Flash Memory), Magnetic Surface Memory, optical disk, or memory such as Compact Disc Read-Only Memory (CD-ROM); it can also be various terminals including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital Assistant etc.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms. of.
  • the unit described above as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit; it may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present disclosure.
  • each functional unit in each embodiment of the present disclosure may be all integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above integration
  • the unit can be implemented either in the form of hardware or in the form of hardware plus software functional units.
  • the above-mentioned integrated units of the embodiments of the present disclosure are implemented in the form of software functional parts and sold or used as independent products, they may also be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present disclosure may be embodied in the form of software products in essence or the parts that make contributions to related technologies.
  • the computer software products are stored in a storage medium and include several instructions for making The device automated test line performs all or part of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage medium includes various media that can store program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
  • the embodiment of the present disclosure obtains the historical pose information of the historical video frame before the current video frame by acquiring the current pose information corresponding to the current video frame collected from the real scene, based on the historical pose information and the current pose information, determine the virtual object pose data, and use the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device, so that the initial position of the display device is no matter where it is.
  • the display device can adjust the display of the virtual object according to the offset of the current pose information and the historical pose information, and display the virtual object to an accurate position, which improves the fusion of the virtual object and the real scene and the AR rendering effect.

Abstract

A display method and apparatus, a display device, and a storage medium. The method comprises: acquiring current posture information corresponding to the current video frame collected from a real scene (S101); acquiring historical posture information of a historical video frame before the current video frame, and determining virtual object posture data on the basis of the historical posture information and the current posture information (S102); and by using the virtual object posture data, rendering, in the current video frame displayed by a display device, a virtual object corresponding to the posture data virtual object (S103), such that no matter where the start position of the display device is, the display device can adjust and display the virtual object according to the offset of the current posture information and of the historical posture information, and can display the virtual object in an accurate position.

Description

显示方法、装置,显示设备及计算机可读存储介质Display method, apparatus, display device and computer-readable storage medium
交叉引用说明Cross-reference notes
本专利申请要求2020年09月16日提交的中国专利申请号为2020109761713,申请名称为“显示方法、装置,显示设备及存储介质”的优先权,该申请的全文以引用的方式并入本申请中。This patent application claims the priority of the Chinese patent application number 2020109761713 filed on September 16, 2020, and the application name is "display method, device, display device and storage medium", the full text of which is incorporated into this application by reference middle.
技术领域technical field
本公开涉及图像处理技术领域,尤其涉及一种显示方法、装置,显示设备及计算机可读存储介质。The present disclosure relates to the technical field of image processing, and in particular, to a display method, an apparatus, a display device, and a computer-readable storage medium.
背景技术Background technique
现有的三维模型显示方法是通过电机控制显示设备的行进位置。在滑动过程中根据显示设备的位置信息,进行显示相对应的增强现实(Augmented Reality,AR)模型。其缺点是AR模型的显示位置和滑动显示设备的初始位置绑定,一旦设备初始位置发生变化,其AR模型的显示位置亦将发生变化,导致AR模型和真实场景存在时延,AR呈现效果不佳。The existing three-dimensional model display method is to control the traveling position of the display device through the motor. During the sliding process, the corresponding Augmented Reality (AR) model is displayed according to the position information of the display device. The disadvantage is that the display position of the AR model is bound to the initial position of the sliding display device. Once the initial position of the device changes, the display position of the AR model will also change, resulting in a delay between the AR model and the real scene, and the AR rendering effect is not good. good.
发明内容SUMMARY OF THE INVENTION
本公开实施例提供了一种显示方法,所述方法包括:An embodiment of the present disclosure provides a display method, the method includes:
获取从真实场景中采集的当前视频帧的当前位姿信息;Obtain the current pose information of the current video frame collected from the real scene;
获取所述当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息与所述当前位姿信息,确定虚拟对象位姿数据;Obtain the historical pose information of the historical video frame before the current video frame, and determine virtual object pose data based on the historical pose information and the current pose information;
利用所述虚拟对象位姿数据,在显示设备展示的当前视频帧中渲染虚拟对象;Using the virtual object pose data, rendering the virtual object in the current video frame displayed by the display device;
通过所述显示设备显示所述真实场景与所述虚拟对象相叠加的增强现实效果。The augmented reality effect in which the real scene and the virtual object are superimposed is displayed through the display device.
上述方案中,所述获取从真实场景中采集的当前视频帧的当前位姿信息,包括:In the above solution, the obtaining of the current pose information of the current video frame collected from the real scene includes:
通过所述显示设备的采集部分采集所述真实场景的当前视频帧;The current video frame of the real scene is collected by the collection part of the display device;
利用定位算法对所述当前视频帧进行处理,得到所述当前视频帧在相机传感器坐标系中的所述当前位姿信息。The current video frame is processed using a positioning algorithm to obtain the current pose information of the current video frame in the camera sensor coordinate system.
上述方案中,所述获取所述当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息与所述当前位姿信息,确定虚拟对象位姿数据,包括:In the above solution, the obtaining of the historical pose information of the historical video frame before the current video frame, based on the historical pose information and the current pose information, determining the virtual object pose data, including:
获取所述当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息确定所述历史位姿偏移信息;Obtain the historical pose information of the historical video frame before the current video frame, and determine the historical pose offset information based on the historical pose information;
基于所述历史位姿偏移信息和所述当前位姿信息,得到所述虚拟对象位姿数据。The virtual object pose data is obtained based on the historical pose offset information and the current pose information.
上述方案中,所述基于所述历史位姿信息确定历史位姿偏移信息,包括:In the above solution, determining the historical pose offset information based on the historical pose information includes:
获取所述历史视频帧在视觉空间坐标系中的第一位姿信息;以及,利用定位算法对所述历史视频帧进行处理,得到所述历史视频帧在相机传感器坐标系中的第二位姿信息;其中,所述历史位姿信息包括所述第一位姿信息和所述第二位姿信息;Obtain the first pose information of the historical video frame in the visual space coordinate system; and, use a positioning algorithm to process the historical video frame to obtain the second pose of the historical video frame in the camera sensor coordinate system information; wherein, the historical pose information includes the first pose information and the second pose information;
基于所述第二位姿信息与所述第一位姿信息之间的偏移量,确定所述历史位姿偏移信息。The historical pose offset information is determined based on an offset between the second pose information and the first pose information.
上述方案中,所述基于所述历史位姿信息确定所述历史位姿偏移信息,包括:In the above solution, determining the historical pose offset information based on the historical pose information includes:
获取所述历史视频帧在视觉空间坐标系中的第一位姿信息;Obtain the first pose information of the historical video frame in the visual space coordinate system;
获取所述显示设备的采集部分在采集所述历史视频帧时的第三传感数据;acquiring the third sensing data when the acquisition part of the display device acquires the historical video frame;
基于第一传感数据与所述第三传感数据之间的偏移量,确定历史传感位姿信息;所述历史位姿信息包括所述第一位姿信息和所述历史传感位姿信息;所述第一传感数据包括所述采集部分在所述显示设备启动时采集的初始视频帧的数据;Determine historical sensing pose information based on the offset between the first sensing data and the third sensing data; the historical pose information includes the first pose information and the historical sensing position attitude information; the first sensing data includes the data of the initial video frame collected by the collecting part when the display device is started;
基于所述第一位姿信息和所述历史传感位姿信息之间的偏移量,确定所述历史位姿偏移信息。The historical pose offset information is determined based on an offset between the first pose information and the historical sensed pose information.
上述方案中,所述基于所述历史位姿偏移信息和所述当前位姿信息,得到所述虚拟对象位姿数据,包括:In the above solution, the obtaining of the virtual object pose data based on the historical pose offset information and the current pose information includes:
按照所述历史位姿偏移信息,对所述当前位姿信息进行偏移,得到纠正位姿信息;According to the historical pose offset information, the current pose information is offset to obtain corrected pose information;
确定与所述纠正位姿信息对应的所述虚拟对象位姿数据。The virtual object pose data corresponding to the corrected pose information is determined.
上述方案中,所述获取从真实场景中采集的当前视频帧的当前位姿信息,包括:In the above solution, the obtaining of the current pose information of the current video frame collected from the real scene includes:
获取所述显示设备的采集部分在采集初始视频帧时的第一传感数据,以及所述显示设备的采集部分在采集所述当前视频帧时的第二传感数据;acquiring the first sensing data of the acquisition part of the display device when collecting the initial video frame, and the second sensing data of the acquisition part of the display device when collecting the current video frame;
计算所述第一传感数据与所述第二传感数据的偏移量,确定所述显示设备采集所述当前视频帧时的所述当前位姿信息。Calculate the offset between the first sensing data and the second sensing data, and determine the current pose information when the display device collects the current video frame.
上述方案中,所述虚拟对象位姿数据包括:构成虚拟对象的每个像素的坐标位置;所述利用所述虚拟对象位姿数据,在所述显示设备对应的当前视频帧中渲染虚拟对象,包括:In the above solution, the virtual object pose data includes: the coordinate position of each pixel constituting the virtual object; the virtual object is rendered in the current video frame corresponding to the display device by using the virtual object pose data, include:
将所述虚拟对象中的每个像素的坐标位置映射到渲染引擎坐标系下,得到每个像素的目标坐标位置;The coordinate position of each pixel in the virtual object is mapped to the rendering engine coordinate system to obtain the target coordinate position of each pixel;
利用渲染引擎,在所述当前视频帧中目标坐标位置处渲染所述虚拟对象。Using a rendering engine, the virtual object is rendered at the target coordinate position in the current video frame.
本公开实施例提供一种显示装置,基于显示设备进行使用,包括:Embodiments of the present disclosure provide a display device, which is used based on a display device, including:
采集部分,被配置为获取从真实场景中采集的当前视频帧的当前位姿信息,获取所述当前视频帧之前的历史视频帧的历史位姿信息;The collection part is configured to obtain the current pose information of the current video frame collected from the real scene, and obtain the historical pose information of the historical video frame before the current video frame;
处理部分,被配置为基于所述历史位姿信息与所述当前位姿信息确定虚拟对象位姿数据;a processing part configured to determine virtual object pose data based on the historical pose information and the current pose information;
渲染部分,被配置为利用所述虚拟对象位姿数据,在所述显示设备展示的当前视频帧中渲染所述虚拟对象位姿数据对应的虚拟对象;a rendering part, configured to use the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device;
展示部分,被配置为通过所述显示设备显示所述真实场景与所述虚拟对象相叠加的增强现实效果。The presentation part is configured to display, through the display device, an augmented reality effect in which the real scene and the virtual object are superimposed.
上述装置中,所述增强现实效果包括以下之一:In the above device, the augmented reality effect includes one of the following:
所述真实场景中的至少一个真实对象的至少部分被所述虚拟对象遮挡;At least part of at least one real object in the real scene is occluded by the virtual object;
所述真实场景中的目标真实对象的边缘处渲染有所述虚拟对象;The virtual object is rendered at the edge of the target real object in the real scene;
所述真实场景中的背景区域中渲染有所述虚拟对象。The virtual object is rendered in the background area in the real scene.
上述装置中,所述处理部分,还被配置为基于所述真实场景图像,确定所述展示对象在预设三维虚拟场景中对应的虚拟对象模型;所述预设三维虚拟场景为根据所述真实场景建模得到的虚拟模型;获得对所述虚拟对象模型是否存在有预设渲染数据的判断结果;在所述判断结果表征为所述虚拟对象模型存在有预设渲染数据的情况下,将所述预设渲染数据作为所述虚拟对象数据。In the above device, the processing part is further configured to determine the virtual object model corresponding to the display object in the preset three-dimensional virtual scene based on the real scene image; the preset three-dimensional virtual scene is based on the real scene image. The virtual model obtained by scene modeling; obtain the judgment result of whether the virtual object model has preset rendering data; in the case that the judgment result is characterized as the virtual object model has preset rendering data, the The preset rendering data is used as the virtual object data.
上述装置中,所述处理部分,还被配置为根据所述真实场景图像,确定所述展示对象在真实场景中的当前位姿信息;根据真实坐标系与虚拟坐标系的预设映射关系,确定所述当前位姿信息在所述预设三维虚拟场景中对应的虚拟对象模型;所述真实坐标系为所述真实场景对应的坐标系;所述虚拟坐标系为所述预设三维虚拟场景对应的坐标系。In the above device, the processing part is further configured to determine the current pose information of the display object in the real scene according to the real scene image; the virtual object model corresponding to the current pose information in the preset three-dimensional virtual scene; the real coordinate system is the coordinate system corresponding to the real scene; the virtual coordinate system is the corresponding coordinate system of the preset three-dimensional virtual scene coordinate system.
上述装置中,所述处理部分,还被配置为根据真实坐标系与虚拟坐标系的预设映射关 系,确定所述当前位姿信息在所述预设三维虚拟场景中对应的位置区域;将所述位置区域内对应的预设虚拟模型作为所述虚拟对象模型。In the above device, the processing part is further configured to determine the position area corresponding to the current pose information in the preset three-dimensional virtual scene according to the preset mapping relationship between the real coordinate system and the virtual coordinate system; The corresponding preset virtual model in the location area is used as the virtual object model.
上述装置中,所述预设三维虚拟场景为实时重建的模型,或者预存在云端的模型。In the above device, the preset three-dimensional virtual scene is a model reconstructed in real time, or a model pre-stored in the cloud.
上述装置中,所述图像采集单元包含双目摄像头;所述显示设备还包括建模部分,所述采集部分,还被配置为所述基于所述真实场景图像中包括的展示对象,确定与所述展示对象匹配的虚拟对象数据之前,通过所述双目摄像头,获取所述真实场景图像的图像信息和深度信息;所述建模部分,还被配置为根据所述真实场景图像的图像信息和深度信息;对所述真实场景图像中的展示对象进行三维建模,得到所述预设三维虚拟场景。In the above device, the image acquisition unit includes a binocular camera; the display device further includes a modeling part, and the acquisition part is further configured to determine the display object based on the display object included in the real scene image and the display device. Before describing the virtual object data matching the display object, obtain the image information and depth information of the real scene image through the binocular camera; the modeling part is also configured to be based on the image information and the depth information of the real scene image. depth information; three-dimensional modeling is performed on the display object in the real scene image to obtain the preset three-dimensional virtual scene.
上述装置中,所述显示设备还包括更新部分,所述更新部分,被配置为在所述显示设备上展示所述真实场景图像与所述虚拟对象相叠加的增强现实AR效果之后,在所述显示设备的移动过程中,对采集的所述真实场景图像进行更新,并基于更新的真实场景图像得到更新的虚拟对象;所述展示部分,还被配置为在所述显示设备上实时展示所述更新的真实场景图像与所述更新的虚拟对象相叠加的增强现实AR效果。In the above device, the display device further includes an update part, and the update part is configured to display the augmented reality AR effect in which the real scene image and the virtual object are superimposed on the display device, During the movement of the display device, the collected real scene image is updated, and an updated virtual object is obtained based on the updated real scene image; the display part is also configured to display the real scene image on the display device in real time. An augmented reality AR effect in which the updated real scene image is superimposed with the updated virtual object.
上述装置中,展示对象的周围设置有至少一个显示设备,所述至少一个显示设备中的每个显示设备用于根据各自对所述展示对象的采集方向,在各自当前位置上实时采集所述展示对象的真实场景图像,并基于各自采集到的真实场景图像得到对应的虚拟对象,展示各自对应的真实场景图像与虚拟对象相叠加的增强现实AR效果。In the above device, at least one display device is arranged around the display object, and each display device in the at least one display device is used to collect the display in real time at the respective current position according to the respective collection direction of the display object. The real scene image of the object is obtained, and the corresponding virtual object is obtained based on the real scene image collected respectively, and the augmented reality AR effect in which the corresponding real scene image and the virtual object are superimposed is displayed.
本公开实施例提供一种显示设备,所述显示设备沿目标轨迹移动,包括:An embodiment of the present disclosure provides a display device that moves along a target trajectory, including:
显示屏,被配置为在所述显示设备上显示所述真实场景与所述虚拟对象相叠加的增强现实效果;a display screen configured to display an augmented reality effect in which the real scene and the virtual object are superimposed on the display device;
存储器,被配置为存储可执行指令;a memory configured to store executable instructions;
处理器,被配置为执行所述存储器中存储的可执行指令时,结合所述显示屏,实现本公开实施例所述的方法。When the processor is configured to execute the executable instructions stored in the memory, in combination with the display screen, the method described in the embodiments of the present disclosure is implemented.
本公开实施例提供一种计算机可读存储介质,存储有可执行指令,被配置为被处理器执行时,实现本公开实施例所述的方法。Embodiments of the present disclosure provide a computer-readable storage medium, which stores executable instructions and is configured to implement the methods described in the embodiments of the present disclosure when executed by a processor.
本公开实施例具有以下有益效果:The embodiments of the present disclosure have the following beneficial effects:
通过获取从真实场景中采集的当前视频帧的当前位姿信息,获取当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息与所述当前位姿信息,确定虚拟对象位姿数据,利用所述虚拟对象位姿数据,在所述显示设备展示的当前视频帧中渲染所述虚拟对象位姿数据对应的虚拟对象,使得显示设备的初始位置无论在什么位置,显示设备都可以根据当前位姿信息和历史位姿信息的偏移调整虚拟对象的显示情况,将虚拟对象显示到准确的位置,提高了虚拟对象与真实场景的融合度以及AR呈现效果。By obtaining the current pose information of the current video frame collected from the real scene, obtaining the historical pose information of the historical video frame before the current video frame, and determining the virtual object based on the historical pose information and the current pose information pose data, using the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device, so that no matter where the initial position of the display device is, the display device Both can adjust the display of virtual objects according to the offset of current pose information and historical pose information, display virtual objects to accurate positions, and improve the fusion of virtual objects and real scenes and the AR rendering effect.
附图说明Description of drawings
图1是本公开实施例提供的一种应用场景的示意图;FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
图2是本公开实施例提供的另一种应用场景的示意图;FIG. 2 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure;
图3为本公开实施例提供的另一种应用场景示意图;FIG. 3 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure;
图4为本公开实施例提供的显示方法的一个可选的流程示意图;FIG. 4 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure;
图5是本公开实施例提供的显示设备的装置结构示意图;5 is a schematic diagram of a device structure of a display device provided by an embodiment of the present disclosure;
图6a为本公开实施例提供的三个相机坐标系的关系示意图;FIG. 6a is a schematic diagram of the relationship between three camera coordinate systems according to an embodiment of the present disclosure;
图6b为本公开实施例提供的SLAM算法定义的世界坐标系示意图;FIG. 6b is a schematic diagram of a world coordinate system defined by a SLAM algorithm according to an embodiment of the present disclosure;
图6c为本公开实施例提供的渲染引擎采用的世界坐标系和视觉空间世界坐标系的关系示意图;6c is a schematic diagram of the relationship between the world coordinate system and the visual space world coordinate system adopted by the rendering engine provided by the embodiment of the present disclosure;
图7a是本公开实施例提供的虚拟对象的一个可选的效果示意图;7a is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure;
图7b是本公开实施例提供的虚拟对象的一个可选的效果示意图;7b is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure;
图7c是本公开实施例提供的虚拟对象的一个可选的效果示意图;7c is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure;
图7d是本公开实施例提供的虚拟对象的一个可选的效果示意图;7d is a schematic diagram of an optional effect of a virtual object provided by an embodiment of the present disclosure;
图8是本公开实施例提供的显示方法的一个可选的流程示意图;FIG. 8 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure;
图9是本公开实施例提供的显示方法的一个可选的流程示意图;FIG. 9 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure;
图10是本公开实施例提供的显示方法的一个可选的流程示意图;FIG. 10 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure;
图11是本公开实施例提供的显示方法的一个可选的流程示意图;11 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure;
图12a是本公开实施例提供的通过显示屏对沙盘模型进行展示的一个可选的效果示意图;12a is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure;
图12b是本公开实施例提供的通过显示屏对沙盘模型进行展示的一个可选的效果示意图;12b is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure;
图12c是本公开实施例提供的通过显示屏对沙盘模型进行展示的一个可选的效果示意图;12c is a schematic diagram of an optional effect of displaying the sand table model through a display screen provided by an embodiment of the present disclosure;
图12d是本公开实施例提供的通过显示屏对沙盘模型进行展示的一个可选的效果示意图;12d is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure;
图12e是本公开实施例提供的通过显示屏对沙盘模型进行展示的一个可选的效果示意图;12e is a schematic diagram of an optional effect of displaying a sand table model through a display screen provided by an embodiment of the present disclosure;
图13a是本公开实施例提供的显示设备的装置结构示意图;FIG. 13a is a schematic diagram of a device structure of a display device provided by an embodiment of the present disclosure;
图13b是本公开实施例提供的显示设备的装置结构示意图;13b is a schematic diagram of a device structure of a display device provided by an embodiment of the present disclosure;
图14是本公开实施例提供的显示装置的一个可选的结构示意图;14 is an optional schematic structural diagram of a display device provided by an embodiment of the present disclosure;
图15是本公开实施例提供的显示设备的一个可选的结构示意图。FIG. 15 is an optional schematic structural diagram of a display device provided by an embodiment of the present disclosure.
具体实施方式detailed description
为了使本公开的目的、技术方案和优点更加清楚,下面结合附图和实施例对本公开的技术方案进一步详细阐述,所描述的实施例不应视为对本公开的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be further elaborated below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations of the present disclosure. All other embodiments obtained under the premise of not making creative efforts fall within the protection scope of the present disclosure.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" can be the same or a different subset of all possible embodiments, and Can be combined with each other without conflict.
如果公开文件中出现“第一/第二”的类似描述则增加以下的说明,在以下的描述中,所涉及的术语“第一\第二\第三”仅仅是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。If a similar description of "first/second" appears in the published documents, the following description will be added. In the following description, the term "first\second\third" involved is only to distinguish similar objects, and does not mean For a specific ordering of objects, it is understood that "first\second\third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be performed in an order other than that shown or described.
除非另有定义,本文所使用的所有的技术和科学术语与属于本公开实施例的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开实施例的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of the present disclosure belong. The terminology used herein is for the purpose of describing the embodiments of the present disclosure only and is not intended to limit the present disclosure.
本公开实施例提供一种显示方法、装置、显示设备及计算机可读存储介质,能够提高展示的直观性和丰富性。本公开实施例提供的显示方法应用于显示设备中,下面说明本公开实施例提供的显示设备的示例性应用,本公开实施例提供的显示设备可以实施为AR眼镜、笔记本电脑,平板电脑,台式计算机,机顶盒,移动设备(例如,移动电话,便携式音乐播放器,个人数字助理,专用消息设备,便携式游戏设备)等各种具有显示屏的终端。Embodiments of the present disclosure provide a display method, apparatus, display device, and computer-readable storage medium, which can improve the intuitiveness and richness of display. The display method provided by the embodiment of the present disclosure is applied to a display device. The following describes an exemplary application of the display device provided by the embodiment of the present disclosure. The display device provided by the embodiment of the present disclosure can be implemented as AR glasses, a notebook computer, a tablet computer, a desktop computer Computers, set-top boxes, mobile devices (eg, mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable game devices) and other various terminals with display screens.
下面对可适用于本公开实施例中的应用场景进行示例性说明。本公开实施例的应用场景包括但不限于物体展示场景,例如楼盘沙盘展示、工地楼宇展示、或其他物体展示等场景。The following provides exemplary descriptions of application scenarios applicable to the embodiments of the present disclosure. Application scenarios of the embodiments of the present disclosure include but are not limited to object display scenarios, such as real estate sand table display, construction site building display, or other object display scenarios.
示例性的,请参见图1,图1为本公开实施例提供的一种应用场景的示意图。如图1所示,显示屏101可以设置在楼宇之中,并可以沿预设轨道进行滑动。在其它实施例中,显示屏101可以设置在楼宇的边缘或楼宇之外。显示屏101可以用于采集楼宇的真实场景图像,并在楼宇真实场景图像上叠加与楼宇相关的虚拟效果,从而呈现出AR效果。在一些实施例中,在显示屏101滑动到楼宇A的情况下,显示屏101采集到楼宇A的真实图像,并可以根据楼宇A的真实图像确定楼宇A的楼宇模型为A’,显示屏101根据A’对应的预设渲染数据,渲染得到楼宇A的虚拟效果图像,并将楼宇A的虚拟效果图像叠加楼宇A的真实图像上显示出AR效果。在显示屏101滑动到楼宇B的情况下,显示屏101可以得到楼宇B的真实图像,并确定楼宇B的楼宇模型为B’,进而将楼宇B的虚拟效果图像叠加楼宇B的真实图像上对屏幕显示内容进行更新,在显示屏101的移动过程中实时显示出每个移动位置上AR效果。For example, please refer to FIG. 1 , which is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. As shown in FIG. 1 , the display screen 101 can be installed in a building and can slide along a preset track. In other embodiments, the display screen 101 may be positioned at the edge of the building or outside the building. The display screen 101 can be used to collect the real scene image of the building, and superimpose the virtual effect related to the building on the real scene image of the building, thereby presenting the AR effect. In some embodiments, when the display screen 101 slides to the building A, the display screen 101 collects a real image of the building A, and the building model of the building A can be determined as A' according to the real image of the building A, and the display screen 101 According to the preset rendering data corresponding to A', the virtual effect image of building A is obtained by rendering, and the virtual effect image of building A is superimposed on the real image of building A to display the AR effect. When the display screen 101 slides to the building B, the display screen 101 can obtain the real image of the building B, and determine the building model of the building B as B', and then superimpose the virtual effect image of the building B on the real image of the building B. The content displayed on the screen is updated, and the AR effect on each moving position is displayed in real time during the movement of the display screen 101 .
图2为本公开实施例提供的另一种应用场景的示意图,如图2所示,本公开实施例中的显示设备还可以为终端设备102,用户可以手持或佩戴终端设备102进入楼宇之间,并通过拍摄楼宇使在终端设备102上显示楼宇图像与楼宇相关的虚拟效果图像相叠加的AR效果。FIG. 2 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure. As shown in FIG. 2 , the display device in the embodiment of the present disclosure may also be a terminal device 102, and a user may hold or wear the terminal device 102 to enter between buildings , and by photographing the building, the terminal device 102 displays an AR effect in which the building image and the virtual effect image related to the building are superimposed.
图3为本公开实施例提供的另一种应用场景示意图,如图3所示,显示设备101设置于预设的滑动轨道102上,显示设备101可以沿滑动轨道102移动,且显示设备101设置于展示台的前方,在所述展示台上设有至少一个目标实体103,所述显示设备101中显示有虚拟对象104,该虚拟对象104用于对目标实体103进行讲解。示例性的,在虚拟对象104讲解过程中可以基于显示设备101移动过程中采集的目标实体103的图像,在显示设备101的屏幕中显示与目标实体103相关的虚拟效果图像,以呈现目标实体103与虚拟效果图像相叠加的AR效果。FIG. 3 is a schematic diagram of another application scenario provided by an embodiment of the present disclosure. As shown in FIG. 3 , the display device 101 is set on a preset sliding track 102, the display device 101 can move along the sliding track 102, and the display device 101 is set In front of the display table, at least one target entity 103 is arranged on the display table, and a virtual object 104 is displayed on the display device 101 , and the virtual object 104 is used for explaining the target entity 103 . Exemplarily, during the explanation of the virtual object 104, a virtual effect image related to the target entity 103 may be displayed on the screen of the display device 101 based on the image of the target entity 103 collected during the movement of the display device 101 to present the target entity 103. AR effect superimposed with virtual effect image.
参见图4,图4是本公开实施例提供的显示方法的一个可选的流程示意图,将结合图4示出的步骤进行说明。Referring to FIG. 4 , FIG. 4 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure, which will be described in conjunction with the steps shown in FIG. 4 .
步骤S101、获取从真实场景中采集的当前视频帧的当前位姿信息。Step S101: Obtain current pose information of a current video frame collected from a real scene.
示例性的,本公开实施例中提供的显示方法应用于显示设备中。其中,如图5所示,显示设备500可以固定在通过带有滑轮的支架530上,与展台520上预设的滑动轨道510活动连接,并可沿预设的滑动轨道510左右滑动。示例性的,本公开实施例中提供的显示方法还可以应用于用户手持显示设备进行移动的场景。用户手持显示设备移动的同时,显示设备显示虚拟对象和真实场景进行融合。本公开实施例中提供的显示方法主要用于解决可移动的显示设备不在初始位置启动时,显示设备显示的虚拟对象很难和真实场景融合,AR呈现效果不佳的问题。Exemplarily, the display method provided in the embodiment of the present disclosure is applied to a display device. As shown in FIG. 5 , the display device 500 can be fixed on a bracket 530 with pulleys, movably connected with a preset sliding track 510 on the booth 520 , and can slide left and right along the preset sliding track 510 . Exemplarily, the display method provided in the embodiment of the present disclosure may also be applied to a scenario in which a user moves with a hand-held display device. When the user moves with the display device in hand, the display device displays virtual objects and real scenes for fusion. The display method provided in the embodiments of the present disclosure is mainly used to solve the problem that when the movable display device is not started at the initial position, the virtual object displayed by the display device is difficult to be integrated with the real scene, and the AR rendering effect is not good.
本公开实施例中,显示设备可以通过采集部分采集当前真实场景的图像,根据图像中的当前视频帧或者当前时刻的图像确定显示设备的当前位姿信息。示例性的,真实场景可以是展台上的沙盘模型或其他展品、建筑中的工地、建筑物室内场景、街道场景、或其他的物体等场景,通过在真实场景中叠加虚拟对象,来呈现增强现实的效果。其中,采集部分的采集范围可以包含全部展示物体,也可以只包含部分展示物体。本公开实施例对采集部分的采集范围不做限定。In the embodiment of the present disclosure, the display device may collect an image of the current real scene through the acquisition part, and determine the current pose information of the display device according to the current video frame in the image or the image at the current moment. Exemplarily, the real scene may be a sand table model or other exhibits on a booth, a construction site in a building, an interior scene of a building, a street scene, or other objects, and the augmented reality is presented by superimposing virtual objects on the real scene. Effect. The collection range of the collection part may include all the displayed objects, or may only include some of the displayed objects. The embodiment of the present disclosure does not limit the collection range of the collection part.
本公开实施例中,显示设备的位姿信息可以包括显示设备在滑动轨道上运动时、用户手持显示设备进行移动时、智能移动显示设备自主导航移动时,用于显示虚拟对象的显示部件所在的位置和/或显示角度。当前视频帧对应的当前位姿信息可以通过设置在显示设备上的采集部分获取。本公开实施例中采集部分可以包括:双目相机、传感器、陀螺仪、惯性测量传感器(Inertial measurement unit,IMU)等。In this embodiment of the present disclosure, the pose information of the display device may include the location of the display component used to display the virtual object when the display device moves on the sliding track, when the user moves the display device by hand, or when the intelligent mobile display device navigates and moves autonomously. position and/or display angle. The current pose information corresponding to the current video frame can be acquired through the acquisition part set on the display device. The acquisition part in the embodiment of the present disclosure may include: a binocular camera, a sensor, a gyroscope, an inertial measurement unit (Inertial measurement unit, IMU), and the like.
如可以是基于全球定位系统(Global Positioning System,GPS)、全球导航卫星系统(Global Navigation Satellite System,GLONASS),也可以同时包括用来确定显示设备的显 示角度的角速度传感器。For example, it may be based on a global positioning system (Global Positioning System, GPS), a global navigation satellite system (Global Navigation Satellite System, GLONASS), and may also include an angular velocity sensor for determining the display angle of the display device.
本公开实施例中,显示设备在非初始位置启动时存在位姿偏移,当显示设备在当前视频帧需要显示虚拟对象时,首先需要获取当前视频帧的当前位姿信息,将当前位姿信息与位姿偏移叠加,进而可以在展示对象对应的位置显示虚拟对象。本公开实施例中,显示设备开启后采集部分实时采集真实场景中的视频图像,筛选出视频图像的当前时刻的视频帧作为当前视频帧,并对当前视频帧进行处理,获取到当前视频帧的当前位姿信息。In the embodiment of the present disclosure, there is a pose offset when the display device is started at a non-initial position. When the display device needs to display a virtual object in the current video frame, it first needs to obtain the current pose information of the current video frame, and convert the current pose information to the current video frame. It is superimposed with the pose offset, and then the virtual object can be displayed at the position corresponding to the display object. In the embodiment of the present disclosure, after the display device is turned on, the collection part collects the video image in the real scene in real time, selects the video frame at the current moment of the video image as the current video frame, processes the current video frame, and obtains the current video frame. Current pose information.
在本公开的一些实施例中,显示设备可以采用定位算法对当前视频帧进行处理,获取到当前视频帧的当前位姿信息。其中,定位算法例如为地图构建(simultaneous localization and mapping,SLAM)算法,SLAM算法可以基于预先定义的虚拟坐标系,结合当前视频帧计算出当前位姿信息。In some embodiments of the present disclosure, the display device may use a positioning algorithm to process the current video frame to obtain current pose information of the current video frame. The positioning algorithm is, for example, a map construction (simultaneous localization and mapping, SLAM) algorithm, and the SLAM algorithm can calculate the current pose information based on a pre-defined virtual coordinate system in combination with the current video frame.
本公开实施例中,采集部分可以是设置在显示设备上的传感器,显示设备开启后,传感器实时获取显示设备的位置坐标信息。当前视频帧对应的当前位姿信息可以是当前时刻的传感器获取到的显示设备的位置坐标信息。在本公开的一些实施例中,采集部分可以包括设置在显示设备上的角度传感器,显示设备开启后角度传感器实时获取显示设备的显示角度信息。当前视频帧对应的当前位姿信息可以包括当前时刻的角度传感器获取到的显示设备的显示角度信息。其中,位姿偏移可以为显示设备在非初始位置启动时的位置坐标信息,与显示设备在初始位置启动时的位置坐标信息的差值。位姿偏移还可以为显示设备在非初始位置启动时的非初始位置启动时显示角度信息,与显示设备在初始位置启动时的显示角度信息的差值。In the embodiment of the present disclosure, the acquisition part may be a sensor provided on the display device. After the display device is turned on, the sensor acquires the position coordinate information of the display device in real time. The current pose information corresponding to the current video frame may be the position coordinate information of the display device acquired by the sensor at the current moment. In some embodiments of the present disclosure, the acquisition part may include an angle sensor disposed on the display device, and the angle sensor acquires display angle information of the display device in real time after the display device is turned on. The current pose information corresponding to the current video frame may include the display angle information of the display device acquired by the angle sensor at the current moment. The pose offset may be the difference between the position coordinate information when the display device is started at a non-initial position and the position coordinate information when the display device is started at the initial position. The pose offset can also be the difference between the display angle information when the display device is started at a non-initial position when the display device is started at a non-initial position, and the display angle information when the display device is started at an initial position.
在本公开的一些实施例中,当前视频帧对应的当前位姿信息也可以包括传感器获取到的位置坐标信息与角度传感器获取到的显示角度信息的组合信息。In some embodiments of the present disclosure, the current pose information corresponding to the current video frame may also include combination information of the position coordinate information obtained by the sensor and the display angle information obtained by the angle sensor.
步骤S102、获取当前视频帧之前的历史视频帧的历史位姿信息,基于历史位姿信息与当前位姿信息,确定虚拟对象位姿数据。Step S102: Obtain historical pose information of a historical video frame before the current video frame, and determine virtual object pose data based on the historical pose information and the current pose information.
本公开实施例中,显示设备的采集部分(比如采集部分中的双目相机)实时采集当前真实场景的图像。显示设备启动预定时长(示例性的,设置为1-3秒内的时长)后通过设置在显示设备上的采集部分获取显示设备的历史视频帧。其中,历史视频帧是当前时刻之前任意一时刻的视频帧。显示设备可以采用定位算法对历史视频帧进行处理,获取到历史视频帧的历史位姿信息。本公开实施例中,定位算法例如为SLAM算法、视觉定位算法和基于惯性传感器的定位算法等,本公开实施例对此并不限定。示例性的,显示设备通过视觉定位算法对历史视频帧进行处理得到历史视频帧的第一位姿信息,显示设备通过SLAM算法对历史视频帧进行处理得到历史视频帧的第二位姿信息,显示设备通过基于惯性传感器的定位算法对历史视频帧对应时刻的惯性传感器数据进行处理得到历史视频帧的历史传感位姿信息。其中第一位姿信息包括:视觉空间位姿信息,第二位姿信息包括:相机位姿信息,历史传感位姿信息包括:惯性传感位姿信息。示例性的,显示设备的处理部分可以基于第一位姿信息和第二位姿信息的计算出偏移,得到历史位姿偏移信息。In the embodiment of the present disclosure, the acquisition part (for example, the binocular camera in the acquisition part) of the display device acquires the image of the current real scene in real time. After the display device starts up for a predetermined duration (exemplarily, the duration is set to be within 1-3 seconds), the historical video frames of the display device are acquired through the acquisition part set on the display device. The historical video frame is a video frame at any moment before the current moment. The display device can use a positioning algorithm to process the historical video frames to obtain historical pose information of the historical video frames. In the embodiments of the present disclosure, the positioning algorithms are, for example, SLAM algorithms, visual positioning algorithms, and inertial sensor-based positioning algorithms, which are not limited in the embodiments of the present disclosure. Exemplarily, the display device processes the historical video frames through a visual positioning algorithm to obtain the first pose information of the historical video frames, the display device processes the historical video frames through the SLAM algorithm to obtain the second pose information of the historical video frames, and displays the information. The device processes the inertial sensor data at the corresponding moment of the historical video frame through the positioning algorithm based on the inertial sensor to obtain the historical sensing pose information of the historical video frame. The first pose information includes visual space pose information, the second pose information includes camera pose information, and the historical sensing pose information includes inertial sensing pose information. Exemplarily, the processing part of the display device may calculate the offset based on the first pose information and the second pose information to obtain historical pose offset information.
本公开实施例中,显示设备的处理部分获取到当前位姿信息与历史位姿偏移信息,通过显示设备的处理部分将当前位姿信息叠加历史位姿偏移信息,得到虚拟对象位姿数据。处理部分将虚拟对象位姿数据发送给显示设备的渲染部分上,渲染部分可以在对应的位置渲染出虚拟对象,提高了虚拟对象与真实场景的融合度以及AR呈现效果。In the embodiment of the present disclosure, the processing part of the display device acquires the current pose information and the historical pose offset information, and the processing part of the display device superimposes the current pose information on the historical pose offset information to obtain virtual object pose data . The processing part sends the virtual object pose data to the rendering part of the display device, and the rendering part can render the virtual object at the corresponding position, which improves the fusion degree of the virtual object and the real scene and the AR rendering effect.
本公开实施例中,为了方便解释位姿信息,这里引入坐标系的概念。首先可以分别定义虚拟的相机传感器坐标系slam_c、视觉空间坐标系phy_c、渲染引擎相机坐标系render_c、相机传感器世界坐标系slam_w、渲染引擎相机世界坐标系render_w和视觉空间世界坐标系phy_w。其中,相机传感器坐标系slam_c为SLAM算法定义的相机坐标系,相机传感器世界坐标系slam_w为SLAM算法定义的世界坐标系,视觉空间坐标系phy_c为视觉定位算法定义的相机坐标系,视觉空间世界坐标系phy_w为视觉定位算法定义的世界坐标系, 渲染引擎相机坐标系render_c为渲染引擎采用算法定义的相机坐标系,渲染引擎相机世界坐标系render_w为渲染引擎采用算法定义的世界坐标系。In the embodiments of the present disclosure, for the convenience of explaining the pose information, the concept of a coordinate system is introduced here. First, the virtual camera sensor coordinate system slam_c, the visual space coordinate system phy_c, the rendering engine camera coordinate system render_c, the camera sensor world coordinate system slam_w, the rendering engine camera world coordinate system render_w and the visual space world coordinate system phy_w can be defined respectively. Among them, the camera sensor coordinate system slam_c is the camera coordinate system defined by the SLAM algorithm, the camera sensor world coordinate system slam_w is the world coordinate system defined by the SLAM algorithm, the visual space coordinate system phy_c is the camera coordinate system defined by the visual positioning algorithm, and the visual space world coordinate system The system phy_w is the world coordinate system defined by the visual positioning algorithm, the rendering engine camera coordinate system render_c is the camera coordinate system defined by the rendering engine algorithm, and the rendering engine camera world coordinate system render_w is the world coordinate system defined by the rendering engine algorithm.
由于在本公开实施例中,显示设备上的采集部分包括了一个相机,所以基于相机定义的相机传感器坐标系slam_c、视觉空间坐标系phy_c和渲染引擎相机坐标系render_c的原点是重合的。其中,SLAM算法定义的相机传感器世界坐标系slam_w与SLAM算法启动的位置有关,启动位置即为相机传感器世界坐标系slam_w的原点位置。渲染引擎相机世界坐标系render_w和视觉空间世界坐标系phy_w的原点可以是真实场景中的任意一点。Since in the embodiment of the present disclosure, the acquisition part on the display device includes a camera, the origins of the camera sensor coordinate system slam_c, the visual space coordinate system phy_c and the rendering engine camera coordinate system render_c defined based on the camera are coincident. Among them, the camera sensor world coordinate system slam_w defined by the SLAM algorithm is related to the starting position of the SLAM algorithm, and the starting position is the origin position of the camera sensor world coordinate system slam_w. The origin of the rendering engine camera world coordinate system render_w and the visual space world coordinate system phy_w can be any point in the real scene.
相机传感器坐标系slam_c中,如图6a所示,Xslam_c表示该坐标系的X轴,Yslam_c表示该坐标系的Y轴,Zslam_c表示该坐标系的Z轴。显示设备可以通过SLAM算法对当前视频帧或者历史视频帧进行计算,得到当前视频帧或者历史视频帧在相机传感器坐标系slam_c中的当前位姿信息或者历史位姿信息。In the camera sensor coordinate system slam_c, as shown in Figure 6a, Xslam_c represents the X axis of the coordinate system, Yslam_c represents the Y axis of the coordinate system, and Zslam_c represents the Z axis of the coordinate system. The display device can calculate the current video frame or historical video frame through the SLAM algorithm, and obtain the current pose information or historical pose information of the current video frame or historical video frame in the camera sensor coordinate system slam_c.
视觉空间坐标系phy_c中,如图6a所示,Xphy_c表示该坐标系的X轴,Yphy_c表示该坐标系的Y轴,Zphy_c表示该坐标系的Z轴。显示设备可以通过视觉定位算法对当前视频帧或者历史视频帧进行计算,得到当前视频帧或者历史视频帧在视觉空间坐标系phy_c中的当前位姿信息或者历史位姿信息。渲染引擎相机坐标系render_c中,如图6A所示,Xrender_c表示该坐标系的X轴,Yrender_c表示该坐标系的Y轴,Zrender_c表示该坐标系的Z轴。显示设备通过历史位姿信息计算获取历史位姿偏移信息,将历史位姿偏移信息和当前位姿信息叠加得到虚拟对象位姿数据。其中,虚拟对象位姿数据包括虚拟对象在相机传感器坐标系slam_c中的位姿数据,显示设备将虚拟对象在相机传感器坐标系slam_c中的位姿数据转换到渲染引擎相机坐标系render_c中,得到虚拟对象的目标位置坐标,然后可以通过渲染引擎根据虚拟对象的目标位置坐标在渲染引擎坐标系对应的位置渲染出虚拟对象。In the visual space coordinate system phy_c, as shown in Fig. 6a, Xphy_c represents the X axis of the coordinate system, Yphy_c represents the Y axis of the coordinate system, and Zphy_c represents the Z axis of the coordinate system. The display device may calculate the current video frame or the historical video frame through the visual positioning algorithm, and obtain the current pose information or historical pose information of the current video frame or the historical video frame in the visual space coordinate system phy_c. In the rendering engine camera coordinate system render_c, as shown in FIG. 6A , Xrender_c represents the X axis of the coordinate system, Yrender_c represents the Y axis of the coordinate system, and Zrender_c represents the Z axis of the coordinate system. The display device obtains the historical pose offset information by calculating the historical pose information, and superimposes the historical pose offset information and the current pose information to obtain virtual object pose data. The virtual object pose data includes the pose data of the virtual object in the camera sensor coordinate system slam_c, and the display device converts the virtual object pose data in the camera sensor coordinate system slam_c to the rendering engine camera coordinate system render_c to obtain the virtual object. The target position coordinates of the object can then be rendered by the rendering engine at a position corresponding to the rendering engine coordinate system according to the target position coordinates of the virtual object.
相机传感器世界坐标系slam_w中,如图6b所示,Xslam_w、Yslam_w和Zslam_w即为三个坐标轴。In the camera sensor world coordinate system slam_w, as shown in Figure 6b, Xslam_w, Yslam_w and Zslam_w are three coordinate axes.
渲染引擎相机世界坐标系render_w中,如图6c所示,Xrender_w、Yrender_w和Zrender_w即为三个坐标轴。In the rendering engine camera world coordinate system render_w, as shown in Figure 6c, Xrender_w, Yrender_w and Zrender_w are the three coordinate axes.
视觉空间世界坐标系phy_w中,如图6c所示,Xphy_w、Yphy_w和Zphy_w即为三个坐标轴。如图6c所示,渲染引擎相机世界坐标系render_w和视觉空间世界坐标系phy_w(即真实世界坐标系)的原点是重合的,即渲染空间与物理空间应该是一一对应的。In the visual space world coordinate system phy_w, as shown in Figure 6c, Xphy_w, Yphy_w and Zphy_w are three coordinate axes. As shown in Figure 6c, the origins of the rendering engine camera world coordinate system render_w and the visual space world coordinate system phy_w (ie, the real world coordinate system) coincide, that is, the rendering space and the physical space should have a one-to-one correspondence.
示例性的,视觉空间坐标系phy_c中的历史位姿信息或者当前位姿信息包括显示设备的显示部件在视觉空间坐标系phy_c中的坐标位置,或者包括显示设备的显示部件与视觉空间坐标系phy_c中各个坐标轴的夹角,或者同时包括显示设备的显示部件在视觉空间坐标系phy_c中的坐标位置以及与视觉空间坐标phy_c中各个坐标轴的夹角,在此不做具体限定。Exemplarily, the historical pose information or current pose information in the visual space coordinate system phy_c includes the coordinate position of the display component of the display device in the visual space coordinate system phy_c, or includes the display component of the display device and the visual space coordinate system phy_c. The included angle of each coordinate axis in , or simultaneously includes the coordinate position of the display component of the display device in the visual space coordinate system phy_c and the included angle with each coordinate axis in the visual space coordinate phy_c, which is not specifically limited here.
示例性的,显示设备的历史视频帧的历史位姿信息包括了第一位姿信息和第二位姿信息。显示设备可以计算获取历史视频帧的第一位姿信息为(X1,Y1,Z1)、第二位姿信息为(X2,Y2,Z2)。其中,第一位姿信息(X1,Y1,Z1)中的X1为历史视频帧在视觉空间坐标系phy_c中的X轴上的坐标点,Y1为历史视频帧在视觉空间坐标系phy_c中的Y轴上的坐标点,Z1为历史视频帧在视觉空间坐标系phy_c中的Z轴上的坐标点。第二位姿信息(X2,Y2,Z2)中的X2为历史视频帧在相机传感器坐标系slam_c中的X轴上的坐标点,Y2为历史视频帧在相机传感器坐标系slam_c中的Y轴上的坐标点,Z2为历史视频帧在相机传感器坐标系slam_c中的Z轴上的坐标点。然后通过显示设备的处理部分计算获取第一位姿信息(X1,Y1,Z1)和第二位姿信息(X2,Y2,Z2)之间的偏移,得到历史位姿偏移信息。将历史位姿偏移信息和当前位姿信息融合,得到虚拟对象位姿数据。Exemplarily, the historical pose information of the historical video frames of the display device includes first pose information and second pose information. The display device may calculate and obtain the first pose information of the historical video frame as (X1, Y1, Z1), and the second pose information as (X2, Y2, Z2). Among them, X1 in the first pose information (X1, Y1, Z1) is the coordinate point of the historical video frame on the X axis in the visual space coordinate system phy_c, and Y1 is the Y of the historical video frame in the visual space coordinate system phy_c The coordinate point on the axis, Z1 is the coordinate point on the Z axis of the historical video frame in the visual space coordinate system phy_c. X2 in the second pose information (X2, Y2, Z2) is the coordinate point of the historical video frame on the X axis in the camera sensor coordinate system slam_c, and Y2 is the historical video frame on the Y axis in the camera sensor coordinate system slam_c The coordinate point, Z2 is the coordinate point of the historical video frame on the Z axis in the camera sensor coordinate system slam_c. Then, the offset between the first pose information (X1, Y1, Z1) and the second pose information (X2, Y2, Z2) is obtained by the processing part of the display device, and the historical pose offset information is obtained. The historical pose offset information and the current pose information are fused to obtain the virtual object pose data.
步骤S103、利用虚拟对象位姿数据,在显示设备展示的当前视频帧中渲染虚拟对象。Step S103, using the virtual object pose data to render the virtual object in the current video frame displayed by the display device.
本公开实施例中,显示设备的渲染部分确定出的虚拟对象位姿数据之后,根据虚拟对象位姿数据包括的构成虚拟对象的每个像素的坐标位置,在真实场景图像中与展示对象关联的展示位置处渲染虚拟对象位姿数据对应的虚拟对象。In the embodiment of the present disclosure, after the virtual object pose data determined by the rendering part of the display device, according to the coordinate position of each pixel constituting the virtual object included in the virtual object pose data, the display object is associated with the display object in the real scene image. The virtual object corresponding to the pose data of the virtual object is rendered at the display position.
本公开实施例中,显示设备根据虚拟对象位姿数据渲染得到的虚拟对象可以包括以下至少之一:In this embodiment of the present disclosure, the virtual object rendered by the display device according to the pose data of the virtual object may include at least one of the following:
与展示对象对应的虚拟场景效果;如图7a所示,在通过滑轨上的显示屏对展台上的沙盘模型进行展示时,虚拟对象可以是沙盘中的楼宇模型对应的完工后的效果,以及沙盘区域在白天和夜晚不同的场景效果。The virtual scene effect corresponding to the display object; as shown in Figure 7a, when the sand table model on the booth is displayed through the display screen on the slide rail, the virtual object can be the completed effect corresponding to the building model in the sand table, and The sand table area has different scene effects during the day and night.
与展示对象对应的虚拟细节图;如图7b所示,在通过滑轨上的显示屏对展台上的汽车进行展示时,显示屏不在初始位置启动,当获取到了显示屏的当前位姿信息和历史位姿信息后,可以确定虚拟对象位姿信息,从而进行虚拟虚拟对象的展示。虚拟对象可以是在显示屏当前位置对应的车身部位内部的构造细节图。The virtual detail map corresponding to the display object; as shown in Figure 7b, when the car on the booth is displayed through the display screen on the slide rail, the display screen is not started at the initial position, when the current pose information and After the historical pose information is obtained, the pose information of the virtual object can be determined, so as to display the virtual virtual object. The virtual object may be a detailed view of the structure inside the body part corresponding to the current position of the display screen.
与展示对象对应的虚拟三维动画效果;如图7c所示,虚拟对象可以是汽车上的元件如方向盘的虚拟三维动画效果53,显示设备可以将方向盘元件对应的虚拟三维动画效果53在显示屏的上方区域播放,对方向盘进行全方位旋转展示。The virtual three-dimensional animation effect corresponding to the display object; as shown in Figure 7 c, the virtual object can be the virtual three-dimensional animation effect 53 of the component on the car such as the steering wheel, and the display device can display the virtual three-dimensional animation effect 53 corresponding to the steering wheel component on the display screen. The upper area is played, and the steering wheel is displayed in an all-round rotation.
与展示对象对应的虚拟标签。如图7d所示,在通过滑轨上的显示屏对展台上的沙盘模型进行展示时,虚拟对象可以是以文字标签或图片标签的形式展示楼宇模型对应的说明信息。The virtual label corresponding to the display object. As shown in Fig. 7d, when displaying the sand table model on the booth through the display screen on the slide rail, the virtual object can display the description information corresponding to the building model in the form of a text label or a picture label.
本公开实施例中,显示设备通过当前位姿信息和历史位姿信息确定了虚拟对象位姿数据之后,可以从真实场景图像中得到与展示对象关联的展示位置,这样在根据虚拟对象位姿数据进行渲染,得到虚拟对象之后,将虚拟对象对应叠加在真实场景图像中展示对象关联的展示位置上,再配合虚拟对象数据的透明度的设置,来达到真实场景图像与虚拟对象相叠加的增强显示AR效果。如上述图7a至图7d所示,虚拟对象与真实场景图像中的展示对象是1:1大小,并且虚拟对象是覆盖在真实场景图像中展示对象的同一位置上的,因此如沙盘完工效果、车身细节图等虚拟效果可以覆盖并重合在沙盘部分模型图像,汽车部分车身图像上显示,从而呈现出了在展示对象上进一步叠加了虚拟画面的AR效果。In the embodiment of the present disclosure, after the display device determines the pose data of the virtual object through the current pose information and the historical pose information, the display device can obtain the display position associated with the display object from the real scene image. In this way, according to the virtual object pose data After rendering, after obtaining the virtual object, the virtual object is correspondingly superimposed on the display position associated with the display object in the real scene image, and then cooperate with the setting of the transparency of the virtual object data to achieve the enhanced display AR in which the real scene image and the virtual object are superimposed. Effect. As shown in Figures 7a to 7d above, the size of the virtual object and the display object in the real scene image is 1:1, and the virtual object is overlaid on the same position of the display object in the real scene image, so it is like the sand table completion effect, Virtual effects such as car body detail images can be overlaid and superimposed on part of the model image of the sand table, and displayed on the part of the car body image, thus presenting an AR effect in which the virtual image is further superimposed on the display object.
S104、通过显示设备显示真实场景与所述虚拟对象相叠加的增强现实效果。S104 , displaying an augmented reality effect in which the real scene and the virtual object are superimposed on the display device.
本公开实施例中,显示设备渲染出虚拟对象之后,可以通过显示设备上的显示屏幕,展示真实场景图像与虚拟对象相叠加的AR效果。In the embodiment of the present disclosure, after the display device renders the virtual object, the AR effect in which the real scene image and the virtual object are superimposed may be displayed on the display screen on the display device.
示例性的,通常显示设备需要通过相机传感器坐标系slam_c确定显示设备的位姿,从而根据显示设备的位姿来显示虚拟对象。当显示设备不在初始位置启动时,显示设备定义的相机传感器坐标系slam_c的原点不在预设的启动位置,造成显示设备的定位位姿存在误差。本公开实施例中,显示设备上的处理部分通过处理历史位姿信息得到显示设备不在初始位置启动时的历史位姿偏移信息。例如,历史位姿信息包括第一位姿信息和第二位姿信息,第一位姿信息包括历史视频帧在视觉空间坐标系phy_c中的视觉空间位姿信息,而视觉空间坐标系phy_c与真实场景匹配,第二位姿信息包括历史视频帧在相机传感器坐标系slam_c中的相机位姿信息。显示设备可以通过第一位姿信息和第二位姿信息计算得到历史位姿偏移信息。其中,历史位姿偏移信息是显示设备不在初始位置启动时显示设备定义的相机传感器坐标系slam_c在真实场景内的偏移信息。显示设备将当前位姿信息和历史位姿偏移信息进行叠加可以将显示设备的位姿误差进行纠正,从而确定虚拟对象位姿数据,根据虚拟对象位姿数据对真实场景中与展示对象关联的展示位置进行进一步渲染,使得显示设备无论在任何位置启动时可以在真实场景中展示对象关联的展示位置展示虚拟对象,进而展示虚拟对象与真实场景图像相叠加的AR效果,使得显示设备显示的虚拟对象与真实场景高度融合,优化了AR显示效果。Exemplarily, generally, the display device needs to determine the pose of the display device through the camera sensor coordinate system slam_c, so as to display the virtual object according to the pose of the display device. When the display device is not started at the initial position, the origin of the camera sensor coordinate system slam_c defined by the display device is not at the preset start position, resulting in an error in the positioning pose of the display device. In the embodiment of the present disclosure, the processing part on the display device obtains the historical pose offset information when the display device is not started at the initial position by processing the historical pose information. For example, the historical pose information includes the first pose information and the second pose information, the first pose information includes the visual space pose information of the historical video frame in the visual space coordinate system phy_c, and the visual space coordinate system phy_c is related to the real For scene matching, the second pose information includes the camera pose information of historical video frames in the camera sensor coordinate system slam_c. The display device may obtain historical pose offset information by calculating the first pose information and the second pose information. The historical pose offset information is the offset information of the camera sensor coordinate system slam_c defined by the display device in the real scene when the display device is not started at the initial position. The display device superimposes the current pose information and the historical pose offset information to correct the pose error of the display device, so as to determine the virtual object pose data. The display position is further rendered, so that the display device can display the virtual object in the display position associated with the object in the real scene when it is started at any position, and then display the AR effect in which the virtual object and the real scene image are superimposed, so that the virtual object displayed by the display device can be displayed. The object is highly integrated with the real scene, which optimizes the AR display effect.
在一些可能的实施方式中,参见图8,图8是本公开实施例提供的显示方法的一个可 选的流程示意图,图4示出的S101可以通过S1011至S1012实现,将结合各步骤进行说明。In some possible implementations, referring to FIG. 8 , FIG. 8 is an optional schematic flowchart of the display method provided by an embodiment of the present disclosure. S101 shown in FIG. 4 can be implemented by S1011 to S1012 , which will be described in conjunction with each step. .
S1011、通过显示设备的采集部分采集真实场景的当前视频帧。S1011. Collect the current video frame of the real scene through the collection part of the display device.
本公开实施例中,显示设备开启后,由于显示设备不在初始位置启动,显示设备显示的虚拟对象也不会显示在对应的位置上。此时通过设置在显示设备上的采集部分获取显示设备开启后当前时刻的视频帧。In the embodiment of the present disclosure, after the display device is turned on, since the display device is not started at the initial position, the virtual object displayed by the display device will not be displayed at the corresponding position. In this case, the video frame at the current moment after the display device is turned on is obtained through the acquisition part set on the display device.
S1012、利用定位算法对当前视频帧进行处理,得到当前视频帧在相机传感器坐标系中的当前位姿信息。S1012 , using a positioning algorithm to process the current video frame to obtain current pose information of the current video frame in the camera sensor coordinate system.
本公开实施例中,为了获取当前视频帧的当前位姿信息。定位算法首先对当前视频帧进行特征提取并进行特征匹配,选取当前视频帧的关键点,然后基于关键点的相关数据利用基础矩阵进行计算,可以获取当前视频帧对应的当前位姿信息。本公开实施例中,定位算法包括SLAM定位算法。本公开实施例中,显示设备可以通过算法计算得到当前位姿信息从相机传感器坐标系slam_c到相机传感器世界坐标系slam_w中的转换矩阵,即当前位姿信息矩阵。在本公开实施例中前位姿信息矩阵为:Tslam_w_slam_c_X。其中,Tslam_w_slam_c_X代表第X帧视频帧即当前视频帧的位姿信息从相机传感器坐标系slam_c中到相机传感器世界坐标系slam_w中的转换矩阵。In this embodiment of the present disclosure, in order to obtain the current pose information of the current video frame. The positioning algorithm first extracts and matches the features of the current video frame, selects the key points of the current video frame, and then uses the basic matrix to calculate based on the relevant data of the key points to obtain the current pose information corresponding to the current video frame. In this embodiment of the present disclosure, the positioning algorithm includes a SLAM positioning algorithm. In the embodiment of the present disclosure, the display device can obtain the transformation matrix of the current pose information from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w through algorithm calculation, that is, the current pose information matrix. In the embodiment of the present disclosure, the front pose information matrix is: Tslam_w_slam_c_X. Among them, Tslam_w_slam_c_X represents the transformation matrix of the X-th video frame, that is, the pose information of the current video frame from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w.
在一些可能的实施方式中,参见图9,图9是本公开实施例提供的显示方法的一个可选的流程示意图,图4示出的S101可以通过S1013至S1014实现,将结合各步骤进行说明。In some possible implementations, referring to FIG. 9 , FIG. 9 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure. S101 shown in FIG. 4 can be implemented by S1013 to S1014 , which will be described in conjunction with each step. .
S1013、获取显示设备的采集部分在采集初始视频帧时的第一传感数据,以及显示设备的采集部分在采集当前视频帧时的第二传感数据。S1013: Acquire the first sensing data when the acquisition part of the display device collects the initial video frame, and the second sensor data when the acquisition part of the display device collects the current video frame.
本公开实施例中,为了获取显示设备的当前位姿信息首先可以定义一个虚拟的传感坐标系imu_c。传感坐标系imu_c是惯性传感器定位算法定义的坐标系,传感坐标系imu_c的原点与坐标轴的定义参照S102中的相机传感器坐标系slam_c进行定义。显示设备开启后,通过设置在显示设备上的采集部分(可以为惯性传感器)获取显示设备开启时的初始视频帧的第一传感数据,和显示设备开启一段时候后当前视频帧的第二传感数据。示例性的,第一传感数据包括初始视频帧的加速度数据和方向数据,第二传感数据包括当前视频帧的加速度数据和方向数据。In this embodiment of the present disclosure, in order to obtain the current pose information of the display device, a virtual sensing coordinate system imu_c may be defined first. The sensing coordinate system imu_c is a coordinate system defined by the inertial sensor positioning algorithm, and the origin and coordinate axis of the sensing coordinate system imu_c are defined with reference to the camera sensor coordinate system slam_c in S102 . After the display device is turned on, the acquisition part (which can be an inertial sensor) set on the display device obtains the first sensing data of the initial video frame when the display device is turned on, and the second transmission of the current video frame after the display device is turned on for a period of time. sense data. Exemplarily, the first sensing data includes acceleration data and orientation data of the initial video frame, and the second sensing data includes acceleration data and orientation data of the current video frame.
S1014、基于第一传感数据与第二传感数据的偏移量,确定显示设备采集当前视频帧时的当前位姿信息。S1014. Based on the offset between the first sensing data and the second sensing data, determine the current pose information when the display device collects the current video frame.
本公开实施例中,显示设备的处理部分计算得到第一传感数据与第二传感数据之间的偏移量。显示设备通过偏移量计算转换可以得到当前视频帧在预先建立的传感坐标系imu_c中的当前位姿信息。本公开实施例中,显示设备可以通过算法计算得到当前位姿信息从传感坐标系imu_c到传感世界坐标系imu_w的转换矩阵,即当前位姿信息矩阵。在本公开实施例中,当前位信息姿矩阵为:Timu_w_imu_c_X。其中,Timu_w_imu_c_X代表第X帧视频帧即当前视频帧的位姿信息从传感坐标系imu_c到传感世界坐标系imu_w的转换矩阵。In the embodiment of the present disclosure, the processing part of the display device calculates and obtains the offset between the first sensing data and the second sensing data. The display device can obtain the current pose information of the current video frame in the pre-established sensing coordinate system imu_c by calculating and converting the offset. In the embodiment of the present disclosure, the display device can obtain the transformation matrix of the current pose information from the sensing coordinate system imu_c to the sensing world coordinate system imu_w through algorithm calculation, that is, the current pose information matrix. In this embodiment of the present disclosure, the current pose matrix is: Timu_w_imu_c_X. Wherein, Timu_w_imu_c_X represents the transformation matrix of the X-th video frame, that is, the pose information of the current video frame from the sensing coordinate system imu_c to the sensing world coordinate system imu_w.
在一些可能的实施方式中,参见图8,图8是本公开实施例提供的显示方法的一个可选的流程示意图,图4示出的S102可以通过S1021至S1022实现,将结合各步骤进行说明。In some possible implementations, referring to FIG. 8 , FIG. 8 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure. S102 shown in FIG. 4 can be implemented by S1021 to S1022 , which will be described in conjunction with each step. .
S1021、获取当前视频帧之前的历史视频帧的历史位姿信息,基于历史位姿信息确定所述历史位姿偏移信息。S1021. Obtain historical pose information of a historical video frame before the current video frame, and determine the historical pose offset information based on the historical pose information.
本公开实施例中,显示设备的采集部分实时采集真实场景的图像,显示设备启动预定时长(通常设置为1-3秒内的时长)后通过设置在显示设备上的采集部分获取历史视频帧。显示设备的处理部分对历史视频帧的信息处理得到历史视频帧的第一位姿信息和第二位 姿信息。然后显示设备的处理部分基于历史视频帧的第一位姿信息和第二位姿信息计算出历史位姿偏移信息。In the embodiment of the present disclosure, the acquisition part of the display device acquires images of the real scene in real time, and the display device acquires historical video frames through the acquisition part set on the display device after the display device starts for a predetermined duration (usually set to a duration within 1-3 seconds). The processing part of the display device processes the information of the historical video frame to obtain the first pose information and the second pose information of the historical video frame. The processing part of the display device then calculates the historical pose offset information based on the first pose information and the second pose information of the historical video frame.
在一些可能的实施方式中,参见图10,图10是本公开实施例提供的显示方法的一个可选的流程示意图,图8示出的S1021可以通过S201至S202实现,将结合各步骤进行说明。In some possible implementations, referring to FIG. 10 , FIG. 10 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure. S1021 shown in FIG. 8 can be implemented by S201 to S202 , which will be described in conjunction with each step. .
S201、获取历史视频帧在视觉空间坐标系中的第一位姿信息;以及,利用定位算法对历史视频帧进行处理,得到历史视频帧在相机传感器坐标系中的第二位姿信息。S201. Obtain the first pose information of the historical video frame in the visual space coordinate system; and use a positioning algorithm to process the historical video frame to obtain the second pose information of the historical video frame in the camera sensor coordinate system.
本公开实施例中,显示设备的采集部分获取到了历史视频帧之后,可以通过视觉定位算法计算得到历史视频帧在视觉空间坐标系phy_c中的第一位姿信息。然后将历史视频帧通过SLAM算法计算得到历史视频帧在相机传感器坐标系slam_c中的第二位姿信息。第一位姿信息包括了历史视频帧在视觉空间坐标系phy_c中的位置坐标。第二位姿信息包括了历史视频帧在相机传感器坐标系slam_c中的位置坐标。In the embodiment of the present disclosure, after the acquisition part of the display device acquires the historical video frame, the first pose information of the historical video frame in the visual space coordinate system phy_c can be obtained by calculating through the visual positioning algorithm. Then, the historical video frame is calculated by the SLAM algorithm to obtain the second pose information of the historical video frame in the camera sensor coordinate system slam_c. The first pose information includes the position coordinates of the historical video frame in the visual space coordinate system phy_c. The second pose information includes the position coordinates of the historical video frame in the camera sensor coordinate system slam_c.
本公开实施例中,显示设备可以通过算法计算得到第一位姿信息从视觉空间坐标系phy_c到视觉空间世界坐标系phy_w的转换矩阵,即第一位姿信息矩阵。在本公开实施例中,第一位姿信息矩阵为:Tphy_w_phy_c_N。其中,Tphy_w_phy_c_N代表第N帧历史视频帧的位姿信息从视觉空间坐标系phy_c到视觉空间世界坐标系phy_w的转换矩阵。In the embodiment of the present disclosure, the display device can obtain the transformation matrix of the first pose information from the visual space coordinate system phy_c to the visual space world coordinate system phy_w through algorithm calculation, that is, the first pose information matrix. In the embodiment of the present disclosure, the first pose information matrix is: Tphy_w_phy_c_N. Among them, Tphy_w_phy_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the visual space coordinate system phy_c to the visual space world coordinate system phy_w.
本公开实施例中,显示设备可以通过算法计算得到第二位姿信息从相机传感器坐标系slam_c到相机传感器世界坐标系slam_w的转换矩阵,即第二位姿信息矩阵。在本公开实施例中,第二位姿信息矩阵为:Tslam_w_slam_c_N。其中,Tslam_w_slam_c_N代表第N帧历史视频帧的位姿信息从相机传感器坐标系slam_c到相机传感器世界坐标系slam_w的转换矩阵。In this embodiment of the present disclosure, the display device can obtain a transformation matrix of the second pose information from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w through algorithm calculation, that is, the second pose information matrix. In the embodiment of the present disclosure, the second pose information matrix is: Tslam_w_slam_c_N. Among them, Tslam_w_slam_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the camera sensor coordinate system slam_c to the camera sensor world coordinate system slam_w.
S202、基于第二位姿信息与第一位姿信息之间的偏移量,确定历史位姿偏移信息。S202. Determine historical pose offset information based on the offset between the second pose information and the first pose information.
本公开实施例中,历史位姿偏移信息可以为偏移矩阵Toffset 1,计算获取偏移矩阵Toffset 1时需要获取第一位姿信息矩阵、第二位姿信息矩阵、SLAM算法定义的相机传感器坐标系slam_c到渲染引擎相机坐标系render_c的第一转换矩阵、SLAM算法定义的相机传感器坐标系slam_c到视觉空间坐标系phy_c的第二转换矩阵和渲染引擎相机世界坐标系render_w到视觉空间世界坐标系phy_w的第三转换矩阵。将第二位姿信息矩阵基于第一转换矩阵、第二转换矩阵和第三转换矩阵转换到和第一位姿信息矩阵对应的视觉空间坐标系phy_c中,并将第二位姿信息矩阵转换到视觉空间坐标系phy_c中的矩阵信息与第一位姿信息矩阵进行计算,可以得到偏移矩阵Toffset 1。In this embodiment of the present disclosure, the historical pose offset information may be an offset matrix Toffset 1. When calculating and obtaining the offset matrix Toffset 1, it is necessary to obtain the first pose information matrix, the second pose information matrix, and the camera sensor defined by the SLAM algorithm. The first transformation matrix from the coordinate system slam_c to the rendering engine camera coordinate system render_c, the second transformation matrix from the camera sensor coordinate system slam_c defined by the SLAM algorithm to the visual space coordinate system phy_c, and the rendering engine camera world coordinate system render_w to the visual space world coordinate system The third transformation matrix of phy_w. Convert the second pose information matrix to the visual space coordinate system phy_c corresponding to the first pose information matrix based on the first transformation matrix, the second transformation matrix and the third transformation matrix, and convert the second pose information matrix to The matrix information in the visual space coordinate system phy_c is calculated with the first pose information matrix, and the offset matrix Toffset 1 can be obtained.
示例性的,计算公式为(1)为:Exemplarily, the calculation formula (1) is:
Figure PCTCN2021096358-appb-000001
Figure PCTCN2021096358-appb-000001
其中,Tphy_w_phy_c_N为第一位姿信息矩阵,Tslam_w_slam_c_N为第二位姿信息矩阵,Trotate_Y_UP为SLAM算法定义的相机传感器坐标系slam_c到渲染引擎相机坐标系render_c的第一转换矩阵,第一转换矩阵Trotate_Y_UP能够使SLAM算法定义的相机传感器坐标系slam_c的Y方向与渲染引擎相机坐标系render_c的UP方向一致。Tphy_c_slam_c为SLAM算法定义的相机传感器坐标系slam_c到视觉空间坐标系phy_c的第二转换矩阵,Trender_w_phy_w为渲染引擎相机世界坐标系render_w到视觉空间世界坐标系phy_w的第三转换矩阵。显示设备可以通过第一转换矩阵Trotate_Y_UP、第二转换矩阵Tphy_c_slam_c、第三转换矩阵Trender_w_phy_w、第一位姿信息矩阵 Tphy_w_phy_c_N和第二位姿信息矩阵Tslam_w_slam_c_N进行计算,实现了相机传感器坐标slam_c、视觉空间坐标系phy_c和渲染引擎相机坐标系render_c之间的对齐,进而可以计算出偏移矩阵Toffset 1。Among them, Tphy_w_phy_c_N is the first pose information matrix, Tslam_w_slam_c_N is the second pose information matrix, and Trotate_Y_UP is the first transformation matrix from the camera sensor coordinate system slam_c defined by the SLAM algorithm to the rendering engine camera coordinate system render_c. The first transformation matrix Trotate_Y_UP can Make the Y direction of the camera sensor coordinate system slam_c defined by the SLAM algorithm consistent with the UP direction of the rendering engine camera coordinate system render_c. Tphy_c_slam_c is the second conversion matrix from the camera sensor coordinate system slam_c defined by the SLAM algorithm to the visual space coordinate system phy_c, and Trend_w_phy_w is the third conversion matrix from the rendering engine camera world coordinate system render_w to the visual space world coordinate system phy_w. The display device can calculate through the first transformation matrix Trotate_Y_UP, the second transformation matrix Tphy_c_slam_c, the third transformation matrix Trend_w_phy_w, the first pose information matrix Tphy_w_phy_c_N and the second pose information matrix Tslam_w_slam_c_N, and realize the camera sensor coordinates slam_c, visual space coordinates The alignment between the system phy_c and the rendering engine camera coordinate system render_c, and then the offset matrix Toffset 1 can be calculated.
显示设备将第三转换矩阵与所述第一位姿信息矩阵相乘,得到第一中间矩阵,然后将第一中间矩阵与所述第二转换矩阵相乘,得到第二中间矩阵,再将第二中间矩阵与所述第一转换矩阵相乘,得到第三中间矩阵。再将第三中间矩阵与第二位姿信息矩阵的逆矩阵相乘,得到历史位姿偏移信息也就是偏移矩阵Toffset 1。The display device multiplies the third transformation matrix and the first attitude information matrix to obtain a first intermediate matrix, then multiplies the first intermediate matrix and the second transformation matrix to obtain a second intermediate matrix, and then multiplies the first intermediate matrix by the second transformation matrix. The second intermediate matrix is multiplied by the first transformation matrix to obtain a third intermediate matrix. Then multiply the third intermediate matrix with the inverse matrix of the second pose information matrix to obtain the historical pose offset information, that is, the offset matrix Toffset 1.
在一些可能的实施方式中,参见图11,图11是本公开实施例提供的显示方法的一个可选的流程示意图,图8示出的S1021可以通过S301至S304实现,将结合各步骤进行说明。In some possible implementations, referring to FIG. 11 , FIG. 11 is an optional schematic flowchart of the display method provided by an embodiment of the present disclosure. S1021 shown in FIG. 8 can be implemented through S301 to S304 , which will be described in conjunction with each step. .
S301、获取历史视频帧在视觉空间坐标系中的第一位姿信息。S301. Acquire first pose information of a historical video frame in a visual space coordinate system.
本公开实施例中,采集部分获取到了历史视频帧之后,可以通过处理部分确定历史视频帧在视觉空间坐标系phy_c中的位姿信息,从而得到历史视频帧在视觉空间坐标系phy_c中的第一位姿信息。In the embodiment of the present disclosure, after the acquisition part acquires the historical video frame, the processing part can determine the pose information of the historical video frame in the visual space coordinate system phy_c, so as to obtain the first position of the historical video frame in the visual space coordinate system phy_c pose information.
本公开实施例中,显示设备可以通过算法计算得到第一位姿信息在视觉空间坐标系phy_c到视觉空间世界坐标系phy_w的转换矩阵,即第一位姿信息矩阵。在本公开实施例中,第一位姿信息矩阵为:Tphy_w_phy_c_N。其中,Tphy_w_phy_c_N代表第N帧历史视频帧的位姿信息从视觉空间坐标系phy_c中到视觉空间世界坐标系phy_w的转换矩阵。In the embodiment of the present disclosure, the display device can obtain the transformation matrix of the first pose information from the visual space coordinate system phy_c to the visual space world coordinate system phy_w through algorithm calculation, that is, the first pose information matrix. In the embodiment of the present disclosure, the first pose information matrix is: Tphy_w_phy_c_N. Among them, Tphy_w_phy_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the visual space coordinate system phy_c to the visual space world coordinate system phy_w.
S302、获取显示设备的采集部分在采集历史视频帧时的第三传感数据。S302: Acquire third sensing data when the collection part of the display device collects historical video frames.
本公开实施例中,显示设备开启后,由于显示设备不在初始位置启动。此时通过设置在显示设备上的采集部分(可以为惯性传感器)获取显示设备的历史视频帧的第三传感数据。第三传感数据包括历史视频帧的加速度数据和方向数据。In the embodiment of the present disclosure, after the display device is turned on, the display device is not started at the initial position. At this time, the third sensing data of the historical video frames of the display device is acquired through the acquisition part (which may be an inertial sensor) provided on the display device. The third sensory data includes acceleration data and orientation data of historical video frames.
S303、基于第一传感数据与第三传感数据之间的偏移量,确定历史传感位姿信息。S303. Determine historical sensing pose information based on the offset between the first sensing data and the third sensing data.
本公开实施例中,显示设备的处理部分计算得到第一传感数据与第三传感数据的偏移量。偏移量通过计算转换可以得到历史视频帧在预先建立的传感坐标系imu_c中的历史传感位姿信息。其中,第一传感数据包括采集部分在显示设备启动时采集的初始视频帧的数据。In the embodiment of the present disclosure, the processing part of the display device calculates and obtains the offset between the first sensing data and the third sensing data. The offset can be obtained by calculating and transforming the historical sensing pose information of the historical video frame in the pre-established sensing coordinate system imu_c. Wherein, the first sensing data includes the data of the initial video frame collected by the collecting part when the display device is started.
本公开实施例中,显示设备可以通过算法计算得到历史传感位姿信息在传感坐标系imu_c到传感世界坐标系imu_w的转换矩阵,即历史传感位姿信息矩阵。在本公开实施例中,历史传感位姿信息矩阵为:Timu_w_imu_c_N。其中,Timu_w_imu_c_N代表第N帧历史视频帧的位姿信息从传感坐标系imu_c中到传感世界坐标系imu_w的转换矩阵。In the embodiment of the present disclosure, the display device can obtain the transformation matrix of the historical sensing pose information from the sensing coordinate system imu_c to the sensing world coordinate system imu_w through algorithm calculation, that is, the historical sensing pose information matrix. In the embodiment of the present disclosure, the historical sensing pose information matrix is: Timu_w_imu_c_N. Among them, Timu_w_imu_c_N represents the transformation matrix of the pose information of the Nth historical video frame from the sensing coordinate system imu_c to the sensing world coordinate system imu_w.
S304、基于第一位姿信息和历史传感位姿信息之间的偏移量,确定历史位姿偏移信息。S304. Determine historical pose offset information based on the offset between the first pose information and the historical sensed pose information.
本公开实施例中,历史位姿偏移信息可以为偏移矩阵Toffset 2。显示设备计算获取偏移矩阵Toffset 2时需要获取第一位姿信息矩阵、历史传感位姿信息矩阵、惯性传感器定位算法定义的传感坐标系imu_c到渲染引擎相机坐标系render_c的第一转换矩阵、惯性传感器定位算法定义的传感坐标系imu_c到视觉空间坐标系phy_c的第二转换矩阵和渲染引擎相机世界坐标系render_w到视觉空间世界坐标系phy_w的第三转换矩阵。历史传感位姿信息矩阵基于第一转换矩阵、第二转换矩阵和第三转换矩阵转换到和第一位姿信息矩阵对应的视觉空间坐标系phy_c中,并将历史传感位姿信息转换到视觉空间坐标系phy_c中的矩阵信息与第一位姿信息矩阵进行计算,可以得到偏移矩阵Toffset 2。In this embodiment of the present disclosure, the historical pose offset information may be an offset matrix Toffset 2 . When the display device calculates and obtains the offset matrix Toffset 2, it needs to obtain the first attitude information matrix, the historical sensing pose information matrix, and the first transformation matrix from the sensing coordinate system imu_c defined by the inertial sensor positioning algorithm to the rendering engine camera coordinate system render_c , the second transformation matrix of the sensor coordinate system imu_c defined by the inertial sensor positioning algorithm to the visual space coordinate system phy_c, and the third transformation matrix of the rendering engine camera world coordinate system render_w to the visual space world coordinate system phy_w. The historical sensing pose information matrix is transformed into the visual space coordinate system phy_c corresponding to the first attitude information matrix based on the first transformation matrix, the second transformation matrix and the third transformation matrix, and the historical sensing pose information is converted into The matrix information in the visual space coordinate system phy_c is calculated with the first pose information matrix, and the offset matrix Toffset 2 can be obtained.
示例性的,计算公式(2)为:Exemplarily, the calculation formula (2) is:
Figure PCTCN2021096358-appb-000002
Figure PCTCN2021096358-appb-000002
其中,Tphy_w_phy_c_N为第一位姿信息矩阵,Timu_w_imu_c_N为历史传感位姿信息矩阵,Trotate_Y_UP为惯性传感器定位算法定义的传感坐标系imu_c到渲染引擎相机坐标系render_c的第一转换矩阵,第一转换矩阵Trotate_Y_UP能够使传感坐标系imu_c的Y方向与渲染引擎相机坐标系render_c的UP方向一致。Tphy_c_imu_c为惯性传感器定位算法定义的传感坐标系imu_c到视觉空间坐标系phy_c的第二转换矩阵,Trender_w_phy_w为渲染引擎相机世界坐标系render_w到视觉空间世界坐标系phy_w的第三转换矩阵。显示设备可以通过第一转换矩阵Trotate_Y_UP、第二转换矩阵Tphy_c_imu_c、第三转换矩阵Trender_w_phy_w、第一位姿信息矩阵Tphy_w_phy_c_N和历史传感位姿信息矩阵Timu_w_imu_c_N进行计算,实现了传感坐标系imu_c、视觉空间坐标系phy_c和渲染引擎相机坐标系render_c之间的对齐,进而可以计算出偏移矩阵Toffset 2。Among them, Tphy_w_phy_c_N is the first pose information matrix, Timu_w_imu_c_N is the historical sensor pose information matrix, Trotate_Y_UP is the first transformation matrix from the sensor coordinate system imu_c defined by the inertial sensor positioning algorithm to the rendering engine camera coordinate system render_c, the first transformation The matrix Trotate_Y_UP can make the Y direction of the sensor coordinate system imu_c consistent with the UP direction of the rendering engine camera coordinate system render_c. Tphy_c_imu_c is the second transformation matrix from the sensor coordinate system imu_c defined by the inertial sensor positioning algorithm to the visual space coordinate system phy_c, and Trend_w_phy_w is the third transformation matrix from the rendering engine camera world coordinate system render_w to the visual space world coordinate system phy_w. The display device can calculate through the first transformation matrix Trotate_Y_UP, the second transformation matrix Tphy_c_imu_c, the third transformation matrix Trend_w_phy_w, the first attitude information matrix Tphy_w_phy_c_N and the historical sensing pose information matrix Timu_w_imu_c_N, so as to realize the sensing coordinate system imu_c, visual The alignment between the space coordinate system phy_c and the rendering engine camera coordinate system render_c, and then the offset matrix Toffset 2 can be calculated.
显示设备将第三转换矩阵与所述第一位姿信息矩阵相乘,得到第一中间矩阵,然后将第一中间矩阵与所述第二转换矩阵相乘,得到第二中间矩阵,再将第二中间矩阵与所述第一转换矩阵相乘,得到第三中间矩阵。再将第三中间矩阵与历史传感位姿矩阵的逆矩阵相乘,得到历史位姿偏移信息也就是偏移矩阵Toffset 2。The display device multiplies the third transformation matrix and the first attitude information matrix to obtain a first intermediate matrix, then multiplies the first intermediate matrix and the second transformation matrix to obtain a second intermediate matrix, and then multiplies the first intermediate matrix by the second transformation matrix. The second intermediate matrix is multiplied by the first transformation matrix to obtain a third intermediate matrix. The third intermediate matrix is then multiplied by the inverse matrix of the historical sensing pose matrix to obtain the historical pose offset information, that is, the offset matrix Toffset 2.
S1022、基于历史位姿偏移信息和当前位姿信息,得到虚拟对象位姿数据。S1022 , obtaining virtual object pose data based on the historical pose offset information and the current pose information.
本公开实施例中,显示设备可以通过当前位姿信息和历史位姿偏移信息融合获取虚拟对象位姿数据。In the embodiment of the present disclosure, the display device may obtain virtual object pose data by fusing current pose information and historical pose offset information.
本公开实施例中,虚拟对象位姿数据view1可以通过公式(3)计算获取。公式(3)为:In the embodiment of the present disclosure, the pose data view1 of the virtual object can be obtained by calculation through formula (3). Formula (3) is:
view1=Toffset 1×(Tslam_w_slam_c_X) -1               (3); view1=Toffset 1×(Tslam_w_slam_c_X) -1 (3);
其中,Toffset 1为S201至S202计算的偏移矩阵,(Tslam_w_slam_c_X) -1为S1011至S1012计算的当前位姿信息矩阵的逆矩阵。显示设备通过将Toffset 1和(Tslam_w_slam_c_X) -1相乘,可以计算得到虚拟对象位姿数据,记为矩阵view1。 Wherein, Toffset 1 is the offset matrix calculated from S201 to S202, and (Tslam_w_slam_c_X) -1 is the inverse matrix of the current pose information matrix calculated from S1011 to S1012. The display device can calculate the pose data of the virtual object by multiplying Toffset 1 and (Tslam_w_slam_c_X) -1 , which is denoted as matrix view1.
本公开实施例中,虚拟对象位姿数据view2可以通过公式(4)计算获取。公式(4)为:In the embodiment of the present disclosure, the pose data view2 of the virtual object can be obtained by calculation through formula (4). Formula (4) is:
view2=Toffset 2×(Timu_w_imu_c_X) -1              (4); view2=Toffset 2×(Timu_w_imu_c_X) -1 (4);
其中,Toffset 2为S301至S304计算的偏移矩阵,(Tslam_w_slam_c_X) -1为S1013至S1014计算的当前位姿信息矩阵的逆矩阵。显示设备通过将Toffset 2和(Tslam_w_slam_c_X) -1相乘,可以计算得到虚拟对象位姿数据,记为矩阵view2。 Wherein, Toffset 2 is the offset matrix calculated from S301 to S304 , and (Tslam_w_slam_c_X) −1 is the inverse matrix of the current pose information matrix calculated from S1013 to S1014 . The display device can calculate the virtual object pose data by multiplying Toffset 2 and (Tslam_w_slam_c_X) -1 , which is denoted as matrix view2.
在一些可能的实施方式中,参见图10,图10是本公开实施例提供的显示方法的一个可选的流程示意图,图4示出的S103可以通过S204至S205实现,将结合各步骤进行说明。In some possible implementations, referring to FIG. 10 , FIG. 10 is an optional schematic flowchart of the display method provided by the embodiment of the present disclosure. S103 shown in FIG. 4 can be implemented through S204 to S205 , which will be described in conjunction with each step. .
S204、将虚拟对象中的每个像素的坐标位置映射到渲染引擎坐标系下,得到每个像素的目标坐标位置。S204: Map the coordinate position of each pixel in the virtual object to the rendering engine coordinate system to obtain the target coordinate position of each pixel.
本公开实施例中,虚拟对象位姿数据包括了虚拟对象每个像素的坐标位置。虚拟对象的其中一个标记像素位置的坐标1为(X3,Y3,Z3),其中标记像素位置的坐标1(X3,Y3,Z3)为标记像素在相机传感器坐标系slam_c中的坐标,X3为标记像素在相机传感器 坐标系slam_c的X轴上的坐标,Y3为标记像素在相机传感器坐标系slam_c的Y轴上的坐标,Z3为标记像素在相机传感器坐标系slam_c的Z轴上的坐标。显示设备得到虚拟对象位姿数据之后,将待展示的虚拟对象的每个像素的坐标位置根据虚拟对象位姿数据的坐标位置映射到渲染引擎坐标系render_c下,得到待展示的虚拟对象的每个像素的目标坐标位置。本公开实施例中,由于相机传感器坐标系slam_c和渲染引擎坐标系render_c的原点重合,显示设备可以将标记像素的坐标1通过坐标转换映射到渲染引擎坐标系render_c中的目标坐标位置,示例性的,目标坐标位置为坐标2(X4,Y4,Z4)。其中,标记像素的目标坐标位置的坐标2(X4,Y4,Z4)为目标坐标位置在渲染引擎坐标系render_c中的坐标,X4为目标坐标位置在渲染引擎坐标系render_c的X轴上的坐标,Y4为目标坐标位置在渲染引擎坐标系render_c的Y轴上的坐标,Z4为标记像素在渲染引擎坐标系render_c的Z轴上的坐标。In the embodiment of the present disclosure, the pose data of the virtual object includes the coordinate position of each pixel of the virtual object. The coordinate 1 of one of the marked pixel positions of the virtual object is (X3, Y3, Z3), and the coordinate 1 of the marked pixel position (X3, Y3, Z3) is the coordinate of the marked pixel in the camera sensor coordinate system slam_c, and X3 is the mark The coordinate of the pixel on the X axis of the camera sensor coordinate system slam_c, Y3 is the coordinate of the marked pixel on the Y axis of the camera sensor coordinate system slam_c, and Z3 is the coordinate of the marked pixel on the Z axis of the camera sensor coordinate system slam_c. After the display device obtains the virtual object pose data, the coordinate position of each pixel of the virtual object to be displayed is mapped to the rendering engine coordinate system render_c according to the coordinate position of the virtual object pose data, and each pixel of the virtual object to be displayed is obtained. The target coordinate position in pixels. In this embodiment of the present disclosure, since the origins of the camera sensor coordinate system slam_c and the rendering engine coordinate system render_c are coincident, the display device can map the coordinate 1 of the marked pixel to the target coordinate position in the rendering engine coordinate system render_c through coordinate transformation. , the target coordinate position is coordinate 2 (X4, Y4, Z4). Among them, the coordinate 2 (X4, Y4, Z4) of the target coordinate position of the marked pixel is the coordinate of the target coordinate position in the rendering engine coordinate system render_c, and X4 is the coordinate of the target coordinate position on the X axis of the rendering engine coordinate system render_c, Y4 is the coordinate of the target coordinate position on the Y axis of the rendering engine coordinate system render_c, and Z4 is the coordinate of the marker pixel on the Z axis of the rendering engine coordinate system render_c.
S205、利用渲染引擎,在当前视频帧中目标坐标位置处渲染虚拟对象。S205, using a rendering engine to render the virtual object at the target coordinate position in the current video frame.
本公开实施例中,显示设备的渲染引擎获取到了上一步骤中的需要展示的虚拟对象的每个像素的目标坐标位置,根据需要展示的虚拟对象的每个像素的目标坐标位置,按照预先设定好的程序在真实场景中渲染虚拟对象。示例性的,标记像素被渲染引擎渲染在坐标为(X4,Y4,Z4)的位置。In the embodiment of the present disclosure, the rendering engine of the display device obtains the target coordinate position of each pixel of the virtual object that needs to be displayed in the previous step, and the target coordinate position of each pixel of the virtual object to be displayed according to the preset Predetermined programs render virtual objects in real scenes. Exemplarily, the marked pixel is rendered by the rendering engine at a position with coordinates (X4, Y4, Z4).
参见图11,图11是本公开实施例提供的显示方法的一个可选的流程示意图。基于图4,在S104之后,还可以执行S105-S106,将结合各步骤进行说明。Referring to FIG. 11 , FIG. 11 is an optional schematic flowchart of a display method provided by an embodiment of the present disclosure. Based on FIG. 4, after S104, S105-S106 may also be executed, which will be described in conjunction with each step.
S105、在显示设备的移动过程中,对采集的真实场景图像进行更新,并基于更新的真实场景图像得到更新的虚拟对象。S105. During the movement of the display device, update the collected real scene image, and obtain an updated virtual object based on the updated real scene image.
本公开实施例中,在显示设备移动的过程中,采集部分采集的真实场景图像也会有所变化,在一些实施例中,当显示设备上设置有沿着轨道移动的显示屏时,显示屏可以通过背面的摄像头对沙盘模型进行扫描,摄像头采集到的真实场景图像会随着扫描的位置实时更新,真实场景图像中包含的展示对象也会实时更新,因此,在显示设备的移动过程中,显示设备会对采集的真实场景图像进行更新,并基于更新的真实场景图像得到更新的虚拟对象。In the embodiments of the present disclosure, during the movement of the display device, the real scene image collected by the collecting part will also change. The sand table model can be scanned through the camera on the back. The real scene image collected by the camera will be updated in real time with the scanned position, and the display objects contained in the real scene image will also be updated in real time. Therefore, during the movement of the display device, The display device will update the collected real scene image, and obtain an updated virtual object based on the updated real scene image.
S106、在显示设备上实时展示更新的真实场景图像与更新的虚拟对象相叠加的增强现实效果。S106 , displaying an augmented reality effect in which the updated real scene image and the updated virtual object are superimposed in real time on the display device.
本公开实施例中,显示设备会实时展示更新的真实场景图像与更新的虚拟对象相叠加的增强现实AR效果,从而达到在显示设备移动过程中,根据每个不同移动位置上所采集到展示对象不同展示部分,实时展示不同的虚实结合的AR画面的流畅展示效果。In the embodiment of the present disclosure, the display device will display the augmented reality AR effect in which the updated real scene image and the updated virtual object are superimposed in real time, so that during the movement of the display device, the display object can be displayed according to the collected display objects at each different moving position. Different display parts display the smooth display effect of different AR images combining virtual and real in real time.
在本公开的一些实施例中,展示对象的周围可以设置有至少一个显示设备,至少一个显示设备中的每个显示设备用于根据各自对展示对象的采集方向,在各自当前位置上实时采集展示对象的真实场景图像,并基于各自采集到的真实场景图像得到对应的虚拟对象,展示各自对应的真实场景图像与虚拟对象相叠加的增强现实AR效果。当显示设备不在初始位置启动时,通过显示设备的当前位姿信息和历史位姿信息,确定虚拟对象位姿数据,进而将虚拟对象的展示在对应的位置。在一些实施例中,在对建筑工地的施工楼宇进行AR效果呈现的场景中,可以在建筑工地中搭设四面透明的玻璃房,并在每面玻璃墙后设置沿着预设轨道滑动的显示屏,用于对工地上各处位置的楼宇进行全方位的展示。In some embodiments of the present disclosure, at least one display device may be arranged around the display object, and each display device in the at least one display device is configured to collect and display the display object in real time at the respective current position according to the respective collection direction of the display object. The real scene image of the object is obtained, and the corresponding virtual object is obtained based on the real scene image collected respectively, and the augmented reality AR effect in which the corresponding real scene image and the virtual object are superimposed is displayed. When the display device is not started at the initial position, the virtual object pose data is determined through the current pose information and historical pose information of the display device, and the virtual object is displayed at the corresponding position. In some embodiments, in the scene where the construction site is presented with an AR effect, a four-sided transparent glass room may be set up on the construction site, and a display screen that slides along a preset track may be set behind each glass wall , which is used for a comprehensive display of buildings at various locations on the construction site.
下面,将说明本公开实施例在一个实际的应用场景中的示例性应用。Below, an exemplary application of the embodiments of the present disclosure in a practical application scenario will be described.
在一些实施例中,对于楼盘沙盘展示的场景,可以在沙盘模型所在的展台旁设置滑动轨道,并在滑动轨道上设置可滑动的显示屏作为显示设备,其中,显示屏包括预设的滑动轨道和带有摄像头的显示屏,显示屏正面为屏幕部分,正对观看者,用于进行最终AR效果的展示,显示屏背面为摄像头,用于对沙盘模型进行图像采集。由于沙盘模型占据面积较大,显示屏的展示范围可以只是沙盘模型中的一部分,通过在预设滑动轨道上的移动来 对整体沙盘模型进行扫描。In some embodiments, for a real estate sand table display scene, a sliding track may be set beside the booth where the sand table model is located, and a slidable display screen may be set on the sliding track as a display device, wherein the display screen includes a preset sliding track And a display screen with a camera, the front of the display screen is the screen part, facing the viewer, for the display of the final AR effect, and the back of the display screen is a camera for image acquisition of the sand table model. Since the sand table model occupies a large area, the display range of the display screen can be only a part of the sand table model, and the whole sand table model can be scanned by moving on the preset sliding track.
在一些实施例中,如图12a所示,当显示屏滑动到沙盘左侧位置时,背后的摄像头采集到沙盘模型左侧的图像作为真实场景图像,显示屏可以根据左侧沙盘模型图像,在显示设备内部存储空间中的预设三维虚拟场景中确定出与左侧沙盘模型匹配的虚拟左侧沙盘模型作为虚拟对象模型,并将关联在虚拟左侧沙盘模型上的虚拟沙盘模型渲染数据作为虚拟对象数据,从而可以通过虚拟沙盘模型渲染数据渲染出左侧沙盘模型对应的完工后的楼体图,并将完工后的楼体图叠加在真实的左侧沙盘模型图像上,并在显示屏中显示,从而展现出左侧沙盘模型对应的完工效果。在显示屏移动到沙盘模型的右侧时,如图12b所示,根据同样的过程得到右侧沙盘模型对应的虚拟效果,并叠加在右侧沙盘模型的真实图像上进行显示,展现出右侧沙盘模型对应的完工效果。在一些实施例中,虚拟沙盘模型渲染数据还可以设置为白天效果和夜间效果两种不同类型的虚拟对象数据,根据白天效果进行虚拟对象的渲染可以呈现出如图12c所示的AR效果,根据夜间效果进行虚拟对象的渲染可以呈现出如图12d所示的AR效果。In some embodiments, as shown in Fig. 12a, when the display screen slides to the left side of the sand table, the camera behind the camera captures the image on the left side of the sand table model as the real scene image. In the preset three-dimensional virtual scene in the internal storage space of the display device, the virtual left sand table model matching the left sand table model is determined as the virtual object model, and the rendering data of the virtual sand table model associated with the virtual left sand table model is used as the virtual object model. Object data, so that the completed building diagram corresponding to the left sand table model can be rendered through the virtual sand table model rendering data, and the completed building diagram can be superimposed on the real left sand table model image and displayed on the display screen. display, thus showing the finished effect corresponding to the sand table model on the left. When the display screen moves to the right side of the sand table model, as shown in Figure 12b, the virtual effect corresponding to the sand table model on the right side is obtained according to the same process, and superimposed on the real image of the sand table model on the right side for display, showing the right side The finished effect corresponding to the sand table model. In some embodiments, the virtual sand table model rendering data can also be set to two different types of virtual object data: daytime effect and nighttime effect. Rendering the virtual object according to the daytime effect can present the AR effect shown in FIG. 12c. Rendering virtual objects with night effect can present the AR effect as shown in Figure 12d.
在一些实施例中,如图12e所示,显示屏上还可以对应设置展示主题控件,这样,在不同的展示主题控件被点击事件触发时,显示设备可以根据被触发的不同展示主题控件对应的不同虚拟对象数据,在真实沙盘模型图像上叠加不同主题类型效果的虚拟对象,如基于同样的沙盘模型可以显示出交通分析、区域规划、时间展示,企业介绍等等多种虚拟效果主题。In some embodiments, as shown in FIG. 12e , display theme controls may also be correspondingly set on the display screen. In this way, when different display theme controls are triggered by a click event, the display device can display the corresponding For different virtual object data, virtual objects with different theme types are superimposed on the real sand table model image. For example, based on the same sand table model, various virtual effect themes such as traffic analysis, regional planning, time display, enterprise introduction, etc. can be displayed.
可以理解的是,本公开实施例中,对于同样的展示对象,显示设备可以通过不同渲染效果的虚拟对象呈现不同的虚实结合的AR效果,从而丰富了展示方式,提高了展示效果。It can be understood that, in the embodiment of the present disclosure, for the same display object, the display device can present different AR effects combining virtual and real through virtual objects with different rendering effects, thereby enriching the display mode and improving the display effect.
在一些实施例中,如图13a所示,本公开实施例提供的显示方法如下:In some embodiments, as shown in FIG. 13a, the display methods provided by the embodiments of the present disclosure are as follows:
在本公开实施例中,显示设备101在滑动轨道105的非初始位置启动时,显示设备上的双目相机123实时获取真实场景的图像。显示设备101通过设置在显示设备101上的双目相机123获取显示设备101启动后第N视频帧在视觉空间坐标系phy_c中的第一位姿信息。然后通过设置在显示设备101上的双目相机123获取第N视频帧在相机传感器坐标系slam_c中的第二位姿信息。显示设备101通过将第二位姿信息转换到第一位姿信息的视觉空间坐标系phy_c中,并与第一位姿信息进行计算可以得到第N视频帧的位姿偏移信息。显示设备101通过设置在显示设备101上的双目相机123获取第N+X视频帧(当前视频帧)在相机传感器坐标系slam_c中的当前位姿信息。显示设备101将当前位姿信息的逆矩阵与历史位姿偏移信息相乘,可以获取虚拟对象位姿数据。在本公开实施例中虚拟对象可以为虚拟汽车122。显示设备101的渲染引擎获取虚拟汽车122位姿数据,基于虚拟汽车122位姿数据渲染得到虚拟汽车122,将虚拟汽车122对应叠加在建筑模型121关联的展示位置上,得到建筑模型121与虚拟汽车122相叠加的增强显示AR效果。提高了虚拟汽车122与建筑模型121的融合度以及AR呈现效果。In the embodiment of the present disclosure, when the display device 101 is started at a non-initial position of the sliding track 105, the binocular camera 123 on the display device acquires an image of a real scene in real time. The display device 101 acquires the first pose information of the Nth video frame in the visual space coordinate system phy_c after the display device 101 is started through the binocular camera 123 provided on the display device 101 . Then, the second pose information of the Nth video frame in the camera sensor coordinate system slam_c is acquired through the binocular camera 123 provided on the display device 101 . The display device 101 can obtain the pose offset information of the Nth video frame by converting the second pose information into the visual space coordinate system phy_c of the first pose information, and performing calculation with the first pose information. The display device 101 acquires the current pose information of the N+X th video frame (current video frame) in the camera sensor coordinate system slam_c through the binocular camera 123 provided on the display device 101 . The display device 101 can obtain the virtual object pose data by multiplying the inverse matrix of the current pose information and the historical pose offset information. In the embodiment of the present disclosure, the virtual object may be the virtual car 122 . The rendering engine of the display device 101 obtains the virtual car 122 pose data, renders the virtual car 122 based on the virtual car 122 pose data, and superimposes the virtual car 122 on the display position associated with the building model 121 to obtain the building model 121 and the virtual car. 122 superimposed enhanced display AR effects. The fusion degree of the virtual car 122 and the building model 121 and the AR rendering effect are improved.
在一些实施例中,如图13b所示,本公开实施例提供的另一种显示方法的步骤可以如下:In some embodiments, as shown in FIG. 13b, the steps of another display method provided by an embodiment of the present disclosure may be as follows:
在本公开实施例中,显示设备101在滑动轨道125的非初始位置启动时,显示设备101通过设置在显示设备101上的惯性传感器124获取显示设备101启动时的初始时刻T0的第一传感数据,第一传感数据包括显示设备101初始时刻T0的加速度数据和方向数据。显示设备101通过设置在显示设备101上的双目相机123获取当前视频帧之前的历史时刻T1对应的历史视频帧在视觉空间坐标系phy_c中的第一位姿信息。显示设备101通过设置在显示设备101上的惯性传感器124获取历史视频帧对应的历史时刻T1的第二传感数据,第二传感数据包括历史时刻T1的加速度数据和方向数据。然后计算第一传感数据和第二传感数据之间的偏移量可以得到历史传感位姿信息。显示设备101通过将历史传感位姿信息转换到第一位姿信息的视觉空间坐标系phy_c中,并与第一位姿信息进行计算可以得到 历史位姿偏移信息。显示设备通过设置在显示设备101上的惯性传感器124获取显示设备101当前时刻T2的第三传感数据,第三传感数据包括当前时刻的加速度数据和方向数据。显示设备101计算第一传感数据和第三传感数据之间的偏移量可以得到当前位姿信息。显示设备101将当前位姿信息的逆矩阵与历史位姿偏移信息相乘,可以获取虚拟对象位姿数据。在本公开实施例中虚拟对象可以为虚拟汽车122。显示设备101的渲染引擎获取虚拟汽车122位姿数据,基于虚拟汽车122位姿数据渲染得到虚拟汽车122,将虚拟汽车122对应叠加在建筑模型121关联的展示位置上,得到建筑模型121与虚拟汽车122相叠加的增强显示AR效果。提高了虚拟汽车122与建筑模型121的融合度以及AR呈现效果。In this embodiment of the present disclosure, when the display device 101 starts at a non-initial position of the sliding track 125 , the display device 101 obtains the first sensor at the initial time T0 when the display device 101 starts up through the inertial sensor 124 provided on the display device 101 . The first sensing data includes acceleration data and orientation data of the display device 101 at the initial time T0. The display device 101 obtains the first pose information of the historical video frame corresponding to the historical time T1 before the current video frame in the visual space coordinate system phy_c through the binocular camera 123 provided on the display device 101 . The display device 101 acquires the second sensing data of the historical time T1 corresponding to the historical video frame through the inertial sensor 124 provided on the display device 101 , and the second sensing data includes acceleration data and direction data of the historical time T1 . Then, by calculating the offset between the first sensing data and the second sensing data, historical sensing pose information can be obtained. The display device 101 can obtain the historical pose offset information by converting the historical sensing pose information into the visual space coordinate system phy_c of the first pose information, and performing calculation with the first pose information. The display device acquires third sensing data of the current time T2 of the display device 101 through the inertial sensor 124 provided on the display device 101 , and the third sensing data includes acceleration data and direction data at the current time. The display device 101 can obtain the current pose information by calculating the offset between the first sensing data and the third sensing data. The display device 101 can obtain the virtual object pose data by multiplying the inverse matrix of the current pose information and the historical pose offset information. In the embodiment of the present disclosure, the virtual object may be the virtual car 122 . The rendering engine of the display device 101 obtains the virtual car 122 pose data, renders the virtual car 122 based on the virtual car 122 pose data, and superimposes the virtual car 122 on the display position associated with the building model 121 to obtain the building model 121 and the virtual car. 122 superimposed enhanced display AR effects. The fusion degree of the virtual car 122 and the building model 121 and the AR rendering effect are improved.
本公开实施例提供一种显示设备,图14为本公开实施例提供的显示装置的一个可选的组成结构示意图,如图14所示,该显示装置455包括:An embodiment of the present disclosure provides a display device. FIG. 14 is a schematic diagram of an optional composition structure of the display device provided by the embodiment of the present disclosure. As shown in FIG. 14 , the display device 455 includes:
采集部分4551,被配置为获取从真实场景中采集的当前视频帧的当前位姿信息,获取当前视频帧之前的历史视频帧的历史位姿信息;The collection part 4551 is configured to obtain the current pose information of the current video frame collected from the real scene, and obtain the historical pose information of the historical video frame before the current video frame;
处理部分4552,被配置为基于历史位姿信息与当前位姿信息确定虚拟对象位姿数据;processing part 4552, configured to determine virtual object pose data based on historical pose information and current pose information;
渲染部分4553,被配置为利用虚拟对象位姿数据,在显示设备展示的当前视频帧中渲染虚拟对象位姿数据对应的虚拟对象;The rendering part 4553 is configured to use the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device;
展示部分4554,被配置为通过显示设备显示真实场景与所述虚拟对象相叠加的增强现实效果。The presentation part 4554 is configured to display the augmented reality effect in which the real scene and the virtual object are superimposed through the display device.
当显示装置455在非初始位置启动后,采集部分4551实时获取真实场景中的图像视频。图像视频中包括了当前视频帧和历史视频帧。处理部分4552基于当前视频帧和历史视频帧进行处理,可以分别得到当前位姿信息和历史位姿信息。处理部分4552将历史位姿信息进行计算得到历史位姿偏移信息,将当前位姿信息与历史位姿偏移信息进行叠加得到虚拟对象位姿数据。处理部分4552将虚拟对象位姿数据发送给渲染部分4553,渲染部分4553在显示设备对应的当前视频帧中渲染虚拟对象位姿数据对应的虚拟对象。展示部分4554显示真实场景与虚拟对象相叠加的增强现实效果。After the display device 455 is started in a non-initial position, the acquisition part 4551 acquires images and videos in the real scene in real time. The image video includes the current video frame and the historical video frame. The processing part 4552 performs processing based on the current video frame and the historical video frame, and can obtain the current pose information and the historical pose information, respectively. The processing part 4552 calculates the historical pose information to obtain historical pose offset information, and superimposes the current pose information and the historical pose offset information to obtain virtual object pose data. The processing part 4552 sends the virtual object pose data to the rendering part 4553, and the rendering part 4553 renders the virtual object corresponding to the virtual object pose data in the current video frame corresponding to the display device. The presentation section 4554 displays an augmented reality effect in which a real scene is superimposed with a virtual object.
在一些实施例中,增强现实效果包括以下之一:In some embodiments, the augmented reality effect includes one of the following:
所述真实场景中的至少一个真实对象的至少部分被所述虚拟对象遮挡;At least part of at least one real object in the real scene is occluded by the virtual object;
所述真实场景中的目标真实对象的边缘处渲染有所述虚拟对象;The virtual object is rendered at the edge of the target real object in the real scene;
所述真实场景中的背景区域中渲染有所述虚拟对象。The virtual object is rendered in the background area in the real scene.
所述真实场景中的一个真实对象与虚拟对象结合呈现AR效果。A real object in the real scene is combined with a virtual object to present an AR effect.
所述真实场景中的一个真实对象与放大一定比例的虚拟对象结合呈现AR效果。A real object in the real scene is combined with a virtual object enlarged in a certain proportion to present an AR effect.
在一些实施例中,所述处理部分4552,还被配置为基于所述真实场景图像,确定所述展示对象在预设三维虚拟场景中对应的虚拟对象模型;所述预设三维虚拟场景为根据所述真实场景建模得到的虚拟模型;获得对所述虚拟对象模型是否存在有预设渲染数据的判断结果;在所述判断结果表征为所述虚拟对象模型存在有预设渲染数据的情况下,将所述预设渲染数据作为所述虚拟对象数据。In some embodiments, the processing part 4552 is further configured to determine, based on the real scene image, a virtual object model corresponding to the display object in a preset three-dimensional virtual scene; the preset three-dimensional virtual scene is based on The virtual model obtained by modeling the real scene; obtaining the judgment result of whether the virtual object model has preset rendering data; in the case that the judgment result is characterized by the existence of preset rendering data in the virtual object model , using the preset rendering data as the virtual object data.
在一些实施例中,所述处理部分4552,还被配置为根据所述真实场景图像,确定所述展示对象在真实场景中的当前位姿信息;根据真实坐标系与虚拟坐标系的预设映射关系,确定所述当前位姿信息在所述预设三维虚拟场景中对应的虚拟对象模型;所述真实坐标系为所述真实场景对应的坐标系;所述虚拟坐标系为所述预设三维虚拟场景对应的坐标系。In some embodiments, the processing part 4552 is further configured to determine the current pose information of the display object in the real scene according to the real scene image; according to the preset mapping between the real coordinate system and the virtual coordinate system determine the virtual object model corresponding to the current pose information in the preset three-dimensional virtual scene; the real coordinate system is the coordinate system corresponding to the real scene; the virtual coordinate system is the preset three-dimensional virtual scene The coordinate system corresponding to the virtual scene.
在一些实施例中,所述处理部分4552,还被配置为根据真实坐标系与虚拟坐标系的预设映射关系,确定所述当前位姿信息在所述预设三维虚拟场景中对应的位置区域;将所述位置区域内对应的预设虚拟模型作为所述虚拟对象模型。In some embodiments, the processing part 4552 is further configured to determine the position area corresponding to the current pose information in the preset three-dimensional virtual scene according to the preset mapping relationship between the real coordinate system and the virtual coordinate system ; take the corresponding preset virtual model in the location area as the virtual object model.
在一些实施例中,所述预设三维虚拟场景为实时重建的模型,或者预存在云端的模型。In some embodiments, the preset three-dimensional virtual scene is a model reconstructed in real time, or a model pre-stored in the cloud.
在一些实施例中,所述采集部分4551包含双目摄像头;所述显示装置455还包括建模部分,所述采集部分4551,还被配置为所述基于所述真实场景图像中包括的展示对象, 确定与所述展示对象匹配的虚拟对象数据之前,通过所述双目摄像头,获取所述真实场景图像的图像信息和深度信息;所述建模部分,还被配置为根据所述真实场景图像的图像信息和深度信息;对所述真实场景图像中的展示对象进行三维建模,得到所述预设三维虚拟场景。In some embodiments, the acquisition part 4551 includes a binocular camera; the display device 455 further includes a modeling part, and the acquisition part 4551 is further configured to display objects included in the image based on the real scene , before determining the virtual object data matching the display object, obtain the image information and depth information of the real scene image through the binocular camera; the modeling part is further configured to be based on the real scene image 3D modeling of the display objects in the real scene image to obtain the preset 3D virtual scene.
在一些实施例中,所述显示装置455还包括更新部分,所述更新部分,被配置为在所述显示设备上展示所述真实场景图像与所述虚拟对象相叠加的增强现实AR效果之后,在所述显示设备的移动过程中,对采集的所述真实场景图像进行更新,并基于更新的真实场景图像得到更新的虚拟对象;所述展示部分4554,还被配置为在所述显示设备上实时展示所述更新的真实场景图像与所述更新的虚拟对象相叠加的增强现实AR效果。In some embodiments, the display device 455 further includes an update part, and the update part is configured to display, on the display device, an augmented reality AR effect in which the real scene image and the virtual object are superimposed, During the movement of the display device, the collected real scene image is updated, and an updated virtual object is obtained based on the updated real scene image; the display part 4554 is also configured to display on the display device The augmented reality AR effect in which the updated real scene image and the updated virtual object are superimposed is displayed in real time.
在一些实施例中,展示对象的周围设置有至少一个显示设备,所述至少一个显示设备中的每个显示设备用于根据各自对所述展示对象的采集方向,在各自当前位置上实时采集所述展示对象的真实场景图像,并基于各自采集到的真实场景图像得到对应的虚拟对象,展示各自对应的真实场景图像与虚拟对象相叠加的增强现实AR效果。In some embodiments, at least one display device is arranged around the display object, and each display device in the at least one display device is configured to collect all the displayed objects in real time at their respective current positions according to their respective collection directions for the display object. The real scene image of the display object is described, and the corresponding virtual object is obtained based on the real scene image collected respectively, and the augmented reality AR effect in which the corresponding real scene image and the virtual object are superimposed is displayed.
本公开实施例中,当显示装置455不在初始位置启动时,通过设置在显示设备上的采集部分4551分别获取当前视频帧的当前位姿信息和历史视频帧的历史位姿信息,显示装置455上的处理部分4552通过处理历史位姿信息得到显示装置455不在初始位置启动时的历史位姿偏移信息。处理部分4552将当前位姿信息和历史位姿偏移信息进行叠加可以确定虚拟对象位姿数据,虚拟对象位姿数据包括了构成虚拟对象的每个像素的坐标位置。渲染部分4553根据虚拟对象位姿数据对真实场景中展示对象关联的展示位置进行进一步渲染,使得显示装置455无论在任何位置启动时可以在真实场景中与展示对象关联的展示位置展示虚拟对象,进而展示部分4554展示通过虚拟对象与真实场景图像相叠加的增强现实AR效果,使得显示设备显示的虚拟对象与真实场景进行无缝融合。In the embodiment of the present disclosure, when the display device 455 is not started at the initial position, the current pose information of the current video frame and the historical pose information of the historical video frames are obtained respectively through the acquisition part 4551 provided on the display device. The processing part 4552 obtains the historical pose offset information when the display device 455 is not started at the initial position by processing the historical pose information. The processing part 4552 superimposes the current pose information and the historical pose offset information to determine virtual object pose data, where the virtual object pose data includes the coordinate position of each pixel constituting the virtual object. The rendering part 4553 further renders the display position associated with the display object in the real scene according to the pose data of the virtual object, so that the display device 455 can display the virtual object at the display position associated with the display object in the real scene no matter when it is started at any position, and then The display part 4554 displays the augmented reality AR effect by superimposing the virtual object and the real scene image, so that the virtual object displayed by the display device and the real scene are seamlessly integrated.
需要说明的是,以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开装置实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。It should be noted that the descriptions of the above apparatus embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects to the method embodiments. For technical details not disclosed in the device embodiments of the present disclosure, please refer to the descriptions of the method embodiments of the present disclosure for understanding.
需要说明的是,本公开实施例中,如果以软件功能部分的形式实现上述的展示方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是终端、服务器等)执行本公开各个实施例所述方法的全部或部分。而前述的计算机可读存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本公开实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present disclosure, if the above-mentioned display method is implemented in the form of a software function part and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present disclosure essentially or the parts that make contributions to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions for A computer device (which may be a terminal, a server, etc.) is caused to execute all or part of the methods described in the various embodiments of the present disclosure. The aforementioned computer-readable storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other media that can store program codes. As such, embodiments of the present disclosure are not limited to any particular combination of hardware and software.
对应地,本公开实施例再提供一种计算机程序产品,所述计算机程序产品包括计算机可执行指令,该计算机可执行指令用于实现本公开实施例提供的展示方法中的步骤。Correspondingly, an embodiment of the present disclosure further provides a computer program product, where the computer program product includes computer-executable instructions, and the computer-executable instructions are used to implement the steps in the presentation method provided by the embodiment of the present disclosure.
相应的,本公开实施例再提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可执行指令,该计算机可执行指令用于实现上述实施例提供的展示方法的步骤。Correspondingly, an embodiment of the present disclosure further provides a computer-readable storage medium, where computer-executable instructions are stored on the computer-readable storage medium, and the computer-executable instructions are used to implement the steps of the presentation method provided by the foregoing embodiments.
本公开实施例还提供一种显示设备,图15为本公开实施例提供的显示设备的一个可选的组成结构示意图,如图15所示,所述显示设备110包括:显示屏1101;An embodiment of the present disclosure further provides a display device. FIG. 15 is a schematic diagram of an optional composition structure of the display device provided by the embodiment of the present disclosure. As shown in FIG. 15 , the display device 110 includes: a display screen 1101 ;
存储器1102,被配置为存储计算机程序;memory 1102 configured to store computer programs;
处理器1103,配置为执行所述存储器1102中存储的计算机程序时,结合所述显示屏1101,被实现上述实施例提供的展示方法的步骤。When the processor 1103 is configured to execute the computer program stored in the memory 1102, in conjunction with the display screen 1101, the steps of the display methods provided in the above embodiments are implemented.
显示设备110还包括:通信总线1104。通信总线1104被配置为实现这些组件之间的连接通信。The display device 110 also includes a communication bus 1104 . The communication bus 1104 is configured to enable connection communication between these components.
在本公开实施例中,显示屏1101包括但不限于液晶显示屏,有机发光二级管显示屏,触控显示屏等等,本公开实施例不做限定。In the embodiment of the present disclosure, the display screen 1101 includes, but is not limited to, a liquid crystal display screen, an organic light-emitting diode display screen, a touch screen display screen, and the like, which is not limited in the embodiment of the present disclosure.
存储器1102配置为存储由处理器1101计算机程序和应用,还可以缓存待处理器1103以及显示设备110中各部分待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。The memory 1102 is configured to store computer programs and applications by the processor 1101, and may also cache data to be processed or processed by the processor 1103 and various parts of the display device 110 (eg, image data, audio data, voice communication data, and video communication data). data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
处理器1103执行程序时实现上述任一项展示方法的步骤。处理器1103通常控制显示设备110的总体操作。When the processor 1103 executes the program, the steps of any one of the above-mentioned methods are implemented. The processor 1103 generally controls the overall operation of the display device 110 .
上述处理器1103可以为特定用途集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理装置(Digital Signal Processing Device,DSPD)、可编程逻辑装置(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器中的至少一种。可以理解地,实现上述处理器功能的电子器件还可以为其它,本公开实施例不作限制。The above-mentioned processor 1103 may be an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (Programmable Logic Device) At least one of a Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that the electronic device that implements the function of the above processor may also be other, which is not limited by the embodiment of the present disclosure.
上述计算机可读存储介质/存储器可以是只读存储器(Read Only Memory,ROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性随机存取存储器(Ferromagnetic Random Access Memory,FRAM)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(Compact Disc Read-Only Memory,CD-ROM)等存储器;也可以是包括上述存储器之一或任意组合的各种终端,如移动电话、计算机、平板设备、个人数字助理等。The above-mentioned computer-readable storage medium/memory can be a read-only memory (Read Only Memory, ROM), a programmable read-only memory (Programmable Read-Only Memory, PROM), an erasable programmable read-only memory (Erasable Programmable Read-Only Memory) Memory, EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Magnetic Random Access Memory (FRAM), Flash Memory (Flash Memory), Magnetic Surface Memory, optical disk, or memory such as Compact Disc Read-Only Memory (CD-ROM); it can also be various terminals including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital Assistant etc.
这里需要指出的是:以上计算机可读存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开中的计算机可读存储介质和设备实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。It should be pointed out here that the descriptions of the above computer-readable storage medium and device embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects to the method embodiments. For technical details that are not disclosed in the computer-readable storage medium and device embodiments in the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本公开的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。It is to be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic associated with the embodiment is included in at least one embodiment of the present disclosure. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present disclosure, the size of the sequence numbers of the above-mentioned processes does not imply the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, rather than the embodiments of the present disclosure. implementation constitutes any limitation. The above-mentioned serial numbers of the embodiments of the present disclosure are only for description, and do not represent the advantages or disadvantages of the embodiments.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
在本公开所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元 上;可以根据实际的需要选择其中的部分或全部单元来实现本公开实施例方案的目的。The unit described above as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit; it may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present disclosure.
另外,在本公开各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure may be all integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above integration The unit can be implemented either in the form of hardware or in the form of hardware plus software functional units.
或者,本公开实施例上述集成的单元如果以软件功能部分的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得设备自动测试线执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the embodiments of the present disclosure are implemented in the form of software functional parts and sold or used as independent products, they may also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present disclosure may be embodied in the form of software products in essence or the parts that make contributions to related technologies. The computer software products are stored in a storage medium and include several instructions for making The device automated test line performs all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes various media that can store program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
本公开实施例所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided by the embodiments of the present disclosure can be arbitrarily combined under the condition of no conflict to obtain new method embodiments.
本公开实施例所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in the several method or device embodiments provided by the embodiments of the present disclosure can be combined arbitrarily under the condition of no conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本公开实施例的实施方式,但本公开实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above description is only the implementation of the embodiments of the present disclosure, but the protection scope of the embodiments of the present disclosure is not limited thereto. Any person skilled in the technical field can easily think of changes or Substitutions should be included within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
工业实用性Industrial Applicability
本公开实施例通过获取从真实场景中采集的当前视频帧对应的当前位姿信息,获取当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息与所述当前位姿信息,确定虚拟对象位姿数据,利用所述虚拟对象位姿数据,在显示设备展示的当前视频帧中渲染所述虚拟对象位姿数据对应的虚拟对象,使得显示设备的初始位置无论在什么位置,显示设备都可以根据当前位姿信息和历史位姿信息的偏移调整虚拟对象的显示情况,将虚拟对象显示到准确的位置,提高了虚拟对象与真实场景的融合度以及AR呈现效果。The embodiment of the present disclosure obtains the historical pose information of the historical video frame before the current video frame by acquiring the current pose information corresponding to the current video frame collected from the real scene, based on the historical pose information and the current pose information, determine the virtual object pose data, and use the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device, so that the initial position of the display device is no matter where it is. , the display device can adjust the display of the virtual object according to the offset of the current pose information and the historical pose information, and display the virtual object to an accurate position, which improves the fusion of the virtual object and the real scene and the AR rendering effect.

Claims (12)

  1. 一种显示方法,所述方法包括:A display method, the method comprising:
    获取从真实场景中采集的当前视频帧的当前位姿信息;Obtain the current pose information of the current video frame collected from the real scene;
    获取所述当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息与所述当前位姿信息,确定虚拟对象位姿数据;Obtain the historical pose information of the historical video frame before the current video frame, and determine virtual object pose data based on the historical pose information and the current pose information;
    利用所述虚拟对象位姿数据,在显示设备展示的当前视频帧中渲染虚拟对象;Using the virtual object pose data, rendering the virtual object in the current video frame displayed by the display device;
    通过所述显示设备显示所述真实场景与所述虚拟对象相叠加的增强现实效果。The augmented reality effect in which the real scene and the virtual object are superimposed is displayed through the display device.
  2. 根据权利要求1所述的显示方法,其中,所述获取从真实场景中采集的当前视频帧的当前位姿信息,包括:The display method according to claim 1, wherein the acquiring the current pose information of the current video frame collected from the real scene comprises:
    通过所述显示设备的采集部分采集所述真实场景的当前视频帧;The current video frame of the real scene is collected by the collection part of the display device;
    利用定位算法对所述当前视频帧进行处理,得到所述当前视频帧在相机传感器坐标系中的所述当前位姿信息。The current video frame is processed using a positioning algorithm to obtain the current pose information of the current video frame in the camera sensor coordinate system.
  3. 根据权利要求1或2所述的显示方法,其中,所述获取所述当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息与所述当前位姿信息,确定虚拟对象位姿数据,包括:The display method according to claim 1 or 2, wherein the acquiring the historical pose information of the historical video frame before the current video frame, determines the virtual pose based on the historical pose information and the current pose information Object pose data, including:
    获取所述当前视频帧之前的历史视频帧的历史位姿信息,基于所述历史位姿信息确定所述历史位姿偏移信息;Obtain the historical pose information of the historical video frame before the current video frame, and determine the historical pose offset information based on the historical pose information;
    基于所述历史位姿偏移信息和所述当前位姿信息,得到所述虚拟对象位姿数据。The virtual object pose data is obtained based on the historical pose offset information and the current pose information.
  4. 根据权利要求3所述的显示方法,其中,所述基于所述历史位姿信息确定历史位姿偏移信息,包括:The display method according to claim 3, wherein the determining the historical pose offset information based on the historical pose information comprises:
    获取所述历史视频帧在视觉空间坐标系中的第一位姿信息;以及,利用定位算法对所述历史视频帧进行处理,得到所述历史视频帧在相机传感器坐标系中的第二位姿信息;其中,所述历史位姿信息包括所述第一位姿信息和所述第二位姿信息;Obtain the first pose information of the historical video frame in the visual space coordinate system; and, use a positioning algorithm to process the historical video frame to obtain the second pose of the historical video frame in the camera sensor coordinate system information; wherein, the historical pose information includes the first pose information and the second pose information;
    基于所述第二位姿信息与所述第一位姿信息之间的偏移量,确定所述历史位姿偏移信息。The historical pose offset information is determined based on an offset between the second pose information and the first pose information.
  5. 根据权利要求3所述的显示方法,其中,所述基于所述历史位姿信息确定所述历史位姿偏移信息,包括:The display method according to claim 3, wherein the determining the historical pose offset information based on the historical pose information comprises:
    获取所述历史视频帧在视觉空间坐标系中的第一位姿信息;Obtain the first pose information of the historical video frame in the visual space coordinate system;
    获取所述显示设备的采集部分在采集所述历史视频帧时的第三传感数据;acquiring the third sensing data when the acquisition part of the display device acquires the historical video frame;
    基于第一传感数据与所述第三传感数据之间的偏移量,确定历史传感位姿信息;所述历史位姿信息包括所述第一位姿信息和所述历史传感位姿信息;所述第一传感数据包括所述采集部分在所述显示设备启动时采集的初始视频帧的数据;Determine historical sensing pose information based on the offset between the first sensing data and the third sensing data; the historical pose information includes the first pose information and the historical sensing position attitude information; the first sensing data includes the data of the initial video frame collected by the collecting part when the display device is started;
    基于所述第一位姿信息和所述历史传感位姿信息之间的偏移量,确定所述历史位姿偏移信息。The historical pose offset information is determined based on an offset between the first pose information and the historical sensed pose information.
  6. 根据权利要求3至5任一所述的显示方法,其中,所述基于所述历史位姿偏移信息和所述当前位姿信息,得到所述虚拟对象位姿数据,包括:The display method according to any one of claims 3 to 5, wherein the obtaining the virtual object pose data based on the historical pose offset information and the current pose information includes:
    按照所述历史位姿偏移信息,对所述当前位姿信息进行偏移,得到纠正位姿信息;According to the historical pose offset information, the current pose information is offset to obtain corrected pose information;
    确定与所述纠正位姿信息对应的所述虚拟对象位姿数据。The virtual object pose data corresponding to the corrected pose information is determined.
  7. 根据权利要求1至4任一所述的显示方法,其中,所述获取从真实场景中采集的当前视频帧的当前位姿信息,包括:The display method according to any one of claims 1 to 4, wherein the acquiring the current pose information of the current video frame collected from the real scene comprises:
    获取所述显示设备的采集部分在采集初始视频帧时的第一传感数据,以及所述显示设备的采集部分在采集所述当前视频帧时的第二传感数据;Acquiring first sensing data when the acquisition part of the display device collects the initial video frame, and second sensing data when the acquisition part of the display device collects the current video frame;
    基于所述第一传感数据与所述第二传感数据之间的偏移量,确定所述显示设备采集所 述当前视频帧时的所述当前位姿信息。Based on the offset between the first sensing data and the second sensing data, the current pose information when the display device collects the current video frame is determined.
  8. 根据权利要求1至7任一所述的显示方法,其中,所述虚拟对象位姿数据包括:构成虚拟对象的每个像素的坐标位置;The display method according to any one of claims 1 to 7, wherein the virtual object pose data comprises: the coordinate position of each pixel constituting the virtual object;
    所述利用所述虚拟对象位姿数据,在显示设备展示的当前视频帧中渲染虚拟对象,包括:The rendering of the virtual object in the current video frame displayed by the display device by using the virtual object pose data includes:
    将所述虚拟对象中的每个像素的坐标位置映射到渲染引擎坐标系下,得到每个像素的目标坐标位置;The coordinate position of each pixel in the virtual object is mapped to the rendering engine coordinate system to obtain the target coordinate position of each pixel;
    利用渲染引擎,在所述当前视频帧中所述目标坐标位置处渲染所述虚拟对象。Using a rendering engine, the virtual object is rendered at the target coordinate position in the current video frame.
  9. 根据权利要求1至8任一所述的显示方法,其中,所述显示设备沿目标轨迹移动。The display method according to any one of claims 1 to 8, wherein the display device moves along a target trajectory.
  10. 一种显示装置,基于显示设备进行使用,包括:A display device, used based on a display device, comprising:
    采集部分,被配置为获取从真实场景中采集的当前视频帧的当前位姿信息,获取所述当前视频帧之前的历史视频帧的历史位姿信息;The collection part is configured to obtain the current pose information of the current video frame collected from the real scene, and obtain the historical pose information of the historical video frame before the current video frame;
    处理部分,被配置为基于所述历史位姿信息与所述当前位姿信息确定虚拟对象位姿数据;a processing part configured to determine virtual object pose data based on the historical pose information and the current pose information;
    渲染部分,被配置为利用所述虚拟对象位姿数据,在所述显示设备展示的当前视频帧中渲染所述虚拟对象位姿数据对应的虚拟对象;a rendering part, configured to use the virtual object pose data to render the virtual object corresponding to the virtual object pose data in the current video frame displayed by the display device;
    展示部分,被配置为通过所述显示设备显示所述真实场景与所述虚拟对象相叠加的增强现实效果。The display part is configured to display, through the display device, an augmented reality effect in which the real scene and the virtual object are superimposed.
  11. 一种显示设备,所述显示设备在预设的滑动轨道上移动,包括:A display device that moves on a preset sliding track, comprising:
    显示屏,被配置为在所述显示设备上显示所述真实场景与所述虚拟对象相叠加的增强现实效果;a display screen configured to display an augmented reality effect in which the real scene and the virtual object are superimposed on the display device;
    存储器,被配置为存储可执行指令;a memory configured to store executable instructions;
    处理器,被配置为执行所述存储器中存储的可执行指令时,结合所述显示屏,实现权利要求1至9任一项所述的方法。The processor, when configured to execute the executable instructions stored in the memory, implements the method of any one of claims 1 to 9 in combination with the display screen.
  12. 一种计算机可读存储介质,存储有可执行指令,被配置为被处理器执行时,实现权利要求1至9任一项所述的方法。A computer-readable storage medium storing executable instructions configured to, when executed by a processor, implement the method of any one of claims 1 to 9.
PCT/CN2021/096358 2020-09-16 2021-05-27 Display method and apparatus, display device, and computer-readable storage medium WO2022057308A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010976171.3 2020-09-16
CN202010976171.3A CN112132940A (en) 2020-09-16 2020-09-16 Display method, display device and storage medium

Publications (1)

Publication Number Publication Date
WO2022057308A1 true WO2022057308A1 (en) 2022-03-24

Family

ID=73846940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096358 WO2022057308A1 (en) 2020-09-16 2021-05-27 Display method and apparatus, display device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN112132940A (en)
WO (1) WO2022057308A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114896644A (en) * 2022-05-17 2022-08-12 电子科技大学 Implementation method of three-dimensional (3D) tower crane construction scene display system based on ThreeJS
WO2024031882A1 (en) * 2022-08-08 2024-02-15 珠海普罗米修斯视觉技术有限公司 Video processing method and apparatus, and computer readable storage medium
WO2024055683A1 (en) * 2022-09-16 2024-03-21 华为技术有限公司 Augmented reality method and computing apparatus

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132940A (en) * 2020-09-16 2020-12-25 北京市商汤科技开发有限公司 Display method, display device and storage medium
CN113176594A (en) * 2021-03-12 2021-07-27 中国软件评测中心(工业和信息化部软件与集成电路促进中心) Vehicle-mounted early warning test method and device based on sand table, computer and storage medium
CN113256710B (en) * 2021-05-21 2022-08-02 深圳市慧鲤科技有限公司 Method and device for displaying foresight in game, computer equipment and storage medium
CN114332416B (en) * 2021-11-30 2022-11-29 北京百度网讯科技有限公司 Image processing method, device, equipment and storage medium
CN114401414B (en) * 2021-12-27 2024-01-23 北京达佳互联信息技术有限公司 Information display method and system for immersive live broadcast and information pushing method
CN114092526B (en) * 2022-01-21 2022-06-28 之江实验室 Augmented reality method and device based on object 3D pose visual tracking
CN114415839A (en) * 2022-01-27 2022-04-29 歌尔科技有限公司 Information display method, device, equipment and storage medium
CN114445600A (en) * 2022-01-28 2022-05-06 北京字跳网络技术有限公司 Method, device and equipment for displaying special effect prop and storage medium
CN114494328B (en) * 2022-02-11 2024-01-30 北京字跳网络技术有限公司 Image display method, device, electronic equipment and storage medium
CN114543797A (en) * 2022-02-18 2022-05-27 北京市商汤科技开发有限公司 Pose prediction method and apparatus, device, and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100045701A1 (en) * 2008-08-22 2010-02-25 Cybernet Systems Corporation Automatic mapping of augmented reality fiducials
CN108765563A (en) * 2018-05-31 2018-11-06 北京百度网讯科技有限公司 Processing method, device and the equipment of SLAM algorithms based on AR
CN108805917A (en) * 2018-05-25 2018-11-13 网易(杭州)网络有限公司 Sterically defined method, medium, device and computing device
CN110738737A (en) * 2019-10-15 2020-01-31 北京市商汤科技开发有限公司 AR scene image processing method and device, electronic equipment and storage medium
CN112132940A (en) * 2020-09-16 2020-12-25 北京市商汤科技开发有限公司 Display method, display device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108510592B (en) * 2017-02-27 2021-08-31 亮风台(上海)信息科技有限公司 Augmented reality display method of real physical model
CN108564045B (en) * 2018-04-17 2020-12-04 广州腾讯科技有限公司 Augmented reality data processing method and device, storage medium and computer equipment
CN109947886B (en) * 2019-03-19 2023-01-10 腾讯科技(深圳)有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111131806B (en) * 2019-12-30 2021-05-18 联想(北京)有限公司 Method and device for displaying virtual object and electronic equipment
CN111651069A (en) * 2020-06-11 2020-09-11 浙江商汤科技开发有限公司 Virtual sand table display method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100045701A1 (en) * 2008-08-22 2010-02-25 Cybernet Systems Corporation Automatic mapping of augmented reality fiducials
CN108805917A (en) * 2018-05-25 2018-11-13 网易(杭州)网络有限公司 Sterically defined method, medium, device and computing device
CN108765563A (en) * 2018-05-31 2018-11-06 北京百度网讯科技有限公司 Processing method, device and the equipment of SLAM algorithms based on AR
CN110738737A (en) * 2019-10-15 2020-01-31 北京市商汤科技开发有限公司 AR scene image processing method and device, electronic equipment and storage medium
CN112132940A (en) * 2020-09-16 2020-12-25 北京市商汤科技开发有限公司 Display method, display device and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114896644A (en) * 2022-05-17 2022-08-12 电子科技大学 Implementation method of three-dimensional (3D) tower crane construction scene display system based on ThreeJS
CN114896644B (en) * 2022-05-17 2023-06-20 电子科技大学 Realization method of three-dimensional (3D) tower crane construction scene display system based on ThreeJS
WO2024031882A1 (en) * 2022-08-08 2024-02-15 珠海普罗米修斯视觉技术有限公司 Video processing method and apparatus, and computer readable storage medium
WO2024055683A1 (en) * 2022-09-16 2024-03-21 华为技术有限公司 Augmented reality method and computing apparatus

Also Published As

Publication number Publication date
CN112132940A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
WO2022057308A1 (en) Display method and apparatus, display device, and computer-readable storage medium
TWI782332B (en) An augmented reality data presentation method, device and storage medium
US11217019B2 (en) Presenting image transition sequences between viewing locations
US20200302685A1 (en) Generating a Three-Dimensional Model Using a Portable Electronic Device Recording
US8902288B1 (en) Photo-image-based 3D modeling system on a mobile device
US8823855B2 (en) User equipment and method for providing augmented reality (AR) service
US20130314398A1 (en) Augmented reality using state plane coordinates
EP2672459B1 (en) Apparatus and method for providing augmented reality information using three dimension map
US20140267282A1 (en) System And Method For Context Dependent Level Of Detail Adjustment For Navigation Maps And Systems
US20100188397A1 (en) Three dimensional navigation using deterministic movement of an electronic device
TW200949205A (en) Generating a display image
TW200949201A (en) Displaying route information on a digital map image
US10629001B2 (en) Method for navigation in an interactive virtual tour of a property
JP2010531007A5 (en)
JP6711137B2 (en) Display control program, display control method, and display control device
CN111373347B (en) Apparatus, method and computer program for providing virtual reality content
WO2014078991A1 (en) Information processing method and information processing device
JP6345381B2 (en) Augmented reality system
CN111815783A (en) Virtual scene presenting method and device, electronic equipment and storage medium
ES2300204B1 (en) SYSTEM AND METHOD FOR THE DISPLAY OF AN INCREASED IMAGE APPLYING INCREASED REALITY TECHNIQUES.
US20240087157A1 (en) Image processing method, recording medium, image processing apparatus, and image processing system
US11137976B1 (en) Immersive audio tours
CN114827574A (en) Image processing method and device, electronic device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21868145

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21868145

Country of ref document: EP

Kind code of ref document: A1