WO2020029877A1 - 多相机拼接的亮度调整方法及便携式终端 - Google Patents
多相机拼接的亮度调整方法及便携式终端 Download PDFInfo
- Publication number
- WO2020029877A1 WO2020029877A1 PCT/CN2019/099018 CN2019099018W WO2020029877A1 WO 2020029877 A1 WO2020029877 A1 WO 2020029877A1 CN 2019099018 W CN2019099018 W CN 2019099018W WO 2020029877 A1 WO2020029877 A1 WO 2020029877A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- brightness
- mapping function
- image
- camera
- images
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000013507 mapping Methods 0.000 claims abstract description 93
- 230000006870 function Effects 0.000 claims description 112
- 238000004590 computer program Methods 0.000 claims description 12
- 101150112439 SMAP gene Proteins 0.000 claims description 8
- 238000004422 calculation algorithm Methods 0.000 claims description 7
- 230000004927 fusion Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 4
- 230000001186 cumulative effect Effects 0.000 claims description 4
- 230000007704 transition Effects 0.000 claims description 4
- 230000000007 visual effect Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 7
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000011478 gradient descent method Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- G—PHYSICS
- G03—PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
- G03B—APPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
- G03B37/00—Panoramic or wide-screen photography; Photographing extended surfaces, e.g. for surveying; Photographing internal surfaces, e.g. of pipe
- G03B37/04—Panoramic or wide-screen photography; Photographing extended surfaces, e.g. for surveying; Photographing internal surfaces, e.g. of pipe with cameras or projectors providing touching or overlapping fields of view
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/92—Dynamic range modification of images or parts thereof based on global image properties
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/698—Control of cameras or camera modules for achieving an enlarged field of view, e.g. panoramic image capture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Definitions
- the invention belongs to the field of image processing, and particularly relates to a method for adjusting brightness of a multi-camera splicing and a portable terminal.
- multi-camera image stitching technology has been more and more widely used, such as virtual reality and panoramic images.
- multi-camera image stitching generally requires cameras to shoot from different angles at the same time, and there must be overlapping areas between adjacent images.
- the overlapping area has the same name control point pair, and the image transformation matrix is calculated using the image matching method. Thereby stitching into a panoramic image.
- Some existing methods use the average value of the color channels in the common area to linearly adjust multiple images when eliminating the brightness difference of image stitching.
- the Chinese patent with authorization number CN102542548 discloses a color between images. Correction method and device.
- the average value of the color channels of the two images in the common area determine the linear relationship between the images on the color channel, and then correct the two images based on the linear relationship.
- the color value of the pixels on the full image in the color channel When the above method processes an image with a large difference in brightness, the effect is poor, and pixels in the image that are not in the common area are also greatly changed, which affects the visual effect.
- the invention proposes a multi-camera stitching brightness adjustment method, a computer-readable storage medium, and a portable terminal.
- the aim is to eliminate the difference in brightness of overlapping areas while maintaining the same details in bright and dark parts of the image, and improving the panoramic image Visual effects.
- the present invention provides a method for adjusting brightness of a multi-camera stitching, the method includes:
- the six sets of overlapping area images are composed of six original images shot by six-camera panoramic cameras simultaneously and independently, and the six original images are six fish-eye images; the six fish-eye images are expanded longitude and latitude images.
- the brightness mapping function is specifically:
- k is an initial value, and an initial value can be set to 1, x is a pixel value, and x ⁇ [0,255], so as to determine the entire brightness mapping function.
- Adjust the k value of the brightness mapping function to calculate a, b, and c values; set the k values of the six cameras to 1 and use LM under the constraint of k 1 k 2 k 3 k 4 k 5 k 6 1
- the algorithm optimizes the k value of each camera to minimize the total brightness error r.
- r is minimum, six cameras have six k values.
- the a, b, and c corresponding to each camera can be calculated based on the k value at this time. Value, the brightness mapping function for each camera at this time is the optimal brightness mapping function.
- the dark panoramic mosaic image refers to the brightest panoramic image in the dark part, and the obtaining method is specifically:
- the optimal brightness mapping function is adjusted by using a first adjustment function.
- the first adjustment function is:
- f i (1) (x) is an adjusted brightness mapping function of the i-th camera
- f i (x) is an optimal brightness mapping function of the i-th camera
- the bright panorama mosaic image refers to the darkest panorama image of the bright part, and the obtaining method is specifically:
- the second adjustment function is:
- f i (2) (x) is an adjusted brightness mapping function of the i-th camera
- f i (x) is an optimal brightness mapping function of the i-th camera
- the dark panoramic mosaic image and the bright panoramic mosaic image are merged to obtain the final output panoramic mosaic image, specifically:
- the weight w at the central meridian corresponding to the darkest original image is set to 1
- the weight w at the central meridian of the darkest image is set to 0, and a linear transition is made elsewhere to generate a weight map.
- W 1 W is a value obtained by subtracting 1 each in point 1, FIG generating weight W 2; using the equation:
- I is the final panoramic mosaic image
- I 1 is a dark panoramic mosaic image
- I 2 is a bright panoramic mosaic image.
- the present invention provides a computer-readable storage medium.
- the computer program is executed by a processor, the steps of the brightness adjustment method for multi-camera stitching described above are implemented.
- the present invention provides a portable terminal, including:
- One or more processors are One or more processors;
- One or more computer programs wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, which are implemented when the processors execute the computer programs.
- the invention adjusts the brightness mapping function for the cameras with independent exposures to achieve the elimination of the brightness difference of the overlapping areas, while maintaining the details of the bright and dark parts of the image unchanged, and better improving the visual effect of the panoramic image.
- FIG. 1 is a flowchart of a method for adjusting brightness of a multi-camera stitching method according to the first embodiment of the present invention.
- FIG. 2 is a schematic diagram of six lens angles of view of a panoramic camera provided in Embodiment 1 of the present invention.
- FIG. 3 is a schematic diagram of overlapping areas between the six latitude and longitude maps developed by the six fisheye diagrams provided by the first embodiment of the present invention.
- FIG. 4 is a schematic diagram of calculating a total brightness error in brightness adjustment of a multi-camera stitching provided by Embodiment 1 of the present invention.
- FIG. 5 is a schematic diagram of a weight map of image fusion in brightness adjustment of multi-camera stitching provided by Embodiment 1 of the present invention.
- FIG. 6 is a schematic structural diagram of a portable terminal according to a second embodiment of the present invention.
- a method for adjusting brightness of a multi-camera stitching includes the following steps:
- the six cameras are six-eye panoramic cameras, and the six original images taken by the simultaneous independent exposures of the six cameras are six fish-eye images, and the images taken by adjacent cameras have overlapping perspectives;
- i 1 to 5
- rI [i] is taken by the i + 1 camera
- rI [6] is taken by the first camera.
- the original image captured by each camera is mapped with a brightness mapping function, and the brightness mapping function is:
- k is an initial value, and an initial value can be set to 1, x is a pixel value, and x ⁇ [0,255] to determine the entire brightness mapping function;
- the brightness error of the i-th overlapping area is defined as:
- r is minimum, six cameras have six K values, the a, b, and c values corresponding to each camera can be calculated according to the k value at this time, and the brightness mapping function corresponding to each camera at this time is its optimal brightness mapping function;
- the LM algorithm is a combination of the gradient descent method and the Gauss-Newton method.
- the LM algorithm adds the factor ⁇ to the Gauss-Newton method.
- ⁇ is large, it is equivalent to the gradient descent method, and when ⁇ is equivalent to the Gauss-Newton method,
- ⁇ is equivalent to the Gauss-Newton method.
- ⁇ is equivalent to the gradient descent method
- ⁇ is equivalent to the Gauss-Newton method
- the LM algorithm When using the LM algorithm, first set a relatively small value of ⁇ . When the objective function is found to increase, use ⁇ to quickly find the increase in ⁇ , and then use Newton's method to reduce ⁇ .
- the optimal brightness mapping function is adjusted by using a first adjustment function.
- the first adjustment function is:
- f i (1) (x) is an adjusted brightness mapping function of the i-th camera
- f i (x) is an optimal brightness mapping function of the i-th camera calculated in step S103.
- the second adjustment function is:
- f i (2) (x) is an adjusted brightness mapping function of the i-th camera
- f i (x) is an optimal brightness mapping function of the i-th camera calculated in step S103.
- the weight w at the central meridian corresponding to the darkest original image is set to 1
- the weight w at the central meridian of the darkest image is set to 0, and the linear transition elsewhere is obtained.
- a weight map W 1 subtracting the value of each point in W 1 by 1 to obtain a weight map W 2 ; S105 is specifically:
- I is the final panoramic mosaic image
- I 1 is a dark panoramic mosaic image
- I 2 is a bright panoramic mosaic image.
- Embodiment 3 of the present invention provides a computer-readable storage medium.
- the steps of the method for adjusting brightness of a multi-camera stitching provided by Embodiment 1 of the present invention are implemented.
- the computer-readable storage medium may be a non-transitory computer-readable storage medium.
- FIG. 6 shows a specific structural block diagram of a portable terminal provided in Embodiment 4 of the present invention.
- a portable terminal 100 includes: one or more processors 101, a memory 102, and one or more computer programs, where the processors 101 and the memory 102 are connected by a bus, the one or more computer programs are stored in the memory 102, and are configured to be executed by the one or more processors 101, the processors 101 executing all When describing the computer program, the steps of implementing the method for adjusting the brightness of a multi-camera stitching as provided in the first embodiment of the present invention are described.
- the brightness mapping function for an independently exposed camera by adjusting the brightness mapping function for an independently exposed camera, the brightness difference in the overlapped area is eliminated, while the details in the bright and dark parts of the image are kept unchanged, and the visual effect of the panoramic image is improved.
- the storage media such as ROM / RAM, magnetic disk, optical disk, and the like.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
- Stereoscopic And Panoramic Photography (AREA)
Abstract
本发明提供了一种多相机拼接的亮度调整方法、计算机可读存储介质及便携式终端。所述方法包括:获取六个相机分别拍摄的原始图像及其对应的六组重叠区域图像;对每个相机拍摄的原始图像用亮度映射函数映射,计算所述的六组重叠区域图像亮度的总亮度误差;分别调整每个相机的亮度映射函数,使所述的总亮度误差最小;调整最优亮度映射函数并映射进行全景拼接,分别生成暗部最亮的暗全景拼接图和亮部最暗的亮全景拼接图;融合暗全景拼接图与亮全景拼接图,生成全景拼接图像;本发明技术方案通过对独立曝光的相机调整亮度映射函数,实现了消除重叠区域的亮度差异,同时能保持图像亮处和暗处细节不变,较好的改善全景图像的视觉效果。
Description
本发明属于图像处理领域,尤其涉及一种多相机拼接的亮度调整方法及便携式终端。
随着计算机技术和图像处理技术的不断发展,多相机图像拼接技术得到了越来越广泛的应用,如虚拟现实和全景图像等。在获取全景图像时,多相机图像拼接一般需要相机在同一时刻从不同角度进行拍摄,而且相邻图像之间要有重叠区域,通过重叠区域同名控制点对,利用图像匹配方法计算图像变换矩阵,从而拼接成一幅全景图像。
在多相机全景拼接中,每个相机视场内的场景亮度不一致,为了拍摄更多的细节,需要每个相机独立曝光。但独立曝光后,相邻两个相机在重叠区域的图像的亮度存在较大的差异。如果对这些图像直接进行拼接,拼接的全景图像在图像重叠区域会存在亮度差异明显的接缝线,从而影响全景图像的视觉和美观效果。
现有的一些方法在消除图像拼接的亮度差异时,采用公共区域内颜色通道的颜色平均值来对多图像进行线性调整,如授权号为CN 102542548 B的中国专利,公开了一种图像间颜色校正方法和装置,在该技术中,根据获取的两幅图像分别在公共区域内颜色通道的颜色平均值,确定图像之间在颜色通道上的线性关系后,然后根据该线性关系,校正两幅图像全图像上的像素点在所述颜色通道上的颜色值。上述方法在处理亮度差异较大的图像时,效果较差,会使图像中不在公共区域的像素也受到较大的改变,影响视觉效果。
本发明提出一种多相机拼接的亮度调整方法、计算机可读存储介质及 便携式终端,旨在消除重叠区域的亮度差异,同时能保持图像亮处和暗处细节不变,较好的改善全景图像的视觉效果。
第一方面,本发明提供了一种多相机拼接的亮度调整方法,所述方法包括:
获取六个相机分别拍摄的六幅原始图像并展开成经纬度图像,获取对应的六组重叠区域图像;
对每个相机拍摄的原始图像用亮度映射函数映射,计算所述的六组重叠区域图像的亮度差异之和,作为总亮度误差;
分别调整每个相机的亮度映射函数,使所述的总亮度误差最小,得到最优亮度映射函数;
使原始图像中暗部最亮的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成暗全景拼接图;使原始图像中亮部最暗的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成亮全景拼接图;
融合暗全景拼接图与亮全景拼接图,生成全景拼接图像。
进一步的,所述的六组重叠区域图像由六目全景相机同时独立曝光拍摄的六幅原始图像组成,所述的六幅原始图像为六幅鱼眼图像;六幅鱼眼图像展开的经纬度图像之间形成六组重叠区域图像,对所述的六组重叠区域图像标记为sI[i]与rI[i],i=1~6,其中,sI[i]与rI[i]为一对重叠区域图像,sI[i]由第i个相机拍摄,当i=1~5时,rI[i]由第i+1个相机拍摄,当i=6时,rI[6]由第1个相机拍摄。
进一步的,所述的亮度映射函数,具体为:
公式(1)中a,b,c满足:
f(128)=128k (2)
f'(128)=k (3)
f(255)=255 (4)
上述公式(2)、公式(3)和公式(4)中k为初始值,可设初始值为1,x为像素的值,x∈[0,255],从而确定整个亮度映射函数。
进一步的,所述的计算六组重叠区域图像的亮度差异之和作为总误差,具体为:
对每个重叠区域的两幅图像sI[i]与rI[i],统计两幅图像的亮度直方图sH[i]与rH[i];
分别计算每个重叠区域的两幅图像的累积直方图sS[i]和rS[i];
用直方图规定化的方法,将sS[i]向rS[i]对齐,得到亮度映射函数sMap[i],反之,将rS[i]向sS[i]对齐,得到亮度映射函数rMap[i];
采用公式(5):
进一步的,所述的最优亮度映射函数具体计算方法为:
调整所述亮度映射函数的k值,计算a,b,c值;设置六个相机的k值初始化为1,在k
1k
2k
3k
4k
5k
6=1的约束条件下用LM算法对每个相机的k值做优化,使总亮度误差r最小,当r最小时,六个相机有六个k值,可根据此时k值计算出每个相机对应的a,b,c值,此时对每个相机应的亮度映射函数即为最优亮度映射函数。
进一步的,所述暗全景拼接图,是指暗部最明亮的全景图,获取方法具体为:
公式(6)中,f
i
(1)(x)为第i个相机调整后的亮度映射函数,f
i(x)为第i个相机的最优亮度映射函数。
进一步的,所述的亮全景拼接图,是指亮部最暗的全景图,获取方法具体为:
使原始图像中亮部最暗的图像保持不变,找到所述的亮部最暗图像的亮度映射函数f
l,计算其反函数f
l
-1,用第二调整函数调整最优亮度映射函数,所述的第二调整函数为:
f
i
(2)(x)=f
l
-1[f
i(x)] (7)
公式(7)中,f
i
(2)(x)为第i个相机调整后的亮度映射函数,f
i(x)为第i个相机的最优亮度映射函数。
进一步的,融合暗全景拼接图与亮全景拼接图,得到最终输出的全景拼接图像,具体为:
在暗全景拼接图中,最暗原始图像对应的中心经线处的权值w设为1,最暗图像的中心经线处的权值w设为0,其它地方线性过渡,生成一张权值图W
1,用1减去W
1中每个点的值,生成权值图W
2;采用公式:
I=W
1I
1+W
2I
2 (8)
生成全景拼接图像,公式(8)中,I为最终生成的全景拼接图像,I
1为暗全景拼接图,I
2为亮全景拼接图。
第二方面,本发明提供了一种计算机可读存储介质,所述计算机程序被处理器执行时实现如上述的多相机拼接的亮度调整方法的步骤。
第三方面,本发明提供了一种便携式终端,包括:
一个或多个处理器;
存储器;以及
一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述处理器执行所述计算机程序时实现如上述的多相机拼接的亮度调整方法的步骤。
本发明通过对独立曝光的相机调整亮度映射函数,实现了消除重叠区域的亮度差异,同时能保持图像亮处和暗处细节不变,较好的改善全景图像的视觉效果。
图1是本发明实施例一提供的多相机拼接的亮度调整方法流程图。
图2是本发明实施例一提供的全景相机六个镜头视角区域示意图。
图3是本发明实施例一提供的六幅鱼眼图展开的经纬度图之间相互重叠区域示意图。
图4是本发明实施例一提供的多相机拼接的亮度调整中计算总亮度误差示意图。
图5是本发明实施例一提供的多相机拼接的亮度调整中图像融合的权值图示意图。
图6是本发明实施例二提供的便携式终端的结构示意图。
为了使本发明的目的、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。
实施例一:
请参阅图1,本发明实施例一提供的一种多相机拼接的亮度调整方法 包括以下步骤:
S101.获取六个相机分别拍摄的六幅原始图像并展开成经纬度图像,获取对应的六组重叠区域图像;
请参阅图2,该六个相机为六目全景相机,六个相机同时独立曝光拍摄的六幅原始图像为六幅鱼眼图像,相邻相机拍摄的图像均有重叠视角;
请参阅图3,由于每个相机都与相邻的相机有重叠视角,因此所拍摄的图像与相邻相机拍摄的图像均有重叠区域;六幅鱼眼图像展开的经纬度图像之间形成六组重叠区域图像,对所述的六组重叠区域图像标记为sI[i]与rI[i],i=1~6,其中,sI[i]与rI[i]为一对重叠区域图像,sI[i]由第i个相机拍摄,当i=1~5时,rI[i]由第i+1个相机拍摄,当i=6时,rI[6]由第1个相机拍摄。
S102.对每个相机拍摄的原始图像用亮度映射函数映射,计算所述的六组重叠区域图像的亮度差异之和,作为总亮度误差;
具体的,在图像拼接时,对每个相机拍摄的原始图像用亮度映射函数映射,所述亮度映射函数为:
公式(1)中a,b,c满足:
f(128)=128k (2)
f'(128)=k (3)
f(255)=255 (4)
上述公式(2)、公式(3)和公式(4)中k为初始值,可设初始值为1,x为像素的值,x∈[0,255],从而确定整个亮度映射函数;
请参阅图4,还需要说明的是,计算所述的六组重叠区域图像的亮度差异之和,作为总亮度误差步骤如下:
S1021:对每个重叠区域的两幅图像sI[i]与rI[i],统计两幅图像的亮度直方图sH[i]与rH[i];
S1022:分别计算每个重叠区域的两幅图像的累积直方图sS[i]和rS[i];
S1023:用直方图规定化的方法,将sS[i]向rS[i]对齐,得到亮度映射函数sMap[i],反之,将rS[i]向sS[i]对齐,得到亮度映射函数rMap[i];
S1024:计算所述的六组重叠区域图像的亮度差异之和,作为总亮度误差;
定义第i个重叠区域的亮度误差为:
S103.分别调整每个相机的亮度映射函数,使所述的总亮度误差最小,得到最优亮度映射函数;
具体的,所述分别调整每个相机的亮度映射函数为分别调整每个相机的亮度映射函数的k值,计算a,b,c值;6个相机的k值初始化为1,在约束条件k
1k
2k
3k
4k
5k
6=1下,用LM(Levenberg-Marquart)算法对每个相机的k值做优化,使总亮度误差r最小,当r最小时,六个相机有六个k值,可根据此时k值计算出每个相机对应的a,b,c值,此时对每个相机应的亮度映射函数为其最优亮度映射函数;
还需要说明的是,LM算法是梯度下降法与高斯-牛顿法的结合,LM算法在高斯牛顿法中加入了因子μ,当μ大时相当于梯度下降法,μ小时相当于高斯牛顿法,在使用LM算法时,先设置一个比较小的μ值,当发现目标函数反而增大时,将μ增大使用梯度下降法快速寻找,然后再将μ减小使用牛顿法进行寻找。
S104.使原始图像中暗部最亮的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成暗全景拼接图;使原始图像中亮部最暗的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成亮全景拼接图;
公式(6)中,f
i
(1)(x)为第i个相机调整后的亮度映射函数,f
i(x)为用S103步骤中计算出来的第i个相机的最优亮度映射函数。
使原始图像中亮部最暗的图像保持不变,找到所述的亮部最暗图像的亮度映射函数f
l,计算其反函数f
l
-1,用第二调整函数调整最优亮度映射函数,所述的第二调整函数为:
f
i
(2)(x)=f
l
-1[f
i(x)] (7)
公式(7)中,f
i
(2)(x)为第i个相机调整后的亮度映射函数,f
i(x)为用S103步骤中计算出来的第i个相机的最优亮度映射函数。
S105.融合暗全景拼接图与亮全景拼接图,生成全景拼接图像;
请参阅图5,在暗全景拼接图中,最暗原始图像对应的中心经线处的权值w设为1,最暗图像的中心经线处的权值w设为0,其它地方线性过渡,得到一张权值图W
1,用1减去W
1中每个点的值,得到权值图W
2;所述S105具体为:
I=W
1I
1+W
2I
2 (8)
公式(8)中,I为最终生成的全景拼接图像,I
1为暗全景拼接图,I
2为亮全景拼接图。
实施例二:
本发明实施例三提供了一种计算机可读存储介质,所述计算机程序被处理器执行时实现如本发明实施例一提供的多相机拼接的亮度调整方法的步骤。
所述计算机可读存储介质可以是非暂态计算机可读存储介质。
实施例三:
图6示出了本发明实施例四提供的便携式终端的具体结构框图,一种便携式终端100包括:一个或多个处理器101、存储器102、以及一个或多个计算机程序,其中所述处理器101和所述存储器102通过总线连接,所述一个或多个计算机程序被存储在所述存储器102中,并且被配置成由所述一个或多个处理器101执行,所述处理器101执行所述计算机程序时实现如本发明实施例一提供的一种多相机拼接的亮度调整方法的步骤。
本发明中,通过对独立曝光的相机调整亮度映射函数,实现了消除重叠区域的亮度差异,同时能保持图像亮处和暗处细节不变,较好的改善全景图像的视觉效果。
在本发明实施例中,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于一计算机可读取存储介质中,所述的存储介质,如ROM/RAM、磁盘、光盘等。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。
Claims (17)
- 一种多相机拼接的亮度调整方法,其特征在于,包括以下步骤:获取六个相机分别拍摄的六幅原始图像并展开成经纬度图像,获取对应的六组重叠区域图像;对每个相机拍摄的原始图像用亮度映射函数映射,计算所述的六组重叠区域图像的亮度差异之和,作为总亮度误差;分别调整每个相机的亮度映射函数,使所述的总亮度误差最小,得到最优亮度映射函数;使原始图像中暗部最亮的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成暗全景拼接图;使原始图像中亮部最暗的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成亮全景拼接图;融合暗全景拼接图与亮全景拼接图,生成全景拼接图像。
- 如权利要求1所述的方法,其特征在于:所述的六组重叠区域图像由六目全景相机同时独立曝光拍摄的六幅原始图像组成,所述的六幅原始图像为六幅鱼眼图像;六幅鱼眼图像展开的经纬度图像之间形成六组重叠区域图像,对所述的六组重叠区域图像标记为sI[i]与rI[i],i=1~6,其中,sI[i]与rI[i]为一对重叠区域图像,sI[i]由第i个相机拍摄,当i=1~5时,rI[i]由第i+1个相机拍摄,当i=6时,rI[6]由第1个相机拍摄。
- 如权利要求3所述的方法,其特征在于:所述的最优亮度映射函数具体计算方法为:调整所述亮度映射函数的k值,计算a,b,c值;设置六个相机的k值初始化为1,在k 1k 2k 3k 4k 5k 6=1的约束条件下用LM算法对每个相机的k值做优化,使总亮度误差r最小,当r最小时,六个相机有六个k值,可根据此时k值计算出每个相机对应的a,b,c值,此时对每个相机应的亮度映射函数即为最优亮度映射函数。
- 如权利要求1所述的方法,其特征在于:融合暗全景拼接图与亮全景拼接图,得到最终输出的全景拼接图像,具体为:在暗全景拼接图中,最暗原始图像对应的中心经线处的权值w设为1,最暗图像的中心经线处的权值w设为0,其它地方线性过渡,生成一张权值图W 1,用1减去W 1中每个点的值,生成权值图W 2;采用公式:I=W 1I 1+W 2I 2 (8)生成全景拼接图像,公式(8)中,I为最终生成的全景拼接图像,I 1为暗全景拼接图,I 2为亮全景拼接图。
- 一种计算机可读存储介质,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述的多相机拼接的亮度调整方法的步骤。
- 一种便携式终端,包括:一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存 储器中,并且被配置成由所述一个或多个处理器执行,其特征在于,所述处理器执行所述计算机程序时实现的多相机拼接的亮度调整方法包括:获取六个相机分别拍摄的六幅原始图像并展开成经纬度图像,获取对应的六组重叠区域图像;对每个相机拍摄的原始图像用亮度映射函数映射,计算所述的六组重叠区域图像的亮度差异之和,作为总亮度误差;分别调整每个相机的亮度映射函数,使所述的总亮度误差最小,得到最优亮度映射函数;使原始图像中暗部最亮的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成暗全景拼接图;使原始图像中亮部最暗的图像保持不变,调整最优亮度映射函数并映射所有原始图像进行全景拼接,生成亮全景拼接图;融合暗全景拼接图与亮全景拼接图,生成全景拼接图像。
- 如权利要求10所述的便携式终端,其特征在于:所述的六组重叠区域图像由六目全景相机同时独立曝光拍摄的六幅原始图像组成,所述的六幅原始图像为六幅鱼眼图像;六幅鱼眼图像展开的经纬度图像之间形成六组重叠区域图像,对所述的六组重叠区域图像标记为sI[i]与rI[i],i=1~6,其中,sI[i]与rI[i]为一对重叠区域图像,sI[i]由第i个相机拍摄,当i=1~5时,rI[i]由第i+1个相机拍摄,当i=6时,rI[6]由第1个相机拍摄。
- 如权利要求12所述的便携式终端,其特征在于:所述的最优亮度映射函数具体计算方法为:调整所述亮度映射函数的k值,计算a,b,c值;设置六个相机的k值初始化为1,在k 1k 2k 3k 4k 5k 6=1的约束条件下用LM算法对每个相机的k值做优化,使总亮度误差r最小,当r最小时,六个相机有六个k值,可根据此时k值计算出每个相机对应的a,b,c值,此时对每个相机应的亮度映射函数即为最优亮度映射函数。
- 如权利要求10所述的便携式终端,其特征在于:融合暗全景拼接图与亮全景拼接图,得到最终输出的全景拼接图像,具体为:在暗全景拼接图中,最暗原始图像对应的中心经线处的权值w设为1,最暗图像的中心经线处的权值w设为0,其它地方线性过渡,生成一张权值图W 1,用1减去W 1中每个点的值,生成权值图W 2;采用公式:I=W 1I 1+W 2I 2 (8)生成全景拼接图像,公式(8)中,I为最终生成的全景拼接图像,I 1为暗全景拼接图,I 2为亮全景拼接图。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP19846694.8A EP3836071A4 (en) | 2018-08-10 | 2019-08-02 | BRIGHTNESS ADJUSTMENT METHOD FOR MULTIPLE CAMERAS AND PORTABLE TERMINAL MOSAICING |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810906060.8 | 2018-08-10 | ||
CN201810906060.8A CN109166076B (zh) | 2018-08-10 | 2018-08-10 | 多相机拼接的亮度调整方法、装置及便携式终端 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020029877A1 true WO2020029877A1 (zh) | 2020-02-13 |
Family
ID=64895441
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/099018 WO2020029877A1 (zh) | 2018-08-10 | 2019-08-02 | 多相机拼接的亮度调整方法及便携式终端 |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP3836071A4 (zh) |
CN (1) | CN109166076B (zh) |
WO (1) | WO2020029877A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117237237A (zh) * | 2023-11-13 | 2023-12-15 | 深圳元戎启行科技有限公司 | 一种车载360度全景影像的光度均衡方法及装置 |
CN117319805A (zh) * | 2023-11-30 | 2023-12-29 | 广汽埃安新能源汽车股份有限公司 | 一种车辆全景图像的亮度补偿方法及装置 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109166076B (zh) * | 2018-08-10 | 2020-08-07 | 影石创新科技股份有限公司 | 多相机拼接的亮度调整方法、装置及便携式终端 |
CN113781317B (zh) * | 2021-08-02 | 2023-08-18 | 华南理工大学 | 一种全景环视系统的亮度均衡方法 |
CN115861079B (zh) * | 2023-02-24 | 2023-05-12 | 和普威视光电股份有限公司 | 一种无重叠区域的全景图像拼接方法、系统及拼接终端 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102542548A (zh) | 2011-12-30 | 2012-07-04 | 深圳市万兴软件有限公司 | 一种图像间颜色校正方法和装置 |
CN105321151A (zh) * | 2015-10-27 | 2016-02-10 | Tcl集团股份有限公司 | 一种全景图拼接亮度均衡方法及系统 |
CN107369129A (zh) * | 2017-06-26 | 2017-11-21 | 深圳岚锋创视网络科技有限公司 | 一种全景图像的拼接方法、装置及便携式终端 |
US20180035047A1 (en) * | 2016-07-29 | 2018-02-01 | Multimedia Image Solution Limited | Method for stitching together images taken through fisheye lens in order to produce 360-degree spherical panorama |
US20180082454A1 (en) * | 2016-09-19 | 2018-03-22 | Qualcomm Incorporated | Color normalization for a multi-camera system |
CN109166076A (zh) * | 2018-08-10 | 2019-01-08 | 深圳岚锋创视网络科技有限公司 | 多相机拼接的亮度调整方法、装置及便携式终端 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3962676B2 (ja) * | 2002-11-29 | 2007-08-22 | キヤノン株式会社 | 画像処理方法及び装置 |
US10166921B2 (en) * | 2014-02-11 | 2019-01-01 | Robert Bosch Gmbh | Brightness and color matching video from multiple-camera system |
CN104881854B (zh) * | 2015-05-20 | 2017-10-31 | 天津大学 | 基于梯度和亮度信息的高动态范围图像融合方法 |
US9355433B1 (en) * | 2015-06-30 | 2016-05-31 | Gopro, Inc. | Image stitching in a multi-camera array |
US10558881B2 (en) * | 2016-08-24 | 2020-02-11 | Electronics And Telecommunications Research Institute | Parallax minimization stitching method and apparatus using control points in overlapping region |
-
2018
- 2018-08-10 CN CN201810906060.8A patent/CN109166076B/zh active Active
-
2019
- 2019-08-02 WO PCT/CN2019/099018 patent/WO2020029877A1/zh unknown
- 2019-08-02 EP EP19846694.8A patent/EP3836071A4/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102542548A (zh) | 2011-12-30 | 2012-07-04 | 深圳市万兴软件有限公司 | 一种图像间颜色校正方法和装置 |
CN105321151A (zh) * | 2015-10-27 | 2016-02-10 | Tcl集团股份有限公司 | 一种全景图拼接亮度均衡方法及系统 |
US20180035047A1 (en) * | 2016-07-29 | 2018-02-01 | Multimedia Image Solution Limited | Method for stitching together images taken through fisheye lens in order to produce 360-degree spherical panorama |
US20180082454A1 (en) * | 2016-09-19 | 2018-03-22 | Qualcomm Incorporated | Color normalization for a multi-camera system |
CN107369129A (zh) * | 2017-06-26 | 2017-11-21 | 深圳岚锋创视网络科技有限公司 | 一种全景图像的拼接方法、装置及便携式终端 |
CN109166076A (zh) * | 2018-08-10 | 2019-01-08 | 深圳岚锋创视网络科技有限公司 | 多相机拼接的亮度调整方法、装置及便携式终端 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3836071A4 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117237237A (zh) * | 2023-11-13 | 2023-12-15 | 深圳元戎启行科技有限公司 | 一种车载360度全景影像的光度均衡方法及装置 |
CN117319805A (zh) * | 2023-11-30 | 2023-12-29 | 广汽埃安新能源汽车股份有限公司 | 一种车辆全景图像的亮度补偿方法及装置 |
CN117319805B (zh) * | 2023-11-30 | 2024-03-01 | 广汽埃安新能源汽车股份有限公司 | 一种车辆全景图像的亮度补偿方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
EP3836071A1 (en) | 2021-06-16 |
CN109166076A (zh) | 2019-01-08 |
EP3836071A4 (en) | 2022-06-01 |
CN109166076B (zh) | 2020-08-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020029877A1 (zh) | 多相机拼接的亮度调整方法及便携式终端 | |
US8872887B2 (en) | Object detection and rendering for wide field of view (WFOV) image acquisition systems | |
JP7253635B2 (ja) | 画像融合方法及び携帯端末 | |
WO2018228467A1 (zh) | 图像曝光方法、装置、摄像设备及存储介质 | |
US9900505B2 (en) | Panoramic video from unstructured camera arrays with globally consistent parallax removal | |
CN105979238B (zh) | 一种多摄像头全局成像一致性控制方法 | |
WO2019072190A1 (zh) | 图像处理方法、电子装置和计算机可读存储介质 | |
US10764496B2 (en) | Fast scan-type panoramic image synthesis method and device | |
WO2017000484A1 (zh) | 用于用户终端的全景图像生成方法和装置 | |
WO2018176925A1 (zh) | Hdr图像的生成方法及装置 | |
CN111583116A (zh) | 基于多摄像机交叉摄影的视频全景拼接融合方法及系统 | |
US20060239579A1 (en) | Non Uniform Blending of Exposure and/or Focus Bracketed Photographic Images | |
CN106875339A (zh) | 一种基于长条形标定板的鱼眼图像拼接方法 | |
WO2014023231A1 (zh) | 宽视场超高分辨率光学成像系统及方法 | |
CN110378859A (zh) | 一种新的高动态范围图像生成方法 | |
US8750608B2 (en) | Image processing method and apparatus | |
JP2014078926A (ja) | 画像調整装置、画像調整方法およびプログラム | |
WO2019184667A1 (zh) | 一种全景图像的颜色校正方法和电子设备 | |
CN106097244A (zh) | 用于拼接图像的方法和装置以及用于组合图像的方法 | |
US11503232B2 (en) | Image signal processing for reducing lens flare | |
CN111866523B (zh) | 全景视频合成方法、装置、电子设备和计算机存储介质 | |
WO2020134123A1 (zh) | 全景拍摄方法及装置、相机、移动终端 | |
CN112669758A (zh) | 显示屏校正方法、装置、系统和计算机可读存储介质 | |
CN114331835A (zh) | 一种基于最优映射矩阵的全景图像拼接方法及装置 | |
US20160088266A1 (en) | Automatic image color correciton using an extended imager |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19846694 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2019846694 Country of ref document: EP Effective date: 20210310 |