Virtual-real MR image fusion method and device for holographic visualization terminal equipment, equipment, storage medium and program product

Through the image fusion method based on depth information, the problem of inaccurate image fusion in the prior art is solved, accurate pixel occlusion relationship determination and image fusion are achieved, and the fusion effect is improved.

CN120070812APending Publication Date: 2025-05-30YONGKE VISION TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510091807.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art cannot accurately remove the background area in image fusion, resulting in a removal error in the final fusion picture.

Method used

By acquiring the real image captured by the camera and the virtual image rendered by the virtual reality engine, based on the first depth information in the virtual image and the second depth information in the real image, the pixel occlusion relationship between the virtual image and the real image is determined, and the image fusion is performed according to this relationship.

Benefits of technology

Accurate pixel occlusion relationship determination is achieved, avoiding decision errors, and improving the accuracy of image fusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070812A_ABST
    Figure CN120070812A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual-real MR image fusion method for holographic visual terminal equipment, a virtual-real MR image fusion device for the holographic visual terminal equipment, virtual-real MR image fusion equipment for the holographic visual terminal equipment, a storage medium and a computer program product, and relates to the technical field of image processing. Compared with a current image fusion method which does not consider depth information, due to the fact that the depth information of the related pixel points in the virtual image and the real image is considered, the accurate pixel shielding relation between the virtual image and the real image can be determined, and therefore when image fusion is carried out based on the accurate pixel shielding relation, the image fusion efficiency is improved. And an accurate MR virtual-real fusion result can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of image processing, and in particular, to a method for fusing virtual and real MR images for a holographic visualization terminal device, a device for fusing virtual and real MR images for a holographic visualization terminal device, a device for fusing virtual and real MR images for a holographic visualization terminal device, a storage medium, and a computer program product. Background Art

[0002] Currently, MR (Mixed Reality) has been applied to demonstration scenarios such as real-time teaching and training demonstrations. During a demonstration, a demonstrator interacts with virtual objects, for example, wears stereoscopic glasses to interact with virtual objects displayed by a three-dimensional holographic visualization terminal. At the same time, a camera is used to record the interaction process of the demonstrator. At this time, it involves the need to fuse the real picture captured by the camera with the virtual objects to obtain the final picture of the combination of virtual and real in MR. Thus, audiences other than the demonstrator can perceive the content of the combined virtual and real picture without wearing relevant devices such as 3D stereoscopic glasses.

[0003] When fusing the virtual picture and the real picture to obtain the final output picture, currently conventional image fusion methods such as color-based matte extraction methods cannot accurately extract corresponding regions such as the background region, resulting in parts that should have been removed not being removed in the final fused picture, or parts that should not have been removed being removed instead. When using a virtual engine to render pictures in applications, color key colors need to be avoided.

[0004] The above content is only used to assist in understanding the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a method for fusing virtual and real MR images for a holographic visualization terminal device, a device for fusing virtual and real MR images for a holographic visualization terminal device, a device for fusing virtual and real MR images for a holographic visualization terminal device, a storage medium, and a computer program product, aiming to solve the technical problem of inaccurate image fusion.

[0006] To achieve the above objective, this application proposes a method for fusing virtual and real MR images for a holographic visualization terminal device, the method including:

[0007] Obtain a real image captured by a camera for a holographic visualization terminal device, and a virtual image of a virtual object rendered by a virtual reality engine from the perspective of the camera during shooting; wherein, the virtual object is three-dimensionally holographically visualized and interacted with by the holographic visualization terminal device;

[0008] Determine the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image;

[0009] Fuse the virtual image and the real image according to the pixel occlusion relationship.

[0010] In one embodiment, the step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image includes:

[0011] Based on the first depth information of each pixel point of the virtual object in the virtual image, determine the virtual space position of each pixel point of the virtual object in the virtual scene space of the virtual reality engine;

[0012] Based on the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, determine the virtual display space corresponding to the actual display space of the holographic visualization terminal device in the virtual scene space;

[0013] Determine the pixel occlusion relationship between the virtual image and the real image from the virtual space position and the virtual display space.

[0014] In one embodiment, the step of determining the pixel occlusion relationship between the virtual image and the real image from the virtual space position and the virtual display space includes:

[0015] Based on the virtual space position, determine the target ray in the camera shooting direction;

[0016] Determine the first intersection point and the second intersection point of the target ray and the virtual display space;

[0017] Based on the virtual space position, the first intersection point and the second intersection point, determine the pixel occlusion relationship between the virtual image and the real image.

[0018] In one embodiment, the step of determining the pixel occlusion relationship between the virtual image and the real image based on the virtual space position, the first intersection point and the second intersection point includes:

[0019] If the virtual space position is between the first intersection point and the second intersection point, then determine the pixel occlusion relationship between the virtual image and the real image as: the pixel points of the virtual object occlude the pixel points of the real image;

[0020] If the virtual space position is outside the first intersection point and the second intersection point, it is determined that the pixel occlusion relationship is: the pixel point of the real image occludes the pixel point of the virtual object.

[0021] In one embodiment, the step of fusing the virtual image and the real image according to the pixel occlusion relationship includes:

[0022] When the pixel occlusion relationship is that the pixel point of the virtual object occludes the pixel point of the real image, the color of the pixel point of the virtual object occludes the color of the pixel point of the real image to obtain a fused target image.

[0023] In one embodiment, before the step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, it includes:

[0024] Determine the first pixel region of the holographic visualization terminal device in the real image and the second pixel region of the virtual object in the virtual image;

[0025] Divide the second pixel region into a third pixel region and a fourth pixel region, where the third pixel region is located within the first pixel region and the fourth pixel region is located outside the first pixel region;

[0026] For the third pixel region, the color of the pixel point of the virtual object occludes the color of the pixel point of the real image;

[0027] For the fourth pixel region, perform the step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image.

[0028] In addition, to achieve the above object, the present application also proposes an image fusion device, and the image fusion device includes:

[0029] An acquisition module, configured to acquire a real image obtained by a camera shooting a holographic visualization terminal device, and a virtual image of a virtual object rendered by a virtual reality engine from the shooting perspective of the camera; wherein, the virtual object is three-dimensionally holographically visualized and interacted by the holographic visualization terminal device;

[0030] A determination module, configured to determine a pixel occlusion relationship between the virtual image and the real image based on first depth information of each pixel point of a virtual object in the virtual image and second depth information of pixel points at key positions of the holographic visualization terminal device in the real image;

[0031] A fusion module, configured to fuse the virtual image and the real image according to the pixel occlusion relationship.

[0032] In addition, to achieve the above object, the present application also provides an image fusion device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program is configured to implement the steps of the virtual-real MR image fusion method for a holographic visualization terminal device as described above.

[0033] In addition, to achieve the above object, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the virtual-real MR image fusion method for a holographic visualization terminal device as described above.

[0034] In addition, to achieve the above object, the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the virtual-real MR image fusion method for a holographic visualization terminal device as described above.

[0035] One or more technical solutions proposed by the present application have at least the following technical effects:

[0036] In the present application, an image fusion method based on depth information is proposed. First, a real image obtained by a camera photographing a holographic visualization terminal device and a virtual image of a virtual object rendered by a virtual reality engine from the perspective of the camera photographing are acquired; then, based on the depth information of relevant pixel points in the virtual image and the real image, a pixel occlusion relationship between the virtual image and the real image is determined; finally, the virtual image and the real image are fused according to the pixel occlusion relationship.

[0037] Compared with the current image fusion methods that do not consider depth information, since the depth information of relevant pixel points in the virtual image and the real image is considered, an accurate pixel occlusion relationship between the virtual image and the real image can be determined. Furthermore, when performing image fusion based on the accurate pixel occlusion relationship, an accurate MR virtual-real fusion result can be obtained. Description of the Drawings

[0038] The accompanying drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with the present application, and are used together with the description to explain the principles of the present application.

[0039] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0040] Figure 1 It is a schematic diagram of shooting for an application scenario of the virtual-real MR image fusion method for the holographic visualization terminal device of the present application;

[0041] Figure 2 It is a schematic diagram of the virtual image area division for an application scenario of the virtual-real MR image fusion method for the holographic visualization terminal device of the present application;

[0042] Figure 3 It is a schematic diagram of the error in cropping for an application scenario of the virtual-real MR image fusion method for the holographic visualization terminal device of the present application;

[0043] Figure 4 It is a schematic flowchart provided by the first embodiment of the virtual-real MR image fusion method for the holographic visualization terminal device of the present application;

[0044] Figure 5 It is a schematic diagram of the principle of generating the virtual reality engine screen provided by the second embodiment of the virtual-real MR image fusion method for the holographic visualization terminal device of the present application;

[0045] Figure 6 It is the first relative position diagram provided by the second embodiment of the virtual-real MR image fusion method for the holographic visualization terminal device of the present application;

[0046] Figure 7 It is the second relative position diagram provided by the second embodiment of the virtual-real MR image fusion method for the holographic visualization terminal device of the present application;

[0047] Figure 8 It is a schematic diagram of the module structure of the virtual-real MR image fusion device for the holographic visualization terminal device according to the embodiment of the present application;

[0048] Figure 9 It is a schematic diagram of the device structure of the hardware operating environment involved in the virtual-real MR image fusion method for the holographic visualization terminal device according to the embodiment of the present application.

[0049] The realization of the purpose, functional features, and advantages of the present application will be further described in conjunction with the embodiments with reference to the accompanying drawings. Detailed implementation manners

[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0051] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the accompanying drawings of the specification and specific implementation manners.

[0052] In an application scenario, virtual simulation teaching live broadcast and virtual training live broadcast are systems in which teachers or commanders, etc. use three-dimensional holographic visualization terminals for real-time teaching and training demonstrations, etc., which can provide immersive educational simulation training, military training experiences, etc., and at the same time support synchronous display live broadcast functions. The system consists of two major parts: a virtual simulation teaching / demonstration subsystem and a real-time display subsystem. Among them, the virtual simulation teaching / demonstration subsystem integrates a three-dimensional holographic visualization terminal module (including but not limited to the form of an electronic sand table and a display wall), an optical positioning module, and a stereoscopic glasses module to provide an interactive three-dimensional training experience; while the real-time display subsystem is equipped with a fixed-position camera and an MR virtual-real fusion output terminal for capturing and real-time transmitting teaching or training scenarios, etc., to ensure that on-site and remote audiences can obtain an immersive learning and viewing experience without wearing anything.

[0053] When teaching or commanding, the teacher or commander wears the stereoscopic glasses module, and the pose of the stereoscopic glasses module is captured by the optical positioning system. The three-dimensional holographic visualization terminal (electronic sand table, holographic wall) can display the three-dimensional stereoscopic image from the perspective of the teacher or commander in real time for the teacher or commander to view during teaching.

[0054] Refer to Figure 1 , the real-time display subsystem uses a fixed-position camera to shoot the teacher and the electronic sand table to record the teaching process of the teacher. At the same time, the pose of the camera observing the three-dimensional holographic visualization terminal (such as an electronic sand table, a holographic wall) is calibrated, and the computer generates a virtual scene image from the perspective of the camera in real time to the MR virtual-real fusion output terminal.

[0055] The final output image of the real-time display subsystem is composed of two parts: a virtual image and a real image. The virtual image is generated by the computer in real time, and the real image is captured by the camera. The two parts of the image use a certain fusion method to cover the screen part of the monitor in the real image with the virtual image to form the final image. The audience watching the live broadcast is like observing the interaction between the three-dimensional holographic visualization terminal (electronic sand table, holographic wall) and the teacher at the camera position.

[0056] In traditional image fusion methods such as chroma keying, the mask area of the virtual picture is identified by color. During fusion, the mask area is recognized according to color, and the virtual picture is used to replace the real picture in the mask area. For example, a certain color (such as green) is used as the background in the virtual picture, and other colors are the foreground. During fusion, it is necessary to traverse all the pixels of this picture. As long as the pixel is green, it is discarded and filled with the pixel at the same position in the real picture, thus completing the fusion process.

[0057] The above color-based matte extraction has the following disadvantages: It is impossible to accurately remove the background area according to the position, and sometimes the part with the same color within the area to be retained will be removed. Therefore, the engine needs to avoid the chroma key color when rendering pictures.

[0058] Refer to Figure 2 , taking an electronic sand table as an example, the area to be retained on the virtual image consists of two parts. The first part is the image range within the screen of the three-dimensional holographic visualization terminal (such as an electronic sand table, holographic wall), and the second part is the area that protrudes from the screen of the three-dimensional holographic visualization terminal in the virtual scene. In order to achieve the out-of-screen display effect, this part of the area also needs to be retained.

[0059] Area 1, that is, the image range of the screen of the three-dimensional holographic visualization terminal, can be approximated by manually or automatically specifying a polygon, and it is easy to find this image range. However, the shape of Area 2 changes with the virtual scene and cannot be calculated in advance. Therefore, during the traversal process of color-based matte extraction, it is impossible to determine whether a certain pixel in Area 2 is located in the area to be retained. If the color of this pixel is the same as the chroma key, it will be wrongly removed.

[0060] Refer to Figure 3 , in the engine picture, there is a green window in the building. Since the color is the same as the chroma key, it will be removed during image fusion, revealing the picture captured by the camera.

[0061] Based on this, the embodiment of the present application provides a virtual-real MR image fusion method for holographic visualization terminal devices. Refer to Figure 4 , Figure 4 is a schematic flowchart of the first embodiment of the virtual-real MR image fusion method for holographic visualization terminal devices of the present application.

[0062] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, an image fusion device, etc. that can implement the above functions. Hereinafter, taking the image fusion device as an example, this embodiment and the following embodiments will be described.

[0063] In this embodiment, the virtual-real MR image fusion method for holographic visualization terminal devices includes steps S10 to S30:

[0064] Step S10, obtain a real image captured by a camera for the holographic visualization terminal device, and a virtual image of a virtual object rendered by a virtual reality engine from the perspective of the camera; wherein, the virtual object is subjected to three-dimensional holographic visualization display and interaction by the holographic visualization terminal device.

[0065] In one embodiment, frame-by-frame image fusion can be performed based on a real video recorded by a camera for the holographic visualization terminal device.

[0066] Among them, various forms of holographic visualization terminal devices are supported, and the holographic visualization terminal device can be in the form of an electronic sand table, a holographic wall, etc.

[0067] It should be noted that the virtual image of the virtual object rendered by the virtual reality engine is a virtual image from the perspective of the camera, so that the perspective of the virtual image is unified with that of the real image, avoiding misalignment between the virtual image and the real image during fusion due to different perspectives.

[0068] Step S20, based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, determine the pixel occlusion relationship between the virtual image and the real image.

[0069] Considering that in the current image fusion method, the pixel points of the virtual object are prone to removal errors during fusion, therefore, the first depth information of each pixel point of the virtual object in the virtual image is obtained, and fusion based on depth information is performed on each pixel point of the virtual object in the virtual image.

[0070] For the real image, since the area where removal errors occur is only a part of it, only the part of the real image related to the holographic visualization terminal device needs to be considered.

[0071] In one embodiment, determine the pixel points at the key positions of the holographic visualization terminal device in the real image. Among them, the key positions of the holographic visualization terminal device can be the coordinate points for determining its spatial position. For example, referring to Figure 2 , determine the coordinates of the display plane of the holographic visualization terminal device, and determine the coordinates of the actual display space of the holographic visualization terminal device. That is to say, according to the coordinates of the key positions, the display plane or display space of the holographic visualization terminal device can be determined.

[0072] Step S30, fuse the virtual image and the real image according to the pixel occlusion relationship.

[0073] Compared with the existing image fusion methods that do not consider depth information, since the depth information of relevant pixel points in the virtual image and the real image is considered, the accurate pixel occlusion relationship between the virtual image and the real image can be determined. Furthermore, when performing image fusion based on the accurate pixel occlusion relationship, an accurate fusion result can be obtained.

[0074] The image fusion method based on depth information proposed in this application can avoid misjudgment during chroma keying and does not require the engine to avoid the color of the chroma key when rendering the picture.

[0075] In a feasible implementation manner, before the step S20, it includes:

[0076] Determine the first pixel region of the holographic visualization terminal device in the real image and the second pixel region of the virtual object in the virtual image;

[0077] Divide the second pixel region into a third pixel region and a fourth pixel region, where the third pixel region is within the first pixel region and the fourth pixel region is outside the first pixel region;

[0078] For the third pixel region, the color of the pixel points of the virtual object occludes the color of the pixel points of the real image;

[0079] For the fourth pixel region, perform the step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image.

[0080] Before determining the pixel occlusion relationship between the virtual image and the real image, the overlapping region between the pixel region of the holographic visualization terminal device in the real image and the pixel region of the virtual object in the virtual image can also be determined. Thus, the second pixel region of the virtual object in the virtual image is divided into: a third pixel region within the first pixel region of the holographic visualization terminal device in the real image and a fourth pixel region outside the first pixel region of the holographic visualization terminal device in the real image. Refer to Figure 2 , the first pixel region of the holographic visualization terminal device in the real image is Figure 2 the region 1 shown in Figure 2 , and the fourth pixel region of the virtual object in the virtual image is

[0081] For the third pixel region, since it is within the first pixel region of the holographic visualization terminal device in the real image, therefore, directly occluding the color of the pixel points of the real image with the color of the pixel points of the virtual object is sufficient. For the fourth pixel region, that is Figure 2 the region 2 in , further image fusion needs to be performed according to the depth information.

[0082] The above can reduce the amount of data for image fusion based on depth information, and while performing accurate image fusion, improve the speed of image fusion.

[0083] Based on the first embodiment of the present application, in the second embodiment of the present application, the content that is the same as or similar to the above-mentioned first embodiment can be referred to the above introduction and will not be elaborated hereinafter. On this basis, step S20 includes:

[0084] Based on the first depth information of each pixel point of the virtual object in the virtual image, determine the virtual space position of each pixel point of the virtual object in the virtual scene space of the virtual reality engine;

[0085] Based on the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, determine the virtual display space corresponding to the actual display space of the holographic visualization terminal device in the virtual scene space;

[0086] Determine the pixel occlusion relationship between the virtual image and the real image from the virtual space position and the virtual display space.

[0087] Refer to Figure 5 , the principle of generating an image by the virtual reality engine is similar to the camera imaging principle. Taking a certain point in space as the optical center, the points in the engine scene are projected towards this point. According to the pinhole imaging principle of the camera, each image point on the projection plane can be back-projected into a ray in space. This ray will have intersections with several vertical planes of the electronic sand table screen in the engine scene space, that is, the virtual display space. As Figure 5 shown, the optical center of the camera in the engine is O, there is an image point X on the projection plane, the ray it back-projects is OP, and this ray intersects the front vertical plane of the three-dimensional holographic visualization terminal (electronic sand table, holographic wall) screen in space at point X1 and intersects the rear vertical plane at point X2. In the engine scene, the position of the three-dimensional holographic visualization terminal (electronic sand table, holographic wall) screen is known, and the position of the optical center is calibrated, so the ray OP is known, that is, the equations of the front and rear vertical planes can be obtained. The projection plane is the near clipping plane of the engine camera parameters, and the equation of the plane can be obtained. Therefore, given any point X on the projection plane, the positions of point X1 and point X2 can be calculated.

[0088] Further, refer to Figure 6 , based on the first depth information of each pixel point of the virtual object in the virtual image, determine the virtual space position of each pixel point of the virtual object in the virtual scene space of the virtual reality engine, that is, Figure 6 the object point Y shown in

[0089] Refer to Figure 5 or Figure 6, based on the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, the virtual display space corresponding to the actual display space of the holographic visualization terminal device in the virtual scene space is determined as: the virtual display space defined by the respective vertical surfaces of the electronic sand table screen. Among them, the depth information of the pixel points at each point or key positions of the four vertical surfaces of the three-dimensional holographic visualization terminal screen in the virtual scene space can be calculated in advance, and the depth templates corresponding to each vertical surface are calibrated thereby. Furthermore, the pixel occlusion relationship between the virtual image and the real image is determined by using the relative position relationship between the virtual space position of the virtual object pixel points in the virtual scene space of the virtual reality engine and the depth templates. Specifically, if the virtual space position is between the two depth templates, the pixel occlusion relationship is determined as: the pixel points of the virtual object occlude the pixel points of the real image; if the virtual space position is outside the two depth templates, the pixel occlusion relationship is determined as: the pixel points of the real image occlude the pixel points of the virtual object.

[0090] In one embodiment, when determining the pixel occlusion relationship between the two based on the virtual space position and the virtual display space, if the virtual space position is within the virtual display space, the occlusion relationship between the virtual object in the virtual image and the three-dimensional holographic visualization terminal in the real image is determined as: the virtual object occludes the three-dimensional holographic visualization terminal; if the virtual space position is outside the virtual display space, the occlusion relationship is: the three-dimensional holographic visualization terminal occludes the virtual object.

[0091] In a feasible implementation manner, the step of determining the pixel occlusion relationship between the virtual image and the real image from the virtual space position and the virtual display space includes:

[0092] Based on the virtual space position, determine the target ray in the camera shooting direction;

[0093] Determine the first intersection point and the second intersection point of the target ray and the virtual display space;

[0094] Based on the virtual space position, the first intersection point and the second intersection point, determine the pixel occlusion relationship between the virtual image and the real image.

[0095] In one embodiment, referring to Figure 6 , based on the virtual space position, the target ray in the camera shooting direction is determined as ray OP, and the first intersection point and the second intersection point of the target ray and the virtual display space are determined as X1 and X2 respectively. Further, the pixel occlusion relationship between the virtual image and the real image can be determined according to the virtual space position: the object point Y, the first intersection point X1, and the second intersection point X2.

[0096] In a feasible implementation manner, the step of determining the pixel occlusion relationship between the virtual image and the real image based on the virtual space position, the first intersection point, and the second intersection point includes:

[0097] If the virtual space position is between the first intersection point and the second intersection point, it is determined that the pixel occlusion relationship between the virtual image and the real image is: the pixel points of the virtual object occlude the pixel points of the real image;

[0098] If the virtual space position is outside the first intersection point and the second intersection point, it is determined that the pixel occlusion relationship is: the pixel points of the real image occlude the pixel points of the virtual object.

[0099] In one embodiment, referring to Figure 6 , after rendering the object point Y in the scene, the depth information is the distance |OY| from the object point Y to the optical center O, and the image point of the object point Y on the projection plane is X. The distance |OX1| from the optical center O to the point X1 and the distance |OX2| from the optical center O to the point X2 are calculated. Among them, |OX2| > |OY| and |OX1| < |OY| are satisfied. Therefore, when fusing the images, the image point X needs to cover the captured image of the camera.

[0100] In one embodiment, referring to Figure 7 , after rendering the object point Z in the scene, the depth information is the distance |OZ| from the object point Z to the optical center O, and the image point of the object point Z on the projection plane is X. The distance |OX1| from the optical center O to the point X1 and the distance |OX2| from the optical center O to the point X2 are calculated. Because |OX1| > |OZ| is satisfied, when fusing the images, the image point X does not need to cover the captured image of the camera.

[0101] It should be noted that the image fusion method based on depth information proposed in this application has real-time performance. As long as the camera is calibrated, the depth template can be pre-calculated. That is to say, the distance |OX1| from the optical center O to the point X1 and the distance |OX2| from the optical center O to the point X2 can be pre-calculated, and no additional calculation amount will be added when fusing the images.

[0102] In a feasible implementation manner, the step S30 includes:

[0103] When the pixel occlusion relationship is that the pixel points of the virtual object occlude the pixel points of the real image, the color of the pixel points of the virtual object occludes the color of the pixel points of the real image to obtain the fused target image.

[0104] In one embodiment, when the virtual reality engine renders the virtual image, it simultaneously generates the color information and depth information of each pixel in the virtual image.

[0105] When the pixel occlusion relationship is that the pixel points of the virtual object occlude the pixel points of the real image, the color of the pixel points of the virtual object occludes the color of the pixel points of the real image to obtain the fused target image. Conversely, when the pixel occlusion relationship is that the pixel points of the real object occlude the pixel points of the virtual image, the color of the pixel points of the real object is maintained to obtain the fused target image.

[0106] In summary, in this embodiment, the depth information of each point on the four vertical surfaces of the screen of the three-dimensional holographic visualization terminal (electronic sand table, holographic wall) in the virtual scene is calculated in advance as the maximum depth value template and the minimum depth value template. That is to say, two templates are established for each point on the projection plane. The value of the minimum depth template is the distance |OX1| between the optical center and point X1, and the value of the maximum depth template is the distance |OX2| between the optical center and point X2. When the engine renders the virtual image, the color information and depth information of each pixel in the image are generated at the same time. The depth information is compared with the template value. If it is within the maximum and minimum ranges, it means that the color information of this pixel point needs to occlude the camera screen; otherwise, if it exceeds the range, it means that this pixel point needs to display the camera screen.

[0107] It can be understood that the information pre-stored in the template does not need to be limited to depth, as long as it is a value that has a linear relationship or an approximate linear relationship with depth, such as the depth default provided by the virtual reality engine, the depth based on the logarithmic relationship, the inverse depth, or the distance from the object point to the optical center, etc.

[0108] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the virtual-real MR image fusion method of this application for holographic visualization terminal devices. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.

[0109] This application also provides an image fusion device. Please refer to Figure 8 The image fusion device includes:

[0110] An acquisition module 10, configured to acquire a real image obtained by a camera shooting a holographic visualization terminal device, and a virtual image of a virtual object in the shooting perspective of the camera rendered by a virtual reality engine; wherein, the virtual object is three-dimensionally holographically visualized and interacted by the holographic visualization terminal device;

[0111] A determination module 20, configured to determine the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image;

[0112] A fusion module 30, configured to fuse the virtual image and the real image according to the pixel occlusion relationship.

[0113] In one embodiment, the determining module 20 is further configured to:

[0114] Based on the first depth information of each pixel point of the virtual object in the virtual image, determine the virtual spatial position of each pixel point of the virtual object in the virtual scene space of the virtual reality engine;

[0115] Based on the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, determine the virtual display space corresponding to the actual display space of the holographic visualization terminal device in the virtual scene space;

[0116] Determine the pixel occlusion relationship between the virtual image and the real image from the virtual spatial position and the virtual display space.

[0117] In one embodiment, the determining module 20 is further configured to:

[0118] Based on the virtual spatial position, determine the target ray in the camera shooting direction;

[0119] Determine the first intersection point and the second intersection point of the target ray and the virtual display space;

[0120] Based on the virtual spatial position, the first intersection point and the second intersection point, determine the pixel occlusion relationship between the virtual image and the real image.

[0121] In one embodiment, the determining module 20 is further configured to:

[0122] If the virtual spatial position is between the first intersection point and the second intersection point, determine the pixel occlusion relationship between the virtual image and the real image as: the pixel points of the virtual object occlude the pixel points of the real image;

[0123] If the virtual spatial position is outside the first intersection point and the second intersection point, determine the pixel occlusion relationship as: the pixel points of the real image occlude the pixel points of the virtual object.

[0124] In one embodiment, the fusion module 20 is further configured to:

[0125] When the pixel occlusion relationship is that the pixel points of the virtual object occlude the pixel points of the real image, use the color of the pixel points of the virtual object to occlude the color of the pixel points of the real image to obtain the fused target image.

[0126] In one embodiment, the determining module 20 is further configured to:

[0127] Before the step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, include:

[0128] Determine the first pixel region of the holographic visualization terminal device in the real image and the second pixel region of the virtual object in the virtual image;

[0129] Divide the second pixel region into a third pixel region and a fourth pixel region, where the third pixel region is located within the first pixel region and the fourth pixel region is located outside the first pixel region;

[0130] For the third pixel region, block the color of the pixel points of the virtual object with the color of the pixel points of the real image;

[0131] For the fourth pixel region, perform the step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image.

[0132] The image fusion device provided in this application adopts the virtual-real MR image fusion method for the holographic visualization terminal device in the above embodiment, which can solve the technical problem of inaccurate image fusion. Compared with the prior art, the beneficial effects of the image fusion device provided in this application are the same as those of the virtual-real MR image fusion method for the holographic visualization terminal device provided in the above embodiment, and other technical features in the image fusion device are the same as those disclosed in the method of the above embodiment, which will not be elaborated here.

[0133] This application provides an image fusion device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the virtual-real MR image fusion method for the holographic visualization terminal device in the first embodiment above.

[0134] Next, refer to Figure 9 , which shows a schematic structural diagram of an image fusion device suitable for implementing the embodiments of this application. The image fusion device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 9The illustrated image fusion device is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of this application.

[0135] As Figure 9 shown, the image fusion device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the image fusion device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the image fusion device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an image fusion device with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.

[0136] In particular, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in this application are executed.

[0137] The image fusion device provided by this application adopts the virtual-real MR image fusion method for holographic visualization terminal devices in the above embodiments, which can solve the technical problem of inaccurate image fusion. Compared with the prior art, the beneficial effects of the image fusion device provided by this application are the same as those of the virtual-real MR image fusion method for holographic visualization terminal devices provided in the above embodiments, and other technical features in this image fusion device are the same as those disclosed in the method of the previous embodiment, which will not be elaborated here.

[0138] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0139] As described above, the above are only specific implementation manners of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0140] This application provides a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the virtual-real MR image fusion method for holographic visualization terminal devices in the above embodiments.

[0141] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0142] The above computer-readable storage medium can be included in an image fusion device; or it can exist separately without being assembled into the image fusion device.

[0143] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by an image fusion device, the image fusion device is enabled to: obtain a real image obtained by a camera shooting a holographic visualization terminal device, and a virtual image of a virtual object rendered by a virtual reality engine from the shooting perspective of the camera; wherein, the virtual object is subjected to three-dimensional holographic visualization display and interaction by the holographic visualization terminal device;

[0144] Based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key positions of the holographic visualization terminal device in the real image, determine the pixel occlusion relationship between the virtual image and the real image;

[0145] According to the pixel occlusion relationship, fuse the virtual image and the real image.

[0146] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).

[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0148] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.

[0149] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned virtual-real MR image fusion method for a holographic visualization terminal device, and can solve the technical problem of inaccurate image fusion. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the virtual-real MR image fusion method for a holographic visualization terminal device provided in the above embodiments, and will not be elaborated here.

[0150] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the method for fusing virtual and real MR images for a holographic visualization terminal device as described above.

[0151] The computer program product provided by the present application can solve the technical problem of inaccurate image fusion. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the method for fusing virtual and real MR images for a holographic visualization terminal device provided in the above embodiments, and will not be elaborated here.

[0152] The foregoing are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.

Claims

1. A virtual and real MR image fusion method for a holographic visualization terminal device, characterized in that: The method comprises: Acquire a real image obtained by shooting a holographic visualization terminal device with a camera, and a virtual image of a virtual object in the camera shooting angle rendered by a virtual reality engine; wherein the virtual object is displayed and interacted with in a three-dimensional holographic visualization by the holographic visualization terminal device; Determine a pixel occlusion relationship between the virtual image and the real image based on first depth information of each pixel of the virtual object in the virtual image and second depth information of the pixel at a key position of the holographic visualization terminal device in the real image; The virtual image and the real image are fused according to the pixel occlusion relationship.

2. The virtual-real MR image fusion method for a holographic visualization terminal device according to claim 1, characterized in that: The step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel of the virtual object in the virtual image and the second depth information of the pixel at the key position of the holographic visualization terminal device in the real image comprises: Determining a virtual space position of each pixel of the virtual object in a virtual scene space of a virtual reality engine based on first depth information of each pixel of the virtual object in the virtual image; Determining, based on second depth information of pixels at key positions of the holographic visualization terminal device in the real image, that an actual display space of the holographic visualization terminal device corresponds to a virtual display space in the virtual scene space; A pixel occlusion relationship between the virtual image and the real image is determined based on the virtual space position and the virtual display space.

3. The virtual-real MR image fusion method for a holographic visualization terminal device according to claim 2, characterized in that: The step of determining the pixel occlusion relationship between the virtual image and the real image based on the virtual space position and the virtual display space comprises: Based on the virtual space position, determining a target ray in a camera shooting direction; Determine a first intersection point and a second intersection point between the target ray and the virtual display space; A pixel occlusion relationship between the virtual image and the real image is determined based on the virtual space position, the first intersection point, and the second intersection point.

4. The virtual-real MR image fusion method for a holographic visualization terminal device according to claim 3, characterized in that: The step of determining a pixel occlusion relationship between the virtual image and the real image based on the virtual space position, the first intersection point and the second intersection point comprises: If the virtual space position is located between the first intersection point and the second intersection point, then determining the pixel occlusion relationship between the virtual image and the real image is: the pixel points of the virtual object occlude the pixel points of the real image; If the virtual space position is outside the first intersection point and the second intersection point, the pixel occlusion relationship is determined as follows: a pixel point of the real image occludes a pixel point of the virtual object.

5. The virtual-real MR image fusion method for a holographic visualization terminal device according to claim 1, characterized in that: The step of fusing the virtual image and the real image according to the pixel occlusion relationship comprises: When the pixel occlusion relationship is that the pixel points of the virtual object occlude the pixel points of the real image, the color of the pixel points of the virtual object is used to occlude the color of the pixel points of the real image to obtain a fused target image.

6. The virtual-real MR image fusion method for a holographic visualization terminal device according to claim 1, characterized in that: The step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel of the virtual object in the virtual image and the second depth information of the pixel at the key position of the holographic visualization terminal device in the real image includes: Determining a first pixel area of ​​the holographic visualization terminal device in the real image and a second pixel area of ​​the virtual object in the virtual image; Dividing the second pixel region into a third pixel region and a fourth pixel region, wherein the third pixel region is located within the first pixel region, and the fourth pixel region is located outside the first pixel region; For the third pixel area, the color of the pixel of the virtual object covers the color of the pixel of the real image; For the fourth pixel area, the step of determining the pixel occlusion relationship between the virtual image and the real image based on the first depth information of each pixel point of the virtual object in the virtual image and the second depth information of the pixel points at the key position of the holographic visualization terminal device in the real image is performed.

7. A virtual-real MR image fusion device for a holographic visualization terminal device, characterized in that: The device comprises: An acquisition module, used to acquire a real image obtained by shooting a holographic visualization terminal device with a camera, and a virtual image of a virtual object rendered by a virtual reality engine under the camera shooting angle; wherein the virtual object is displayed and interacted with in a three-dimensional holographic visualization by the holographic visualization terminal device; A determination module, configured to determine a pixel occlusion relationship between the virtual image and the real image based on first depth information of each pixel of the virtual object in the virtual image and second depth information of the pixel at a key position of the holographic visualization terminal device in the real image; A fusion module is used to fuse the virtual image and the real image according to the pixel occlusion relationship.

8. A virtual-real MR image fusion device for a holographic visualization terminal device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the virtual-real MR image fusion method for a holographic visualization terminal device as described in any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the virtual-real MR image fusion method for a holographic visualization terminal device as described in any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the virtual-real MR image fusion method for a holographic visualization terminal device according to any one of claims 1 to 6 are implemented.