A method and system for eliminating parallax of multi-viewpoint images

By acquiring fixed-focus camera and wide-angle camera images from multiple viewpoints, performing dedistortion and weighted fusion, the parallax problem is solved, image splicing without misalignment and low distortion is achieved, and image quality and clarity are improved.

CN118301489BActive Publication Date: 2024-09-27SICHUAN NATIONAL INNOVATION VISION UHD VIDEO TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410447406.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-15
Publication Date
2024-09-27
Estimated Expiration
2044-04-15

Smart Images

  • Figure CN118301489B
    Figure CN118301489B
Patent Text Reader

Abstract

The present invention discloses a method and system for eliminating parallax of multi-viewpoint images, including obtaining first images of a target scene from different viewpoints, where there is no overlap between different viewpoints; the first image is acquired by multiple fixed-focus cameras placed at different positions; obtaining a second image of the target scene, where the second image is a panoramic image acquired by a wide-angle camera; performing dedistortion processing on the second image to obtain a reference image; and fusing the first image with the reference image to obtain a final image. The present invention has the beneficial effect of solving the parallax problem when images taken by cameras at different viewpoints are spliced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a method and system for eliminating parallax of multi-viewpoint images. Background Art

[0002] In the field of large-scene monitoring, there are generally two solutions for monitoring scenes with a large field of view. One is a solution similar to a compound eye camera or a panoramic camera. Multiple cameras are integrated inside a device, which is equivalent to all cameras being located at the same viewpoint. However, the image stitched by this solution has large distortion. Although anti-distortion algorithms can be added later, the image quality will be lost to a large extent. The other solution is to arrange all cameras in a distributed manner and place them at different viewpoints. This solution does not have distortion and the image quality after stitching is better, but the problem is that there is parallax between cameras at different viewpoints. The same object is photographed by different cameras at different positions, resulting in misalignment of the objects after stitching.

[0003] Therefore, the present invention proposes a method and system for eliminating parallax of multi-viewpoint images to solve the parallax problem when images taken by cameras at different viewpoints are stitched together. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for eliminating parallax of multi-viewpoint images, which solves the parallax problem when images taken by cameras at different viewpoints are stitched together.

[0005] The object of the present invention is to achieve a method for eliminating parallax of multi-viewpoint images through the following technical scheme, including: obtaining first images of a target scene from different viewpoints, where there is no overlap between the different viewpoints; the first images are acquired by a plurality of fixed-focus cameras placed at different positions;

[0006] Acquire a second image of the target scene, where the second image is a panoramic image acquired by a wide-angle camera;

[0007] performing a dedistortion process on the second image to obtain a reference image;

[0008] The first image is fused with the reference image to obtain a final image.

[0009] Furthermore, the first images include: a first viewpoint image P1, a second viewpoint image P2, an i-th viewpoint image Pi, ..., an n-th viewpoint image Pn, where n is the total number of first images.

[0010] Further, performing dedistortion processing on the second image to obtain a reference image includes:

[0011] S301: extracting corner point information on the second image;

[0012] S302: further extracting sub-pixel information according to the corner point information;

[0013] S303: calibrating the wide-angle camera according to the sub-pixel information to obtain a calibration result;

[0014] S304: Evaluate the calibration result using a reprojection error method to obtain a new calibration result;

[0015] S305: performing a dedistortion operation on the second image according to the new calibration result to obtain a reference image after the distortion is corrected.

[0016] Furthermore, the calibration result is obtained by calibrating the wide-angle camera in the calibrateCamera function to obtain the calibration result; the calibration result includes: an intrinsic parameter matrix, an extrinsic parameter matrix and a distortion coefficient of the wide-angle camera.

[0017] Furthermore, fusing the plurality of first images with the reference image to obtain a final image includes:

[0018] S401: Acquire an overlapping area between the first image and the reference image in the first image, the overlapping area on the first image is the first overlapping area L1, and the overlapping area on the reference image Q is the second overlapping area L2; acquire an overlapping area between the first image Pi and the reference image in the first image, the overlapping area on the first image Pi is the first overlapping area L1i, and the overlapping area on the reference image Q is the second overlapping area L2i;

[0019] S402: Calculate the clarity Lap of each pixel in the first overlap area L1i, and calculate the clarity Lap of each pixel in the second overlap area L2i w , the formula for calculating clarity is:

[0020] Lap(x,y)=Img(x+1,y)+Img(x,y+1)+Img(x-1,y)+Img(x,y-1)-4×Img(x,y)+C

[0021] Lap w (x,y)=Img w (x+1,y)+Img w (x,y+1)+Img w (x-1,y)+Img w (x,y-1)-4×Img w (x,y)+C

[0022] Where:

[0023] Img(x,y) is the image pixel value at the position with coordinates (x,y) in the first overlap area L1i;

[0024] Img w (x, y) is the image pixel value at the position with coordinate (x, y) in the second overlap area L2i

[0025] Lap(x,y) is the Laplace sharpness value of the pixel with coordinates (x,y) in the first overlap area L1i;

[0026] Lap w (x, y) is the Laplace sharpness value of the pixel with coordinates (x, y) in the second overlap area L2i;

[0027] c is a constant;

[0028] S403: according to the clarity of each pixel calculated in S402, a fusion weight of the first overlapped area L1i and a fusion weight of the second overlapped area L2i are calculated;

[0029] The fusion weight formula is:

[0030]

[0031]

[0032] Where:

[0033] n represents the total number of first images; i represents the i-th viewpoint image of the first image;

[0034] FeatherWeight i (x, y) is the feathering value obtained after Gaussian blurring of the fusion mask of the i-th first image;

[0035] BlendWeight i (x, y) is the fusion weight of the i-th first overlap region L1i;

[0036] WildWeight i (x, y) is the fusion weight of the i-th second overlap region L2i;

[0037] S404: performing weighted fusion on the stitched image and the reference image according to the fusion weight of the first overlapped area L1i and the fusion weight of the second overlapped area L2i;

[0038] The weighted fusion formula is:

[0039] Img blend_i =Img L1_i ×BlendWeight i +Img L2_i ×WildWeight i

[0040] in:

[0041] Img L1_i is the pixel value on the first overlapping area L1i;

[0042] Img L2_i is the pixel value on the second overlapping area L2i;

[0043] Img blend_i is the pixel value of the fused image;

[0044] The fused The pixel values ​​are replaced to the corresponding coordinates of the reference image to obtain the final image Img all .

[0045] The present invention also proposes a multi-viewpoint stitching system applied to a large-field-of-view monitoring scene, comprising:

[0046] An image acquisition module is configured to acquire a plurality of first images of a target scene from different viewpoints, wherein the plurality of first images are acquired by a plurality of fixed-focus cameras placed at different positions, and there is no overlap between the first images; and acquire a second image of the target scene, wherein the second image is a panoramic image captured by a wide-angle camera;

[0047] A dedistortion module performs dedistortion processing on the second image to obtain a reference image;

[0048] A fusion module is used to fuse the first image with the reference image to obtain a final image.

[0049] The present invention has the following advantages:

[0050] The present invention solves the parallax problem when images taken by cameras at different viewpoints are stitched together. Multiple images containing a target scene are obtained by using a wide-angle camera and fixed-focus cameras at multiple viewpoints. The multiple images are stitched together to obtain a larger image of a complete scene. The parallax problem when stitching images is solved by weighted fusion.

[0051] The number and position of the cameras of the present invention can be determined according to the focus area of ​​the shooting scene: for example, when shooting an airport runway and focusing on the aircraft on the runway, when arranging the fixed-focus cameras, the focal plane is located on the runway, and the number is determined according to the length of the runway. The acquisition equipment also includes a wide-angle camera for acquiring a full-viewing angle; the first image in the final image can be set according to the relevant position according to the focus area to ensure that a complete scene image of the focus area is obtained;

[0052] (2) The present invention can ensure that the spliced ​​images have low distortion and no misalignment, and at the same time, add depth of field fusion processing to increase the clarity of the images. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a diagram of the method steps of the present invention;

[0054] Figure 2 This is a schematic diagram of the placement of a fixed-focus camera;

[0055] Figure 3 A schematic diagram of the process of obtaining a reference image;

[0056] Figure 4 A schematic diagram of the final image. DETAILED DESCRIPTION

[0057] The present invention is further described below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following description.

[0058] It should be noted that the directions or positional relationships indicated by "left", "right", etc. are based on the directions or positional relationships shown in the accompanying drawings, or are the directions or positional relationships in which the inventive product is usually placed when in use, or are the directions or positional relationships commonly understood by those skilled in the art. Such terms are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.

[0059] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0060] Embodiment 1

[0061] like Figure 1 As shown, the present invention proposes a method for eliminating parallax of multi-viewpoint images, comprising:

[0062] Acquire first images of the target scene from different viewpoints, where there is no overlap between the different viewpoints; the first images are acquired by a plurality of fixed-focus cameras placed at different positions, such as Figure 2 As shown; the first image includes a first viewpoint image P1, a second viewpoint image P2, an i-th viewpoint image Pi, ..., an n-th viewpoint image Pn, where n is the total number of first images.

[0063] A second image of the target scene is acquired, where the second image is a panoramic image captured by a wide-angle camera.

[0064] performing a dedistortion process on the second image to obtain a reference image;

[0065] The first image is fused with the reference image to obtain a final image.

[0066] like Figure 3As shown, the dedistortion process is performed on the second image to obtain a reference image. Specifically, the steps include:

[0067] S301: extracting corner point information on the second image;

[0068] S302: further extracting sub-pixel information according to the corner point information;

[0069] S303: calibrating the wide-angle camera according to the sub-pixel information to obtain a calibration result; in some specific embodiments, the wide-angle camera is calibrated by using the calibrateCamera function to obtain a calibration result;

[0070] The calibration results include: the wide-angle camera's intrinsic parameter matrix, extrinsic parameter matrix, and distortion coefficients;

[0071]

[0072]

[0073] in:

[0074] f x 、f y are the normalized focal lengths in the x and y directions, respectively;

[0075] c x 、c y is the offset of the camera optical axis in the image coordinate system;

[0076] R represents the selection matrix, T represents the translation vector;

[0077] The distortion coefficients include k1, k2, k3, p1, and p2; k1 represents the first-order radial distortion coefficient; k2 represents the second-order radial distortion coefficient; k3 represents the third-order radial distortion coefficient; p1 represents the first-order tangential distortion coefficient; and P2 represents the second-order tangential distortion coefficient.

[0078] S304: Evaluate the calibration result using a reprojection error method to obtain a new calibration result;

[0079] S305: performing a dedistortion operation on the second image according to the new calibration result to obtain a reference image after the distortion is corrected.

[0080] The specific steps of fusing the multiple first images with the reference image to obtain a final image include:

[0081] S401: Acquire an overlapping area between the first image and the reference image in the first image, the overlapping area on the first image is the first overlapping area L1, and the overlapping area on the reference image Q is the second overlapping area L2; acquire an overlapping area between the first image Pi and the reference image in the first image, the overlapping area on the first image Pi is the first overlapping area L1i, and the overlapping area on the reference image Q is the second overlapping area L2i;

[0082] S402: Calculate the clarity Lap of each pixel in the first overlap area L1i, and calculate the clarity Lap of each pixel in the second overlap area L2i w , the formula for calculating clarity is:

[0083] Lap(x,y)=Img(x+1,y)+Img(x,y+1)+Img(x-1,y)+Img(x,y-1)-4×Img(x,y)+C

[0084] Lap w (x,y)=Img w (x+1,y)+Img w (x,y+1)+Img w (x-1,y)+Img w (x,y-1)-4×Img w (x,y)+C

[0085] Where:

[0086] Img(x,y) is the image pixel value at the position with coordinates (x,y) in the first overlap area L1i;

[0087] Img w (x, y) is the image pixel value at the position with coordinate (x, y) in the second overlap area L2i

[0088] Lap(x,y) is the Laplace sharpness value of the pixel with coordinates (x,y) in the first overlap area L1i;

[0089] Lap w (x, y) is the Laplace sharpness value of the pixel with coordinates (x, y) in the second overlap area L2i;

[0090] c is a constant;

[0091] S403: according to the clarity of each pixel calculated in S402, a fusion weight of the first overlapped area L1i and a fusion weight of the second overlapped area L2i are calculated;

[0092] The fusion weight formula is:

[0093]

[0094]

[0095] Where:

[0096] n represents the total number of first images; i represents the i-th viewpoint image of the first image;

[0097] FeatherWeight i (x, y) is the feathering value obtained after Gaussian blurring of the fusion mask of the i-th first image;

[0098] BlendWeight i (x, y) is the fusion weight of the i-th first overlap region L1i;

[0099] WildWeight i (x, y) is the fusion weight of the i-th second overlap region L2i;

[0100] S404: performing weighted fusion on the first image and the reference image according to the fusion weight of the first overlapped area L1i and the fusion weight of the second overlapped area L2i;

[0101] The weighted fusion formula is:

[0102] Img blend_i =Img L1_i ×BlendWeight i +Img L2_i ×WildWeight i

[0103] in:

[0104] Img L1_i is the pixel value on the first overlapping area L1i;

[0105] Img L2_i is the pixel value on the second overlapping area L2i;

[0106] Img blend_i is the pixel value of the fused image;

[0107] The fused The pixel values ​​are replaced to the corresponding coordinates of the reference image to obtain the final image Img all .

[0108] Embodiment 2

[0109] The present invention also provides a multi-view image parallax elimination system, comprising:

[0110] An image acquisition module is configured to acquire a plurality of first images of a target scene, wherein the first images are taken by a plurality of fixed-focus cameras at a plurality of viewpoints, and the first images taken by adjacent fixed-focus cameras have overlapping parts; and acquire a second image of the target scene, wherein the second image is a panoramic image taken by a wide-angle camera;

[0111] A dedistortion module performs dedistortion processing on the second image to obtain a reference image;

[0112] A fusion module is used to fuse the first image with the reference image to obtain a final image.

[0113] After the image acquisition module in the present invention acquires the plurality of first images and the second image, the plurality of first images are numbered and the second image is transmitted to the de-distortion module;

[0114] The dedistortion module performs distortion processing on the second image to obtain a reference image; the numbered first image and the reference image are simultaneously input into the fusion module, such as Figure 4 As shown, for each first image, the fusion module retains the part without parallax, replaces the foreground and background parts with the reference image, and finally splices all the first images fused with the reference image to obtain a complete, parallax-free, low-distortion final image.

[0115] The above embodiments only express preferred implementation modes, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the invention, and these all belong to the protection scope of the invention.

Claims

1. A method for eliminating parallax of multi-viewpoint images, characterized in that: The steps include: Acquire first images of a target scene from different viewpoints, where there is no overlap between the different viewpoints; the first images are acquired by a plurality of fixed-focus cameras placed at different positions; Acquire a second image of the target scene, where the second image is a panoramic image acquired by a wide-angle camera; performing a dedistortion process on the second image to obtain a reference image; Fusing the first image with the reference image to obtain a final image; The first images of the target scene under different viewpoints are obtained, wherein the first images include: a first viewpoint image P1, a second viewpoint image P2, an i-th viewpoint image Pi, ..., an n-th viewpoint image Pn, where n is the total number of the first images; The specific steps of fusing the first image with the reference image to obtain a final image include: S401: Acquire an overlapping area between the first image and the reference image in the first image, the overlapping area on the first image is the first overlapping area L1, and the overlapping area on the reference image Q is the second overlapping area L2; acquire an overlapping area between the first image Pi and the reference image in the first image, the overlapping area on the first image Pi is the first overlapping area L1i, and the overlapping area on the reference image Q is the second overlapping area L2i; S402: Calculate the clarity Lap of each pixel in the first overlap area L1i, and calculate the clarity Lap of each pixel in the second overlap area L2i , the formula for calculating clarity is: Where: The coordinates in the first overlap area L1i are The image pixel value at the location; The coordinates in the second overlap area L2i are The image pixel value at the location; The coordinates in the first overlap area L1i are The Laplace sharpness value of the pixel; The coordinates in the second overlap area L2i are The Laplace sharpness value of the pixel; c is a constant; S403: according to the clarity of each pixel calculated in S402, a fusion weight of the first overlapped area L1i and a fusion weight of the second overlapped area L2i are calculated; The fusion weight formula is: Where: n represents the total number of first images; i represents the i-th viewpoint image of the first image; is the feathering value obtained after Gaussian blurring of the fusion mask of the i-th first image; is the fusion weight of the i-th first overlapping area L1i; is the fusion weight of the i-th second overlapping area L2i; S404: performing weighted fusion on the first image and the reference image according to the fusion weight of the first overlapped area L1i and the fusion weight of the second overlapped area L2i; The weighted fusion formula is: in: is the pixel value on the first overlapping area L1i; is the pixel value on the second overlapping area L2i; is the pixel value of the fused image; The fused The pixel value is replaced to the corresponding coordinate position of the reference image to obtain the final image .

2. The method for eliminating parallax of multi-view images according to claim 1, characterized in that: The specific steps of performing dedistortion processing on the second image to obtain a reference image include: S301: extracting corner point information on the second image; S302: further extracting sub-pixel information according to the corner point information; S303: calibrating the wide-angle camera according to the sub-pixel information to obtain a calibration result; S304: Evaluate the calibration result using a reprojection error method to obtain a new calibration result; S305: performing a dedistortion operation on the second image according to the new calibration result to obtain a reference image after the distortion is corrected.

3. The method for eliminating parallax of multi-view images according to claim 2, characterized in that: The calibration result is obtained by calibrating the wide-angle camera using the calibrateCamera function to obtain the calibration result; The calibration results include: the intrinsic parameter matrix, extrinsic parameter matrix and distortion coefficients of the wide-angle camera.

4. A multi-view image parallax elimination system, characterized in that: include: An image acquisition module is used to acquire a plurality of first images of a target scene from different viewpoints, wherein the plurality of first images are acquired by a plurality of fixed-focus cameras placed at different positions, and there is no overlap between the first images; Acquire a second image of the target scene, where the second image is a panoramic image captured by a wide-angle camera; A dedistortion module performs dedistortion processing on the second image to obtain a reference image; A fusion module, fusing the first image with the reference image to obtain a final image; The first images of the target scene under different viewpoints are obtained, wherein the first images include: a first viewpoint image P1, a second viewpoint image P2, an i-th viewpoint image Pi, ..., an n-th viewpoint image Pn, where n is the total number of the first images; The specific steps of fusing the first image with the reference image to obtain a final image include: S401: Acquire an overlapping area between the first image and the reference image in the first image, the overlapping area on the first image is the first overlapping area L1, and the overlapping area on the reference image Q is the second overlapping area L2; acquire an overlapping area between the first image Pi and the reference image in the first image, the overlapping area on the first image Pi is the first overlapping area L1i, and the overlapping area on the reference image Q is the second overlapping area L2i; S402: Calculate the clarity Lap of each pixel in the first overlap area L1i, and calculate the clarity Lap of each pixel in the second overlap area L2i , the formula for calculating clarity is: Where: The coordinates in the first overlap area L1i are The image pixel value at the location; The coordinates in the second overlap area L2i are The image pixel value at the location; The coordinates in the first overlap area L1i are The Laplace sharpness value of the pixel; The coordinates in the second overlap area L2i are The Laplace sharpness value of the pixel; c is a constant; S403: according to the clarity of each pixel calculated in S402, a fusion weight of the first overlapped area L1i and a fusion weight of the second overlapped area L2i are calculated; The fusion weight formula is: Where: n represents the total number of first images; i represents the i-th viewpoint image of the first image; is the feathering value obtained after Gaussian blurring of the fusion mask of the i-th first image; is the fusion weight of the i-th first overlapping area L1i; is the fusion weight of the i-th second overlapping area L2i; S404: performing weighted fusion on the first image and the reference image according to the fusion weight of the first overlapped area L1i and the fusion weight of the second overlapped area L2i; The weighted fusion formula is: in: is the pixel value on the first overlapping area L1i; is the pixel value on the second overlapping area L2i; is the pixel value of the fused image; The fused The pixel value is replaced to the corresponding coordinate position of the reference image to obtain the final image .

Citation Information

Patent Citations

  • Multi-video fusion method, device and system

    CN108234904A

  • Non-structural light field intelligent sensing system and device

    CN113436130A

  • Panoramic image splicing method and device based on optimal mapping matrix

    CN114331835A

  • Camera, electronic equipment, shooting method and storage medium

    CN115278067A

  • Depth-of-field expansion method and system for multi-view multi-focal-length imaging

    CN116437205A