Method for changing perspective relation of 3D shooting

By resetting the camera viewpoint and focal length, and using image and depth data to perform perspective transformation, we solve the problem of abnormal perspective in VR with mid-telephoto lenses and ToF cameras and perspective deformation in mobile phone selfies, and achieve distant close-ups and mobile phone selfies in VR. The best perspective effect improves the image quality of 3D shooting.

CN118660146APending Publication Date: 2024-09-17JIANGSU XUANWEI IMAGING TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202210913109.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-08-01
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In existing 3D shooting technology, medium and telephoto lenses have abnormal perspective problems in VR near-eye display, causing user discomfort; when the front camera of a mobile phone takes a selfie, the distance is too close, causing perspective deformation, affecting the beauty of the photo; ToF cameras in 3D image reconstruction Insufficient precision to meet the detail requirements of close-up objects.

Method used

By resetting the camera viewpoint and focal length, using image data and depth data for perspective transformation, calculating new left and right parallax images, automatic interpolation or AI to supplement the missing pixels, combining the binocular ranging algorithm to calculate the depth image, resetting the camera viewpoint and Focal length renders a new perspective relationship and solves the problems of abnormal perspective and flatness.

Benefits of technology

It achieves comfortable perspective for close-ups of long-range targets in VR, improves the three-dimensional sense and image quality of 3D shooting, solves the problem of perspective deformation of mobile phone selfies, and provides the best 2D and 3D photos or videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660146A
    Figure CN118660146A
Patent Text Reader

Abstract

The invention discloses a method for changing a perspective relationship between a 3D shot image and a video, which comprises the following steps of: resetting a viewpoint and a shooting distance of a camera, calculating new left and right parallax images through perspective transformation according to image data and depth data, and automatically interpolating or supplementing missing pixels in the parallax images by AI (Artificial Intelligence). By reconstructing the perspective relation of the 3D image, the abnormal perspective problem of near-to-eye display of the parallax 3D image of the medium and long-focus lens is solved, and a feasible method is provided for realizing near-to-eye immersive display of a 3D close-up lens of a distant-view target in VR; the problems of abnormal perspective and insufficient stereoscopic impression during near-to-eye display of 3D images of a medium and long-focus lens and a ToF camera are solved, the camera equipped with the ToF module is compact in structure and convenient to carry, and the convenience of 3D shooting is greatly improved; the problem of excessive deformation caused by too short selfie distance of the mobile phone is solved, and optimal perspective 2D and 3D photos or videos can be provided for mobile phone users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The present invention relates to a method for changing a 3D shooting perspective relationship, and more particularly to a method for resetting a viewpoint position and a focal length to render a 3D image and a video. Background technology:

[0002] The perspective relationship of photos and videos is determined when they are taken. The perspective is only related to the position of the camera's viewpoint, or the shooting distance, and has nothing to do with the focal length.

[0003] CN201210121855 discloses an automatic adjustment system for shooting parameters of a 3D stereo camera device, which can shoot global 3D panoramic videos at a wide angle and record local close-up 3D video images at a long focal length; CN202011413002 discloses a dual-focal-length video shooting, processing and display method, which can shoot and record wide-angle, medium-focus and long-focus 3D videos. On near-eye 3D display devices such as VR head-mounted displays, local close-up shots taken with medium- and long-focus lenses have a serious sense of flatness due to insufficient parallax, and when the parallax is sufficient, there is an abnormal perspective of small near and large far, causing discomfort to users. The shooting of medium- and long-focus 3D close-up shots, especially VR near-eye display, is currently a difficult problem to solve. When a close-up shot is needed in near-eye display, it can often only be achieved by shooting at close range with a wide-angle lens.

[0004] When mobile phone users take selfies with the front camera, the camera is too close, resulting in obvious perspective distortion, and the nose is too big and the face looks fat, affecting the overall beauty. Studies have shown that if you want to take a portrait without distorting facial features, 1.5m is the best distance. The photos taken at this distance are basically the same as what is actually observed, while the nose is about 30% larger when the shooting distance is 30cm. Obviously, it is difficult to take a selfie at a distance of 1.5m, unless you use a selfie stick, but even so, the face part of the photo taken at this time is too small, resulting in insufficient facial clarity. Summary of the invention:

[0005] The present invention discloses a method for changing the perspective relationship of 3D captured images and videos, by resetting the viewpoint and shooting distance of the camera, using image data and depth data to calculate new left and right parallax images through perspective transformation, and automatically interpolating or AI to supplement the missing pixels in the parallax image. The depth data can be directly taken by a ToF camera, or it can be a set of parallax images taken by 3D, and the left and right view depth images are calculated by a binocular ranging algorithm. ToF is the abbreviation of Time-of-Flight, which is a group of infrared laser pulses that are invisible to the human eye. After encountering an object, they are reflected back to the camera, and the time difference or phase difference from emission to reflection back to the camera is calculated, and the data is collected to form a set of depth data of the marked distance, so as to establish an imaging technology of a 3D model. The viewpoint in the specification represents the camera framing position for shooting or rendering photos.

[0006] The purposes of the present invention are: 1. reconstructing the perspective relationship of 3D images, solving the abnormal perspective problem of small near and large far when close-up of distant subjects photographed by medium-long focal length lenses with large parallax is displayed in 3D, which is particularly serious when VR is displayed near the eye; 2. reconstructing the perspective relationship of 3D images, solving the abnormal perspective problem or flatness problem caused by insufficient stereo when distant 3D subjects photographed by medium-long focal length lenses and ToF cameras are displayed near the eye; 3. reconstructing the perspective relationship of selfie photos, solving the problem of excessive perspective deformation caused by the front camera of a mobile phone due to the close selfie distance, and outputting 2D and 3D photos or videos with the best perspective.

[0007] One of the methods to obtain depth images is to directly provide them from a ToF camera, but the accuracy of its depth data is not enough to meet the needs of 3D image reconstruction of close-up objects such as faces and body details taken by medium and long focal length cameras. AI can identify and judge the posture and angle of the target object based on image data and depth information, and automatically fill in the matching depth to replace the original value. The matching depth value is allowed to contain a large error. For example, for a face, AI identifies the face angle based on the feature points and depth information on the face image, and replaces the original value with the depth that matches the face model angle.

[0008] The second method of acquiring the depth image is to use a set of parallax images taken by 3D to calculate the left and right view depth images respectively through the binocular ranging algorithm. The calculation process of binocular stereo depth is as follows:

[0009] a) Left and right view binocular correction, the two images are strictly aligned in the horizontal direction, so that the epipolar lines of the two images are exactly on the same horizontal line;

[0010] b) Image pixel matching: any point on one image has the same row number as its matching point on another image, and only one-dimensional search is required on that row to match the corresponding point;

[0011] c) Calculate the depth of each pixel based on the matching results to obtain the left and right view depth maps.

[0012] There are two ways to render the left and right views and create a new perspective relationship for the 3D image: first, set the new camera viewpoint position, target object distance, and focal length according to the perspective requirements, input image data and depth data, and use the linear perspective transformation formula to calculate the new left and right views to supplement the missing pixels in the new image; second, input image data and depth data, build a 3D model, reset the camera's viewpoint and focal length, and render new left and right views. During the rendering process, the light source is not reset and the color of the target object surface of the 3D modeling is not changed. Obviously, direct perspective transformation does not require the 3D modeling process and has higher efficiency.

[0013] The image data C and the image depth data z are collected and aligned synchronously. The depth image provides the three-dimensional coordinates (x, y, z) of the target surface point in the perspective direction of the optical axis Z axis, where x and y are the depth image pixel coordinates, and the depth image pixel value z is the Z axis coordinate. A point on the surface of the target object in the 3D space XYZ coordinate system is represented by T(x, y, z, C), and C(r, g, b) represents the color value of the pixel point. The continuity of the pixel color C(r, g, b) in the color image is combined with the continuity of the depth image z value to determine and mark the boundary line of the target object in the color image and the depth image, and the holes and noise caused by the missing data in the depth image are repaired and filtered. The accurate calibration of the boundary line of the target object, especially the boundary line of the target object with front and back occlusion relationship, is very important for improving the quality of 3D modeling or directly transforming high-quality 3D images.

[0014] A 3D model containing the surface color information of the target object can be established by T(x, y, z, C). The model surface can be quickly reconstructed through three adjacent points in space, and the model surface can be mapped through image data to restore the true color and texture of the object surface. A new camera viewpoint is set in the main view direction of the 3D model, that is, in the vicinity of the original shooting optical axis direction, and the appropriate distance, lens optical axis direction and focal length are determined to render a new perspective image. If the two camera viewpoints set have horizontal parallax, a 3D image with a new perspective relationship can be obtained after rendering, and the stereoscopic sense of the 3D image can be enhanced by increasing the parallax.

[0015] The method of directly transforming the left and right parallax images without 3D modeling is more efficient and suitable for perspective reconstruction of 3D videos. The data of the depth 3D image T (x, y, z, C) can be directly taken by a camera with ToF function, or it can be calculated by a binocular ranging algorithm using a 3D image taken by parallax. Figure 7As shown, the 2D image mapped after changing the viewpoint is P1(x1, y1, C), and the transformation formula is:

[0016] x1=x0*(1-z0 / v0) / (1-z0 / v1)

[0017] y1=y0*(1-z0 / v0) / (1-z0 / v1)

[0018] Where (x0, y0) is the position coordinate of the pixel point P0 of the 2D image before the perspective transformation, (x1, y1) is the position coordinate of the pixel point P1 of the 2D image after the perspective transformation, z0 is the depth data of the pixel point of the 2D image before the transformation, recorded in the 3D image pixel T0 (x0, y0, z0, C0), v0 is the camera viewpoint distance before the transformation, v1 is the camera viewpoint distance preset by the perspective transformation, and C is the pixel color, represented by (r, g, b).

[0019] The same viewing distance, non-coaxial parallax displacement transformation is as follows Figure 5 As shown in the figure, the parallax of the two viewpoints is d, the viewing distance is v1, and the 2D image transformed by displacement is recorded as P2(x2, y2, C). Based on the image P1(x1, y1, C), only the horizontal translation transformation of pixels is performed. The formula is:

[0020] x2=x1+d*z0 / (v1-z0)

[0021] y2=y1

[0022] The above formula and Figure 7 The descriptions do not consider the case where the depth is negative. Based on different zero reference planes, the depth data of the 3D image is different, and there are some differences in the perspective transformation and parallax displacement formulas, but the final perspective images are the same. During the image transformation process, there will be multiple different pixel values ​​in the same position. The pixel value with the largest and most forward z value is selected to fill the position; if there are valueless blank points in the continuous area of ​​the transformed image, they are filled by interpolation based on the surrounding continuous points; the valueless blank areas that appear at the discontinuous boundaries of the target object are automatically filled or AI filled according to the preset scheme. Description of the drawings:

[0023] Figure 1 Flowchart of perspective transformation of telephoto far viewpoint parallax 3D image into wide-angle near viewpoint parallax 3D image

[0024] Figure 2 Flowchart of perspective transformation of long-focus far-viewing point depth 3D image into wide-angle near-viewing point 3D parallax image

[0025] Figure 3 Flowchart of perspective transformation of wide-angle near-viewing point depth 3D image into optimal perspective 2D and 3D image

[0026] Figure 4 Schematic diagram of the viewpoint position of telephoto parallax 3D shooting and the wide-angle near viewpoint position preset by perspective transformation

[0027] Figure 5 Schematic diagram of the viewpoint position of telephoto depth 3D shooting and the wide-angle near viewpoint position preset by perspective transformation

[0028] Figure 6 Schematic diagram of the viewpoint position for wide-angle depth 3D shooting and the optimal viewpoint position preset by perspective transformation

[0029] Figure 7 Schematic diagram of coaxial perspective transformation of viewpoints at different distances

[0030] The diagram numbers in the above drawings are:

[0031] 1 The target object being photographed, 2 The right viewpoint telephoto lens, 3 The left viewpoint telephoto lens, 4 The horizontal field of view of the camera, 5 The optical axis of the camera lens, 6 The coaxial wide-angle camera preset by the perspective transformation, 7 The non-coaxial wide-angle camera preset by the perspective transformation, 8 The telephoto lens of the depth 3D camera, 9 The ToF lens of the depth 3D camera, 10 The horizontal field of view of the ToF lens, 11 The wide-angle lens of the depth 3D camera, 12 The coaxial medium-focus camera preset by the perspective transformation, 13 The non-coaxial medium-focus camera preset by the perspective transformation, 15 The 2D image plane, 16 The viewpoint when the camera is shooting, 17 The spatial pixel point T0 (x0, y0, z0, C0) of the depth 3D image, 18 The coaxial viewpoint preset by the perspective transformation, 19 The pixel point P0 of the 3D pixel point T0 on the 2D image from the perspective of the V0 viewpoint, 20 The pixel point P1 of the 3D pixel point T0 on the 2D image from the preset V1 viewpoint.

[0032] The present invention solves the problem of abnormal perspective when 3D images with parallax of medium and long focal length lenses are displayed near the eye by reconstructing the perspective relationship of 3D images, and provides a feasible method for realizing immersive near-eye display of 3D close-up shots of distant targets in VR; the present invention solves the problems of abnormal perspective and insufficient stereoscopic sense when 3D images with medium and long focal length lenses and ToF cameras are displayed near the eye, and the camera equipped with ToF module has a compact structure and is easy to carry, which greatly improves the convenience of 3D shooting; the present invention solves the problem of perspective deformation when the distance of mobile phone selfie is too close, and can provide mobile phone users with 2D and 3D photos or videos with the best perspective. Specific implementation method:

[0033] Implementation case 1: Move the viewpoint closer and re-perspective transform the image to solve the abnormal perspective problem of large parallax 3D shooting with medium and long focal length lenses for near-eye display. The reason for the abnormal perspective of small near and large far is that the long-distance perspective is used during shooting, while the target object is at a close distance during near-eye 3D display, resulting in a perspective contradiction. The solution is to move the camera's viewpoint closer to the subject along the optical axis of the lens during the original shooting, and re-render the perspective image with a wide viewing angle, such as Figure 4 As shown in the figure, a comfortable perspective sense is achieved for the near-eye display of the target object. Rendering the perspective image along the original optical axis close to the subject can maintain the original parallax size and provide the best perspective rendering quality; non-coaxial rendering of the perspective image can also adjust the parallax size and stereoscopic sense of the 3D image as needed. The specific process of transforming the telephoto far-viewing point parallax 3D image into the wide-angle near-viewing point parallax 3D image is as follows: Figure 1 shown.

[0034] Implementation case two: move the viewpoint closer and re-perspectively transform the image to solve the problem of abnormal perspective or insufficient stereoscopic effect in near-eye display when shooting 3D with medium and long focal length lenses and ToF cameras. The depth data provided by the ToF camera is not accurate enough to meet the 3D modeling or perspective transformation of important details of the target object, such as face and limbs. AI can identify and judge the type and posture angle of the target object based on the image and depth data, and replace the original value with a pre-set depth that matches it. It is allowed for the depth value used for replacement to contain large errors, and the brain's subjective stereoscopic vision will automatically correct some errors. Move the camera's viewpoint closer to the subject along the optical axis of the lens during the original shooting, re-render the perspective image with a wide viewing angle, and set another viewpoint with horizontal parallax, the same viewing distance, and non-coaxial to render another view, which together serve as the left and right views of the 3D image, such as Figure 5 As shown in FIG. 1 , the target object near the eye displays a normal perspective. The specific process of transforming the long-focus far-viewing point depth 3D image into the wide-angle near-viewing point 3D parallax image is as follows: Figure 2 shown.

[0035] Implementation case three, move the near viewpoint to about 1.5m away from the face and re-perspectively transform the image to solve the perspective distortion caused by the close distance of the mobile phone selfie. The front camera of the mobile phone includes a wide-angle lens and a ToF lens. The wide-angle lens is mainly used for selfies and videos. The ToF lens simultaneously records the depth data of the image. The depth data can be used in 3D display, face recognition, 3D beauty, etc. A 3D model is established based on the selfie photos and depth data. The spatial position and color characteristics of the surface points of the 3D model are represented by T(x, y, z, C). Figure 6As shown in the figure, the camera viewpoint is moved about 1.5m away from the subject along the optical axis of the lens when taking a selfie, and the photo is re-rendered with a medium-focus perspective to solve the excessive deformation caused by the close shooting distance and obtain the best perspective 2D photo or video. At at least one viewpoint that is off the optical axis at a suitable distance, a 3D photo or video with parallax is rendered. The specific process is as follows Figure 3 shown.

[0036] The method of changing the perspective relationship of 3D shooting described in the present invention is very different from the method of establishing a 3D model by acquiring multi-view images and acquiring multi-view depth data in terms of purpose, method, scope of application and application effect. The fundamental purpose of the present invention is to change the perspective relationship. Only one photo is needed to establish a 3D model, and only the fineness and completeness of the main direction of the optical axis of the original photo are considered. It is not a 3D model that can be used in multiple directions as commonly said. More often, it is not necessary to establish a 3D model directly by perspective point transformation, and it has higher efficiency and better image quality. The quality of the new perspective point image obtained by the present invention is based on the application standard of ultra-high-definition photos or videos taken by professional cameras, which is different from the clarity and texture of the usual 3D modeling renderings.

Claims

1. A method for changing the perspective relationship of 3D captured images and videos, characterized in that: By resetting the camera's viewpoint and shooting distance, new left and right disparity images are calculated based on the image data and depth data through perspective transformation. The depth data can be directly taken by the ToF camera, or it can be a set of disparity images taken in 3D, and the left and right view depth images are calculated separately by the binocular ranging algorithm.

2. The method according to claim 1, further characterized in that: When the accuracy of the depth data provided by the ToF camera is not sufficient to satisfy the perspective transformation of the details of the target object in the 3D image, the AI ​​can identify and judge the posture angle of the target object based on the image data and depth data, and automatically fill in the depth value of the preset 3D model that matches the target object to replace the original value. The depth value of the matching 3D model is allowed to contain a large error. When the target object is a close-up of a face or body, the AI ​​matches the posture angle of the preset human body model based on the feature points of the face or body in the image and depth data, and replaces the value of the original area with insufficient depth resolution with the depth value of the model.

3. The method according to claim 1 or 2, further characterized in that: The image data C is synchronously collected and aligned with the image depth data z. The depth image provides the three-dimensional coordinates (x, y, z) of the target surface point in the Z-axis perspective direction of the camera optical axis, where x and y are the coordinates of the depth image pixel point, and the depth image pixel value z is the Z-axis coordinate. A pixel point on the target surface in the 3D space XYZ coordinate system is represented by T(x, y, z, C), and C(r, g, b) represents the color value of the pixel point. According to the continuity of the pixel color value C(r, g, b) in the color image and the continuity of the depth image z value, the boundary line of the target object in the color image and the depth image is judged and marked, and the holes and noise caused by missing data in the depth image are repaired and filtered.

4. The method according to claim 1 or 3, further characterized in that: In order to solve the abnormal perspective problem of distant target objects photographed with large parallax in 3D by medium-to-long focal length lenses in 3D display, especially VR near-eye display, where objects are small near and large far away, the camera's viewpoint is moved close to the target object along the optical axis of the lens during the original shooting, and the left and right views are re-perspectively transformed with a wide-angle view to reconstruct the perspective relationship of the 3D image, so that the target object has a normal sense of perspective and a good sense of immersion in VR near-eye display. The left and right views of the preset camera perspective transformation close to the target object along the original optical axis can maintain the original parallax size and obtain the best image quality.

5. The method according to claim 2 or 3, further characterized in that: In order to solve the problem of abnormal perspective or insufficient stereoscopic sense when the depth 3D images taken by medium- and long-focus cameras with ToF function are displayed near the eye, the preset camera viewpoint is close to the target object along the optical axis of the lens during the original shooting, and the perspective image is re-rendered with a wide-angle perspective. A new viewpoint with equal viewing distance, non-coaxiality, and horizontal parallax is set to render another view, which together serve as the left and right views of the 3D image.

6. The method according to claim 2 or 3, further characterized in that: The front camera of a mobile phone includes a wide-angle lens and a ToF lens. The wide-angle lens is mainly used for selfie photos and videos, and the ToF lens synchronously records the depth data of the image. In order to solve the perspective distortion caused by the close distance when taking selfies with the front camera of the mobile phone, the preset camera viewpoint is moved about 1.5m away from the face along the optical axis of the lens during selfie, and the selfie photo is re-rendered from the perspective of a medium-focus lens to obtain a 2D photo or video with the best perspective. At at least one viewpoint to the left and right of the preset camera viewpoint that deviates from the optical axis, another view is rendered with appropriate parallax to form a 3D photo or video.

7. The method according to claim 3, further characterized in that: According to the perspective requirements, the camera's new viewpoint position, target object distance, and focal length are set, image data and depth data are input, and the new left and right views are calculated using the linear perspective transformation formula to supplement the missing pixels in the new view. In the image transformation process, if there are multiple different pixel colors in the same position, select the pixel color value with the largest and most forward z value to fill in the position. If there are valueless blank points in the continuous area of ​​the transformed view, they are filled based on interpolation of the surrounding continuous points. For valueless blank areas at the discontinuous boundaries of the target object, they are automatically filled according to the preset plan or AI fills the image data according to the characteristics of the target object.

8. The method according to claim 2 or 3, further characterized in that: Image data and depth data are input, and a 3D model containing the surface color information of the target object is established by T(x, y, z, C). In the main view direction of the 3D model, that is, in the vicinity of the original shooting optical axis direction, a suitable distance, lens optical axis direction and focal length are selected, a new camera viewpoint is set, and new left and right perspective images are rendered. During the rendering process, the light source is not reset, and the color of the pixel points on the surface of the 3D model is not changed. By adjusting the horizontal distance between the left and right viewpoints, a stereoscopic, comfortable and more immersive 3D image can be obtained.

Citation Information

Cited By

  • XR head-mounted display video perspective method and system based on neural network

    CN120580390A