Display method, device, electronic device and storage medium

By obtaining the location information of the human target site, calculate the perspective projection images in the three -dimensional three -dimensional scenes and transform the perspective, solving the problem of dynamic image renewal when the existing technology cannot achieve changes in the location of the observation position, realize the dynamic three -dimensional visual effect, improved the improvement of the dynamic three -dimensional visual effects, which improved the improvement, which improved the improvement, which improved the improvement of the effect. Visual experience.

CN112929651BActive Publication Date: 2025-01-24BEIJING INFORMATION SCI & TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110097367.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-25
Publication Date
2025-01-24
Estimated Expiration
2041-01-25

AI Technical Summary

Technical Problem

The existing stereo vision technology cannot achieve dynamic image updates when the observed position changes, resulting in the displayed picture being unable to change with the observed position changes, lacking binocular visual stereo effects.

Method used

By obtaining the location information of the human target site, determine the observation viewpoint position in the three -dimensional three -dimensional scenario, calculate the perspective projection image of the three -dimensional three -dimensional object based on this position and preset display ratio, and perform a perspective transformation to generate the target image. The final output target image To achieve dynamic three -dimensional effect.

Benefits of technology

It is realized that when the position of the human body changes, the display screen can also change accordingly, producing a three-dimensional effect of "optical illusion" and improving the visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112929651B_ABST
    Figure CN112929651B_ABST
Patent Text Reader

Abstract

The present application provides a display method, device, electronic device and storage medium, including: obtaining first position information of a target part of a human body; determining observation position information of an observation viewpoint in a three-dimensional scene based on the first position information; determining a perspective projection image of a three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio; performing perspective transformation on the perspective projection image according to the display ratio to obtain a target image; and outputting the target image to a target object so that the target object displays the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image display technology, and in particular to a display method, device, electronic device and storage medium. Background Art

[0002] There are several ways to generate stereoscopic images. One main method is to use a head-mounted display close to the eyes to produce images. Such devices can produce more realistic display effects and have good image resolution, but the device is bulky, restricting the user's activities and causing great inconvenience. At the same time, such devices will completely block the line of sight, and the human eye cannot receive light from the real world. Another method is to display images through transparent optical surfaces, which can produce good floating projection effects, such as "holographic" fans, and use highly transparent media such as projection film to display translucent images. The stereoscopic vision technology used in 3D cinemas also uses this principle. However, their images are still on a plane that does not change with the observation position, and the displayed images are essentially no different from ordinary displays. They can neither display images from other observation directions nor have binocular stereoscopic effects. Summary of the invention

[0003] In response to the above problems, the present application provides a display method, device, equipment and storage medium.

[0004] The present application provides a display method, comprising:

[0005] Acquiring first position information of a target part of a human body;

[0006] Determining observation position information of an observation viewpoint in a three-dimensional scene based on the first position information;

[0007] Determining a perspective projection image of a three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio;

[0008] Performing perspective transformation on the perspective projection image according to the display ratio to obtain a target image;

[0009] The target image is output to a target object so that the target object displays the target image.

[0010] In some embodiments, the determining, based on the observation position information and a preset display ratio, a perspective projection image of a three-dimensional object in the three-dimensional scene includes:

[0011] Determining a viewing angle value based on the observation position information and second position information of a center point of the three-dimensional object;

[0012] Determining first distance information between the observation position information and a near clipping plane;

[0013] Determining second distance information between the observation position information and the far clipping plane;

[0014] A perspective projection image of a three-dimensional object in the three-dimensional scene is determined based on the first distance information, the second distance information, the display ratio, and the viewing angle.

[0015] In some embodiments, determining the perspective projection image of the three-dimensional object in the three-dimensional scene based on the first distance information, the second distance information, the display ratio, and the viewing angle includes:

[0016] determining a first target value of a perspective projection matrix based on the first distance information, the second distance information, the display ratio and the viewing angle;

[0017] Determining third position information of the three-dimensional object for perspective projection based on the first target value;

[0018] The perspective projection image is determined based on the third position information.

[0019] In some embodiments, determining a first target value of a perspective projection matrix based on the first distance information, the second distance information, the display ratio, and the viewing angle value includes:

[0020] Get the pre-built perspective projection matrix;

[0021] The first distance information, the second distance information, the preset display ratio and the viewing angle value are input into the perspective projection matrix to determine a first target value of the perspective projection matrix.

[0022] In some embodiments, performing perspective transformation on the perspective projection image according to the display ratio to obtain the target image includes:

[0023] Determining transformation range information of perspective transformation based on the display ratio;

[0024] determining a second target value of the perspective transformation matrix based on the transformation range information;

[0025] Determining fourth position information of the perspective projection image for perspective transformation based on the second target value;

[0026] The target image is determined based on the fourth position information.

[0027] In some embodiments, the target part includes: a left eye and a right eye, the target image includes: a target image corresponding to the left eye and a target image corresponding to the right eye, and when the target object includes three-dimensional stereo glasses, outputting the target image to the target object includes:

[0028] Outputting the target image corresponding to the left eye to the left eye of the three-dimensional glasses;

[0029] The target image corresponding to the right eye is output to the right eye of the three-dimensional glasses.

[0030] In some embodiments, when the target object includes a display device, outputting the target image to the target object includes:

[0031] The target image corresponding to the left eye and the target image corresponding to the right eye are output to the display device to display the target image corresponding to the left eye and the target image corresponding to the right eye on the display device.

[0032] An embodiment of the present application provides a display device, including:

[0033] An acquisition module, used for acquiring first position information of a target part of a human body;

[0034] A first determining module, configured to determine observation position information of an observation viewpoint in a three-dimensional scene based on the first position information;

[0035] A perspective projection module, configured to determine a perspective projection image of a three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio;

[0036] A perspective transformation module, used for performing perspective transformation on the perspective projection image according to the display ratio to obtain a target image;

[0037] The output module is used to output the target image to a target object so that the target object displays the target image.

[0038] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, any one of the display methods described above is executed.

[0039] An embodiment of the present application provides a storage medium, and a computer program stored in the storage medium can be executed by one or more processors and can be used to implement any of the display methods described above.

[0040] The present application provides a display method, device, electronic device and storage medium, which obtains first position information of a target part of a human body (such as a face), determines a perspective projection image of a three-dimensional object in a three-dimensional scene based on the first position information, and displays it based on the perspective projection image, so that when the position of the human body changes, the displayed picture can also change, thereby achieving a three-dimensional effect of "visual illusion" and obtaining a relatively good visual experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Hereinafter, the present application will be described in more detail based on embodiments and with reference to the accompanying drawings.

[0042] Figure 1 A schematic diagram of an implementation flow of a display method provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of an implementation process of determining a perspective projection image provided in an embodiment of the present application;

[0044] Figure 3 A perspective schematic diagram of the principle provided by an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a process for determining a target image provided in an embodiment of the present application;

[0046] Figure 5 A schematic diagram of the structure of a display device provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0048] In the drawings, the same reference numerals are used for the same components, and the drawings are not drawn to scale. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0050] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0051] If similar descriptions of "first\second\third" appear in the application documents, the following instructions will be added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0053] The present application provides a display method, which is applied to an electronic device. The function implemented by the display method provided in the present application can be implemented by calling a program code by a processor of the electronic device, wherein the program code can be stored in a computer storage medium. The present application provides a display method, Figure 1 A schematic diagram of an implementation flow of a display method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, including:

[0054] Step S101, obtaining first position information of a target part of a human body.

[0055] In an embodiment of the present application, an electronic device can be connected to a position detection device, and the position detection device detects the first position information of a target part of a human body, so that the electronic device obtains the first position information. The target part can be the head, left eye, right eye, nose, face, etc. of the human body. When the target part is one or more of the left eye and the right eye, the first position information can be detected by a binocular vision camera. When the target part is one or more of the head, left eye, right eye, nose, and face, the first position information can be detected by a head tracking device. In an embodiment of the present application, multiple target parts that are close to each other can be used as a detection object. The first position information can be represented by spatial position coordinates.

[0056] In the embodiment of the present application, the target part may include one or more, and the first position corresponding to each target part may be different.

[0057] Step S102: determining observation position information of an observation viewpoint in a three-dimensional scene based on the first position information.

[0058] In the embodiment of the present application, a three-dimensional scene is pre-established, and the three-dimensional scene includes a three-dimensional object. The three-dimensional scene can be constructed based on a 3D engine. The three-dimensional scene can be a scene for education and teaching such as medicine, design, and mechanics, a retail shopping commodity display scene, a building terrain sand table design display scene, and a virtual cultural tourism display scene. In the embodiment of the present application, the first position information can be converted into observation position information in the three-dimensional scene, and the position corresponding to the observation position information is used as the observation viewpoint for perspective projection. The spatial position coordinates corresponding to the first position information can be converted into spatial position coordinates in the 3D engine.

[0059] Step S103: determining a perspective projection image of a three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio.

[0060] In the embodiment of the present application, the preset display ratio may be determined according to the target object to be output. For example, the preset display ratio may be 16:9, 4:3, etc. In the embodiment of the present application, a perspective projection image is obtained by perspective projecting a three-dimensional object in a three-dimensional space, and the perspective projection image is a two-dimensional image.

[0061] In the embodiment of the present application, determining the perspective projection image of the three-dimensional object in the three-dimensional scene based on the observation position information and the preset display ratio can be achieved in the following manner: determining the viewing angle value based on the observation position information and the second position information of the center point of the three-dimensional object; determining the first distance information between the observation position information and the near clipping plane; determining the second distance information between the observation position information and the far clipping plane; determining the perspective projection image of the three-dimensional object in the three-dimensional scene based on the first distance information, the second distance information, the display ratio and the viewing angle. Determining the first target value of the perspective projection matrix based on the first distance information, the second distance information, the display ratio and the viewing angle; determining the third position information for perspective projection of the three-dimensional object based on the first target value; and determining the perspective projection image based on the third position information.

[0062] In an embodiment of the present application, determining a first target value of a perspective projection matrix based on the first distance information, the second distance information, the display ratio, and the viewing angle value includes: obtaining a pre-established perspective projection matrix; inputting the first distance information, the second distance information, the preset display ratio, and the viewing angle value into the perspective projection matrix to determine the first target value of the perspective projection matrix.

[0063] In the embodiment of the present application, when there are multiple target parts and the first position corresponding to each target part is different, the obtained perspective projection images may be different, that is, the perspective projection images corresponding to each target part may be different.

[0064] Step S104: performing perspective transformation on the perspective projection image according to the display ratio to obtain a target image.

[0065] In the embodiment of the present application, the perspective projection image can be spatially transformed through perspective transformation to obtain a target image, which can better match the target object.

[0066] In an embodiment of the present application, the perspective transformation of the perspective projection image according to the display ratio to obtain the target image can be achieved by the following steps: determining the transformation range information of the perspective transformation based on the display ratio; determining the second target value of the perspective transformation matrix based on the transformation range information; determining the fourth position information of the perspective transformation of the perspective projection image based on the second target value; and determining the target image based on the fourth position information.

[0067] Step S105 , outputting the target image to the target object so that the target object displays the target image.

[0068] In the embodiment of the present application, the target object may include a projection plane such as a wall or a desktop, and may also include a display device, three-dimensional glasses, etc.

[0069] In the embodiment of the present application, when the target object includes a projection plane such as a wall or a desktop, outputting the target image to the target object may be the electronic device projecting the target image onto the projection plane such as a wall or a desktop. When the target object is a display device or three-dimensional stereo glasses, the target image may be output to the display device or the three-dimensional stereo glasses.

[0070] In an embodiment of the present application, the target parts include: a left eye and a right eye, and the target images include: a target image corresponding to the left eye and a target image corresponding to the right eye. When the target object includes three-dimensional stereo glasses, outputting the target image to the target object includes: outputting the target image corresponding to the left eye to the left eye of the three-dimensional stereo glasses; outputting the target image corresponding to the right eye to the right eye of the three-dimensional stereo glasses, and binocular vision effect can be achieved through the three-dimensional stereo glasses.

[0071] In an embodiment of the present application, when the target object includes a display device, the outputting of the target image to the target object includes: outputting the target image corresponding to the left eye and the target image corresponding to the right eye to the display device, so as to display the target image corresponding to the left eye and the target image corresponding to the right eye on the display device. At this time, the display device superimposes the target image corresponding to the left eye and the target image corresponding to the right eye, for example, using polarized light and a dual-lens projector to display the superimposed image. At this time, the user can use passive polarized light 3D glasses to separate the two superimposed images to achieve a binocular visual effect. Or use a high-frequency stroboscopic flat-panel display and active shutter 3D glasses to obtain a binocular visual image. The active shutter 3D glasses are synchronized with the flashing frequency of the display to achieve the separation effect of the high-frequency stroboscopic left and right eye images, thereby achieving the generation of a binocular stereoscopic visual effect.

[0072] A display method provided by the present application obtains first position information of a target part of a human body, determines a perspective projection image of a three-dimensional object in a three-dimensional scene based on the first position information, and displays it based on the perspective projection image, so that when the position of the human body changes, the displayed picture can also change, thereby achieving a "visual illusion" three-dimensional effect and obtaining a better visual experience.

[0073] In some embodiments, step S103 “determining the perspective projection image of the three-dimensional object in the three-dimensional scene based on the observation position information and the preset display ratio” can be implemented by the following steps: Figure 2 A schematic diagram of an implementation process of determining a perspective projection image provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, including:

[0074] Step S1, determining a viewing angle value based on the observation position information and second position information of the center point of the three-dimensional object.

[0075] In the embodiment of the present application, the viewing angle value can be determined based on the spatial position coordinates corresponding to the observation position information and the spatial position coordinates corresponding to the center point of the three-dimensional object, and the viewing angle value is represented by cotθ.

[0076] Step S2, determining first distance information between the observation position information and the near clipping plane;

[0077] In the embodiment of the present application, a near clipping plane and a far clipping plane may be preset when performing perspective projection, and the first distance information is represented by n.

[0078] Step S3, determining second distance information between the observation position information and the far clipping plane.

[0079] In the embodiment of the present application, the second distance is represented by f.

[0080] Step S4: determining a perspective projection image of the three-dimensional object in the three-dimensional scene based on the first distance information, the second distance information, the display ratio and the viewing angle.

[0081] In the embodiment of the present application, step S4 can be implemented by the following steps:

[0082] Step S41, obtaining a pre-established perspective projection matrix.

[0083] In the present application, a perspective projection matrix can be pre-established based on the perspective projection principle. For example, the perspective projection matrix formula is shown in formula (1):

[0084]

[0085] Step S42: input the first distance information, the second distance information, the preset display ratio and the viewing angle value into the perspective projection matrix to determine a first target value of the perspective projection matrix.

[0086] In the embodiment of the present application, the display ratio is represented by Aspect. By inputting the first distance information, the second distance information, the preset display ratio and the viewing angle value into the perspective projection matrix, the first target value can be obtained, and the first target value is the value of M.

[0087] Step S43, determining third position information of the three-dimensional object for perspective projection based on the first target value;

[0088] In the embodiment of the present application, the coordinates of the three-dimensional object in the three-dimensional scene may be multiplied by the first target value, and then the spatial coordinates corresponding to the third position information of the perspective projection may be determined.

[0089] Step S44: determining the perspective projection image based on the third position information.

[0090] In an embodiment of the present application, the electronic device can perform perspective projection on each part of the three-dimensional object based on the third position information, thereby obtaining a perspective projection image, which is projected onto a projection surface in the three-dimensional scene.

[0091] Before implementing the present application, it is necessary to establish a perspective projection matrix, which can be achieved by the following steps: Figure 3 A perspective schematic diagram of the embodiment of the present application is provided, such as Figure 3As shown, point O can be considered as the observation point, the distance between the near clipping plane and point O is n, and the distance between the far clipping plane and point O is f. The coordinates of the three-dimensional object before transformation are P(x, y, z), and the coordinates after perspective projection scaling transformation are P”(x”, y”, z”). Assuming that the required perspective projection matrix is ​​M, then this method can define PM=P”, that is, see formula (2):

[0092]

[0093] At the same time, this method continues to refer to the setting of various parameters of perspective projection transformation Figure 3 As shown, P is the coordinate to be determined, and P' is the transformed coordinate.

[0094] Depend on Figure 3 It can be seen that OP'Q and OPQ are similar triangles. Therefore, the following equation can be derived, see formula (3):

[0095]

[0096] Right now Right now

[0097] Similarly, we can get:

[0098]

[0099] In this way, the coordinates of P' are obtained, see formula (4):

[0100]

[0101] Next, we need to scale P'. Assuming the height of the plane to be projected is H and the original height of the plane is i, we can get:

[0102] Right now

[0103] because so

[0104] In this method, the aspect ratio (i.e., display ratio) of the projection plane is assumed to be Aspect, from which formula (5) can be obtained:

[0105]

[0106] The final image output by perspective projection is a two-dimensional image. However, only the x and y coordinate conversions cannot meet all requirements. Because the z axis cannot be completely discarded, it is necessary to know the nearest z axis coordinate and keep it, because this is the first point observed from the observation point in the depth direction. This point must be kept. However, in the matrix operation of this algorithm, the range of the z axis value must be within the interval [0,1], so the z axis coordinate must be mapped. Setting:

[0107]

[0108] Where a and b are temporary variables. Before mapping, the range of z is [n,f]. n and f are the z-axis coordinate ranges of the two planes before and after the transformation, respectively. That is, n is the distance from point O to the near clipping plane, and f is the distance from the point to the far clipping plane. After the mapping operation, this method sets the range of the z-axis to within the interval of [0,1]. You can set:

[0109]

[0110] Solving for this yields:

[0111]

[0112] After rearrangement, we can see formula (6):

[0113]

[0114] In this way, the specific coordinates of P" are obtained. Bring these coordinates back to the initial matrix multiplication and multiply them with Pz. This can eliminate Pz. Finally, the following formula is obtained, see formula (7):

[0115]

[0116] Px, Py, Pz are equal to x, y, z. Thus, formula (1) is obtained.

[0117] In some embodiments, step S104 "perspectively transforming the perspective projection image according to the display ratio to obtain a target image" can be implemented by the following steps: Figure 4 A schematic diagram of a process for determining a target image provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, including:

[0118] Step S1041: determining transformation range information of perspective transformation based on the display ratio.

[0119] In the embodiment of the present application, four coordinate values ​​may be determined based on the display ratio, and the four coordinate values ​​are two-dimensional coordinate values, and the transformation range information is determined by the four coordinate values.

[0120] Step S1042: Determine a second target value of the perspective transformation matrix based on the transformation range information.

[0121] In the embodiment of the present application, the transformation range information may be input into the perspective transformation matrix to obtain the second target value.

[0122] Through this transformation matrix, we can get a 11 to a 32 The value of is the second target value.

[0123] Step S1043: determining fourth position information for perspective transformation of the perspective projection image based on the second target value.

[0124] In the embodiment of the present application, the second target value may be multiplied by the coordinate value of the perspective projection image to obtain the coordinate value corresponding to the fourth position information, see formula (9):

[0125]

[0126] Step S1044: determine the target image based on the fourth position information.

[0127] In some embodiments, before step S1042, the method further includes pre-establishing a perspective transformation matrix, and establishing the perspective transformation matrix may be achieved by the following method:

[0128] Perspective transformation also requires the definition of a transformation matrix to transform the original coordinates into the target coordinates. [x, y, 1] is the original coordinate, [X, Y, Z] is the transformed coordinate, and the transformation matrix formula is established by referring to formula (9). Since the image is in a two-dimensional plane, the Z coordinate in the depth direction can be set to 1. Dividing the [X, Y, Z] coordinate by Z yields formula (10):

[0129]

[0130] a33 can be eliminated, let a33 = 1, expand all the above formulas, and we can get formula (11):

[0131]

[0132] Before applying the perspective transformation algorithm, four coordinates are input to define the range of the perspective transformation. The four two-dimensional coordinate values ​​can provide a total of 8 points. In this way, this method can obtain a total of 8 equations. The transformation formula is formula (12):

[0133]

[0134] Solve this equation to find the values ​​of all transformation matrices. This formula can be used to obtain a 12 to a 32 The value of can get the entire transformation matrix.

[0135] In some embodiments, the target part includes: a left eye and a right eye, and the target image includes: a target image corresponding to the left eye and a target image corresponding to the right eye. When the target object includes three-dimensional stereo glasses, step S105 "outputting the target image to the target object" includes:

[0136] Step S21, outputting the target image corresponding to the left eye to the left eye of the three-dimensional glasses;

[0137] Step S22: outputting the target image corresponding to the right eye to the right eye of the three-dimensional glasses.

[0138] The method provided in the embodiment of the present application can generate different binocular images and thus produce a binocular stereoscopic visual effect by outputting the target image corresponding to the left eye to the left eye of the three-dimensional stereo glasses and outputting the target image corresponding to the right eye to the right eye of the three-dimensional stereo glasses.

[0139] In some embodiments, when the target object includes a display device, outputting the target image to the target object includes:

[0140] The target image corresponding to the left eye and the target image corresponding to the right eye are output to the display device to display the target image corresponding to the right eye and the target image corresponding to the right eye on the display device. At this time, the display device superimposes the target image corresponding to the left eye and the target image corresponding to the right eye, for example, using polarized light and a dual-lens projector to display the superimposed image. At this time, the user can use passive polarized light 3D glasses to separate the two superimposed images to achieve a binocular visual effect. Alternatively, a high-frequency stroboscopic flat-panel display and active shutter 3D glasses are used to obtain a binocular visual image. The active shutter 3D glasses are synchronized with the flickering frequency of the display to achieve the separation effect of the high-frequency stroboscopic left and right eye images, thereby generating a binocular stereoscopic visual effect.

[0141] The method provided in the embodiment of the present application uses computer vision, computer graphics, human vision principle, VR and AR and other disciplines, perspective transformation, perspective projection and binocular stereo vision and other methods, and uses a relatively low-cost flat display device to generate a picture with 3D visual effects on a plane, simulating the visual perception of real objects by the human eye, and at the same time cooperates with 3D engines and gesture recognition to realize the dynamic effects, physical effects and various interactive operation effects of the picture. It can be specifically used for the visualization of 3D objects and combined with the real world. Because it is low-cost, compared with VR, it does not require the use of bulky head-mounted equipment, the hardware structure of the equipment is relatively simple, and virtual images can be combined and interacted with objects in the real world. It is suitable for education and teaching in medicine, design, machinery, retail shopping, commodity display, architectural terrain sand table design display, and virtual cultural tourism. Fields. Since the method can observe real and virtual scenes at the same time, and can have a variety of interactive methods, the method is not limited to content display, and can also be used in interactive fields with high degrees of freedom, such as augmented reality and desktop virtual games.

[0142] The method provided in the embodiment of the present application uses perspective projection to process the picture in the 3D engine (the same as the three-dimensional scene in the above embodiment), uses a face detection method to obtain the face observation position, and generates a corresponding perspective projection image according to this position. At the same time, based on the aspect ratio of the output display range, a plane with the same aspect ratio is set in the 3D engine, and the perspective projected image is spatially transformed, and this plane is the target plane. The method can be used for various planes, such as desktops, walls, mobile phones, tablet computers, etc. It can also be used for scenes with mixed multiple planes, such as using multiple projectors to project head shadows in the corners of the wall or using multiple projectors to simultaneously project on a desktop and wall at a vertical angle of 90 degrees. The present invention obtains a convincing 3D illusion by dynamically tracking and acquiring the observer's head movement.

[0143] In the embodiments of the present application, real-time binocular stereoscopic vision images can be obtained based on 3D glasses and 3D flat-panel display devices; the perspective projection images of the left eye and the right eye are obtained in the 3D engine, and the position of the face is obtained in real time using computer vision in conjunction with a depth camera or a head tracking device, while the perspective transformation method is used to utilize the dynamic parallax of the human eye to generate a stereoscopic illusion image on a plane, and three-dimensional stereo glasses such as polarized 3D glasses or shutter 3D glasses are used to distribute the left eye and right eye images to the left eye and the right eye, thereby achieving a stereoscopic effect based on binocular vision.

[0144] Based on the foregoing embodiments, an embodiment of the present application provides a display device, wherein each module included in the device and each unit included in each module can be implemented by a processor in a computer device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Microprocessor Unit), a digital signal processor (DSP, Digital Signal Processing) or a field programmable gate array (FPGA, Field Programmable Gate Array), etc.

[0145] The embodiment of the present application provides a display device, Figure 5 A schematic diagram of a display device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the display device 500 includes:

[0146] An acquisition module 501 is used to acquire first position information of a target part of a human body;

[0147] A first determining module 502, configured to determine observation position information of an observation viewpoint in a three-dimensional scene based on the first position information;

[0148] A perspective projection module 503, configured to determine a perspective projection image of a three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio;

[0149] A perspective transformation module 504, configured to perform perspective transformation on the perspective projection image according to the display ratio to obtain a target image;

[0150] The output module 505 is used to output the target image to the target object so that the target object displays the target image.

[0151] In some embodiments, the perspective projection module 503 includes:

[0152] A first determining unit, configured to determine a viewing angle value based on the observation position information and second position information of a center point of the three-dimensional object;

[0153] A second determining unit, used to determine first distance information between the observation position information and a near clipping plane;

[0154] A third determining unit, used to determine second distance information between the observation position information and the far clipping plane;

[0155] A fourth determining unit is configured to determine a perspective projection image of a three-dimensional object in the three-dimensional scene based on the first distance information, the second distance information, the display ratio, and the viewing angle.

[0156] In some embodiments, the fourth determining unit includes:

[0157] A first determining subunit, configured to determine a first target value of a perspective projection matrix based on the first distance information, the second distance information, the display ratio, and the viewing angle;

[0158] a second determining subunit, configured to determine third position information of the three-dimensional object for perspective projection based on the first target value;

[0159] The third determining subunit is configured to determine the perspective projection image based on the third position information.

[0160] The first determination subunit is used to obtain a pre-established perspective projection matrix, input the first distance information, the second distance information, the preset display ratio and the viewing angle value into the perspective projection matrix, and determine a first target value of the perspective projection matrix.

[0161] In some embodiments, the perspective transformation module 504 includes:

[0162] a fifth determining unit, configured to determine transformation range information of the perspective transformation based on the display ratio;

[0163] a sixth determining unit, configured to determine a second target value of the perspective transformation matrix based on the transformation range information;

[0164] a seventh determining unit, configured to determine fourth position information for perspective transformation of the perspective projection image based on the second target value;

[0165] An eighth determining unit is configured to determine the target image based on the fourth position information.

[0166] In some embodiments, the target part includes: a left eye and a right eye, and the target image includes: a target image corresponding to the left eye and a target image corresponding to the right eye. When the target object includes three-dimensional glasses, the output module 505 includes:

[0167] A first output unit, configured to output the target image corresponding to the left eye to the left eye of the three-dimensional glasses;

[0168] The second output unit is used to output the target image corresponding to the right eye to the right eye of the three-dimensional glasses.

[0169] In some embodiments, when the target object includes a display device, the output module 505 includes:

[0170] The third output unit is used to output the target image corresponding to the left eye and the target image corresponding to the right eye to the display device, so as to display the target image corresponding to the left eye and the target image corresponding to the right eye on the display device.

[0171] It should be noted that in the embodiment of the present application, if the above-mentioned display method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0172] Accordingly, an embodiment of the present application provides a storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps in the display method provided in the above embodiment are implemented.

[0173] An embodiment of the present application provides an electronic device; Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 600 includes: a processor 601, at least one communication bus 602, a user interface 603, at least one external communication interface 604, and a memory 605. The communication bus 602 is configured to realize the connection and communication between these components. The user interface 603 may include a display screen, and the external communication interface 604 may include a standard wired interface and a wireless interface. The processor 601 is configured to execute the program of the display method stored in the memory to implement the steps in the display method provided in the above embodiment.

[0174] The description of the above display device and storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the computer device and storage medium embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0175] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0176] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0177] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0178] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0179] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0180] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0181] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read Only Memory), disks or optical disks, etc. Various media that can store program codes.

[0182] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a controller to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0183] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A display method, characterized in that: include: Acquiring first position information of a target part of a human body; Determining observation position information of an observation viewpoint in a three-dimensional scene based on the first position information; Determining a perspective projection image of a three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio; Performing perspective transformation on the perspective projection image according to the display ratio to obtain a target image; Outputting the target image to a target object so that the target object displays the target image; wherein, The step of performing perspective transformation on the perspective projection image according to the display ratio to obtain a target image comprises: Step S1041, determining the transformation range information of the perspective transformation based on the display ratio, determining four coordinate values ​​based on the display ratio, the four coordinate values ​​being two-dimensional coordinate values, and determining the transformation range information through the four coordinate values, Step S1042: determine a second target value of the perspective transformation matrix based on the transformation range information, input the transformation range information into the perspective transformation matrix to obtain the second target value, and obtain to The value of is the second target value, Step S1043, determining fourth position information of the perspective projection image for perspective transformation based on the second target value, and multiplying the second target value by the coordinate value of the perspective projection image using formula (9) to obtain the coordinate value corresponding to the fourth position information. Formula (9) is as follows: (9); Step S1044, determining the target image based on the fourth position information, Before step S1042, the method further includes pre-establishing the perspective transformation matrix, and the step of establishing the perspective transformation matrix includes: Define a transformation matrix to transform the original coordinates into the target coordinates, where is the original coordinate, is the transformed coordinate, and the transformation matrix formula is established using formula (9), the Z coordinate in the depth direction is set to 1, and the [X, Y, Z] coordinate is divided by the Z coordinate to obtain formula (10), which is as follows: (10); In which, let a33 = 1, and obtain formula (11) from formula (9) and formula (10). Formula (11) is as follows: (11); Before the perspective transformation, the four coordinate values ​​are input to define the transformation range information. The four coordinate values ​​provide eight points and eight equations are obtained. The transformation formula is shown in formula (12): (12); Solve formula (12) to obtain the values ​​of all the transformation matrices, and use formula (12) to obtain to The value of is the entire transformation matrix.

2. The method according to claim 1, characterized in that The step of determining the perspective projection image of the three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio includes: Determining a viewing angle value based on the observation position information and second position information of a center point of the three-dimensional object; Determining first distance information between the observation position information and a near clipping plane; Determining second distance information between the observation position information and the far clipping plane; A perspective projection image of a three-dimensional object in the three-dimensional scene is determined based on the first distance information, the second distance information, the display ratio, and the viewing angle.

3. The method according to claim 2, characterized in that The determining, based on the first distance information, the second distance information, the display ratio and the viewing angle, a perspective projection image of the three-dimensional object in the three-dimensional scene includes: Determine a first target value of a perspective projection matrix based on the first distance information, the second distance information, the display ratio, and the viewing angle; Determining third position information of the three-dimensional object for perspective projection based on the first target value; The perspective projection image is determined based on the third position information.

4. The method according to claim 3, characterized in that The determining a first target value of a perspective projection matrix based on the first distance information, the second distance information, the display ratio, and the viewing angle value includes: Get the pre-built perspective projection matrix; The first distance information, the second distance information, the preset display ratio and the viewing angle value are input into the perspective projection matrix to determine a first target value of the perspective projection matrix.

5. The method according to claim 1, characterized in that: The target part includes: a left eye and a right eye, the target image includes: a target image corresponding to the left eye and a target image corresponding to the right eye, and when the target object includes three-dimensional stereo glasses, outputting the target image to the target object includes: Outputting the target image corresponding to the left eye to the left eye of the three-dimensional glasses; The target image corresponding to the right eye is output to the right eye of the three-dimensional glasses.

6. The method according to claim 5, characterized in that When the target object includes a display device, outputting the target image to the target object includes: The target image corresponding to the left eye and the target image corresponding to the right eye are output to the display device to display the target image corresponding to the left eye and the target image corresponding to the right eye on the display device.

7. A display device, characterized in that: include: An acquisition module, used for acquiring first position information of a target part of a human body; A first determining module, configured to determine observation position information of an observation viewpoint in a three-dimensional scene based on the first position information; A perspective projection module, configured to determine a perspective projection image of a three-dimensional object in the three-dimensional scene based on the observation position information and a preset display ratio; A perspective transformation module, used for performing perspective transformation on the perspective projection image according to the display ratio to obtain a target image; An output module, used for outputting the target image to a target object so that the target object displays the target image; Wherein, the perspective transformation module includes: a fifth determining unit, configured to determine the transformation range information of the perspective transformation based on the display ratio, determine four coordinate values ​​based on the display ratio, the four coordinate values ​​being two-dimensional coordinate values, and determine the transformation range information by using the four coordinate values, A sixth determining unit is configured to determine a second target value of the perspective transformation matrix based on the transformation range information, input the transformation range information into the perspective transformation matrix to obtain the second target value, and obtain the second target value through the perspective transformation matrix. to The value of is the second target value, a seventh determining unit, configured to determine fourth position information of the perspective projection image for perspective transformation based on the second target value, and to obtain a coordinate value corresponding to the fourth position information by multiplying the second target value by the coordinate value of the perspective projection image using formula (9), wherein formula (9) is as follows: (9); an eighth determining unit, configured to determine the target image based on the fourth position information, The fifth determining unit is further used to pre-establish the perspective transformation matrix, establish the perspective transformation matrix, and define a transformation matrix to transform the original coordinates into the target coordinates, wherein is the original coordinate, is the transformed coordinate, and the transformation matrix formula is established using formula (9), the Z coordinate in the depth direction is set to 1, and the [X, Y, Z] coordinate is divided by the Z coordinate to obtain formula (10), which is as follows: (10); In which, let a33 = 1, and obtain formula (11) from formula (9) and formula (10). Formula (11) is as follows: (11); Before the perspective transformation, the four coordinate values ​​are input to define the transformation range information. The four coordinate values ​​provide eight points and eight equations are obtained. The transformation formula is shown in formula (12): (12); Solve formula (12) to obtain the values ​​of all the transformation matrices, and use formula (12) to obtain to The value of is the entire transformation matrix.

8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the display method according to any one of claims 1 to 6 is executed.

9. A storage medium, characterized in that: The computer program stored in the storage medium can be executed by one or more processors and can be used to implement the display method as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • 3D display method and device

    CN105282532A

  • Realization method, device and system of virtual stereoscopic scene

    CN106251403A