A monocular screen projection method in a VR scene and virtual reality device
By acquiring the screen information of the projection device and setting the aspect ratio and viewport size of the projection camera, the projection image is dynamically adjusted to be displayed in full screen on the secondary screen of the virtual reality device, solving the problems of image quality and efficiency in VR projection and improving the user experience.
Patent Information
- Application Number
- CN202311282093.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-10-07
AI Technical Summary
When existing VR devices are projected onto other projection devices, issues such as image distortion, reduced user immersion, and increased projection time arise, making it difficult to guarantee image quality and improve projection efficiency.
By acquiring the screen information of the projection device, setting the aspect ratio and viewport size of the projection camera, and combining it with the resolution of the virtual reality device, the proportion and range of the projection screen are dynamically adjusted, and the projection screen is directly rendered in full on the secondary screen.
It reduces screen casting latency, improves picture quality and user viewing experience, solves the problems of image cropping and black border filling, and improves screen casting efficiency.
Smart Images

Figure CN119788925B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of virtual reality (VR), and provides a monocular screen projection method in a VR scene and a virtual reality device. BACKGROUND
[0002] The VR technology gives a person a sense of being in the scene by performing virtual imaging in a three-dimensional space. If a user wants to watch the playing content of a VR device on a screen projection device (such as a television or a projector), the user can project the screen of the VR device onto the screen projection device in real time, so as to obtain a larger viewing field. Meanwhile, other users can also watch the playing content of the VR device and participate in a VR social experience, thereby obtaining a more realistic shared experience.
[0003] Currently, there are mainly three ways to project the screen of a VR device onto a screen projection device:
[0004] (1) The screen of the VR device is directly projected onto the screen projection device, as shown in FIG. 1. This projection method is simple, but the display effect of the screen directly projected onto the screen projection device is abnormal because the screen of the VR device is displayed with distortion and binocularly. Figure 1A
[0005] (2) The screen of the VR device is projected onto the middle part of the screen of the screen projection device, and the two side regions are filled with black, as shown in FIG. 2. This projection method is relatively simple to process, but this filling method reduces the immersion of the user. Figure 1B
[0006] (3) The screen of the VR device is intercepted according to the width-height ratio of the screen of the screen projection device and then displayed on the screen projection device, as shown in FIG. 3. The projection effect is improved compared with the above two methods, but the screen cropping increases the time consumption of the projection, and the content displayed on the screen of the screen projection device after the interception is less than the content seen in the VR device. Figure 1C
[0007] Therefore, it is an urgent problem to be solved in large-screen experience and shared experience to ensure the quality of the VR projection screen while improving the efficiency of the VR projection. SUMMARY
[0008] The embodiments of the present application provide a monocular screen projection method in a VR scene and a virtual reality device, for improving the quality and efficiency of the VR projection.
[0009] In one aspect, the present application provides a monocular screen projection method in a VR scene, applied to a virtual reality device, including:
[0010] After being connected with the screen projection device, screen information of the screen projection device is acquired, wherein the screen of the screen projection device serves as a secondary screen of the virtual reality device and is used for displaying a screen projection picture of the virtual reality device, and the screen information at least includes a first resolution and a direction of the secondary screen;
[0011] According to the screen information, a width-height ratio of a built-in screen projection camera is set, and a viewport size of the screen projection camera is obtained in combination with a second resolution of the virtual reality device;
[0012] A demonstration object of the secondary screen is created, and a screen projection picture acquired by the screen projection camera according to the viewport size is transmitted to the demonstration object, so that the demonstration object directly renders the screen projection picture transmitted by the screen projection camera to be displayed on the secondary screen.
[0013] On the other hand, an embodiment of the present application provides a virtual reality device, comprising a processor, a memory, a display and a communication interface, wherein the communication interface, the display, the memory and the processor are connected through a bus;
[0014] The memory stores a computer program, and the processor executes the following operations according to the computer program:
[0015] After being connected with the screen projection device through the communication interface, screen information of the screen projection device is acquired, wherein the screen of the screen projection device serves as a secondary screen of the virtual reality device and is used for displaying a screen projection picture displayed by the display, and the screen information at least includes a first resolution and a direction of the secondary screen;
[0016] According to the screen information, a width-height ratio of a built-in screen projection camera is set, and a viewport size of the screen projection camera is obtained in combination with a second resolution of the virtual reality device;
[0017] A demonstration object of the secondary screen is created, and a screen projection picture acquired by the screen projection camera according to the viewport size is transmitted to the demonstration object, so that the demonstration object directly renders the screen projection picture transmitted by the screen projection camera to be displayed on the secondary screen.
[0018] On the other hand, an embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used for making a computer device execute steps of a monocular screen projection method in a VR scene provided by an embodiment of the present application.
[0019] The monocular screen projection method in a VR scene provided by an embodiment of the present application has the following beneficial effects:
[0020] In the process of the virtual reality device casting to the casting device, the screen of the casting device is used as a secondary screen of the virtual reality device to display the casting picture, by obtaining the first resolution and direction of the secondary screen, setting the aspect ratio of the built-in casting camera of the virtual reality device, and combining the second resolution of the virtual reality device, the viewport size of the casting camera is obtained, so that after obtaining the demonstration object of the secondary screen, the casting camera can directly transmit the casting picture obtained according to the viewport size to the demonstration object without processing the casting picture, thereby effectively reducing the casting delay, and since the viewport size is set according to the first resolution and direction of the secondary screen, the demonstration object can display the received casting picture on the secondary screen, thereby improving the quality of the casting picture and the user's viewing experience.
[0021] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0023] Figure 1A A direct casting binocular display effect schematic diagram provided for the embodiments of the present application;
[0024] Figure 1B A screen filling casting effect schematic diagram provided for the embodiments of the present application;
[0025] Figure 1C A picture cropping casting effect schematic diagram provided for the embodiments of the present application;
[0026] Figure 2 A wireless casting scene schematic diagram provided for the embodiments of the present application;
[0027] Figure 3 A flowchart of a monocular casting method in a VR scene provided for the embodiments of the present application;
[0028] Figure 4 A setting interface schematic diagram of a casting camera provided for the embodiments of the present application;
[0029] Figure 5AA projection image of the projection camera provided in this application embodiment when the field of view is 90 degrees;
[0030] Figure 5B A projection image of the projection camera provided in this application embodiment when the field of view is 60 degrees;
[0031] Figure 6A A projection image of the projection camera provided in this application embodiment when the aspect ratio is 1:1;
[0032] Figure 6B A projection image of the projection camera provided in this application embodiment when the aspect ratio is 4:3;
[0033] Figure 7 A complete flowchart of a method for simultaneously adjusting the projection ratio and projection range is provided for embodiments of this application;
[0034] Figure 8 An illustration illustrating the projection of a virtual reality device's display onto a smart TV, as provided in an embodiment of this application.
[0035] Figure 9 A structural diagram of a virtual reality device provided in an embodiment of this application. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0037] VR projection technology can provide users with a better large-screen viewing experience, and at the same time, it can also realize a social experience shared by multiple people. It is now widely used in various fields such as tourism, education, and games.
[0038] Currently, there are two main ways to project VR devices onto other projection devices: wireless projection (e.g., via Miracast) and wired projection (e.g., via HDMI).
[0039] Taking wireless screen mirroring as an example, such as Figure 2 As shown, for VR device 100 and smart TV 200 connected to the same WiFi network, screen mirroring commands can be executed on the VR device to send the screen displayed on the VR device to the smart TV as a video stream, so as to take advantage of the large screen of the smart TV and obtain a better user experience.
[0040] Referring to Figure 3 A flowchart of a monocular screen projection method in a VR scene provided by an embodiment of the present application is executed by a virtual reality device, and mainly includes the following steps:
[0041] S301: After connecting with the screen projection device, screen information of the screen projection device is acquired.
[0042] In an example, the virtual reality device can be wirelessly connected with the screen projection device through Miracast, and can also be connected with the screen projection device through HDMI. After successful connection, the virtual reality device can perform screen projection to the screen projection device.
[0043] Optionally, the screen projection device generally has the advantage of large-screen display, and better multi-person sharing experience can be obtained through screen projection, including but not limited to smart televisions, projectors, etc.
[0044] Generally, the virtual reality device and the screen projection device are mostly Android systems. When the Android system supports multi-screen display, it includes three screen types, namely, a main screen, an external screen and a virtual screen. The external screen is a screen connected through HDMI, and the virtual screen is a screen connected through Miracast. The external screen and the virtual screen are collectively referred to as a secondary screen. Therefore, after successful connection, the screen of the screen projection device serves as a secondary screen of the virtual reality device, and is used to display the screen projection picture of the virtual reality device.
[0045] In an example, the screen information of the screen projection device acquired by the virtual reality device at least includes a first resolution and a direction of the secondary screen.
[0046] S302: According to the screen information, the aspect ratio of the built-in screen projection camera is set, and the viewport size of the screen projection camera is obtained in combination with the second resolution of the virtual reality device.
[0047] In the rendering engine (such as Unity3D) of the virtual reality device, each monocular picture corresponds to a virtual screen projection camera. Since the screen projection device is generally a 2D device, the screen projection camera of the monocular picture can be set according to the screen information of the screen projection device.
[0048] The first resolution of the secondary screen includes a first horizontal resolution (i.e., width) and a first vertical resolution (i.e., height) of the secondary screen. Through the acquired first resolution, the aspect ratio of the secondary screen can be obtained, and the aspect ratio of the secondary screen is taken as the aspect ratio of the screen projection camera to determine the screen projection ratio. The display buffer in the virtual reality device contains the second resolution of the virtual reality device itself. Similarly, the second resolution contains a second horizontal resolution and a second vertical resolution, and the ratio of the second horizontal resolution to the second vertical resolution is 1:1, that is, the picture displayed by the virtual reality device is a square.
[0049] In actual application, the screen resolution of the screen mirroring device is different, for example, the aspect ratio of some secondary screens is 16:9, the aspect ratio of some secondary screens is 4:3, the aspect ratio of some secondary screens is 1:1, and the direction of the secondary screen also affects the picture displayed by the screen mirroring device, therefore, the viewport size of the screen mirroring camera can be dynamically set according to the aspect ratio and direction of the actually obtained secondary screen.
[0050] As shown in FIG. 1, it is a schematic diagram of the setting interface of the screen mirroring camera, the information in ViewportRect can be set according to the aspect ratio of the secondary screen, wherein X and Y are used to control the starting position of the viewport of the screen mirroring camera, and W and H are used to set the aspect ratio of the viewport of the screen mirroring camera. Figure 4
[0051] In an example, the resolution of the long side in the aspect ratio of the screen mirroring camera is directly set as the resolution of the corresponding direction in the second resolution, and the resolution of the short side in the aspect ratio of the screen mirroring camera is determined by taking the resolution of the long side as a reference, thereby obtaining the viewport size of the screen mirroring camera.
[0052] For example, assuming that the second resolution is 1024*1024 pixels, and the aspect ratio of the secondary screen is 4:3, at this time, the width of the viewport of the screen mirroring camera is the long side, and the height of the viewport is the short side, therefore, the width of the viewport (i.e. the resolution of the long side) is set as 1024 pixels, and the height of the viewport (i.e. the resolution of the short side) is set as 768 pixels, that is, the viewport size is 1024*768 pixels.
[0053] S303: a presentation object of the secondary screen is created, and the screen mirroring picture obtained by the screen mirroring camera according to the viewport size is transmitted to the presentation object, so that the presentation object directly renders the screen mirroring picture transmitted by the screen mirroring camera to fill the screen and displays it on the secondary screen.
[0054] In an example, after the Viewport Rect item of the screen mirroring camera is set, the screen mirroring camera can obtain the screen mirroring picture of the virtual reality device according to the determined viewport size, and transmit the screen mirroring picture to the presentation object of the secondary screen, and the presentation object directly renders the received screen mirroring picture to fill the screen and displays it on the secondary screen, without needing to perform cropping processing on the screen mirroring picture of the virtual reality device, thereby saving the calculation amount, reducing the screen mirroring delay, and since the viewport size of the screen mirroring camera is set according to the first resolution and direction of the secondary screen, the presentation object can render the received screen mirroring picture to fill the screen and display it on the secondary screen, thereby improving the quality of the screen mirroring picture, and further improving the viewing experience of the user.
[0055] During the screen mirroring process, when the screen mirroring camera is set, the field of view angle of the screen mirroring camera can also be set to determine the screen mirroring range, for example, by sliding Figure 4 The scroll bar in the Field of View sets the field of view of the projected camera.
[0056] In one example, the field of view is used to determine the range of the projected image captured by the projection camera. A larger field of view results in a larger projected image and more content for the user to see; conversely, a smaller field of view results in a smaller projected image and less content for the user. Increasing the field of view of the projection camera allows it to capture more content than a virtual reality device can display, thus enabling more content to be projected onto the projection device for a more realistic viewing experience.
[0057] In practical applications, when the viewport and field of view of the projection camera are set simultaneously, the projection camera can acquire the projection screen according to the set viewport and field of view. At this time, in step S303, the projection screen acquired by the projection camera according to the viewport size and field of view can be transmitted to the demonstration object, and the demonstration object directly renders the received projection screen on the secondary screen in full screen for display.
[0058] like Figure 5A As shown and Figure 5B The image shown is a schematic diagram illustrating the effect of adjusting the projection screen range by adjusting the field of view of the projection camera. Figure 5A This is the projected image displayed on the secondary screen when the field of view is 90 degrees. Figure 5B This is the projected image displayed on the secondary screen when the field of view is 60 degrees. Figure 5A The content displayed on the projected screen is more than Figure 5B The content displayed on the screen being projected.
[0059] like Figure 6A As shown and Figure 6B The image shown illustrates the effect of adjusting the aspect ratio of the projected screen by adjusting the aspect ratio of the projection camera. Figure 6A When the aspect ratio of the viewport is 1:1, the projected image displayed on the secondary screen. Figure 6B When the viewport aspect ratio is 4:3, the projected image displayed on the secondary screen shows the ability to adjust the viewport aspect ratio. Figure 5B Compared to Figure 5A The content of the projected screen remains unchanged in the height direction, but the content increases in the width direction.
[0060] In some embodiments, when the virtual object detects that the presentation object has disappeared, it closes the projection camera to end the projection to the projection device.
[0061] Taking a smart TV as the screen mirroring device as an example, see Figure 7 The flowchart below shows a complete method for simultaneously adjusting the projection ratio and projection range, as provided in the embodiments of this application. It mainly includes the following steps:
[0062] S701: The virtual reality device connects with the smart TV through Miracast or HDMI to make the screen of the smart TV as a secondary screen of the virtual reality device to display the screen mirroring picture.
[0063] S702: The virtual reality device obtains the first resolution and direction of the secondary screen through the DisplayManager class.
[0064] The DisplayManager service is a display device management service, which is a logical display service in the Android system and mainly responds to the acquisition of display parameters (such as resolution and screen direction) and related states (such as connection and disconnection). Therefore, the virtual reality device can use the DisplayManager class as the management class of the secondary screen to obtain the screen information of the secondary screen.
[0065] S703: The virtual reality device opens the screen mirroring camera and sets the aspect ratio and field of view angle of the screen mirroring camera, wherein the aspect ratio of the screen mirroring camera is determined according to the first resolution and direction of the secondary screen.
[0066] S704: The screen mirroring camera determines the range of the screen mirroring picture according to the set field of view angle, and determines the viewport size of the screen mirroring picture according to the set aspect ratio and the second resolution of the screen mirroring camera.
[0067] S705: The screen mirroring camera obtains the screen mirroring picture according to the determined viewport size and range.
[0068] S706: The virtual reality device creates a DisplayPresentation object of the secondary screen by instantiating the Presentation class.
[0069] The Presentation is a special dialog box for displaying content on the secondary screen.
[0070] S707: The virtual reality device transmits the screen mirroring picture obtained by the screen mirroring camera to the DisplayPresentation object.
[0071] S708: The DisplayPresentation object directly renders the received screen mirroring picture full screen on the secondary screen for display.
[0072] S709: The virtual reality device detects that the DisplayPresentation object disappears, and closes the screen mirroring camera to end the screen mirroring.
[0073] As Figure 8As shown, the effect diagram of the method provided by the embodiment of the application is used to display the picture of the virtual reality device on the smart TV, through setting the aspect ratio of the screen projection camera, the problems of black edge filling and picture cropping delay in monocular screen projection can be solved, and through setting the field of view angle of the screen projection camera, more picture content can be projected on the smart TV, so that the user can obtain better viewing experience.
[0074] In the embodiment of the application, the virtual reality device dynamically adjusts the range and proportion of the screen projection picture obtained by the screen projection camera by setting the field of view angle and aspect ratio of the screen projection camera, so that the virtual reality device can directly transmit the screen projection picture obtained by the screen projection camera according to the set field of view angle and aspect ratio to the demonstration object of the secondary screen, without picture cropping, effectively reducing the screen projection delay, and since the aspect ratio of the screen projection camera is set according to the resolution and direction of the secondary screen, the demonstration object can display the received screen projection picture on the secondary screen of the virtual reality device full screen without edge filling, improving the screen projection quality and further improving the user's viewing experience.
[0075] Based on the same technical concept, the embodiment of the application provides a virtual reality device which can implement the steps of the monocular screen projection method in the above-mentioned VR scene and achieve the same technical effect.
[0076] Referring to Figure 9 The virtual reality device includes a processor 901, a memory 902, a display 903 and a communication interface 904, and the communication interface 904, the display 903, the memory 902 and the processor 901 are connected through a bus 905;
[0077] The memory 902 stores a computer program, and the processor 901 executes the following operations according to the computer program:
[0078] After connecting with the screen projection device through the communication interface 904, the screen information of the screen projection device is obtained, wherein the screen of the screen projection device is used as the secondary screen of the virtual reality device for displaying the screen projection picture displayed by the display 903, and the screen information at least includes the first resolution and direction of the secondary screen;
[0079] According to the screen information, the aspect ratio of the built-in screen projection camera is set, and the viewport size of the screen projection camera is obtained in combination with the second resolution of the virtual reality device;
[0080] The demonstration object of the secondary screen is created, and the screen projection picture obtained by the screen projection camera according to the viewport size is transmitted to the demonstration object, so that the demonstration object directly renders the screen projection picture transmitted by the screen projection camera full screen on the secondary screen for display.
[0081] Optionally, the processor 901 further performs: setting a field of view angle of the screen projection camera, the field of view angle being used to determine a range of a screen projection picture acquired by the screen projection camera;
[0082] The processor 901 transmits the screen projection picture acquired by the screen projection camera according to the viewport size to the presentation object, so that the presentation object directly renders and displays the screen projection picture transmitted by the screen projection camera on the secondary screen, and the specific operation is as follows:
[0083] The processor 901 transmits the screen projection picture acquired by the screen projection camera according to the viewport size and the field of view angle to the presentation object, so that the presentation object directly renders and displays the screen projection picture transmitted by the screen projection camera on the secondary screen.
[0084] Optionally, after connecting with the screen projection device through the communication interface, the processor 901 acquires screen information of the screen projection device, and sets an aspect ratio of the built-in screen projection camera according to the screen information, and obtains a viewport size of the screen projection camera in combination with a resolution of the screen projection picture, and the specific operation is as follows:
[0085] The first resolution and the direction of the secondary screen are acquired through a DisplayManager class, and the second resolution of the virtual reality device is acquired through a display buffer of the virtual reality device, and a ratio of a second horizontal resolution to a second vertical resolution in the second resolution is 1:1;
[0086] The aspect ratio of the screen projection camera is set according to the first resolution and the direction of the secondary screen;
[0087] The resolution of a long side in the aspect ratio is directly set as a resolution of a corresponding direction in the second resolution, and the resolution of a short side in the aspect ratio is determined by taking the resolution of the long side as a reference, and the viewport size of the screen projection camera is obtained.
[0088] Optionally, the processor 901 further performs:
[0089] When the presentation object disappears, the screen projection camera is closed to end the screen projection to the screen projection device.
[0090] Optionally, the connection mode of the virtual reality device and the screen projection device includes wired connection or wireless connection.
[0091] Wherein, Figure 9The memory 902 in the foregoing embodiments can be a volatile memory (volatile memory), such as random access memory (RAM); the memory 902 can also be a non-volatile memory (non-volatile memory), such as read-only memory, flash memory, hard disk drive (HDD) or solid-state drive (SSD); or the memory 902 is any other medium capable of carrying or storing a desired computer program in the form of instructions or data structures and capable of being accessed by a computer, but not limited to this. The memory can be a combination of the above memories; the processor 901 can include one or more central processing units (CPU) or digital processing units, etc.
[0092] It should be noted that, Figure 9 This is only an example, and the virtual reality device necessary to execute the steps of the monocular projection method in the VR scene provided by the embodiments of the present application is given. The virtual reality device not shown can also include a speaker, a microphone, an IMU, a camera, a power supply, and other conventional VR device hardware.
[0093] The embodiments of the present application also provide a computer readable storage medium for storing some instructions, which when executed, can complete the monocular projection method in the VR scene of the foregoing embodiments.
[0094] The embodiments of the present application also provide a computer program product for storing a computer program, which is used to execute the monocular projection method in the VR scene of the foregoing embodiments.
[0095] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0096] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0097] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0099] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A monocular projection method in a VR scene, characterized in that, Applied to virtual reality devices, including: After connecting to the projection device, the screen information of the projection device is obtained, wherein the screen of the projection device serves as a secondary screen of the virtual reality device for displaying the projection image of the virtual reality device, and the screen information includes at least the first resolution and orientation of the secondary screen; Based on the screen information, the aspect ratio of the built-in projection camera is set, and combined with the second resolution of the virtual reality device, the viewport size of the projection camera is obtained; A presentation object for the secondary screen is created, and the projection image acquired by the projection camera according to the viewport size is transmitted to the presentation object, so that the presentation object directly renders the projection image transmitted by the projection camera in full screen on the secondary screen for display.
2. The method as described in claim 1, characterized in that, The method further includes setting the field of view of the projection camera, wherein the field of view is used to determine the range of the projection image acquired by the projection camera; The step of transmitting the projection image acquired by the projection camera according to the viewport size to the demonstration object, so that the demonstration object can directly render and display the projection image transmitted by the projection camera on the secondary screen, includes: The projection camera transmits the projection image acquired according to the viewport size and the field of view to the demonstration object, so that the demonstration object can directly display the projection image transmitted by the projection camera in full screen on the secondary screen.
3. The method as described in claim 1, characterized in that, After connecting to the projection device, the screen information of the projection device is obtained, and based on the screen information, the aspect ratio of the built-in projection camera is set. Combined with the resolution of the projected image, the viewport size of the projection camera is obtained, including: After connecting to the projection device, the first resolution and orientation of the secondary screen are obtained through the DisplayManager class, and the second resolution of the virtual reality device is obtained through the display buffer of the virtual reality device. The ratio of the second horizontal resolution to the second vertical resolution in the second resolution is 1:
1. The aspect ratio of the projection camera is set according to the first resolution and orientation of the secondary screen; The resolution of the longer side in the aspect ratio is directly set to the resolution of the corresponding direction in the second resolution, and the resolution of the shorter side in the aspect ratio is determined with reference to the resolution of the longer side, so as to obtain the viewport size of the projection camera.
4. The method as described in claim 1, characterized in that, The method further includes: Once the demonstration object disappears, turn off the projection camera to end the projection to the projection device.
5. The method according to any one of claims 1-4, characterized in that, The connection between the virtual reality device and the projection device can be either wired or wireless.
6. A virtual reality device, characterized in that, It includes a processor, a memory, a display, and a communication interface, wherein the communication interface, the display, the memory, and the processor are connected via a bus; The memory stores a computer program, and the processor performs the following operations according to the computer program: After connecting to the projection device through the communication interface, the screen information of the projection device is obtained. The screen of the projection device serves as a secondary screen of the virtual reality device, used to display the projection image displayed on the monitor. The screen information includes at least the first resolution and orientation of the secondary screen. Based on the screen information, the aspect ratio of the built-in projection camera is set, and combined with the second resolution of the virtual reality device, the viewport size of the projection camera is obtained; A presentation object for the secondary screen is created, and the projection image acquired by the projection camera according to the viewport size is transmitted to the presentation object, so that the presentation object directly renders the projection image transmitted by the projection camera in full screen on the secondary screen for display.
7. The virtual reality device as described in claim 6, characterized in that, The processor also performs the following: setting the field of view of the projection camera, wherein the field of view is used to determine the range of the projection image acquired by the projection camera; The processor transmits the projection image captured by the projection camera according to the viewport size to the demonstration object, so that the demonstration object can directly render and display the projection image transmitted by the projection camera on the secondary screen. The specific operation is as follows: The projection camera transmits the projection image acquired according to the viewport size and the field of view to the demonstration object, so that the demonstration object can directly display the projection image transmitted by the projection camera in full screen on the secondary screen.
8. The virtual reality device as described in claim 6, characterized in that, After connecting to the projection device via the communication interface, the processor obtains the screen information of the projection device, sets the aspect ratio of the built-in projection camera based on the screen information, and obtains the viewport size of the projection camera by combining the resolution of the projection screen. The specific operation is as follows: The first resolution and orientation of the secondary screen are obtained through the DisplayManager class, and the second resolution of the virtual reality device is obtained through the display buffer of the virtual reality device, wherein the ratio of the second horizontal resolution to the second vertical resolution is 1:
1. The aspect ratio of the projection camera is set according to the first resolution and orientation of the secondary screen; The resolution of the longer side in the aspect ratio is directly set to the resolution of the corresponding direction in the second resolution, and the resolution of the shorter side in the aspect ratio is determined with reference to the resolution of the longer side, so as to obtain the viewport size of the projection camera.
9. The virtual reality device as described in claim 6, characterized in that, The processor also performs: Once the demonstration object disappears, turn off the projection camera to end the projection to the projection device.
10. The virtual reality device as described in any one of claims 6-9, characterized in that, The connection between the virtual reality device and the projection device can be either wired or wireless.
Citation Information
Patent Citations
Image adaptive display method and display device
CN113115018A
Video transmission and display system
WO2015098016A1