Immersive stereoscopic panoramic video real-time homography correction and projection method and device

By calculating the camera's intrinsic and extrinsic parameter matrices for homography correction, the problem of perspective changes caused by the inconsistency between the viewpoint and the line of sight in VR scenes is solved, providing a more realistic stereoscopic panoramic video experience, adapting to different camera array configurations, and improving computational efficiency and real-time performance.

CN119052444APending Publication Date: 2024-11-29SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410899847.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

Existing stereoscopic panoramic video generation technologies have failed to effectively address the issues of perspective distortion and visual deviation caused by inconsistencies between the viewpoint, line of sight, and camera angle in VR scenarios, thus affecting the user's stereoscopic perception experience.

Method used

By calculating the camera's intrinsic and extrinsic parameter matrices, homography correction is performed to determine the angle between the user's line of sight and the horizontal direction. Discrete preset homography correction is then performed to correct image pixels and project them to form a stereoscopic panoramic video.

Benefits of technology

It provides more realistic video content that conforms to stereoscopic relationships, enhances the user's stereoscopic perception experience, adapts to different camera array configurations, is compatible with VR isometric projection display methods, and improves computing efficiency and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052444A_ABST
    Figure CN119052444A_ABST
Patent Text Reader

Abstract

The invention provides an immersive stereoscopic panoramic video real-time homography correction and projection method and device, the depth influence of a real observation object or scene is considered in the calculation process in the form of a ratio, the depth ratio can be preset or adjusted according to the actual situation, the depth influences binocular parallax in a stereoscopic panoramic projection model, and the real-time homography correction and projection of the stereoscopic panoramic video is realized. According to the head rotation angle of the panoramic video watched by the user in the VR, homography correction is carried out on the left eye panoramic picture and the right eye panoramic picture displayed by the VR in the stereoscopic panoramic video in real time, so that the visual deviation problem is corrected, a correct viewpoint perspective relation is provided for the user, and more accurate and real stereoscopic panoramic immersive experience is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of panoramic stereo cameras, and in particular to a method and device for real-time homography correction and projection of immersive stereoscopic panoramic videos. Background Art

[0002] Binocular parallax is the way the human brain perceives the world's three-dimensional information and produces a "stereoscopic sense". Omnidirectional Stereo (ODS) technology uses panoramic imaging camera arrays and other technologies and algorithms to present different panoramic images to the left and right eyes in the VR headset, thereby producing parallax, allowing humans to produce a sense of stereo in an immersive 360-degree panorama and achieve depth perception. This technology not only provides an omnidirectional immersive visual experience, but also enhances the user's spatial perception ability, allowing users to interact more naturally and accurately in virtual environments or remote reality environments.

[0003] Existing stereoscopic panoramic video generation technologies can be divided into two categories. The first category focuses on the stitching effect of stereoscopic panoramic videos. The mainstream technical method is multi-image stitching based on optical flow calculation, which can handle moving objects and foreground objects with large parallax to generate stereoscopic panoramic videos with very good stitching effect and strong three-dimensional sense. The typical representative is the patent with patent number CN115174805A, which provides a method, device and electronic device for generating panoramic stereo images. However, the optical flow calculation of this type of technical application has high requirements on computing power, the calculation process is complex, and the whole process takes a long time, and it is impossible to complete the real-time stitching of videos. Therefore, this type of method is not suitable for scenarios with high requirements for stitching efficiency, such as immersive stereoscopic remote operations, real-time panoramic conferences, etc.

[0004] The second category focuses on the stitching efficiency of stereoscopic panoramic videos. The mainstream technical method is to fully consider and utilize the camera array configuration (the external parameter relationship of each camera), analyze the spatial relationship between virtual imaging geometry and VR equidistant cylindrical projection geometry, so as to quickly establish the correspondence between pixels, thereby completing the rapid generation of stereoscopic panoramic videos (images). The typical representative is the method described in the patent number CN108886611A. Compared with the first category of methods, the second category of methods sacrifices the quality of some image stitching effects in exchange for extremely high efficiency, and is more suitable for real-time operation application scenarios.

[0005] Therefore, the current technologies related to real-time homography correction and projection methods for immersive stereoscopic panoramic videos still need to be further improved. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention proposes a method and device for real-time homography correction and projection of immersive stereoscopic panoramic video, which solves the technical problem in the prior art that the perspective relationship changes and thus the visual deviation is caused by not considering the inconsistency between the viewpoint and the line of sight direction in the VR scene and the camera.

[0007] The technical solution of the present invention is achieved in this way:

[0008] On the one hand, the present invention provides a method for real-time homography correction and projection of immersive stereoscopic panoramic video, comprising the following steps:

[0009] An image is captured by an image acquisition device to generate a panoramic image, wherein the image acquisition device includes a panoramic camera array, and the internal and external parameters of the cameras in the panoramic camera array are calibrated to obtain the internal parameter matrix of all cameras; one camera is selected as a standard reference camera, which is recorded as a first camera, and an adjacent camera of the first camera is selected as a second camera to obtain a relative external parameter matrix of the second camera; the external parameter matrix of the first camera is calculated, and the external parameter matrix of the second camera is obtained according to the relative external parameter matrix;

[0010] Select any point in the projection process of the second camera, and establish the homogeneous coordinates of the point, calculate the ratio of the depth value of the point in the second camera coordinate system and the virtual correction camera coordinate system of the second camera, and the radius of the viewing ring, perform homography correction on the second camera, the corrected camera is the virtual correction camera, and calculate the intrinsic parameter matrix of the virtual correction camera;

[0011] Performing discrete preset homography correction according to the correction effect, determining the angle between the user's sight line direction and the horizontal direction, dividing the panoramic image into several equal parts, calculating discrete values ​​of the angle under the several equal parts, calculating the extrinsic parameter matrix of the virtual correction camera, and obtaining the homography matrix of the virtual correction camera, thereby obtaining the corresponding relationship between the several equally divided panoramic images and the panoramic camera array and the resolution video;

[0012] According to the corresponding relationship, the image pixels are corrected and the image is projected to obtain a mapping relationship of the pixels after homography correction and a corrected image set, and the corrected image set is rendered and displayed on the panoramic camera array to form a stereoscopic panoramic video.

[0013] On the basis of this technical solution, further preferably, the calculating the extrinsic parameter matrix and the relative extrinsic parameter matrix of the first camera, and obtaining the extrinsic parameter matrix of the second camera according to the relative extrinsic parameter matrix, specifically includes the following contents:

[0014] The relative extrinsic parameter matrix is ​​an extrinsic parameter matrix between two adjacent cameras, and the extrinsic parameter matrix of the second camera is equal to the product of the extrinsic parameter matrix of the first camera and the relative extrinsic parameter matrix.

[0015] On the basis of this technical solution, it is further preferred that when the stereoscopic panoramic video is mainly used to observe distant scenes, the depth ratio is equal to 1; when the stereoscopic panoramic video is mainly used to observe indoor and close scenes, the depth ratio is greater than 1.

[0016] On the basis of this technical solution, it is further preferred that the discrete preset homography correction is performed according to the correction effect, the angle between the user's sight line direction and the horizontal direction is determined, the panoramic image is divided into several equal parts, and the discrete values ​​of the angle under the several equal parts are calculated, which specifically includes the following contents:

[0017] A discrete preset homography correction is performed according to the correction effect, and the panoramic image is divided into several equal parts according to angles. When the user's line of sight is in the mth divided space, the discrete value of the angle is equal to the quotient of 360° and the equal fraction, multiplied by the difference between m and 0.5.

[0018] On the basis of this technical solution, it is further preferred that the extrinsic parameter matrix of the virtual correction camera is calculated, and the homography matrix of the virtual correction camera is obtained, which specifically includes the following contents:

[0019] The homography matrix is ​​equal to the product of the intrinsic parameter matrix of the virtual correction camera, the extrinsic parameter matrix of the virtual correction camera, the inverse matrix of the extrinsic parameter matrix of the camera, and the inverse matrix of the intrinsic parameter matrix of the camera.

[0020] On the basis of this technical solution, it is further preferred that the radius of the visual ring is half of the user's pupil distance.

[0021] On the basis of this technical solution, further preferably, when calculating the homography matrix, the intrinsic parameter matrix of the virtual correction camera is equal to the intrinsic parameter matrix of the camera.

[0022] On the basis of this technical solution, it is further preferred that the image pixels are corrected and the image is projected. When the corrected image is projected onto an equidistant cylindrical surface, the mapping relationship of the pixels is calculated by an equidistant cylindrical projection algorithm.

[0023] On the basis of this technical solution, it is further preferred that the radius of the projected cylindrical surface meets the following requirements:

[0024] R=nx / 2π, R is the radius of the projected cylindrical surface, n is the total number of cameras, and x is the width of a single camera screen.

[0025] On the other hand, the present invention also provides an immersive stereoscopic panoramic video real-time homography correction and projection device, comprising:

[0026] A calibration module is used to generate a panoramic image by taking an image using an image acquisition device, wherein the image acquisition device includes a panoramic camera array, and calibrate the internal and external parameters of the cameras in the panoramic camera array to obtain the internal parameter matrix of all cameras; select any camera as a standard reference camera, recorded as a first camera, select an adjacent camera of the first camera as a second camera, and obtain a relative external parameter matrix of the second camera; calculate the external parameter matrix of the first camera, and obtain the external parameter matrix of the second camera according to the relative external parameter matrix;

[0027] a calculation module, used to select any point in the projection process of the second camera, establish the homogeneous coordinates of the point, calculate the ratio of the depth value of the point in the second camera coordinate system and the virtual correction camera coordinate system of the second camera, and the radius of the viewing ring, perform homography correction on the second camera, the corrected camera is the virtual correction camera, and calculate the intrinsic parameter matrix of the virtual correction camera;

[0028] A correction module, used to perform discrete preset homography correction according to the correction effect, determine the angle between the user's sight line direction and the horizontal direction, divide the panoramic image into several equal parts, calculate the discrete values ​​of the angle under the several equal parts, calculate the extrinsic parameter matrix of the virtual correction camera, and obtain the homography matrix of the virtual correction camera, and then obtain the corresponding relationship between the several equally divided panoramic images and the panoramic camera array and the resolution video;

[0029] The projection module is used to correct the image pixels according to the corresponding relationship and project the image to obtain the mapping relationship of the pixels after homography correction and the corrected image set, render the corrected image set, and display it on the panoramic camera array to form a stereoscopic panoramic video.

[0030] Compared with the prior art, the technical effects of the present invention are mainly:

[0031] Compared with the existing technology that does not take into account the model and VR viewpoint correction, the present invention takes the depth effect of the real observed object or scene into consideration in the calculation process in the form of a ratio, and the depth ratio can be preset or adjusted according to the actual situation. The depth affects the binocular parallax in the stereo panoramic projection model, which is an important factor affecting the user's stereoscopic perception. At present, only the algorithms that consider the pixel relationship between the camera imaging and the VR imaging surface ignore the influence of the depth on the projection process. Therefore, the method of the present invention can show users more realistic and more stereoscopic video or scene content.

[0032] In addition, considering the camera configuration and the user's perspective and directly performing VR equidistant projection, when the viewing angle is greatly different from the original optical axis direction of the camera, an incorrect perspective relationship will be generated, affecting the viewing experience. In the described scheme, the viewpoint and perspective are corrected according to the user's actual viewing angle and camera configuration, which can provide the user with a correct three-dimensional perspective relationship and provide a better viewing experience and scene perception. In addition, the correction method is compatible with a variety of panoramic camera configurations (for different camera configurations, only the external parameters of the actual camera need to be adjusted, and the process is not affected), and is compatible with the equidistant projection display method currently used by the mainstream VR. It can be used as an independent module with strong adaptability and high convenience.

[0033] Finally, the strategy of discrete preset homography correction fully considers the real-time requirements of application scenarios such as video streaming, optimizes the computer operation process and feasibility, and is highly efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 This is a flow chart of the real-time homography correction and projection method for immersive stereoscopic panoramic video according to the present invention;

[0036] Figure 2 This is a schematic diagram of the ten-mesh equiangular-distance camera configuration of the present invention;

[0037] Figure 3 To form a panoramic image for the left eye based on the annular projection theory;

[0038] Figure 4 To form a panoramic image for the right eye based on the annular projection theory;

[0039] Figure 5 The right panoramic homography correction diagram;

[0040] Figure 6 Schematic diagram of homography correction after the user's line of sight direction θ is changed;

[0041] Figure 7 This is a diagram of the real-time homography correction and projection device for immersive stereoscopic panoramic video of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] It should be understood that the terms used in this description of the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the embodiments of the present invention. As used in the description of the embodiments of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms.

[0044] The present invention adds a one-step correction algorithm based on the algorithm applied in the process from existing camera imaging to VR display. It can perform homography correction on the left-eye and right-eye panoramic images displayed in the VR in the stereoscopic panoramic video in real time according to the head rotation angle of the user watching the panoramic video in VR, thereby correcting the visual deviation problem, providing the user with the correct viewpoint perspective relationship, and providing a more accurate and realistic stereoscopic panoramic immersive experience.

[0045] Example 1

[0046] This embodiment provides a method for real-time homography correction and projection of immersive stereoscopic panoramic video. The flowchart is as follows: Figure 1 As shown, the following steps are included:

[0047] S1. Use an image acquisition device to capture images and generate a panoramic image. The image acquisition device includes a panoramic camera array. Calibrate the internal and external parameters of the cameras in the panoramic camera array to obtain the internal parameter matrix of all cameras. Select any camera as a standard reference camera, recorded as the first camera, select an adjacent camera of the first camera as the second camera, and obtain the relative external parameter matrix of the second camera. Calculate the external parameter matrix of the first camera, and obtain the external parameter matrix of the second camera according to the relative external parameter matrix.

[0048] S2, selecting any point in the projection process of the second camera, and establishing the homogeneous coordinates of the point, calculating the ratio of the depth value of the point in the second camera coordinate system and the virtual correction camera coordinate system of the second camera, and the radius of the viewing ring, performing homography correction on the second camera, the corrected camera is a virtual correction camera, and calculating the intrinsic parameter matrix of the virtual correction camera;

[0049] S3, performing discrete preset homography correction according to the correction effect, determining the angle between the user's sight line direction and the horizontal direction, dividing the panoramic image into several equal parts, calculating discrete values ​​of the angle under the several equal parts, calculating the extrinsic parameter matrix of the virtual correction camera, and obtaining the homography matrix of the virtual correction camera, thereby obtaining the corresponding relationship between the several equally divided panoramic images and the panoramic camera array and the resolution video;

[0050] S4. According to the corresponding relationship, correct the image pixels and project the image to obtain a mapping relationship of the pixels after homography correction and a corrected image set, render the corrected image set, and display it on the panoramic camera array to form a stereoscopic panoramic video.

[0051] Specifically, the calculating the extrinsic parameter matrix and the relative extrinsic parameter matrix of the first camera, and obtaining the extrinsic parameter matrix of the second camera according to the relative extrinsic parameter matrix, specifically includes the following contents:

[0052] The relative extrinsic parameter matrix is ​​an extrinsic parameter matrix between two adjacent cameras, and the extrinsic parameter matrix of the second camera is equal to the product of the extrinsic parameter matrix of the first camera and the relative extrinsic parameter matrix.

[0053] Specifically, when the stereoscopic panoramic video is mainly used to observe distant scenes, the depth ratio is equal to 1; when the stereoscopic panoramic video is mainly used to observe indoor and near scenes, the depth ratio is greater than 1.

[0054] Specifically, the discrete preset homography correction is performed according to the correction effect, the angle between the user's sight line direction and the horizontal direction is determined, the panoramic image is divided into several equal parts, and the discrete values ​​of the angle under the several equal parts are calculated, which specifically includes the following contents:

[0055] A discrete preset homography correction is performed according to the correction effect, and the panoramic image is divided into several equal parts according to angles. When the user's line of sight is in the mth divided space, the discrete value of the angle is equal to the quotient of 360° and the equal fraction, multiplied by the difference between m and 0.5.

[0056] Specifically, calculating the extrinsic parameter matrix of the virtual correction camera and obtaining the homography matrix of the virtual correction camera specifically includes the following contents:

[0057] The homography matrix is ​​equal to the product of the virtual correction camera intrinsic parameter matrix, the virtual correction camera extrinsic parameter matrix, the inverse matrix of the camera extrinsic parameter matrix, and the inverse matrix of the camera intrinsic parameter matrix.

[0058] Specifically, when calculating the homography matrix, the intrinsic parameter matrix of the virtual correction camera is equal to the intrinsic parameter matrix of the camera.

[0059] Specifically, when the image pixels are corrected and the image is projected, when the corrected image is projected onto an equidistant cylindrical surface, the mapping relationship of the pixels is calculated by an equidistant cylindrical projection algorithm.

[0060] Specifically, the radius of the projected cylindrical surface must satisfy:

[0061] R=nx / 2π, R is the radius of the projected cylindrical surface, n is the total number of cameras, and x is the width of a single camera screen.

[0062] At the same time, x = v·f x , v is the length of the resolution of a single camera image, f x is the actual distance corresponding to each pixel in the x-axis direction. In this embodiment, setting R equal to the focal length of the camera is essentially equivalent to scaling the calculation of the above process by a k-scale factor, that is, R = k·(nx / 2π) = f x .

[0063] This embodiment corrects the visual deviation problem, provides the user with a correct viewpoint perspective relationship, and provides a more accurate and realistic stereoscopic panoramic immersive experience.

[0064] The methods described in the present invention are applicable to stereoscopic panoramic video correction of different camera array configurations. In order to describe the implementation process clearly and specifically, a ten-eye equiangular distance camera configuration (such as Figure 2 Taking the example of FIG. 1 as shown, the technical solution and process are described in detail.

[0065] For the above ten-eye camera model, according to the annular projection theory, the right half plane pixels of all camera images are taken and stitched together in sequence to form a panoramic image of the left eye, as shown in Figure 3 As shown; take the left half plane pixels of all camera imaging and stitch them together in sequence to form a panoramic image for the right eye, as shown Figure 4 As shown; Figure 3 In the figure, each right triangle represents a virtual representation of half of the camera imaging. The two right-angled sides that are far away from the observation center are the imaging surface, and their length is 1 / 2 of the complete imaging surface of the camera; the side close to the center is the camera optical axis direction, and its length is equal to the camera focal length f.

[0066] The homography correction process of the right panorama is as follows: Figure 3 As shown in the figure, the smaller white circle is the visual circle, and the larger one is the optical center circle of the camera. Assume that the angle between the user's line of sight and the horizontal direction is θ. According to the principle of annular projection, the right eye position E R The right tangent point (the left tangent point is the left eye) of the user's visual focus point to the visual circle. Taking the 3R camera as an example, the camera imaging surface is L3R3, corresponding to the optical center O of the 3R camera. C3 However, when the user is watching in a VR device, the actual right eye position should be ER , whose position is similar to O C3 The misalignment leads to differences in viewpoint position, and the line of sight direction is different from the 3R camera optical axis (O C3 The non-parallelism of the camera surface L3R3 leads to the difference in viewing direction. The above two differences will change the perspective relationship of the picture. If not corrected, it will affect the user's perception of the panoramic stereoscopic space. Therefore, it is necessary to use the homography matrix to correct the camera imaging surface L3R3 to the viewing center E R After homography correction is performed on all cameras, the imaging planes of the original 10 cameras (outside the light gray area) will be changed to the virtual imaging plane shown in the dark area in the figure.

[0067] Considering the limited field of view (FOV) of VR devices, only some of the images of the calibrated cameras can be seen in actual applications. The number of cameras to be calibrated in actual applications can be adjusted according to the FOV. However, in order to fully explain the process here, all cameras are calibrated.

[0068] In a preferred embodiment, a method for real-time homography correction and projection of immersive stereoscopic panoramic video comprises the following steps:

[0069] S1. Use an image acquisition device to capture images and generate a panoramic image. The image acquisition device includes a panoramic camera array. Calibrate the internal and external parameters of the cameras in the panoramic camera array to obtain the internal parameter matrix of all cameras. Select any camera as a standard reference camera, recorded as the first camera, select an adjacent camera of the first camera as the second camera, and obtain the relative external parameter matrix of the second camera. Calculate the external parameter matrix of the first camera, and obtain the external parameter matrix of the second camera according to the relative external parameter matrix.

[0070] Calibrate the internal and external parameters of the N cameras in a specific panoramic camera array to obtain the internal parameter K of the jth camera. ij , relative to the external parameter K o(j,j+1) . Where K o(j,j+1) Refers to the relative external parameter between two adjacent cameras j and j+1;

[0071] The i-th camera is selected as the standard reference camera, and the camera’s position relative to the observation center ( Figure 2 Midpoint O c )’s ideal external parameter K oi , using the formula K oi ·K o(i,i+1) =K o,i+1 , the relative external parameter matrix K can be obtained by N calibrations in turn o(j,j+1) Find the jth camera relative to the observation center O c The external parameter K oj So far, for the jth camera, its internal parameter K has been calculated.ij , external reference K oj ;

[0072] S2, selecting any point in the projection process of the second camera, and establishing the homogeneous coordinates of the point, calculating the ratio of the depth value of the point in the second camera coordinate system and the virtual correction camera coordinate system of the second camera, and the radius of the viewing ring, performing homography correction on the second camera, the corrected camera is a virtual correction camera, and calculating the intrinsic parameter matrix of the virtual correction camera;

[0073] For the jth camera, consider the pixel relationship in its projection process. Analyze a point P in the real world, and assume that its homogeneous coordinates in world coordinates are [X w , Y w , Z w , 1] T , depth, that is, the Z-axis distance from the camera optical center in the camera coordinate system is Z cj The pixel homogeneous coordinates of the original camera image are X j =[u,v,1] T , homogeneous pixel coordinates after homography correction X jh =[u h , v h , 1] T , the camera intrinsic parameter matrix is ​​K ij , the external parameter matrix is ​​K oj According to the camera imaging principle:

[0074]

[0075] Similarly, the homography correction process is regarded as the j'th virtual correction camera imaging at the right eye, and the depth of point P is Z cj’ , the virtual correction camera internal parameter matrix is ​​K ij’ , the external parameter matrix is ​​K oj’ ;

[0076]

[0077] Then we get:

[0078]

[0079] By setting the depth ratio c to:

[0080]

[0081] Then we have:

[0082]

[0083] The above formula is the pixel (uh ,v h ) and the original camera pixel (u,v). In this formula, c is the depth ratio of point P in the two camera coordinate systems, and H is the homography matrix. The following analyzes these two important parameters and describes the implementation method in the patent.

[0084] c is the depth ratio, which is determined by the viewing ring, the camera optical center circle, and the depth of the observed object. The diameter of the viewing ring is generally selected from the human pupil distance (about 60-65cm). The camera optical center circle (or actual camera position) of the mainstream panoramic camera model is generally slightly larger than the viewing ring.

[0085] Therefore, c can be determined as follows: (1) In videos or real-time applications that mainly observe distant scenes, the distance between the observed object point P and the optical center of the specific camera and its virtual correction camera is much larger than the difference between the two, so c≈1 can be taken; (2) In videos or real-time applications that mainly observe indoor and close-up objects, the c value is slightly larger than 1, and Z in the application scenario can be estimated based on the actual observation distance and camera configuration. cj , Z cj’ The value of is used to find c.

[0086] Among the four camera matrices H obtained by multiplication, the corrected camera intrinsic parameter K ij , external reference K oj Obtained by calibration calculation, the virtual correction camera internal parameter K ij’ It can be set according to needs, generally K ij’ =K ij The above three matrices will not change when the VR user's perspective changes, but the virtual correction camera external parameter K oj’ It will change as the user's perspective changes. Figure 4 As shown in the figure, assuming that the angle between the user's line of sight and the horizontal is θ, and the diameter of the viewing ring is 2r, then:

[0087]

[0088] Therefore, H will change with the user's line of sight direction θ, which is recorded as H=H(θ).

[0089] Therefore, the relationship between each corrected pixel and the original camera imaging pixel is calculated by formula (5) using c and H(θ), and the set of images after correction of N cameras is recorded as Image_H(θ). The schematic diagram of the change of the corrected image Image_H(θ) according to the change of θ is as follows Figure 5 , Figure 6 Considering the requirement of equidistance in VR projection, Image_H(θ) can be further projected onto an equidistant cylindrical surface (as shown in Figure 5The black dotted circle shows the obtained Image_H'(θ) for VR display. The cylindrical surface of Image_H'(θ) is as follows Figure 5 , Figure 6 The middle dark black dotted circle shows that its radius can be freely set according to needs (in the figure, it is consistent with the focal length f' of the virtual correction camera), and the center of the circle is the right eye E R , the center of the circle changes position as θ changes.

[0090] S3, performing discrete preset homography correction according to the correction effect, determining the angle between the user's sight line direction and the horizontal direction, dividing the panoramic image into several equal parts, calculating discrete values ​​of the angle under the several equal parts, calculating the extrinsic parameter matrix of the virtual correction camera, and obtaining the homography matrix of the virtual correction camera, thereby obtaining the corresponding relationship between the several equally divided panoramic images and the panoramic camera array and the resolution video;

[0091] For each pixel correction, the H(θ) corresponding to the current θ must be calculated by formula (4), and each pixel must be corrected by formula (5) to obtain Image_H(θ). Therefore, for N cameras and T×S resolution videos (or images), each θ needs to calculate N×T×S times of formula (4) and formula (5). For high-definition images or video streams, the amount of calculation when θ changes is huge, which makes it difficult to meet the real-time requirements. To address this problem, the strategy of "discrete preset homography correction" is used. The execution method of this strategy is as follows: the omnidirectional 360° space is divided into M equal parts according to the angle. When the user's line of sight is in the mth divided space, real-time θ acquisition is not performed, but the median is used instead.

[0092]

[0093] That is, M discrete values ​​θ m Instead of the continuous value θ, the homography matrix is ​​calculated Hm(θ)=H(θ m ). For the jth camera, the actual camera intrinsic parameter K ij , external reference K oj , preset c value, virtual correction camera internal parameter K ij’ , virtual correction camera external parameter K oj’ (θ m ), and substitute into formula (4) to obtain the homography matrix Hm(θ)=H(θ m ). For M θ m, the correspondence of N×T×S pixels can be calculated in advance, and then the M×N×T×S correspondences can be stored in the computer memory using an array (or other computer storage form) Q. A reasonable M value can be selected according to the specific requirements of computer memory size, processing efficiency, and correction effect. Generally, a good correction effect can be obtained when M=180. If the space requirement for storing Q cannot be met due to small memory, the value of M can be appropriately reduced.

[0094] At this time, there is no need to calculate the corresponding relationship in the VR projection process. The interval where θ is located can be directly determined and the corresponding relationship can be directly read from Q to solve the pixel position after homography correction, that is:

[0095]

[0096] The corrected image Image_H(θ) needs to be projected onto an equidistant cylindrical surface (such as Figure 5 The black dotted circle shows the pixel correspondence relationship.

[0097]

[0098] A represents a certain mapping relationship, which is determined by the equidistant cylindrical projection algorithm adopted by the user. If the "discrete preset homography correction" strategy is adopted to achieve real-time application, formula (8) and formula (9) can be combined to obtain the mapping relationship B:

[0099]

[0100] S4. According to the corresponding relationship, correct the image pixels and project the image to obtain a mapping relationship of the pixels after homography correction and a corrected image set, render the corrected image set, and display it on the panoramic camera array to form a stereoscopic panoramic video.

[0101] At this time, the M×N×T×S mapping relationships B are stored in Q, and the same steps can be followed to achieve fast correction projection.

[0102] In a preferred embodiment, Figure 7 As shown, the present invention also provides an immersive stereoscopic panoramic video real-time homography correction and projection device, comprising:

[0103] The calibration module 10 is used to generate a panoramic image by taking an image using an image acquisition device, wherein the image acquisition device includes a panoramic camera array, calibrate the internal and external parameters of the cameras in the panoramic camera array, and obtain the internal parameter matrix of all cameras; select any camera as a standard reference camera, recorded as the first camera, select an adjacent camera of the first camera as the second camera, and obtain the relative external parameter matrix of the second camera; calculate the external parameter matrix of the first camera, and obtain the external parameter matrix of the second camera according to the relative external parameter matrix;

[0104] A calculation module 20 is used to select any point in the projection process of the second camera, and establish the homogeneous coordinates of the point, calculate the ratio of the depth value of the point in the second camera coordinate system and the virtual correction camera coordinate system of the second camera, and the radius of the viewing ring, perform homography correction on the second camera, the corrected camera is a virtual correction camera, and calculate the intrinsic parameter matrix of the virtual correction camera;

[0105] The correction module 30 is used to perform discrete preset homography correction according to the correction effect, determine the angle between the user's sight line direction and the horizontal direction, divide the panoramic image into several equal parts, calculate the discrete values ​​of the angle under the several equal parts, calculate the extrinsic parameter matrix of the virtual correction camera, and obtain the homography matrix of the virtual correction camera, and then obtain the corresponding relationship between the several equally divided panoramic images and the panoramic camera array and the resolution video;

[0106] The projection module 40 is used to correct the image pixels according to the corresponding relationship and project the image to obtain the mapping relationship of the pixels after homography correction and the corrected image set, render the corrected image set, and display it on the panoramic camera array to form a stereoscopic panoramic video.

[0107] In summary, the present invention provides an immersive stereoscopic panoramic video real-time homography correction and projection method, which takes the depth influence of the real observed object or scene into consideration in the calculation process in the form of a ratio, and the depth ratio can be preset or adjusted according to the actual situation. The depth affects the binocular parallax in the stereoscopic panoramic projection model, and the left eye and right eye panoramic images displayed in the VR in the stereoscopic panoramic video are homographically corrected in real time according to the head rotation angle of the user watching the panoramic video in VR, thereby correcting the visual deviation problem, providing the user with the correct viewpoint perspective relationship, and providing a more accurate and realistic stereoscopic panoramic immersive experience.

[0108] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A real-time homography correction and projection method for immersive stereoscopic panoramic video. It is characterized in that The following steps are involved: An image is captured by an image acquisition device to generate a panoramic image, wherein the image acquisition device includes a panoramic camera array, and the internal and external parameters of the cameras in the panoramic camera array are calibrated to obtain the internal parameter matrix of all cameras; one camera is selected as a standard reference camera, which is recorded as a first camera, and an adjacent camera of the first camera is selected as a second camera to obtain a relative external parameter matrix of the second camera; the external parameter matrix of the first camera is calculated, and the external parameter matrix of the second camera is obtained according to the relative external parameter matrix; Select any point in the projection process of the second camera, and establish the homogeneous coordinates of the point, calculate the depth ratio of the point in the second camera coordinate system and the virtual correction camera coordinate system of the second camera, and the radius of the viewing ring, perform homography correction on the second camera, the corrected camera is the virtual correction camera, and calculate the intrinsic parameter matrix of the virtual correction camera; Performing discrete preset homography correction according to the correction effect, determining the angle between the user's sight line direction and the horizontal direction, dividing the panoramic image into several equal parts, calculating discrete values ​​of the angle under the several equal parts, calculating the extrinsic parameter matrix of the virtual correction camera, and obtaining the homography matrix of the virtual correction camera, thereby obtaining the corresponding relationship between the several equally divided panoramic images and the panoramic camera array and the resolution video; According to the corresponding relationship, the image pixels are corrected and the image is projected to obtain a mapping relationship of the pixels after homography correction and a corrected image set, and the corrected image set is rendered and displayed on the panoramic camera array to form a stereoscopic panoramic video.

2. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 1, It is characterized in that The calculating the extrinsic parameter matrix and the relative extrinsic parameter matrix of the first camera, and obtaining the extrinsic parameter matrix of the second camera according to the relative extrinsic parameter matrix specifically includes the following contents: The relative extrinsic parameter matrix is ​​an extrinsic parameter matrix between two adjacent cameras, and the extrinsic parameter matrix of the second camera is equal to the product of the extrinsic parameter matrix of the first camera and the relative extrinsic parameter matrix.

3. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 1, It is characterized in that When the stereoscopic panoramic video is mainly used to observe distant scenes, the depth ratio is equal to 1; when the stereoscopic panoramic video is mainly used to observe indoor and close scenes, the depth ratio is greater than 1.

4. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 1, It is characterized in that The radius of the visual ring is half of the user's pupil distance.

5. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 1, It is characterized in that The discrete preset homography correction is performed according to the correction effect, the angle between the user's sight line direction and the horizontal direction is determined, the panoramic image is divided into several equal parts, and the discrete values ​​of the angle under the several equal parts are calculated, which specifically includes the following contents: A discrete preset homography correction is performed according to the correction effect, and the panoramic image is divided into several equal parts according to angles. When the user's line of sight is in the mth divided space, the discrete value of the angle is equal to the quotient of 360° and the equal fraction, multiplied by the difference between m and 0.

5.

6. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 1, It is characterized in that Calculating the extrinsic parameter matrix of the virtual correction camera and obtaining the homography matrix of the virtual correction camera specifically includes the following contents: The homography matrix is ​​equal to the product of the intrinsic parameter matrix of the virtual correction camera, the extrinsic parameter matrix of the virtual correction camera, the inverse matrix of the extrinsic parameter matrix of the camera, and the inverse matrix of the intrinsic parameter matrix of the camera.

7. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 6, It is characterized in that When calculating the homography matrix, the intrinsic parameter matrix of the virtual correction camera is equal to the intrinsic parameter matrix of the camera.

8. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 1, It is characterized in that In correcting the image pixels and projecting the image, when the corrected image is projected onto an equidistant cylindrical surface, the mapping relationship of the pixels is calculated by an equidistant cylindrical projection algorithm.

9. The method for real-time homography correction and projection of immersive stereoscopic panoramic video according to claim 8, It is characterized in that The radius of the projected cylinder must satisfy: R=nx / 2π, R is the radius of the projected cylindrical surface, n is the total number of cameras, and x is the screen width of a single camera.

10. A real-time homography correction and projection device for immersive stereoscopic panoramic video. It is characterized in that include: A calibration module is used to generate a panoramic image by taking an image using an image acquisition device, wherein the image acquisition device includes a panoramic camera array, and calibrate the internal and external parameters of the cameras in the panoramic camera array, select any camera as a standard reference camera, recorded as a first camera, select an adjacent camera of the first camera as a second camera, and obtain an internal parameter matrix and a relative external parameter matrix of the second camera; calculate the external parameter matrix and the relative external parameter matrix of the first camera, and obtain the external parameter matrix of the second camera according to the relative external parameter matrix; a calculation module, used to select any point in the projection process of the second camera, establish the homogeneous coordinates of the point, calculate the depth ratio of the point in the coordinate systems of the first camera and the second camera, and the radius of the viewing ring, perform homography correction on the second camera, the corrected camera is a virtual correction camera, and calculate the intrinsic parameter matrix of the virtual correction camera; A correction module, used to perform discrete preset homography correction according to the correction effect, determine the angle between the user's sight line direction and the horizontal direction, divide the panoramic image into several equal parts, calculate the discrete values ​​of the angle under the several equal parts, calculate the extrinsic parameter matrix of the virtual correction camera, and obtain the homography matrix of the virtual correction camera, and then obtain the corresponding relationship between the several equally divided panoramic images and the panoramic camera array and the resolution video; The projection module is used to correct the image pixels according to the corresponding relationship and project the image to obtain the mapping relationship of the pixels after homography correction and the corrected image set, render the corrected image set, and display it on the panoramic camera array to form a stereoscopic panoramic video.