Binocular image generation method, device, equipment, storage medium and program product
By training the neural radiation field model, left-eye and right-eye images are generated based on images collected from multiple angles, which solves the high-cost and difficult problems in the existing technology, achieves low-cost, high-quality binocular image generation, and provides Stereoscopic visual effects.
Patent Information
- Application Number
- CN202211281237.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-10-19
AI Technical Summary
The existing technology requires specially designed shooting equipment and high-cost hardware when generating binocular images, which is difficult to implement and difficult to generate high-quality stereoscopic visual effects.
By acquiring images of the target scene from multiple angles, training the neural radiation field model, and generating left-eye and right-eye images based on preset left-eye and right-eye light rays, reducing hardware cost and difficulty, and improving image quality.
It achieves low-cost and low-difficulty generation of high-quality binocular images, provides stereoscopic visual effects, reduces equipment costs and operational complexity, and improves the accuracy of three-dimensional reconstruction.
Smart Images

Figure CN117974742B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer vision technology, and in particular to a binocular image generation method, device, equipment, storage medium and program product. Background Art
[0002] By providing the viewer with a left-eye image and a right-eye image with appropriate parallax, a stereoscopic visual effect can be provided to the viewer. The left-eye image represents an image provided to the left eye, and the right-eye image represents an image provided to the right eye. The viewing device may be VR (Virtual Reality) glasses, AR (Augmented Reality) glasses, etc.
[0003] In the related art, specially designed shooting equipment is needed to obtain left-eye images and right-eye images. Some even need to rely on 3D (3 Dimensions) sensors or require precisely calibrated camera arrays. The hardware cost is high and the implementation is difficult. Summary of the invention
[0004] The present disclosure provides a technical solution for generating binocular images.
[0005] According to one aspect of the present disclosure, a method for generating a binocular image is provided, comprising:
[0006] Acquire multiple images corresponding to a target scene, wherein the multiple images are acquired from multiple angles of the target scene;
[0007] Using the multiple images to train a neural radiation field model to obtain a trained neural radiation field model;
[0008] The neural radiation field model completed through the training generates a left eye image based on a preset left eye light;
[0009] The neural radiation field model completed through the training generates a right eye image based on the preset right eye light.
[0010] By acquiring multiple images of the target scene acquired from multiple angles, using the multiple images to train a neural radiation field model to obtain a trained neural radiation field model, using the trained neural radiation field model to generate a left-eye image based on a preset left-eye light, and using the trained neural radiation field model to generate a right-eye image based on a preset right-eye light, thereby generating a binocular image corresponding to the target scene by utilizing the multiple images of the target scene acquired from multiple angles, which can reduce hardware costs, reduce the difficulty of obtaining binocular images, and generate accurate and high-quality binocular images.
[0011] In a possible implementation manner, the multiple images include panoramic information of the target scene, the left-eye image is a panoramic image corresponding to the left eye, and the right-eye image is a panoramic image corresponding to the right eye.
[0012] In this implementation, by using multiple images containing panoramic information of the target scene, a left-eye panoramic image and a right-eye panoramic image can be generated, thereby providing a binocular panoramic image, that is, a panoramic image with a stereoscopic effect can be provided, thereby providing a stereoscopic panoramic effect to a viewer using a viewing device.
[0013] In a possible implementation manner, any image information in any image among the multiple images is at least contained in another image among the multiple images.
[0014] In this implementation, by repeatedly collecting the same visual information of the target scene from different angles, the accuracy of three-dimensional reconstruction of the target scene can be improved, thereby improving the quality of the ultimately generated left-eye panoramic image and right-eye panoramic image.
[0015] In a possible implementation manner, the multiple images are acquired by moving a single camera.
[0016] In this implementation, a single camera is used to acquire multiple images corresponding to the target scene, and a left-eye image and a right-eye image are generated based on the multiple images acquired, thereby reducing the equipment cost for generating binocular images. Moreover, in the method of using a single camera, there is no need to adjust the internal parameters of different cameras, which can further reduce the complexity of operation. In addition, in this implementation, the user only needs to take multiple images of the target scene from multiple angles without having to operate complex equipment.
[0017] In a possible implementation, the radius of the minimum circumscribed circle of the multiple acquisition points corresponding to the multiple images is within a preset radius range; wherein the acquisition point corresponding to any one of the multiple images represents the optical center position of the lens when the image is acquired; and the left boundary of the preset radius range is greater than 0.
[0018] In this implementation, by controlling the radius of the minimum circumscribed circle of the multiple acquisition points corresponding to the multiple images to be within a preset radius range, it is possible to ensure that there is a suitable parallax between the images of adjacent perspectives in the multiple images, thereby facilitating accurate and efficient three-dimensional reconstruction of the target scene.
[0019] In a possible implementation, the using the multiple images to train a neural radiation field model to obtain a trained neural radiation field model includes:
[0020] Based on the multiple images, determining a plurality of camera extrinsic parameters corresponding one-to-one to the multiple images;
[0021] Based on the multiple images and the multiple camera extrinsic parameters, a neural radiation field model is trained to obtain a trained neural radiation field model.
[0022] By training the neural radiation field model through this implementation method, the neural radiation field model can learn the three-dimensional visual information of the target scene.
[0023] In one possible implementation,
[0024] The preset left-eye light is a ray, the endpoint of the preset left-eye light is on a preset circle, the preset left-eye light is on a tangent of the preset circle, and the direction of the preset left-eye light is the clockwise direction of the preset circle;
[0025] The preset right-eye light is a ray, the endpoint of the preset right-eye light is on the preset circle, the preset right-eye light is on the tangent of the preset circle, and the direction of the preset right-eye light is counterclockwise of the preset circle;
[0026] Wherein, the diameter of the preset circle is the preset pupil distance.
[0027] By adopting this implementation method, it is possible to generate left-eye images and right-eye images with appropriate parallax and high quality.
[0028] In one possible implementation, the method is applied to any one of a virtual reality device, an augmented reality device, a mixed reality device, an artificial intelligence device, and a digital twin system.
[0029] According to one aspect of the present disclosure, a device for generating a binocular image is provided, comprising:
[0030] An acquisition module, used to acquire multiple images corresponding to a target scene, wherein the multiple images are acquired from multiple angles of the target scene;
[0031] A training module, used to train a neural radiation field model using the multiple images to obtain a trained neural radiation field model;
[0032] A first generating module, configured to generate a left eye image based on a preset left eye light by using the trained neural radiation field model;
[0033] The second generating module is used to generate a right eye image based on the preset right eye light through the trained neural radiation field model.
[0034] In a possible implementation manner, the multiple images include panoramic information of the target scene, the left-eye image is a panoramic image corresponding to the left eye, and the right-eye image is a panoramic image corresponding to the right eye.
[0035] In a possible implementation manner, any image information in any image among the multiple images is at least contained in another image among the multiple images.
[0036] In a possible implementation manner, the multiple images are acquired by moving a single camera.
[0037] In a possible implementation, the radius of the minimum circumscribed circle of the multiple acquisition points corresponding to the multiple images is within a preset radius range; wherein the acquisition point corresponding to any one of the multiple images represents the optical center position of the lens when the image is acquired; and the left boundary of the preset radius range is greater than 0.
[0038] In a possible implementation, the training module is used to:
[0039] Based on the multiple images, determining a plurality of camera extrinsic parameters corresponding one-to-one to the multiple images;
[0040] Based on the multiple images and the multiple camera extrinsic parameters, a neural radiation field model is trained to obtain a trained neural radiation field model.
[0041] In one possible implementation,
[0042] The preset left-eye light is a ray, the endpoint of the preset left-eye light is on a preset circle, the preset left-eye light is on a tangent of the preset circle, and the direction of the preset left-eye light is the clockwise direction of the preset circle;
[0043] The preset right-eye light is a ray, the endpoint of the preset right-eye light is on the preset circle, the preset right-eye light is on the tangent of the preset circle, and the direction of the preset right-eye light is counterclockwise of the preset circle;
[0044] Wherein, the diameter of the preset circle is the preset pupil distance.
[0045] In one possible implementation, the device is applied to any one of a virtual reality device, an augmented reality device, a mixed reality device, an artificial intelligence device, and a digital twin system.
[0046] According to one aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0047] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
[0048] According to one aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0049] In an embodiment of the present disclosure, a plurality of images acquired from a plurality of angles of the target scene are acquired, and a neural radiation field model is trained using the plurality of images to obtain a trained neural radiation field model. A left-eye image is generated based on a preset left-eye light by the trained neural radiation field model, and a right-eye image is generated based on a preset right-eye light by the trained neural radiation field model. Thus, by utilizing the plurality of images acquired from a plurality of angles of the target scene to generate a binocular image corresponding to the target scene, the hardware cost can be reduced, the difficulty of obtaining the binocular image can be reduced, and accurate and high-quality binocular images can be generated.
[0050] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0051] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0053] Figure 1 A flow chart of a binocular image generation method provided by an embodiment of the present disclosure is shown.
[0054] Figure 2 A schematic diagram showing a method for collecting multiple images corresponding to a target scene in a binocular image generation method provided in an embodiment of the present disclosure.
[0055] Figure 3a A schematic diagram showing a left-eye panoramic image generated by the binocular image generation method provided in an embodiment of the present disclosure.
[0056] Figure 3b A schematic diagram showing a right-eye panoramic image generated by the binocular image generation method provided in an embodiment of the present disclosure.
[0057] Figure 4a A schematic diagram showing a preset left-eye light in a binocular image generation method provided in an embodiment of the present disclosure.
[0058] Figure 4b A schematic diagram showing a preset right-eye light in a binocular image generation method provided in an embodiment of the present disclosure.
[0059] Figure 5 A block diagram of a binocular image generation device provided by an embodiment of the present disclosure is shown.
[0060] Figure 6 A block diagram of an electronic device 1900 provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0061] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0062] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0063] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0064] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0065] The embodiments of the present disclosure provide a binocular image generation method, a binocular image generation device, an electronic device, a storage medium and a program product. A plurality of images acquired from a target scene from multiple angles are acquired, and a neural radiation field model is trained using the plurality of images to obtain a trained neural radiation field model. A left-eye image is generated based on a preset left-eye light by the trained neural radiation field model, and a right-eye image is generated based on a preset right-eye light by the trained neural radiation field model. Thus, a binocular image corresponding to the target scene is generated by using the plurality of images acquired from a target scene from multiple angles. This can reduce hardware costs, reduce the difficulty of obtaining binocular images, and generate accurate and high-quality binocular images.
[0066] Exemplarily, the binocular image generation method, binocular image generation device, electronic device, storage medium and program product of the embodiments of the present disclosure can be applied to application fields such as virtual reality technology (VR), augmented reality technology (AR), mixed reality technology (MR), artificial intelligence technology (e.g., artificial intelligence painting) and digital twins. For example, it can be applied to any one of virtual reality devices, artificial intelligence devices, augmented reality devices, mixed reality devices and digital twin systems. It should be noted that the present disclosure does not limit specific application fields or scenarios.
[0067] The following is a detailed description of the binocular image generation method provided by the embodiments of the present disclosure in conjunction with the accompanying drawings.
[0068] Figure 1 A flow chart of a binocular image generation method provided by an embodiment of the present disclosure is shown. In one possible implementation, the execution subject of the binocular image generation method may be a binocular image generation device, for example, the binocular image generation method may be executed by a terminal device or a server or other electronic device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device or a wearable device, etc. In some possible implementations, the binocular image generation method may be implemented by a processor calling computer-readable instructions stored in a memory. For example, Figure 1 As shown, the binocular image generation method includes steps S11 to S14.
[0069] In step S11, a plurality of images corresponding to a target scene are acquired, wherein the plurality of images are acquired from capturing the target scene from multiple angles.
[0070] In step S12, the plurality of images are used to train a neural radiation field model to obtain a trained neural radiation field model.
[0071] In step S13, the neural radiation field model completed through the training generates a left eye image based on the preset left eye light.
[0072] In step S14, the neural radiation field model completed through the training generates a right eye image based on the preset right eye light.
[0073] In an embodiment of the present disclosure, a binocular image may include a left-eye image and a right-eye image, wherein the left-eye image may represent an image provided to the left eye for viewing, and the right-eye image may represent an image provided to the right eye for viewing. There is parallax between the left-eye image and the right-eye image, and the left-eye image and the right-eye image may both be two-dimensional images. Among them, the parallax may represent the directional difference produced by observing the same target from two points at a certain distance. The angle between two points viewed from the target may be referred to as the parallax angle between the two points. In some application scenarios, binocular images may also be referred to as 3D (3 Dimensions, three-dimensional) images, stereo images, binocular stereo images, binocular vision images, etc., which are not limited here.
[0074] The left-eye image and the right-eye image generated by the embodiment of the present disclosure may be provided to a viewing device for display, so as to provide a stereoscopic visual effect to a viewer using the viewing device. The viewing device may be any device capable of providing a stereoscopic visual effect by displaying the left-eye image and the right-eye image. For example, the viewing device may be VR (Virtual Reality) glasses, AR (Augmented Reality) glasses, etc., which are not limited here.
[0075] In the disclosed embodiments, the target scene may represent any scene for which a binocular image is to be generated. The multiple images corresponding to the target scene may be images obtained by performing image acquisition and / or video acquisition of the target scene from multiple angles. For example, images of the target scene may be taken from multiple angles to obtain multiple images. For another example, a video of the target scene may be taken from multiple angles, and multiple images may be captured from the video.
[0076] In the disclosed embodiment, when the multiple images are collected from multiple angles, the camera can be manually controlled by the user or mechanically controlled, which is not limited here. The method of manually controlling the camera movement by the user not only does not require the user to operate complex equipment, but also reduces hardware costs, thereby reducing the difficulty of implementing multi-angle image collection, and can be applied to a wider range of scenarios.
[0077] In a possible implementation, the multiple images are acquired by moving a single camera. In this implementation, multiple images corresponding to the target scene are acquired by using a single camera, and left-eye images and right-eye images are generated based on the multiple images acquired, thereby reducing the cost of equipment for generating binocular images. Moreover, in the method of using a single camera, there is no need to adjust the internal parameters of different cameras, which can further reduce the complexity of operation. In addition, in this implementation, the user only needs to take multiple images of the target scene from multiple angles without having to operate complex equipment.
[0078] In another possible implementation, the multiple images may be acquired by moving at least two cameras. In this implementation, the internal parameters of the at least two cameras may be adjusted so that the internal parameters of the at least two cameras are consistent or similar. After adjusting the internal parameters of the at least two cameras, the at least two cameras may be moved to obtain multiple images of the target scene from multiple angles.
[0079] In a possible implementation, the radius of the minimum circumscribed circle of the multiple acquisition points corresponding to the multiple images is within a preset radius range; wherein the acquisition point corresponding to any one of the multiple images represents the optical center position of the lens when the image is acquired; and the left boundary of the preset radius range is greater than 0.
[0080] There is a special point on the main axis of the lens. The propagation direction of any light passing through this point remains unchanged. This point is called the optical center. The center of the convex lens can be roughly regarded as the optical center. Usually, the lens of a camera is equivalent to a convex lens.
[0081] In this implementation, the minimum circumscribed circle of the multiple projection points corresponding to the multiple acquisition points can be used as the minimum circumscribed circle of the multiple acquisition points. The multiple acquisition points can be projected onto the same horizontal plane to obtain multiple projection points corresponding to the multiple acquisition points.
[0082] For example, the preset radius interval may be (50 cm, 100 cm]. Of course, those skilled in the art may flexibly set the preset radius interval according to the actual application scenario requirements, and no limitation is made here.
[0083] In this implementation, the range of camera movement can be determined according to a preset viewing point and a preset radius interval, and the camera movement can be controlled within the range.
[0084] In this implementation, by controlling the radius of the minimum circumscribed circle of the multiple acquisition points corresponding to the multiple images to be within a preset radius range, it is possible to ensure that there is a suitable parallax between the images of adjacent perspectives in the multiple images, thereby facilitating accurate and efficient three-dimensional reconstruction of the target scene.
[0085] In one possible implementation, the multiple images include panoramic information of the target scene, the left-eye image is a panoramic image corresponding to the left eye, and the right-eye image is a panoramic image corresponding to the right eye. In this implementation, the multiple images may include 360-degree image information of the target scene. In this implementation, the binocular image may be called a binocular panoramic image, the left-eye image may be called a left-eye panoramic image, and the right-eye image may be called a right-eye panoramic image. In some application scenarios, the binocular panoramic image may also be called a 3D panoramic image, a stereoscopic panoramic image, a panoramic stereo image, a binocular stereoscopic panoramic image, etc., which is not limited here.
[0086] In this implementation, by using multiple images containing panoramic information of the target scene, a left-eye panoramic image and a right-eye panoramic image can be generated, thereby providing a binocular panoramic image, that is, a panoramic image with a stereoscopic effect can be provided, thereby providing a stereoscopic panoramic effect to a viewer using a viewing device.
[0087] As an example of this implementation, any image information in any one of the multiple images is at least contained in another one of the multiple images. In this example, the same visual information of the target scene can be repeatedly collected from different angles, so that the different collected images contain the same visual information of the target scene. For example, when the camera is moved, each object in the target scene can be photographed more than twice.
[0088] In this example, by repeatedly collecting the same visual information of the target scene from different angles, the accuracy of three-dimensional reconstruction of the target scene can be improved, thereby improving the quality of the ultimately generated left-eye panoramic image and right-eye panoramic image.
[0089] As another example of this implementation, image information in any one of the multiple images may not be included in another image of the multiple images.
[0090] Figure 2 A schematic diagram showing a method for collecting multiple images corresponding to a target scene in a binocular image generation method provided by an embodiment of the present disclosure is shown. Figure 2As shown, the camera 22 can be moved near the viewing point 21, and the camera 22 can be controlled to shoot the target scene outward. The radius of the minimum circumscribed circle 23 of each acquisition point of the camera 22 can be between 50 cm and 1 m. By controlling the camera 22 to shoot images at multiple different positions, the images captured can cover image information at various angles outside the minimum circumscribed circle 23. By shooting the target scene from more angles to obtain more images, it is helpful to perform more accurate three-dimensional reconstruction, thereby helping to generate left-eye images and right-eye images with higher resolution.
[0091] Figure 3a A schematic diagram showing a left-eye panoramic image generated by the binocular image generation method provided in an embodiment of the present disclosure. Figure 3b A schematic diagram showing a right-eye panoramic image generated by the binocular image generation method provided in an embodiment of the present disclosure is shown. Figure 3a and Figure 3b In the figure, the left-eye panoramic image and the right-eye panoramic image are panoramic images of spherical projection.
[0092] In the embodiment of the present disclosure, the multiple images can be used to train the Neural Radiance Fields (NeRF) model. During the training process of the neural radiation field model, the parameters of the neural radiation field model can be updated by minimizing the pixel difference between the known image (i.e., the multiple images) and the image obtained by rendering. Among them, the neural radiation field model introduces a fully connected neural network into the three-dimensional representation of the scene. By using the multiple images as supervision, the neural radiation field model can implicitly reconstruct the target scene in three dimensions, and then generate a two-dimensional image of a new angle by rendering under a new perspective. The neural radiation field model in the embodiment of the present disclosure can adopt a neural radiation field algorithm or an improved algorithm thereof, which is not limited here.
[0093] In a possible implementation, the multiple images are used to train the neural radiation field model to obtain a trained neural radiation field model, including: based on the multiple images, determining a number of camera extrinsic parameters corresponding one-to-one to the multiple images; based on the multiple images and the multiple camera extrinsic parameters, training the neural radiation field model to obtain a trained neural radiation field model.
[0094] In this implementation, a method such as Structure From Motion (SFM) can be used to recover multiple camera extrinsic parameters corresponding to the multiple images one by one based on the multiple images. The camera extrinsic parameters corresponding to any one of the multiple images may include rotation information and translation information. As an example of this implementation, the camera extrinsic parameters corresponding to any one of the images may be represented by an extrinsic matrix, the rotation information may be represented by a rotation matrix, and the translation information may be represented by a translation vector.
[0095] For any image among the multiple images, the three-dimensional coordinates X=(x, y, z) of the space point corresponding to the image and the two-dimensional viewing direction d=(θ, Φ) can be determined based on the camera extrinsics corresponding to the image. In the training stage of the neural radiation field model, the input of the neural radiation field model may include the three-dimensional coordinates of the space point corresponding to the image and the two-dimensional viewing direction. By training the neural radiation field model in this implementation method, the neural radiation field model can learn the three-dimensional visual information of the target scene.
[0096] In the embodiment of the present disclosure, the left eye image and the right eye image are rendered by the trained neural radiation field model. In the embodiment of the present disclosure, the execution order of step S13 and step S14 is not limited. For example, step S13 and step S14 can be executed at the same time. For another example, step S13 can be executed first, and then step S14 can be executed. For another example, step S14 can be executed first, and then step S13 can be executed.
[0097] In a possible implementation, the preset left eye light is a ray, the endpoint of the preset left eye light is on a preset circle, the preset left eye light is on a tangent of the preset circle, and the direction of the preset left eye light is in a clockwise direction of the preset circle; the preset right eye light is a ray, the endpoint of the preset right eye light is on the preset circle, the preset right eye light is on a tangent of the preset circle, and the direction of the preset right eye light is in a counterclockwise direction of the preset circle; wherein the diameter of the preset circle is a preset pupil distance.
[0098] In this implementation, the value range of the preset pupil distance may be 5 cm to 12 cm. As an example of this implementation, the pupil distance of the target user may be used as the preset pupil distance.
[0099] In this implementation, the diameter of the preset circle is equal to the preset pupil distance. In this implementation, the preset left eye light and the preset right eye light can be sampled according to the light sampling direction of ODS (Omni-Directional Stereo). Figure 4aA schematic diagram showing a preset left eye light in the binocular image generation method provided by an embodiment of the present disclosure. Figure 4a In the figure, the ray with an arrow indicates the preset left eye ray. Figure 4a As shown, the preset left-eye light is a ray, the endpoint of the preset left-eye light is on the preset circle, the preset left-eye light is on the tangent of the preset circle, and the direction of the preset left-eye light is clockwise of the preset circle. Figure 4b A schematic diagram showing a preset right eye light in the binocular image generation method provided by an embodiment of the present disclosure. Figure 4b In the figure, the ray with an arrow indicates the preset right eye ray. Figure 4b As shown, the preset right eye light is a ray, the endpoint of the preset right eye light is on the preset circle, the preset right eye light is on the tangent of the preset circle, and the direction of the preset right eye light is counterclockwise of the preset circle.
[0100] For example, a panoramic image using spherical projection includes n columns of pixels, and each column of pixels represents 360 / n degrees of light. Then, after determining the preset left eye light, n columns of pixels can be rendered column by column to obtain a left eye panoramic image. After determining the preset right eye light, n columns of pixels can be rendered column by column to obtain a right eye panoramic image.
[0101] By adopting this implementation method, it is possible to generate left-eye images and right-eye images with appropriate parallax and high quality.
[0102] Of course, in other implementations, those skilled in the art can flexibly set the preset left eye light direction and the preset right eye light direction according to actual application scenario requirements and / or personal preferences, which is not limited here.
[0103] The binocular image generation method provided in the embodiments of the present disclosure can be applied to virtual reality, augmented reality, three-dimensional reconstruction, computer vision, deep learning and other fields, and is not limited here.
[0104] The following is a specific application scenario to illustrate the binocular image generation method provided by the embodiment of the present disclosure. In this application scenario, it can be used Figure 2The image acquisition method shown in the figure acquires multiple images by moving a single camera to acquire images of the target scene from different angles. The multiple images may include 360-degree image information of the target scene, and any image information in any one of the multiple images may be included in at least another image of the multiple images. After acquiring the multiple images, a number of camera extrinsic parameters corresponding to the multiple images may be determined based on the multiple images, and a neural radiation field model may be trained based on the multiple images and the multiple camera extrinsic parameters. After the training of the neural radiation field model is completed, the trained neural radiation field model may be used based on the following example. Figure 4a The preset left eye light shown in the figure generates a left eye panoramic image, and the neural radiation field model completed by the training can be used based on the following example: Figure 4b The preset right eye light shown generates a right eye panoramic image.
[0105] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0106] In addition, the present disclosure also provides a binocular image generation device, an electronic device, a computer-readable storage medium, and a computer program product, all of which can be used to implement any binocular image generation method provided by the present disclosure. The corresponding technical solutions and technical effects can be found in the corresponding records of the method part and will not be repeated here.
[0107] Figure 5 FIG. 1 is a block diagram of a binocular image generation device provided by an embodiment of the present disclosure. Figure 5 As shown, the binocular image generating device includes:
[0108] An acquisition module 51 is used to acquire multiple images corresponding to a target scene, wherein the multiple images are acquired from multiple angles of the target scene;
[0109] A training module 52, configured to train a neural radiation field model using the plurality of images to obtain a trained neural radiation field model;
[0110] A first generating module 53, configured to generate a left eye image based on a preset left eye light by using the trained neural radiation field model;
[0111] The second generating module 54 is used to generate a right eye image based on the preset right eye light through the trained neural radiation field model.
[0112] In a possible implementation manner, the multiple images include panoramic information of the target scene, the left-eye image is a panoramic image corresponding to the left eye, and the right-eye image is a panoramic image corresponding to the right eye.
[0113] In a possible implementation manner, any image information in any image among the multiple images is at least contained in another image among the multiple images.
[0114] In a possible implementation manner, the multiple images are acquired by moving a single camera.
[0115] In a possible implementation, the radius of the minimum circumscribed circle of the multiple acquisition points corresponding to the multiple images is within a preset radius range; wherein the acquisition point corresponding to any one of the multiple images represents the optical center position of the lens when the image is acquired; and the left boundary of the preset radius range is greater than 0.
[0116] In a possible implementation, the training module 52 is used to:
[0117] Based on the multiple images, determining a plurality of camera extrinsic parameters corresponding one-to-one to the multiple images;
[0118] Based on the multiple images and the multiple camera extrinsic parameters, a neural radiation field model is trained to obtain a trained neural radiation field model.
[0119] In one possible implementation,
[0120] The preset left-eye light is a ray, the endpoint of the preset left-eye light is on a preset circle, the preset left-eye light is on a tangent of the preset circle, and the direction of the preset left-eye light is the clockwise direction of the preset circle;
[0121] The preset right-eye light is a ray, the endpoint of the preset right-eye light is on the preset circle, the preset right-eye light is on the tangent of the preset circle, and the direction of the preset right-eye light is counterclockwise of the preset circle;
[0122] Wherein, the diameter of the preset circle is the preset pupil distance.
[0123] In one possible implementation, the device is applied to any one of a virtual reality device, an augmented reality device, a mixed reality device, an artificial intelligence device, and a digital twin system.
[0124] In an embodiment of the present disclosure, a plurality of images acquired from a plurality of angles of the target scene are acquired, and a neural radiation field model is trained using the plurality of images to obtain a trained neural radiation field model. A left-eye image is generated based on a preset left-eye light by the trained neural radiation field model, and a right-eye image is generated based on a preset right-eye light by the trained neural radiation field model. Thus, by utilizing the plurality of images acquired from a plurality of angles of the target scene to generate a binocular image corresponding to the target scene, the hardware cost can be reduced, the difficulty of obtaining the binocular image can be reduced, and accurate and high-quality binocular images can be generated.
[0125] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. Its specific implementation and technical effects can refer to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.
[0126] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium.
[0127] The embodiment of the present disclosure further provides a computer program, including a computer-readable code. When the computer-readable code is executed in an electronic device, a processor in the electronic device executes the above method.
[0128] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0129] An embodiment of the present disclosure also provides an electronic device, comprising: one or more processors; and a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0130] The electronic device may be provided as a terminal, a server, or a device in other forms.
[0131] Figure 6 1 is a block diagram of an electronic device 1900 provided in an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server. Figure 6, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0132] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OSX TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open source Unix-like operating system (FreeBSD TM ) or similar.
[0133] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0134] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0135] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0136] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0137] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0138] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0139] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0140] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0141] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0142] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0143] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0144] If the technical solution of the embodiments of the present disclosure involves personal information, the product using the technical solution of the embodiments of the present disclosure has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of the embodiments of the present disclosure involves sensitive personal information, the product using the technical solution of the embodiments of the present disclosure has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the requirement of "explicit consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to collect his or her personal information; or on the device for processing personal information, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0145] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for generating a binocular image, characterized in that: include: Acquire multiple images corresponding to a target scene, wherein the multiple images are acquired from multiple angles of the target scene; Using the multiple images to train a neural radiation field model to obtain a trained neural radiation field model; The neural radiation field model completed through the training generates a left eye image based on a preset left eye light; The neural radiation field model completed through the training generates a right eye image based on a preset right eye light; Among them, the preset left eye light is a ray, the endpoint of the preset left eye light is on the preset circle, and the preset left eye light is on the tangent of the preset circle; the preset right eye light is a ray, the endpoint of the preset right eye light is on the preset circle, and the preset right eye light is on the tangent of the preset circle.
2. The method according to claim 1, characterized in that The multiple images contain panoramic information of the target scene, the left-eye image is a panoramic image corresponding to the left eye, and the right-eye image is a panoramic image corresponding to the right eye.
3. The method according to claim 2, characterized in that Any image information in any one of the plurality of images is at least included in another image of the plurality of images.
4. The method according to claim 1, characterized in that: The multiple images are acquired by moving a single camera.
5. The method according to claim 1, characterized in that: The radius of the minimum circumscribed circle of the multiple acquisition points corresponding to the multiple images is within a preset radius range; wherein the acquisition point corresponding to any one of the multiple images represents the optical center position of the lens when the image is acquired; and the left boundary of the preset radius range is greater than 0.
6. The method according to any one of claims 1 to 5, characterized in that The step of using the multiple images to train a neural radiation field model to obtain a trained neural radiation field model includes: Based on the multiple images, determining a plurality of camera extrinsic parameters corresponding one-to-one to the multiple images; Based on the multiple images and the multiple camera extrinsic parameters, a neural radiation field model is trained to obtain a trained neural radiation field model.
7. The method according to any one of claims 1 to 5, characterized in that The preset direction of the left eye light is the clockwise direction of the preset circle; The preset direction of the right eye light is the counterclockwise direction of the preset circle; Wherein, the diameter of the preset circle is the preset pupil distance.
8. The method according to any one of claims 1 to 5, characterized in that The method is applied to any one of a virtual reality device, an augmented reality device, a mixed reality device, an artificial intelligence device, and a digital twin system.
9. A binocular image generation device, characterized in that: include: An acquisition module, used to acquire multiple images corresponding to a target scene, wherein the multiple images are acquired from multiple angles of the target scene; A training module, used to train a neural radiation field model using the multiple images to obtain a trained neural radiation field model; A first generating module, configured to generate a left eye image based on a preset left eye light by using the trained neural radiation field model; A second generating module is used to generate a right eye image based on a preset right eye light by using the trained neural radiation field model; Among them, the preset left eye light is a ray, the endpoint of the preset left eye light is on the preset circle, and the preset left eye light is on the tangent of the preset circle; the preset right eye light is a ray, the endpoint of the preset right eye light is on the preset circle, and the preset right eye light is on the tangent of the preset circle.
10. An electronic device, characterized in that: include: one or more processors; a memory for storing executable instructions; The one or more processors are configured to call the executable instructions stored in the memory to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The invention comprises a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is executed in an electronic device, a processor in the electronic device executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method utilizing conditional generative adversarial network to calculate parallax
CN107358626A
Image display method, smart glasses and storage medium
CN108064447A
