Disclosure of Invention
In order to solve the above problems, the present invention provides a method and a system for creating a three-dimensional panoramic image, which can enlarge an observation angle and increase a user's sense of immersion.
The invention provides a method for establishing a three-dimensional panoramic image, which comprises the following steps:
the photographing devices are symmetrically and uniformly arranged on the hemispherical surface in a spherical surface position relationship with each other, and photograph towards the center direction of the hemisphere, wherein images photographed by the photographing devices adjacent to each other in spatial position are partially overlapped with each other;
the image splicing device is respectively connected with the plurality of photographing devices, receives images sent by the plurality of photographing devices and splices the images sent by the plurality of photographing devices into a panoramic image, and the panoramic image is a hemispherical panoramic image in the center direction;
the virtual reality equipment is connected with the image splicing device, receives the panoramic image spliced by the image splicing device, maps the panoramic image to the appearance of the corresponding virtual hemispherical surface model to display the three-dimensional panoramic image, and the virtual hemispherical surface model corresponds to the hemispherical surface.
Optionally, the hemisphere is divided into a plurality of portions by a spherical latitude line and a spherical longitude line, each portion is intersected by an adjacent longitude line and latitude line to obtain at least 3 intersection points, and the plurality of photographing devices include a wide-angle camera disposed at each intersection point.
Optionally, the system further comprises:
the image compression device is used for compressing the panoramic image spliced by the image splicing device, and is arranged in the image splicing device or externally arranged on the image splicing device and connected with the image splicing device;
and the image decompression device is used for decompressing the panoramic image compressed by the image compression device and sending the decompressed panoramic image to the virtual reality equipment for map display, and the image decompression device can be arranged in the virtual reality equipment.
Optionally, the image stitching device converts images sent by the plurality of photographing devices under different projection planes into the same plane by adopting homography transformation between plane projections, monitors and extracts feature points of each image after the projection planes are unified, performs matching screening of the feature points on two images with an overlapping region, establishes a matching point pair between the two images with the overlapping region, performs image registration and fusion, exposure compensation and ghost removal processing on the images with the matched feature points, and stitches the images shot by the plurality of photographing devices into a panoramic image.
Optionally, the virtual reality device acquires the position and view angle information of the user when the user circles around the center direction of the hemisphere, and displays the three-dimensional image of the image on the hemispherical surface model at the corresponding position and view angle according to the position and view angle information of the user; when a viewpoint height adjusting instruction is triggered, the corresponding viewpoint height position is raised, and the corresponding viewpoint height, horizontal positioning and images on the hemispherical model in the view angle direction are subjected to three-dimensional image display; when a user approaches to the center direction of the hemisphere, the resolution of the displayed three-dimensional image is improved by a preset multiple, and the displayed three-dimensional image is clear and is not distorted.
The invention also provides a method for establishing the three-dimensional panoramic image, which comprises the following steps:
the method comprises the steps of obtaining images shot by a plurality of shooting devices towards the center direction of a hemisphere at the same time, wherein the plurality of shooting devices are symmetrically and uniformly arranged on the hemisphere surface in a sphere position relationship with each other, and the images shot by the shooting devices adjacent in spatial position are partially overlapped with each other;
splicing images shot by a plurality of shooting devices into a panoramic image, wherein the panoramic image is a panoramic image in the center direction of a hemisphere;
and pasting the spliced panoramic picture on the surface of the corresponding virtual hemispherical surface model to display the three-dimensional panoramic picture, wherein the virtual hemispherical surface model corresponds to a hemispherical surface.
Optionally, the hemisphere is divided into a plurality of portions by a spherical latitude line and a spherical longitude line, each portion is intersected by an adjacent longitude line and latitude line to obtain at least 3 intersection points, and the plurality of photographing devices include a wide-angle camera disposed at each intersection point.
Optionally, the method further comprises:
converting images under different projection planes sent by a plurality of photographing devices to the same plane by adopting homography transformation among plane projections;
carrying out feature point monitoring and extraction on each image after the projection planes are consistent, carrying out matching screening on feature points on two images with an overlapping region, and establishing a matching point pair between the two images with the overlapping region;
and carrying out image registration and fusion, exposure compensation and de-ghosting treatment on the images after the feature points are matched, and splicing the plurality of images into a panoramic image.
Optionally, the method further comprises:
when a user circles around the center direction of the hemisphere, position and visual angle information of the user is acquired, and three-dimensional image display is carried out on an image on the hemispherical surface model at the corresponding position and visual angle according to the position and visual angle information of the user;
when a viewpoint height adjusting instruction is triggered, the corresponding viewpoint height position is raised, and the corresponding viewpoint height, horizontal positioning and images on the hemispherical model in the view angle direction are subjected to three-dimensional image display;
when a user approaches to the center direction of the hemisphere, the resolution of the displayed three-dimensional image is improved by a preset multiple, and the displayed three-dimensional image is clear and is not distorted.
Optionally, the method further comprises:
when it is monitored that a button which is positioned on the virtual reality equipment and used for triggering the viewpoint height adjusting instruction is triggered, triggering the viewpoint height adjusting instruction; or
And when the preset times of triggering the viewpoint height adjusting instruction by continuous jumping of the user wearing the virtual reality equipment are monitored, triggering the viewpoint height adjusting instruction.
According to the embodiment of the invention, a plurality of photographing devices which are symmetrically and uniformly arranged on the hemispherical surface in a spherical surface position relationship with each other photograph the central direction of the hemispherical surface at the same time, images photographed by the plurality of photographing devices are spliced into a panoramic image and sent to virtual reality equipment, and the panoramic image is pasted on the outer surface of the corresponding virtual hemispherical surface model to be displayed in a three-dimensional panoramic image. Because the images shot by each shooting device are partially overlapped with each other (the local overlapping degree is high), the image coverage density is higher, the full-angle panoramic image coverage can be realized, and the effect is smoother and closer to a real scene when the partially overlapped images are spliced into a three-dimensional panoramic image. Furthermore, each photographing device simultaneously photographs the hemispherical center direction (scene) from different angles from outside to inside, so that the three-dimensional panoramic view corresponding to the observation angle of the user can be displayed in real time when the user circles around the hemispherical center direction, the observation position can be changed freely by the user, the range of the observation activity area of the user is greatly enlarged, and the user experience is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX from each other. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
According to the invention, the same scene is shot simultaneously from different angles by the plurality of shooting devices, the plurality of images overlapping the whole scene are obtained in real time, and more dense image coverage is obtained, so that the corresponding images can be provided for the user according to the orientation requirement of the real-time user, and the user can obtain the experience of real-time stereoscopic vision effect.
Fig. 1 is an architecture diagram of a system for building a three-dimensional panoramic image according to an embodiment of the present invention, as shown in fig. 1, the system according to the embodiment of the present invention includes:
the N photographing devices are symmetrically and uniformly arranged on the hemispherical surface in a spherical surface position relationship with each other, and simultaneously photograph the hemispherical surface in the central direction, wherein images photographed by the photographing devices adjacent to each other in spatial position are partially overlapped with each other; wherein N is greater than 3.
In this embodiment, the hemispherical surface is divided into a plurality of portions by spherical latitude lines and spherical longitude lines, each portion is intersected by adjacent longitude lines and latitude lines to obtain at least 3 intersections, and the plurality of photographing devices include wide-angle cameras disposed at each intersection. In an optional implementation mode, 2 parts of a hemispherical surface can be divided by using a spherical latitude line along a spherical radius central point, 4 parts of the hemispherical surface can be divided by using a spherical longitude line, eight intersection points are obtained by intersecting two adjacent longitude lines and two adjacent latitude lines, the eight intersection points are respectively provided with a wide-angle camera, and the eight intersection points of the two adjacent longitude lines at the north pole of the spherical surface are provided with the wide-angle cameras.
Fig. 2 is a schematic layout diagram of a photographing device according to an embodiment of the present invention, as shown in fig. 2, 9 wide-angle cameras are symmetrically and uniformly arranged on a hemispherical surface, and the 9 wide-angle cameras all photograph toward a center direction of the hemispherical surface, that is, each wide-angle camera photographs from outside to inside in the center direction of the hemispherical surface from different angles, images photographed by adjacent wide-angle cameras overlap each other partially (the local overlapping degree is high), the image coverage density is high, full-angle panoramic image coverage can be achieved, and when the partially overlapped images are spliced into a three-dimensional panoramic image, the effect is smoother and closer to a real scene.
The system of this embodiment further comprises: the image splicing device is respectively connected with the plurality of photographing devices, receives the images sent by the plurality of photographing devices and splices the images sent by the plurality of photographing devices into a panoramic image, and the panoramic image is a panoramic image of an object at the center of the ball;
when the image splicing device specifically realizes image splicing, homography transformation among plane projections can be adopted, images under different projection planes sent by a plurality of photographing devices are converted into the same plane, feature point monitoring and extraction are carried out on each image after the projection planes are unified, matching screening of feature points is carried out on two images with an overlapping area, matching point pairs between the two images with the overlapping area are established, image registration and fusion, exposure compensation and ghost removal processing are carried out on the images after the feature points are matched, and the images shot by the plurality of photographing devices are spliced into a panoramic image.
The system of this embodiment further comprises: the virtual reality equipment is connected with the image splicing device, receives the panoramic image spliced by the image splicing device, maps the panoramic image to the appearance of the corresponding virtual hemispherical surface model to display the three-dimensional panoramic image, and the virtual hemispherical surface model corresponds to the hemispherical surface.
Specifically, when the virtual reality equipment carries out a three-dimensional panoramic image and when monitoring that a user circles around the center direction of a hemisphere, the position and visual angle information of the user is obtained, and the image on the hemispherical surface model at the corresponding position and under the corresponding visual angle is subjected to three-dimensional image display according to the position and visual angle information of the user; when a viewpoint height adjusting instruction is triggered, the corresponding viewpoint height position is raised, and the corresponding viewpoint height, horizontal positioning and images on the hemispherical model in the view angle direction are subjected to three-dimensional image display; when the situation that the user approaches to the center direction of the hemisphere is monitored, the resolution of the displayed three-dimensional image is improved by a preset multiple, and the displayed three-dimensional image is clear and is not distorted.
For this reason, the virtual reality equipment is provided with a sensor, and the position and the change of the visual angle of the user can be monitored.
In an optional implementation manner, the system of this embodiment further includes:
the image compression device is used for compressing the panoramic image spliced by the image splicing device, and is arranged in the image splicing device or externally arranged on the image splicing device and connected with the image splicing device;
and the image decompression device is used for decompressing the panoramic image compressed by the image compression device and sending the decompressed panoramic image to the virtual reality equipment for map display, and the image decompression device can be arranged in the virtual reality equipment.
According to the embodiment of the invention, a plurality of photographing devices which are symmetrically and uniformly arranged on the hemispherical surface in a spherical surface position relationship with each other photograph the central direction of the hemispherical surface at the same time, images photographed by the plurality of photographing devices are spliced into a panoramic image and sent to virtual reality equipment, and the panoramic image is pasted on the outer surface of the corresponding virtual hemispherical surface model to be displayed in a three-dimensional panoramic image. Because the images shot by each shooting device are partially overlapped with each other (the local overlapping degree is high), the image coverage density is higher, the full-angle panoramic image coverage can be realized, and the effect is smoother and closer to a real scene when the partially overlapped images are spliced into a three-dimensional panoramic image. Furthermore, each photographing device shoots the semi-spherical center direction from different angles from outside to inside, so that the three-dimensional panoramic view corresponding to the observation angle of the user can be displayed in real time when the user circles around the semi-spherical center direction, the observation position can be changed at will by the user, the range of the observation activity area of the user is greatly enlarged, and the user experience degree is improved.
Based on the system architecture diagram shown in fig. 1, fig. 3 is a schematic flow chart of a method for establishing a three-dimensional panoramic image according to an embodiment of the present invention, as shown in fig. 3, including:
101. and acquiring images shot by a plurality of shooting devices which are symmetrically and uniformly arranged on the hemispherical surface in a spherical position relationship with each other and aim at the central direction of the hemisphere.
The plurality of photographing devices are symmetrically and uniformly arranged on a hemispherical surface in a spherical position relationship with each other, and images photographed by the photographing devices adjacent to each other in spatial position are partially overlapped with each other;
wherein, a plurality of devices of shooing include in the concrete arrangement of hemisphere: the hemisphere is divided into a plurality of parts by the spherical latitude line and the spherical longitude line, each part is intersected by the adjacent longitude line and latitude line to obtain at least 3 intersection points, and the plurality of photographing devices comprise wide-angle cameras arranged at each intersection point. As shown in fig. 2, 9 wide-angle cameras are symmetrically and uniformly arranged on a hemispherical surface, and the 9 wide-angle cameras all shoot towards the center direction of the hemisphere, that is, each wide-angle camera shoots from different angles from outside to inside in the center direction of the hemisphere at the same time, so that images shot by adjacent wide-angle cameras are partially overlapped with each other (the local overlapping degree is high), the image coverage density is high, full-angle panoramic image coverage can be realized, and when the partially overlapped images are spliced into a three-dimensional panoramic image, the effect is smoother and closer to a real scene.
In the embodiment of the invention, each photographing device is connected with the image splicing device, and the photographed images can be sent to the image splicing device.
102. And splicing the images shot by the plurality of shooting devices into a panoramic image.
Specifically, after the image stitching device receives the image transmitted from each photographing device, the following processing needs to be performed on the image: the method comprises the steps of projection plane unification, feature extraction, feature matching, image registration and fusion, exposure compensation and ghost removal, and finally a panoramic map capable of covering the outer surface of a hemispherical model is obtained.
Wherein the projection plane uniformization processing includes: and images under different projection planes shot by each shooting device are converted to be under the same plane by adopting homography transformation between plane projections.
Wherein the feature extraction comprises: detecting and extracting feature points of each image, for example, extracting the SIFT feature points of each image by adopting a Scale-invariant feature transform (SIFT) method, performing continuous filtering on each image for a plurality of times to obtain a first Scale group image, reducing the width and the height of an original image by half, performing continuous filtering for a plurality of times to obtain a second Scale group image, and continuously repeating the process until the width and the height of the image are less than or equal to a set threshold value; carrying out difference on the Gaussian images in each scale to form a Gaussian difference scale group image; and solving and calculating local extreme points of the images of the Gaussian difference scale groups, namely the local extreme points are the Sift characteristic points. The Sift characteristic points are local characteristics of the image, have good invariance to translation, rotation, scale scaling, brightness change, shielding, noise and the like, and keep certain stability to vision change and affine transformation.
The feature matching comprises the following steps: because the images shot by the adjacent wide-angle cameras are partially overlapped (the local overlapping degree is high), for two images with an overlapping area, RANSAC (an abbreviation of RANdom Sample Consensus, which is an algorithm for obtaining effective Sample data by calculating mathematical model parameters of data according to a group of Sample data sets containing abnormal data) algorithm is used for screening feature points, and then a matched feature point pair between the two images is established by using a Sift/KD-Tree (short for k-dimensional Tree, which is a data structure for segmenting a k-dimensional data space).
Image registration and fusion includes: the image registration is to obtain image space coordinate transformation parameters through the matched feature point pairs; finally, carrying out image registration by the coordinate transformation parameters; the image fusion can use non-multiresolution technology or multiresolution technology to improve the utilization rate of image information, improve the accuracy and reliability of computer interpretation and improve the spatial resolution and spectral resolution of images.
The exposure compensation and de-ghosting includes: according to the optical perspective geometry principle, images shot by two different shooting devices always have certain parallax errors such as ghosting and ghosting, and finally, the spliced images have unacceptable defects in vision, so that the images need to be subjected to ghost removing processing; in addition, because the cameras have different shooting angles, for example, some cameras are located on the light-facing surface, and some cameras are located on the backlight surface, the shot images have inconsistent exposure degrees. Therefore, in the embodiment of the present invention, exposure compensation and de-ghosting processing need to be performed on each image, wherein the exposure compensation can perform exposure adjustment on the image according to the target histogram curve.
And the image splicing device repeats the steps to splice the images shot by each shooting device into a panoramic image.
103. And pasting the spliced panoramic picture on the appearance of the corresponding virtual hemispherical surface model to display the three-dimensional panoramic picture.
The virtual hemispherical model in the embodiment of the invention is a model which is formed by simulating a hemispherical surface in reality through a scientific technology by virtual reality equipment and then superimposing the hemispherical surface on a virtual reality world to be perceived by a user, and is a mode of observing the world by adding a virtualization technology to a sense organ of the user. Therefore, a position mapping relation exists between the virtual hemispherical model and the hemispherical surface.
In the embodiment of the invention, in order to improve the transmission efficiency and reduce network transmission resources, after the images shot by each shooting device are spliced into the panoramic image by the image splicing device, the spliced panoramic image can be subjected to lightweight lossless compression and then transmitted to the virtual reality equipment through the network.
The virtual reality equipment decompresses the received panoramic image, and then correspondingly maps the decompressed panoramic image onto the outer surface of the virtual hemispherical surface model to form a three-dimensional panoramic image based on virtual reality.
In the embodiment of the invention, each photographing device simultaneously photographs from outside to inside in the center direction of the hemisphere from different angles, so that the three-dimensional panoramic view corresponding to the observation angle of the user can be displayed in real time when the user circles around the center direction of the hemisphere, the observation position can be changed freely by the user, the range of the observation activity area of the user is greatly enlarged, and the user experience is improved.
Specifically, when the user circles around the center direction of the hemisphere, the position and view angle information of the user is acquired, and the image on the hemispherical surface model at the corresponding position and view angle is subjected to three-dimensional image display according to the position and view angle information of the user.
When a viewpoint height adjusting instruction is triggered, the corresponding viewpoint height position is raised, and the corresponding viewpoint height, horizontal positioning and images on the hemispherical model in the view angle direction are subjected to three-dimensional image display; the triggering conditions of the viewpoint height adjusting instruction include, but are not limited to, the following examples: when it is monitored that a button which is positioned on the virtual reality equipment and used for triggering the viewpoint height adjusting instruction is triggered, triggering the viewpoint height adjusting instruction; or when the preset times that the user wearing the virtual reality equipment continuously jumps to trigger the viewpoint height adjusting instruction are monitored, the viewpoint height adjusting instruction is triggered.
When a user approaches to the center direction of the hemisphere, the resolution of the displayed three-dimensional image is improved by a preset multiple, and the displayed three-dimensional image is clear and is not distorted. As shown in fig. 2, when a user approaches a scene center point along a radius, in order to enable a virtual reality device to clearly and finely display a virtual reality three-dimensional image with high resolution in different depths of field, a resolution of 1080P is increased when a user viewpoint approaches the scene center point, for example, the resolution is increased by a specified multiple through a neural network, the specified multiple is generally set to be 2-4 times, and the closer a viewpoint is to the scene center point, the higher the multiple is set, so as to ensure the image to be clear and undistorted.
It should be noted that, in the embodiment of the present invention, a sensor is disposed in the virtual reality device, and is used for tracking the head of the user to determine the position and the posture of the head of the user in the real world, so that the viewing angle of the virtual world can be determined.
According to the embodiment of the invention, a plurality of photographing devices which are symmetrically and uniformly arranged on the hemispherical surface in a spherical surface position relationship with each other photograph the central direction of the hemispherical surface at the same time, images photographed by the plurality of photographing devices are spliced into a panoramic image and sent to virtual reality equipment, and the panoramic image is pasted on the outer surface of the corresponding virtual hemispherical surface model to be displayed in a three-dimensional panoramic image. Because the images shot by each shooting device are partially overlapped with each other (the local overlapping degree is high), the image coverage density is higher, the full-angle panoramic image coverage can be realized, and the effect is smoother and closer to a real scene when the partially overlapped images are spliced into a three-dimensional panoramic image. Furthermore, each photographing device shoots the semi-spherical center direction from different angles from outside to inside, so that the three-dimensional panoramic view corresponding to the observation angle of the user can be displayed in real time when the user circles around the semi-spherical center direction, the observation position can be changed at will by the user, the range of the observation activity area of the user is greatly enlarged, and the user experience degree is improved.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.