Binocular vision positioning method, device and storage medium

By generating the scene camera in virtual production and rendering a third-person perspective, the problem of photographers' difficulty in determining the position of the virtual camera is solved, and the shooting feel and effect are improved.

CN114332329BActive Publication Date: 2025-02-25ZHEJIANG VERSATILE MEDIA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210007925.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-06
Publication Date
2025-02-25
Estimated Expiration
2042-01-06

AI Technical Summary

Technical Problem

During the virtual production process, it is difficult for photographers to accurately judge the position of the virtual camera in the virtual world, affecting the shooting feel and effect.

Method used

By acquiring the position information and rotation information of the virtual camera, removing the first rotation amount in the rotation information, generating a scene camera in the virtual scene to capture the virtual camera and the target object, rendering and covering the captured image information onto the original screen, Form a third-person perspective.

Benefits of technology

It has achieved the addition of a third-person perspective on the original basis, helping photographers quickly position and composition to ensure the shooting effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332329B_ABST
    Figure CN114332329B_ABST
Patent Text Reader

Abstract

The present invention provides a binocular vision positioning method, device and storage medium, which relate to the technical field of computers. The method obtains the position information and rotation information of a virtual camera in a virtual scene, removes the first rotation amount in the rotation information, generates a scene camera in the virtual scene to simultaneously capture the virtual camera and the target object, renders the image information captured by the scene camera onto a rendering target, and overlays the rendering target onto the original picture to form a third-person perspective. This series of steps realizes the addition of a third-person perspective for observing the position of the camera in the virtual scene on the original basis, and solves the technical problem in the prior art that it is difficult to accurately judge the position of the camera in the virtual world by relying solely on the pictures captured by the virtual camera, so that the photographer can quickly locate and compose, and ensure the shooting feel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field, and in particular to a binocular vision positioning method, device and storage medium. Background Art

[0002] Virtual production is a new production method that uses computer-aided production and film visualization. In virtual production, the scene images captured by the virtual camera in the Unreal Engine need to be combined with the real images actually shot by the real camera to generate the final image.

[0003] During the virtual production and shooting process, the virtual camera captures the images rendered by the virtual scene. The captured images show the objects in the virtual scene in the first-person perspective. The photographer is in the real world. It is difficult to accurately judge the position of the camera in the virtual world based on the captured images alone without other references, which affects the photographer's shooting feel and shooting effects. Summary of the invention

[0004] The purpose of the present invention is to solve the problems mentioned in the background technology and to provide a binocular vision positioning method, device and storage medium.

[0005] To achieve the above-mentioned purpose, the present invention first proposes a binocular vision positioning method, comprising the following steps: obtaining position information and rotation information of a virtual camera in a virtual scene; removing a first rotation amount in the rotation information, wherein the first rotation amount is the rotation amount of the virtual camera around the x-axis; generating a scene camera in the virtual scene to simultaneously capture the virtual camera and the target object; rendering the image information captured by the scene camera onto a rendering target; and overlaying the rendering target onto the original picture to form a third-person perspective.

[0006] Optionally, generating a scene camera in a virtual scene to simultaneously capture the virtual camera and the target object includes the following steps: setting a first position of the scene camera according to the position information, the first position being located in the negative direction of the x-axis of the virtual camera coordinate system; and the scene camera obtaining the rotation information after removing the first rotation amount to perform corresponding rotation.

[0007] Optionally, the following steps are also included: determining whether there is an obstacle between the scene camera, the virtual camera and the target object; if there is an obstacle, automatically converting from the first position to the second position, where the second position is located in the positive direction of the z-axis of the virtual camera coordinate system.

[0008] Optionally, collision detection is performed by emitting rays to determine whether there are obstacles between the scene camera and the virtual camera and the target object.

[0009] The present invention also proposes a binocular vision positioning device, comprising: an acquisition module, configured to acquire position information and rotation information of a virtual camera in a virtual scene; a processing module, configured to remove a first rotation amount in the rotation information, wherein the first rotation amount is the rotation of the virtual camera around the x-axis; a generation module, configured to generate a scene camera in the virtual scene to simultaneously capture the virtual camera and the target object; a rendering module, configured to render the image information captured by the scene camera onto a rendering target; and an overlay module, configured to overlay the rendering target onto the original picture to form a third-person perspective.

[0010] Optionally, the generation module also includes: a setting module, configured to set a first position of the scene camera according to the position information, the first position being located in the negative direction of the x-axis of the virtual camera coordinate system; and a rotation module, configured to obtain the rotation information after removing the first rotation amount so that the scene camera can perform corresponding rotation.

[0011] Optionally, the generation module also includes: a switching module, configured to determine whether there is an obstacle between the scene camera, the virtual camera and the target object, and if there is an obstacle, automatically convert from the first position to the second position, and the second position is located in the positive direction of the z-axis of the virtual camera coordinate system.

[0012] Optionally, the switching module further includes: a collision detection module configured to determine whether there is an obstacle between the scene camera, the virtual camera and the target object by emitting rays for collision detection.

[0013] The present invention also proposes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned binocular vision positioning method is implemented.

[0014] Beneficial effects of the present invention:

[0015] A binocular vision positioning method, device and storage medium of an embodiment of the present invention obtains position information and rotation information of a virtual camera in a virtual scene, removes the first rotation amount in the rotation information, generates a scene camera in the virtual scene to simultaneously capture the virtual camera and the target object, renders the image information captured by the scene camera onto a rendering target, and overlays the rendering target onto the original picture to form a third-person perspective. This series of steps adds a third-person perspective for observing the position of the camera in the virtual scene on the original basis, solves the technical problem in the prior art that it is difficult to accurately judge the position of the camera in the virtual world by relying solely on the pictures captured by the virtual camera, thereby enabling the photographer to quickly locate and compose the picture and ensure the shooting feel.

[0016] The features and advantages of the present invention will be described in detail through embodiments in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is one of the flow charts of a binocular vision positioning method according to an embodiment of the present invention;

[0018] Figure 2 The second flowchart of a binocular vision positioning method according to an embodiment of the present invention;

[0019] Figure 3 The third flowchart of a binocular vision positioning method according to an embodiment of the present invention;

[0020] Figure 4 This is one of the structural block diagrams of a binocular vision positioning device according to an embodiment of the present invention;

[0021] Figure 5 This is a second structural block diagram of a binocular vision positioning device according to an embodiment of the present invention;

[0022] Figure 6 This is a third structural block diagram of a binocular vision positioning device according to an embodiment of the present invention;

[0023] Figure 7 This is the fourth structural block diagram of a binocular vision positioning device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to facilitate understanding by those skilled in the art, the present invention will be further described in detail below in conjunction with specific embodiments.

[0025] Figure 1 The following is a schematic flow chart of a binocular vision positioning method according to an embodiment of the present invention.

[0026] like Figure 1 As shown, the binocular vision positioning method includes steps S10 to S50:

[0027] Step S10, obtaining position information and rotation information of the virtual camera in the virtual scene;

[0028] Step S20, removing the first rotation amount in the rotation information, where the first rotation amount is the rotation amount of the virtual camera around the x-axis;

[0029] Step S30, generating a scene camera in the virtual scene to simultaneously capture the virtual camera and the target object;

[0030] Step S40, rendering the image information captured by the scene camera onto a rendering target;

[0031] Step S50: Overlay the rendering target onto the original image to form a third-person perspective.

[0032] In a binocular vision positioning method of an embodiment of the present invention, by obtaining the position information and rotation information of the virtual camera in the virtual scene, removing the first rotation amount in the rotation information, generating a scene camera in the virtual scene to simultaneously capture the virtual camera and the target object, rendering the image information captured by the scene camera onto a rendering target, and overlaying the rendering target onto the original picture to form a third-person perspective, this series of steps realizes the addition of a third-person perspective for observing the position of the camera in the virtual scene on the original basis, solving the technical problem in the prior art that it is difficult to accurately determine the position of the camera in the virtual world by relying solely on the pictures captured by the virtual camera.

[0033] Hereinafter, each step of the robot arm simulation control method in the embodiment of the present invention will be described in more detail with reference to the accompanying drawings and embodiments.

[0034] Step S10, obtaining the position information and rotation information of the virtual camera in the virtual scene.

[0035] Step S20: removing the first rotation amount in the rotation information, where the first rotation amount is the rotation amount of the virtual camera around the x-axis.

[0036] It should be noted that in the Unreal Engine, Roll, Pitch, and Yaw correspond to the X-axis, Y-axis, and Z-axis respectively.

[0037] Step S30, generating a scene camera in the virtual scene to capture the virtual camera and the target object simultaneously.

[0038] Specifically, you can follow Figure 2 The process shown generates a scene camera in a virtual scene to simultaneously capture a virtual camera and a target object, including the following steps:

[0039] Step S310: setting a first position of the scene camera according to the position information, wherein the first position is located in the negative direction of the x-axis of the virtual camera coordinate system.

[0040] Step S320: The scene camera obtains the rotation information after removing the first rotation amount and performs corresponding rotation.

[0041] In one embodiment, if the scene camera obtains the rotation information without removing the first rotation amount to perform a corresponding rotation, the scene camera will capture the picture inverted (that is, the horizontal line is crooked). If the scene camera is not perpendicular to the ground, it may affect the judgment of the camera operator and lose the meaning of the positioning angle of view. By making the scene camera obtain the rotation information after removing the first rotation amount to perform a corresponding rotation, the above problem is solved.

[0042] Please refer to Figure 3In one embodiment, generating a scene camera in a virtual scene to simultaneously capture the virtual camera and the target object also includes the following steps:

[0043] Step S330, determining whether there is an obstacle between the scene camera, the virtual camera and the target object, and if there is an obstacle, automatically converting from the first position to the second position, where the second position is located in the positive direction of the z-axis of the virtual camera coordinate system.

[0044] Specifically, the scene camera at the second position is a top-down perspective, and the displacement vector is above the camera. In one embodiment, the scene camera determines whether there is an obstacle between it, the virtual camera and the target object by emitting rays for collision detection.

[0045] Step S40: Rendering the image information captured by the scene camera onto a rendering target.

[0046] Step S50: Overlay the rendering target onto the original image to form a third-person perspective.

[0047] Through the above steps, a third-person perspective for observing the position of the camera in the virtual scene is added on the original basis, which solves the technical problem in the prior art that it is difficult to accurately determine the position of the camera in the virtual world by only relying on the images captured by the virtual camera, thereby enabling the photographer to quickly locate and compose the picture and ensure the shooting feel.

[0048] Based on the above binocular vision positioning method, the embodiment of the present invention also provides a binocular vision positioning device, such as Figure 4 As shown, the device includes the following modules:

[0049] The acquisition module 100 is configured to acquire the position information and rotation information of the virtual camera in the virtual scene;

[0050] The processing module 200 is configured to remove a first rotation amount in the rotation information, where the first rotation amount is the rotation of the virtual camera around the x-axis;

[0051] A generation module 300 is configured to generate a scene camera in a virtual scene to simultaneously capture a virtual camera and a target object;

[0052] The rendering module 400 is configured to render the image information captured by the scene camera onto a rendering target;

[0053] The overlay module 500 is configured to overlay the rendering target onto the original picture to form a third-person perspective.

[0054] like Figure 5 As shown, in one embodiment, the generating module further includes:

[0055] A setting module 3100 is configured to set a first position of the scene camera according to the position information, wherein the first position is located in the negative direction of the x-axis of the virtual camera coordinate system;

[0056] The rotation module 3200 is configured to obtain the rotation information after removing the first rotation amount for the scene camera to perform corresponding rotation.

[0057] like Figure 6 As shown, in one embodiment, the generating module further includes:

[0058] The switching module 3300 is configured to determine whether there is an obstacle between the scene camera, the virtual camera and the target object. If there is an obstacle, it automatically switches from the first position to the second position, and the second position is located in the positive direction of the z-axis of the virtual camera coordinate system.

[0059] like Figure 7 As shown, in one embodiment, the switching module further includes:

[0060] The collision detection module 33100 is configured to perform collision detection by emitting rays to determine whether there is an obstacle between the scene camera, the virtual camera and the target object.

[0061] In summary, a binocular vision positioning device according to an embodiment of the present invention can be implemented in the form of a program and run on a computer device. The memory of the computer device can store various program modules constituting the binocular vision positioning device, for example, Figure 4 The acquisition module 100, processing module 200, generation module 300, rendering module 400, and covering module 500 are shown. The program composed of various program modules enables the processor to execute the steps of a binocular vision positioning method in various embodiments of the present application described in this specification.

[0062] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in a binocular vision positioning method in each embodiment of the present application are implemented.

[0063] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0064] The above embodiments are explanations of the present invention, not limitations of the present invention. Any solution that is simply modified from the present invention belongs to the protection scope of the present invention. The above is only a preferred embodiment of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A binocular vision positioning method, characterized in that: The following steps are involved: Obtain the position information and rotation information of the virtual camera in the virtual scene; Removing a first rotation amount in the rotation information, where the first rotation amount is the rotation amount of the virtual camera around the x-axis; Generate a scene camera in the virtual scene to capture the virtual camera and the target object simultaneously; Render the image information captured by the scene camera to the rendering target; Overlay the render target onto the original image to create a third-person perspective; The step of generating a scene camera in a virtual scene to simultaneously capture a virtual camera and a target object comprises the following steps: Setting a first position of the scene camera according to the position information, wherein the first position is located in the negative direction of the x-axis of the virtual camera coordinate system; The scene camera obtains the rotation information after removing the first rotation amount and performs corresponding rotation.

2. The binocular vision positioning method according to claim 1, characterized in that: The following steps are also included: Determine whether there is an obstacle between the scene camera, the virtual camera and the target object. If there is an obstacle, automatically convert from the first position to the second position, where the second position is located in the positive direction of the z-axis of the virtual camera coordinate system.

3. The binocular vision positioning method according to claim 2, characterized in that: Collision detection is performed by emitting rays to determine whether there are obstacles between the scene camera and the virtual camera and the target object.

4. A binocular vision positioning method and device, characterized in that: include: An acquisition module is configured to acquire position information and rotation information of a virtual camera in a virtual scene; A processing module, configured to remove a first rotation amount in the rotation information, wherein the first rotation amount is a rotation of the virtual camera around an x-axis; A generation module, configured to generate a scene camera in a virtual scene to simultaneously capture a virtual camera and a target object; A rendering module, configured to render image information captured by a scene camera onto a rendering target; An overlay module, configured to overlay the rendering target onto the original image to form a third-person perspective; Wherein, the generating module further includes: A setting module, configured to set a first position of the scene camera according to the position information, wherein the first position is located in the negative direction of the x-axis of the virtual camera coordinate system; The rotation module is configured to obtain the rotation information of the scene camera after removing the first rotation amount to perform corresponding rotation.

5. The binocular vision positioning method and device according to claim 4, characterized in that: The generation module also includes: The switching module is configured to determine whether there is an obstacle between the scene camera, the virtual camera and the target object. If there is an obstacle, the first position is automatically converted to a second position, and the second position is located in the positive direction of the z-axis of the virtual camera coordinate system.

6. The binocular vision positioning method and device according to claim 5, characterized in that: The switching module also includes: The collision detection module is configured to perform collision detection by emitting rays to determine whether there is an obstacle between the scene camera, the virtual camera and the target object.

7. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the binocular vision positioning method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Viewing angle switching method and device, terminal equipment and storage medium

    CN111158469A