TWI590658B - Image fusion method for multiple lens and device thereof - Google Patents

Image fusion method for multiple lens and device thereof Download PDF

Info

Publication number
TWI590658B
TWI590658B TW105111820A TW105111820A TWI590658B TW I590658 B TWI590658 B TW I590658B TW 105111820 A TW105111820 A TW 105111820A TW 105111820 A TW105111820 A TW 105111820A TW I590658 B TWI590658 B TW I590658B
Authority
TW
Taiwan
Prior art keywords
image
sub
parallax
fused
images
Prior art date
Application number
TW105111820A
Other languages
Chinese (zh)
Other versions
TW201737694A (en
Inventor
方元廷
Original Assignee
方元廷
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 方元廷 filed Critical 方元廷
Priority to TW105111820A priority Critical patent/TWI590658B/en
Application granted granted Critical
Publication of TWI590658B publication Critical patent/TWI590658B/en
Publication of TW201737694A publication Critical patent/TW201737694A/en

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Description

使用多鏡頭之影像融合方法及其裝置 Multi-lens image fusion method and device thereof

本發明提供一種影像融合方法及其裝置,特別是關於一種使用多鏡頭的影像融合方法及其裝置。 The invention provides an image fusion method and a device thereof, in particular to an image fusion method and a device using the same.

目前的影像融合法主要為金字塔融合法(pyramid fusion algorithm),而其他的影像融合法例如為SWT、CVT、NSCT、GRW、WSSM和HOSVD、GFF等。這些影像融合法是將多張相同視景但是不同焦距的影像結合成一張新的影像,且這張新的影像是由各個影像最清晰的部分組合而成。因此,相機需在不同時間下拍攝多張視景相同但焦距不同的影像。 The current image fusion method is mainly a pyramid fusion algorithm, and other image fusion methods are, for example, SWT, CVT, NSCT, GRW, WSSM, HOSVD, GFF, and the like. These image fusion methods combine multiple images of the same view but different focal lengths into a new image, and this new image is composed of the clearest parts of each image. Therefore, the camera needs to take multiple images with the same view but different focal lengths at different times.

若相機在拍攝的過程中有移動,將會融合出錯誤的結果。此外,在不同時間下拍攝的多張影像亦會有時間差問題,導致每張影像中的場景會有些許不同,例如車輛移動或者樹葉搖曳,使得影像融合的結果有偽影或模糊現象。 If the camera moves during the shooting process, it will fuse the wrong result. In addition, there are time lags in multiple images taken at different times, resulting in scenes in each image that are slightly different, such as vehicle movement or leaf swaying, resulting in artifacts or blurring of the image fusion.

因此,在拍攝的過程中,若可以減少相機移動且可同時避免每張影像在不同時間下拍攝的時間差問題,將可提升影像融合的結果。 Therefore, in the process of shooting, if the camera movement can be reduced and the time difference of each image at different times can be avoided at the same time, the result of image fusion can be improved.

本發明提供了一種使用多鏡頭之影像融合方法及其裝置,其透過多個鏡頭同時擷取多個具有不同焦距之視差影像,並調整多 個視差影像以進行影像融合。據此,使用多鏡頭之影像融合方法及其裝置可以同時解決相機移動以及每張視差影像的時間差問題,使得影像融合後的結果更為清晰。 The invention provides an image fusion method using multi-lens and a device thereof, which simultaneously captures a plurality of parallax images with different focal lengths through multiple lenses, and adjusts more Parallax images for image fusion. Accordingly, the multi-lens image fusion method and the device thereof can simultaneously solve the camera movement and the time difference of each parallax image, so that the result after image fusion is clearer.

本發明實施例提供一種使用多鏡頭之影像融合方法,適用於具有多個鏡頭之一影像融合裝置。影像融合方法包括如下步驟:透過多個鏡頭同時擷取具有不同焦距之多個視差影像;分析多個視差影像之多個特徵點;計算多個視差影像之多個特徵點之間的匹配關係;根據匹配關係位移每個視差影像,以將每個視差影像之相同影像部分調整至同一個影像位置;以及融合多個視差影像位移後的結果,並產生一融合影像。 Embodiments of the present invention provide an image fusion method using multiple lenses, which is suitable for an image fusion device having multiple lenses. The image fusion method includes the following steps: simultaneously capturing a plurality of parallax images having different focal lengths through multiple lenses; analyzing a plurality of feature points of the plurality of parallax images; and calculating a matching relationship between the plurality of feature points of the plurality of parallax images; Each parallax image is shifted according to a matching relationship to adjust the same image portion of each parallax image to the same image position; and the result of displacing the plurality of parallax images is shifted, and a fused image is generated.

本發明實施例提供一種使用多鏡頭之影像融合裝置,包括複數個鏡頭、影像擷取器與影像處理器。影像擷取器電連接多個鏡頭,且透過多個鏡頭同時擷取具有不同焦距之多個視差影像。影像處理器電連接影像擷取器,接收多個視差影像,且用以執行下列步驟:分析多個視差影像之多個特徵點;計算每個視差影像之多個特徵點與其他的視差影像之多個特徵點的一匹配關係;根據匹配關係位移每個視差影像,以將每個視差影像之相同影像部分調整至同一個影像位置;融合多個視差影像位移後的結果,並產生一融合影像;以及移除融合影像之邊緣的多餘影像,以產生修正後的融合影像。 Embodiments of the present invention provide an image fusion device using a multi-lens, including a plurality of lenses, an image capture device, and an image processor. The image capture device electrically connects the plurality of lenses, and simultaneously captures a plurality of parallax images having different focal lengths through the plurality of lenses. The image processor is electrically connected to the image capturing device to receive the plurality of parallax images, and is configured to perform the following steps: analyzing a plurality of feature points of the plurality of parallax images; calculating a plurality of feature points of each parallax image and other parallax images a matching relationship of the plurality of feature points; shifting each of the parallax images according to the matching relationship to adjust the same image portion of each parallax image to the same image position; merging the results of the displacement of the plurality of parallax images, and generating a fused image And removing unwanted images from the edges of the fused image to produce a corrected fused image.

為使能更進一步瞭解本發明之特徵及技術內容,請參閱以下有關本發明之詳細說明與附圖,但是此等說明與所附圖式僅係用來說明本發明,而非對本發明的權利範圍作任何的限制。 The detailed description of the present invention and the accompanying drawings are to be understood by the claims The scope is subject to any restrictions.

100‧‧‧影像融合裝置 100‧‧‧Image fusion device

110‧‧‧鏡頭組 110‧‧‧ lens group

120‧‧‧影像擷取器 120‧‧‧Image capture device

130‧‧‧影像處理器 130‧‧‧Image Processor

S210、S220、S230、S240、S250‧‧‧步驟 S210, S220, S230, S240, S250‧‧ steps

S232、S234、S236‧‧‧步驟 S232, S234, S236‧‧‧ steps

Ia、Ib‧‧‧視差影像 Ia, Ib‧‧ parallax images

D1a、D1b‧‧‧影像部分 D1a, D1b‧‧‧ image part

D2a、D2b‧‧‧影像部分 D2a, D2b‧‧‧ image part

s1、s2、s3、s4、s5、s6‧‧‧特徵點 S1, s2, s3, s4, s5, s6‧‧‧ feature points

r1、r2、r3、r4、r5、r6‧‧‧特徵點 R1, r2, r3, r4, r5, r6‧‧‧ feature points

P1‧‧‧右方向 P1‧‧‧Right direction

Wab‧‧‧多餘影像 Wab‧‧‧Extra image

Iab‧‧‧融合影像 Iab‧‧‧ fusion image

Fab‧‧‧修正後的融合影像 Fab‧‧‧Fixed Fusion Image

S331、S332、S333、S334、S335、S336、S337‧‧‧步驟 S331, S332, S333, S334, S335, S336, S337‧‧ steps

Id、Ie、If‧‧‧視差影像 Id, Ie, If‧‧ parallax images

D1d、D1e、D1f‧‧‧影像部分 D1d, D1e, D1f‧‧‧ image part

D2d、D2e、D2f、D3e‧‧‧影像部分 D2d, D2e, D2f, D3e‧‧‧ image parts

x1、x2、x3、x4、x5、x6‧‧‧特徵點 X1, x2, x3, x4, x5, x6‧‧‧ feature points

y1、y2、y3、y4、y5、y6‧‧‧特徵點 Y1, y2, y3, y4, y5, y6‧‧‧ feature points

z1、z2、z3、z4、z5、z6‧‧‧特徵點 Z1, z2, z3, z4, z5, z6‧‧‧ feature points

P2、P3‧‧‧右方向 P2, P3‧‧‧ right direction

Wde、Wef‧‧‧多餘影像 Wde, Wef‧‧‧ redundant images

Fde、Fef‧‧‧影像部分 Fde, Fef‧‧ image part

Ide、Ief‧‧‧子融合影像 Ide, Ief‧‧ ‧ sub-image

m1、m2、m3、m4、m5、m6‧‧‧子特徵點 M1, m2, m3, m4, m5, m6‧‧‧ sub-feature points

n1、n2、n3、n4、n5、n6‧‧‧子特徵點 N1, n2, n3, n4, n5, n6‧‧‧ sub-feature points

Wdef‧‧‧多餘影像 Wdef‧‧‧Extra image

Idef‧‧‧融合影像 Idef‧‧‧ fusion image

Fdef‧‧‧修正後的融合影像 Fdef‧‧‧corrected fusion image

圖1是本發明一實施例之使用多鏡頭之影像融合裝置的示意圖。 1 is a schematic diagram of an image fusion device using a multi-lens according to an embodiment of the present invention.

圖2是本發明一實施例之使用多鏡頭之影像融合方法的流 程圖。 2 is a flow of an image fusion method using a multi-lens according to an embodiment of the present invention; Cheng Tu.

圖3是本發明一實施例之位移每個視差影像的細部流程圖。 3 is a detailed flow chart of shifting each parallax image in accordance with an embodiment of the present invention.

圖4A-4D是本發明一實施例之影像融合方法的示意圖。 4A-4D are schematic diagrams of an image fusion method according to an embodiment of the present invention.

圖5是本發明另一實施例之位移每個視差影像的細部流程圖。 Figure 5 is a detailed flow chart of shifting each parallax image in accordance with another embodiment of the present invention.

圖6A-6E是本發明另一實施例之影像融合方法的示意圖。 6A-6E are schematic diagrams of an image fusion method according to another embodiment of the present invention.

在下文中,將藉由圖式說明本發明之各種例示實施例來詳細描述本發明。然而,本發明概念可能以許多不同形式來體現,且不應解釋為限於本文中所闡述之例示性實施例。此外,圖式中相同參考數字可用以表示類似的元件。 In the following, the invention will be described in detail by way of illustration of various exemplary embodiments of the invention. However, the inventive concept may be embodied in many different forms and should not be construed as being limited to the illustrative embodiments set forth herein. In addition, the same reference numerals may be used in the drawings to indicate similar elements.

本發明實施例所提供的使用多鏡頭之影像融合方法及其裝置,其為透過多個鏡頭同時擷取多個具有不同焦距之視差影像,並根據每個視差影像的特徵點之間的匹配關係(如位置匹配關係),將每個視差影像之相同影像部分調整到同一個影像位置。最後,融合調整後的視差影像以產生融合影像。據此,使用多鏡頭之影像融合方法及其裝置可以同時解決相機移動以及每張視差影像的時間差問題,而不會有偽影或模糊的現象,使得影像融合後的結果更為清晰。此外,由於使用多鏡頭之影像融合方法及其裝置為同時擷取多個視差影像(即不會有每張視差影像的時間差問題),故即使拍攝正在移動的物體,也可以得到良好的影像融合結果。以下將進一步介紹本發明揭露之使用多鏡頭之影像融合方法及其裝置。 The image fusion method and device using the multi-lens according to the embodiment of the present invention are to simultaneously capture a plurality of parallax images having different focal lengths through multiple lenses, and according to the matching relationship between the feature points of each parallax image. (such as position matching relationship), adjust the same image portion of each parallax image to the same image position. Finally, the adjusted parallax image is blended to produce a fused image. Accordingly, the multi-lens image fusion method and the device thereof can simultaneously solve the camera movement and the time difference of each parallax image without artifact or blurring, so that the result after image fusion is clearer. In addition, since the multi-lens image fusion method and the device thereof simultaneously capture multiple parallax images (that is, there is no time difference problem for each parallax image), good image fusion can be obtained even if the moving object is photographed. result. The image fusion method using the multi-lens and the apparatus thereof disclosed in the present invention will be further described below.

首先,請參考圖1,其顯示本發明一實施例之使用多鏡頭之影像融合裝置的示意圖。如圖1所示,影像融合裝置100為用來同時對外部物件擷取多個影像,以將所擷取的影像作為影像融合的來源。在本實施例中,影像融合裝置100可為智慧型手機、錄 影機、平板電腦、筆記型電腦或其他需要執行影像融合的裝置,本發明對此不作限制。 First, please refer to FIG. 1, which shows a schematic diagram of an image fusion device using a multi-lens according to an embodiment of the present invention. As shown in FIG. 1 , the image fusion device 100 is configured to simultaneously capture multiple images of an external object to use the captured image as a source of image fusion. In this embodiment, the image fusion device 100 can be a smart phone and recorded. The present invention does not limit the video camera, the tablet computer, the notebook computer, or other devices that need to perform image fusion.

影像融合裝置100包括一鏡頭組110、一影像擷取器120與一影像處理器130。如圖1所示,鏡頭組110具有多個鏡頭(未繪於圖式中)。在本實施例中,上述多個鏡頭設置在同一個平面(未繪於圖式中)且鏡頭之間具有一預定距離。 The image fusion device 100 includes a lens group 110, an image capture device 120, and an image processor 130. As shown in FIG. 1, the lens group 110 has a plurality of lenses (not shown in the drawings). In this embodiment, the plurality of lenses are disposed on the same plane (not shown in the drawings) and have a predetermined distance between the lenses.

影像擷取器120電連接鏡頭組110之多個鏡頭,且透過上述多個鏡頭同時擷取具有不同焦距之視差影像。舉例來說,鏡頭組110具有2個鏡頭,影像擷取器120將透過2個鏡頭同時擷取具有不同焦距的兩個影像作為兩個視差影像,如圖4A所示之視差影像Ia與Ib。在每一張視差影像中,焦距對應到的影像最清晰(如實線部分)。而越遠離焦距,影像則越模糊(如虛線部分)。舉例來說,在視差影像Ia中,焦距的位置落在左邊人形(即實線部分),且越遠離焦距,影像將越模糊(如虛線部分的右邊人形);而在視差影像Ib中,焦距的位置則落在右邊人形(即實線部分),且越遠離焦距,影像將越模糊(如虛線部分的左邊人形)。而由於相鄰的鏡頭之間具有一段距離,視差影像Ia與Ib之間會有距離位差。因此,視差影像Ia與Ib將相應形成相同影像部分D1a與D1b(即具有相同影像內容),以及不同影像部分D2a與D2b(即具有不同影像內容),如圖4A所示。 The image capturing device 120 electrically connects the plurality of lenses of the lens group 110, and simultaneously captures the parallax images having different focal lengths through the plurality of lenses. For example, the lens group 110 has two lenses, and the image capturing device 120 simultaneously captures two images having different focal lengths as two parallax images through two lenses, such as the parallax images Ia and Ib shown in FIG. 4A. In each parallax image, the focal length corresponds to the sharpest image (such as the solid line). The farther away from the focal length, the more blurred the image (such as the dotted line). For example, in the parallax image Ia, the position of the focal length falls on the left human figure (ie, the solid line portion), and the farther away from the focal length, the more blurred the image will be (such as the right human figure in the dotted line portion); and in the parallax image Ib, the focal length The position falls on the right human form (ie, the solid line part), and the farther away from the focal length, the more blurred the image will be (such as the left human figure in the dotted line). And because there is a distance between adjacent lenses, there will be a distance difference between the parallax images Ia and Ib. Therefore, the parallax images Ia and Ib will correspondingly form the same image portions D1a and D1b (ie, have the same image content), and different image portions D2a and D2b (ie, have different image contents), as shown in FIG. 4A.

影像處理器130電連接影像擷取器120,且接收由影像擷取器120所傳送的視差影像。影像處理器130係用以執行下列步驟,以將接收到的視差影像之相同影像部分調整到同一個影像位置,並對調整後的視差影像進行影像融合。 The image processor 130 is electrically connected to the image capture device 120 and receives the parallax image transmitted by the image capture device 120. The image processor 130 is configured to perform the following steps to adjust the same image portion of the received parallax image to the same image position, and perform image fusion on the adjusted parallax image.

請同時參考圖1-2,圖2顯示本發明一實施例之使用多鏡頭之影像融合方法的流程圖。首先,影像處理器120分析視差影像之多個特徵點(步驟S210)。在本實施例中,影像處理器120係採用尺度不變特徵轉換(Scale-invariant feature transform,SIFT)演 算法來搜尋視差影像之特徵點,且上述特徵點之搜尋方式為所屬技術領域具有通常知識者所知悉,故不再贅述。而視差影像之多個特徵點亦可由其他演算法,如角點偵測(corner detector)、SURF演算法(speeded up robust feature)等搜尋而得,本發明對此不作限制。當然,多個特徵點亦可為視差影像的全部像素,或其他可代表視差影像的資訊,本發明對此不作限制。 Please refer to FIG. 1-2 at the same time. FIG. 2 is a flowchart showing an image fusion method using a multi-lens according to an embodiment of the present invention. First, the image processor 120 analyzes a plurality of feature points of the parallax image (step S210). In this embodiment, the image processor 120 is scale-invariant feature transform (SIFT). The algorithm searches for feature points of the parallax image, and the manner of searching for the feature points is known to those of ordinary skill in the art, and therefore will not be described again. The plurality of feature points of the parallax image may also be searched by other algorithms, such as a corner detector, a speeded up robust feature, etc., which are not limited by the present invention. Certainly, the plurality of feature points may also be all the pixels of the parallax image, or other information that can represent the parallax image, which is not limited by the present invention.

舉例來說,請同時參考圖4A與4B,影像擷取器120透過2個鏡頭同時擷取具有不同焦距的視差影像Ia與Ib並傳送到影像處理器130。而有關視差影像Ia與Ib之間的關係已於上述例子中作說明,故在此不再贅述。因此,在視差影像Ia中,焦距的位置落在左邊的人形,且具有相同影像部分D1a與不同影像部分D2a;以及在視差影像Ib中,焦距的位置則落在右邊的人形,且具有相同影像部分D1b與不同影像部分D2b。而影像處理器130將透過SIFT演算法分析視差影像Ia的特徵點。假設影像處理器130分析出視差影像Ia具有6個特徵點s1、s2、s3、s4、s5與s6,以及視差影像Ib具有6個特徵點r1、r2、r3、r4、r5與r6,如圖4B所示。 For example, referring to FIG. 4A and FIG. 4B simultaneously, the image capturing device 120 simultaneously captures the parallax images Ia and Ib having different focal lengths through the two lenses and transmits them to the image processor 130. The relationship between the parallax images Ia and Ib has been described in the above example, and therefore will not be described again. Therefore, in the parallax image Ia, the position of the focal length falls on the left human figure, and has the same image portion D1a and the different image portion D2a; and in the parallax image Ib, the position of the focal length falls on the right human figure and has the same image Part D1b and different image portion D2b. The image processor 130 will analyze the feature points of the parallax image Ia through the SIFT algorithm. It is assumed that the image processor 130 analyzes that the parallax image Ia has six feature points s1, s2, s3, s4, s5, and s6, and the parallax image Ib has six feature points r1, r2, r3, r4, r5, and r6, as shown in the figure. Shown in 4B.

接下來,影像處理器130將計算每個視差影像之特徵點與其他視差影像之特徵點的匹配關係(步驟S220)。在本實施例中,影像處理器130係採用隨機抽樣一致性(Random sample consensus,RANSAC)演算法來尋找每個視差影像之特徵點最合適的匹配位置,且上述特徵點之搜尋方式為所屬技術領域具有通常知識者所知悉,故不再贅述。而每個視差影像之特徵點的匹配關係亦可由其他影像匹配演算法來計算,本發明對此不作限制。 Next, the image processor 130 calculates a matching relationship between the feature points of each of the parallax images and the feature points of the other parallax images (step S220). In this embodiment, the image processor 130 uses a Random Sample Consensus (RANSAC) algorithm to find the most suitable matching position of the feature points of each parallax image, and the search method of the feature points is a technology. The field is known to the general knowledge and will not be described again. The matching relationship of the feature points of each parallax image can also be calculated by other image matching algorithms, which is not limited by the present invention.

承接上述例子,影像處理器130將透過RANSAC演算法找到視差影像Ia之特徵點s1匹配到視差影像Ib之特徵點r2、視差影像Ia之特徵點s2匹配到視差影像Ib之特徵點r3、視差影像Ia之特徵點s5匹配到視差影像Ib之特徵點r4,以及視差影 像Ia之特徵點s6匹配到視差影像Ib之特徵點r5。而視差影像Ia之特徵點s3與s4,以及視差影像Ib之特徵點r1與r6則不會有匹配關係。 According to the above example, the image processor 130 finds that the feature point s1 of the parallax image Ia is matched to the feature point r2 of the parallax image Ib and the feature point s2 of the parallax image Ia is matched to the feature point r3 of the parallax image Ib and the parallax image through the RANSAC algorithm. The feature point s5 of Ia matches the feature point r4 of the parallax image Ib, and the parallax shadow The feature point s6 like Ia is matched to the feature point r5 of the parallax image Ib. The feature points s3 and s4 of the parallax image Ia and the feature points r1 and r6 of the parallax image Ib do not have a matching relationship.

在計算出每個視差影像之特徵點的匹配關係(即步驟S220)之後,影像處理器130將根據匹配關係位移每個視差影像,以將每個視差影像之相同影像部分調整至同一個影像位置(步驟S230)。承接上述例子,視差影像Ia具有相同影像部分D1a與不同影像部分D2a,以及視差影像Ib具有相同影像部分D1b與不同影像部分D2b。因此,影像處理器130將根據匹配關係將視差影像Ia之相同影像部分D1a與視差影像Ib之相同影像部分D1b調整到同一個影像位置。 After calculating the matching relationship of the feature points of each parallax image (ie, step S220), the image processor 130 shifts each parallax image according to the matching relationship to adjust the same image portion of each parallax image to the same image position. (Step S230). According to the above example, the parallax image Ia has the same image portion D1a and the different image portion D2a, and the parallax image Ib has the same image portion D1b and different image portion D2b. Therefore, the image processor 130 adjusts the same image portion D1a of the parallax image Ia and the same image portion D1b of the parallax image Ib to the same image position according to the matching relationship.

更進一步來說,請同時參考圖3,其顯示本發明一實施例之位移每個視差影像的細部流程圖。首先,影像處理器130將選擇視差影像其中之一作為主要影像,且主要影像之相同影像部分位於上述影像位置,意即,影像處理器130將主要影像之相同影像部分所在的影像位置作為基準位置(步驟S232)。再來,影像處理器130將根據匹配關係計算未選擇的每個視差影像之位移量。而上述位移量係關聯於對應的視差影像之相同影像部分移動至影像位置的距離(步驟S234)。最後,影像處理器130將根據每個位移量位移對應的視差影像(步驟S236)。 Furthermore, please refer to FIG. 3 at the same time, which shows a detailed flow chart of shifting each parallax image according to an embodiment of the present invention. First, the image processor 130 selects one of the parallax images as the main image, and the same image portion of the main image is located at the image position, that is, the image processor 130 uses the image position of the same image portion of the main image as the reference position. (Step S232). Then, the image processor 130 calculates the displacement amount of each of the unselected parallax images according to the matching relationship. The displacement amount is associated with the distance moved to the image position by the same image portion of the corresponding parallax image (step S234). Finally, the image processor 130 shifts the corresponding parallax image according to each displacement amount (step S236).

承接上述例子,影像處理器130將視差影像Ia作為主要影像,並將視差影像Ia之相同影像部分D1a所在的影像位置設定為基準位置。再來,影像處理器130將根據匹配關係計算未選擇的視差影像Ib之位移量,且此位移量代表視差影像Ib之相同影像部分D1b移動到基準位置(視差影像Ia之相同影像部分D1a所在的影像位置)的距離。最後,影像處理器130將根據視差影像Ib之移動量往右方向P1位移視差影像Ib,以將視差影像Ib之相同影像部分D1b調整到基準位置(即視差影像Ia之相同影像 部分D1a所在的影像位置)。當然,影像處理器130亦可改為將視差影像Ib作為主要影像,並重複步驟S232-S236之流程,以將視差影像Ia之相同影像部分D1a調整到視差影像Ib之相同影像部分D1b所在的影像位置,本發明對此不作限制。 According to the above example, the image processor 130 uses the parallax image Ia as the main image, and sets the image position where the same image portion D1a of the parallax image Ia is located as the reference position. Then, the image processor 130 calculates the displacement amount of the unselected parallax image Ib according to the matching relationship, and the displacement amount represents that the same image portion D1b of the parallax image Ib is moved to the reference position (the same image portion D1a of the parallax image Ia is located) The distance of the image position). Finally, the image processor 130 shifts the parallax image Ib to the right direction P1 according to the amount of movement of the parallax image Ib to adjust the same image portion D1b of the parallax image Ib to the reference position (ie, the same image of the parallax image Ia). Part of the image location where D1a is located). Of course, the image processor 130 can also use the parallax image Ib as the main image, and repeat the process of steps S232-S236 to adjust the same image portion D1a of the parallax image Ia to the image of the same image portion D1b of the parallax image Ib. The position is not limited by the present invention.

在將每個視差影像之相同影像部分調整到同一個影像位置(步驟S230)之後,影像處理器130將融合上述視差影像位移後的結果,以據此產生一融合影像(步驟S240)。意即,在影像融合的過程中,影像處理器130會將每張視差影像之相同影像部分中的清晰影像部分(即對應到焦距的位置)融合成一張融合影像(即具有每張視差影像中的清晰影像部分)。而在此步驟中的影像融合技術為所屬技術領域具有通常知識者所知悉,故不再贅述。 After the same image portion of each parallax image is adjusted to the same image position (step S230), the image processor 130 merges the result of the displacement of the parallax image to generate a fused image (step S240). That is, in the process of image fusion, the image processor 130 fuses the clear image portion (ie, the position corresponding to the focal length) in the same image portion of each parallax image into a fused image (ie, has each parallax image) Part of the clear image). The image fusion technology in this step is known to those of ordinary skill in the art, and will not be described again.

承接上述例子,如圖4C所示,影像處理器130將融合視差影像Ia與Ib位移後的結果,以據此產生融合影像Iab。而在影像融合的過程中,影像處理器130將相同影像部分D1a與D1b中的清晰影像部分(即在相同影像部分D1a中的左邊人形以及在相同影像部分D1b中的右邊人形)融合成一張融合影像Iab,使得融合影像Iab具有每張視差影像Ia與Ib中的清晰影像部分,故融合影像Iab相較於視差影像Ia與Ib更為清晰。 In accordance with the above example, as shown in FIG. 4C, the image processor 130 shifts the result of merging the parallax images Ia and Ib to generate a fused image Iab. In the process of image fusion, the image processor 130 fuses the clear image portion of the same image portion D1a and D1b (ie, the left human figure in the same image portion D1a and the right human shape in the same image portion D1b) into one fusion. The image Iab is such that the fused image Iab has a clear image portion in each of the parallax images Ia and Ib, so that the fused image Iab is clearer than the parallax images Ia and Ib.

值得注意的是,由於影像處理器130為根據視差影像位移後的結果(如圖4B所示,視差影像Ib之相同影像部分D1b往右方向P1位移至視差影像Ia之相同影像部分D1a所在的影像位置)產生融合影像,故融合影像在邊緣會形成有視差影像位移後所留下的多餘影像。因此,在產生融合影像Iab(即步驟S240)之後,影像處理器130將移除融合影像之邊緣的多餘影像,以產生修正後的融合影像,以供影像處理器130產生出更好的融合影像(步驟S250)。承接上述例子,如圖4C與4D所示,影像處理器130將進一步移除融合影像Iab之邊緣的多餘影像Wab(在本實施例中為空白影像),以產生修正後的融合影像Fab。 It should be noted that, since the image processor 130 is displaced according to the parallax image (as shown in FIG. 4B, the same image portion D1b of the parallax image Ib is displaced to the right direction P1 to the image of the same image portion D1a of the parallax image Ia. Position) produces a fused image, so the fused image forms an extra image left behind by the displacement of the parallax image. Therefore, after generating the fused image Iab (ie, step S240), the image processor 130 removes the extra image of the edge of the fused image to generate the corrected fused image for the image processor 130 to produce a better fused image. (Step S250). In accordance with the above example, as shown in FIGS. 4C and 4D, the image processor 130 will further remove the extra image Wab (in this embodiment, a blank image) of the edge of the fused image Iab to generate the corrected fused image Fab.

此外,影像處理器130在根據匹配關係位移每個視差影像,以將每個視差影像之相同影像部分調整至同一個影像位置的步驟中,亦可以其他方式來進行,如下述另外一個實施例。 In addition, the image processor 130 may perform the method of shifting each parallax image according to the matching relationship to adjust the same image portion of each parallax image to the same image position, or may be performed in other manners, as another embodiment described below.

而為了方便說明,以下例子以影像擷取器120透過3個鏡頭同時擷取具有不同焦距的三個影像作為三個視差影像來說明。如圖6A所示之視差影像Id、Ie與If,焦距對應到的影像最清晰(如實線部分),而越遠離焦距,影像則越模糊(如虛線部分)。舉例來說,在視差影像Id中,焦距的位置落在最左邊人形(即實線部分),且越遠離焦距,影像將越模糊(如虛線部分的中間與右邊人形);在視差影像Ie中,焦距的位置則落在中間人形(即實線部分),且越遠離焦距,影像將越模糊(如虛線部分的左邊與右邊人形);而在視差影像If中,焦距的位置則落在右邊人形(即實線部分),且越遠離焦距,影像將越模糊(如虛線部分的左邊與中間人形)。此外,由於相鄰的鏡頭之間具有一段距離,視差影像Id、Ie與If之間會有距離位差。因此,視差影像Id與Ie將相應形成相同的影像部分D1d、D1e與D3e(即具有相同影像內容)以及不同的影像部分D2d與D2e(即具有不同影像內容)。而視差影像Ie與If將相應形成相同的影像部分D1e、D2e與D1f(即具有相同影像內容)以及不同的影像部分D3e與D2f(即具有不同影像內容)。 For convenience of description, the following example uses the image capture device 120 to simultaneously capture three images having different focal lengths as three parallax images through three lenses. As shown in the parallax images Id, Ie, and If shown in FIG. 6A, the image corresponding to the focal length is the clearest (such as the solid line portion), and the farther away from the focal length, the more blurred the image (such as the dotted line portion). For example, in the parallax image Id, the position of the focal length falls on the leftmost human shape (ie, the solid line portion), and the farther away from the focal length, the more blurred the image will be (such as the middle and right human figures of the dotted line); in the parallax image Ie The position of the focal length falls on the middle human figure (ie, the solid line part), and the farther away from the focal length, the more blurred the image will be (such as the left and right human figures of the dotted line); and in the parallax image If, the position of the focal length falls to the right. The human form (that is, the solid line part), and the farther away from the focal length, the more blurred the image will be (such as the left side of the dotted line and the middle human figure). In addition, there is a distance difference between the parallax images Id, Ie, and If due to a distance between adjacent lenses. Therefore, the parallax images Id and Ie will correspondingly form the same image portions D1d, D1e, and D3e (i.e., have the same image content) and different image portions D2d and D2e (i.e., have different image contents). The parallax images Ie and If will correspondingly form the same image portions D1e, D2e, and D1f (i.e., have the same image content) and different image portions D3e and D2f (i.e., have different image contents).

接著,如圖6B所示,影像處理器130將透過SIFT演算法分析出視差影像Id具有6個特徵點x1、x2、x3、x4、x5與x6,視差影像Ie具有6個特徵點y1、y2、y3、y4、y5與y6,以及視差影像If具有6個特徵點z1、z2、z3、z4、z5與z6(如同上述步驟S210)。再來,影像處理器130將透過RANSAC演算法找到視差影像Id之特徵點x1-x6分別匹配到視差影像Ie之特徵點y1-y6,以及視差影像Id之特徵點x1-x6分別匹配到視差影像If之特徵點z1-z6(如同上述步驟S220)。 Next, as shown in FIG. 6B, the image processor 130 analyzes the parallax image Id by the SIFT algorithm to have six feature points x1, x2, x3, x4, x5, and x6, and the parallax image Ie has six feature points y1 and y2. , y3, y4, y5, and y6, and the parallax image If have six feature points z1, z2, z3, z4, z5, and z6 (as in the above-described step S210). Then, the image processor 130 matches the feature points x1-x6 of the parallax image Id by the RANSAC algorithm to the feature points y1-y6 of the parallax image Ie, and the feature points x1-x6 of the parallax image Id are respectively matched to the parallax image. The feature points z1-z6 of If (like step S220 above).

在步驟S220之後,影像處理器130將改以不同圖3之於步驟S232-S234之方式來位移每個視差影像,以將每個視差影像之相同影像部分調整至同一個影像位置,其詳細說明如下。 After step S220, the image processor 130 shifts each parallax image in a manner different from that of steps S232-S234 of FIG. 3 to adjust the same image portion of each parallax image to the same image position. as follows.

請參考圖5,其顯示本發明另一實施例之位移每個視差影像的細部流程圖。首先,影像處理器130分別從多個視差影像中選擇二個作為待匹配影像組,且每個視差影像至少被選擇一次(步驟S331)。舉例來說,如圖6B所示,影像處理器130選擇視差影像Id與Ie作為第一組待匹配影像組,且選擇視差影像Ie與Id作為第二組待匹配影像組。 Please refer to FIG. 5, which shows a detailed flow chart of shifting each parallax image according to another embodiment of the present invention. First, the image processor 130 selects two of the plurality of parallax images as the image group to be matched, and each of the parallax images is selected at least once (step S331). For example, as shown in FIG. 6B, the image processor 130 selects the parallax images Id and Ie as the first group of to-be-matched image groups, and selects the parallax images Ie and Id as the second group of to-be-matched image groups.

接著,影像處理器130將在每個待匹配影像組中選擇其中一個視差影像作為第一影像,選擇其中另一個視差影像作為第二影像。而第一影像與第二影像具有相同的子影像(步驟S332)。承接上述例子,如圖6B所示,在第一組待匹配影像組中選擇視差影像Id作為第一影像,視差影像Ie作為第二影像,且視差影像Id與視差影像Ie具有相同的子影像,即相同的影像部分D1d、D1e與D3e。而在第二組待匹配影像組中選擇視差影像Ie作為第一影像,視差影像If作為第二影像,且視差影像Ie與視差影像If具有相同的子影像,即相同的影像部分D1e、D2e與D1f。 Next, the image processor 130 selects one of the parallax images as the first image in each of the to-be-matched image groups, and selects one of the other parallax images as the second image. The first image and the second image have the same sub-image (step S332). According to the above example, as shown in FIG. 6B, in the first group of to-be-matched image groups, the parallax image Id is selected as the first image, the parallax image Ie is used as the second image, and the parallax image Id and the parallax image Ie have the same sub-image. That is, the same image portions D1d, D1e, and D3e. The parallax image Ie is selected as the first image, and the parallax image If is the second image, and the parallax image If has the same sub-image, that is, the same image portion D1e, D2e and D1f.

再來,影像處理器130將在每個待匹配影像組中根據匹配關係計算第二影像之第一位移量。而第一位移量係關聯於第二影像之子影像移動至第一影像之子影像的距離(步驟S333)。承接上述例子,如圖6B所示,在第一組待匹配影像組中,影像處理器130根據匹配關係計算第二影像(即視差影像Ie)之第一位移量,且此第一位移量代表第二影像之子影像(即視差影像Ie之相同的影像部分D1e與D3e)移動到第一影像之子影像(即視差影像Id之相同的影像部分D1d)的距離。在第二組待匹配影像組中,影像處理器130根據匹配關係計算第二影像(即視差影像If)之第一位移量,且此第一位移量代表第二影像之子影像(即視差影像If之相 同的影像部分D1f)移動到第一影像之子影像(即視差影像Ie相同的影像部分D1e與D3e)的距離。 Then, the image processor 130 calculates a first displacement amount of the second image according to the matching relationship in each image group to be matched. The first displacement amount is related to the distance that the sub-image of the second image is moved to the sub-image of the first image (step S333). According to the above example, as shown in FIG. 6B, in the first group of to-be-matched image groups, the image processor 130 calculates a first displacement amount of the second image (ie, the parallax image Ie) according to the matching relationship, and the first displacement amount represents The sub-images of the second image (ie, the same image portions D1e and D3e of the parallax image Ie) are moved to the distance of the sub-images of the first image (ie, the same image portion D1d of the parallax image Id). In the second group of to-be-matched image groups, the image processor 130 calculates a first displacement amount of the second image (ie, the parallax image If) according to the matching relationship, and the first displacement amount represents the sub-image of the second image (ie, the parallax image If Phase The same image portion D1f) is moved to the distance of the sub-image of the first image (i.e., the image portions D1e and D3e having the same parallax image Ie).

接著,影像處理器130將在每個待匹配影像組中,根據第一位移量位移第二影像(步驟S334)。承接上述例子,如圖6B所示,在第一組待匹配影像組中,影像處理器130將根據視差影像Ie之第一位移量往右方向P2位移視差影像Ie,以將視差影像Ie之相同影像部分D1e與D3e調整到視差影像Id之相同影像部分D1d所在的影像位置。而在第二組待匹配影像組中,影像處理器130將根據視差影像If之第一位移量往右方向P2位移視差影像If,以將視差影像If之相同影像部分D1f調整到視差影像Ie之相同影像部分D1e與D2e所在的影像位置。 Next, the image processor 130 shifts the second image according to the first displacement amount in each image group to be matched (step S334). According to the above example, as shown in FIG. 6B, in the first group of to-be-matched image groups, the image processor 130 shifts the parallax image Ie to the right direction P2 according to the first displacement amount of the parallax image Ie to make the parallax image Ie the same. The image portions D1e and D3e are adjusted to the image position where the same image portion D1d of the parallax image Id is located. In the second group of images to be matched, the image processor 130 shifts the parallax image If to the right direction P2 according to the first displacement amount of the parallax image If to adjust the same image portion D1f of the parallax image If to the parallax image Ie. The image position where the same image portions D1e and D2e are located.

接著,影像處理器130將在每個待匹配影像組中,融合待匹配影像組位移後的結果,以分別成為一子融合影像,其中每個子融合影像具有相同影像部分(步驟S335)。承接上述例子,如圖6C所示,影像處理器130將融合視差影像Id與Ie位移後的結果以據此產生子融合影像Ide,且融合視差影像Ie與If位移後的結果以據此產生子融合影像Ief。此時,子融合影像Ide與子融合影像Ief將會具有相同的影像部分Fde與Fef。而子融合影像Ide與Ief亦會分別具有多餘部分Wde與Wef(在本實施例中為空白影像)。 Next, the image processor 130 merges the results of the displacement of the image group to be matched in each image group to be matched to respectively become a sub-fused image, wherein each sub-fused image has the same image portion (step S335). According to the above example, as shown in FIG. 6C, the image processor 130 generates the sub-fused image Ide according to the result of the displacement of the fused parallax images Id and Ie, and combines the results of the disparity images Ie and If to generate the sub-sequence. Fusion image Ief. At this time, the sub-fused image Ide and the sub-fused image Ief will have the same image portions Fde and Fef. The sub-fused images Ide and Ief also have redundant portions Wde and Wef (in this embodiment, blank images).

再來,影像處理器130將分析每個子融合影像之子特徵點,且計算每個子融合影像之子特徵點之間的子匹配關係(步驟S336)。承接上述例子,如圖6C所示,影像處理器130將透過SIFT演算法分析出子融合影像Ide具有6個子特徵點m1、m2、m3、m4、m5與m6,以及子融合影像Ief具有6個子特徵點n1、n2、n3、n4、n5與n6。而影像處理器130接著將透過RANSAC演算法找到子視差影像Ide之子特徵點m1-m6分別匹配到視差影像Ief之子特徵點n1-n6,即子匹配關係。 Then, the image processor 130 analyzes the sub-feature points of each sub-fused image, and calculates a sub-match relationship between the sub-feature points of each sub-fused image (step S336). According to the above example, as shown in FIG. 6C, the image processor 130 analyzes the sub-fused image Ide through the SIFT algorithm to have six sub-feature points m1, m2, m3, m4, m5, and m6, and the sub-fused image Ief has six sub-segments. Feature points n1, n2, n3, n4, n5 and n6. The image processor 130 then finds the sub-feature points m1-m6 of the sub-parallax image Ide through the RANSAC algorithm to match the sub-feature points n1-n6 of the parallax image Ief, that is, the sub-matching relationship.

最後,影像處理器130將根據子匹配關係位移每個子融合影像,以調整每個子融合影像之相同影像部分至同一個影像位置(步驟S337)。承接上述例子,子融合影像Ide與Ief具有相同影像部分Fde與Fef。因此,影像處理器130將根據子匹配關係將子融合影像Ide之相同影像部分Fde與子融合影像Ief之相同影像部分Fef調整到同一個影像位置。 Finally, the image processor 130 shifts each sub-fused image according to the sub-matching relationship to adjust the same image portion of each sub-fused image to the same image position (step S337). In accordance with the above example, the sub-fused images Ide and Ief have the same image portions Fde and Fef. Therefore, the image processor 130 adjusts the same image portion Fde of the sub-fused image Ide and the same image portion Fef of the sub-fused image Ief to the same image position according to the sub-matching relationship.

而有關影像處理器130根據子匹配關係位移每個子融合影像的步驟大致上可由步驟S232-S236、圖3與圖4B推得。首先,影像處理器130選擇子融合影像其中之一作為一主要影像,且主要影像之相同影像部分位於上述影像位置,意即,影像處理器130將主要影像之相同影像部分所在的影像位置作為基準位置;再來,影像處理器130將根據子匹配關係計算未選擇的每個子融合影像之第二位移量,且上述第二位移量關聯於對應的子融合影像之相同影像部分移動至影像位置的距離;最後,影像處理器130將根據每個位移量位移對應的視差影像。 The step of the image processor 130 shifting each sub-fused image according to the sub-matching relationship can be roughly derived from steps S232-S236, FIG. 3 and FIG. 4B. First, the image processor 130 selects one of the sub-fused images as a main image, and the same image portion of the main image is located at the image position, that is, the image processor 130 uses the image position of the same image portion of the main image as a reference. Positioning; further, the image processor 130 calculates a second displacement amount of each of the sub-fusion images that are not selected according to the sub-matching relationship, and the second displacement amount is associated with the same image portion of the corresponding sub-fused image to move to the image position. Finally, the image processor 130 will shift the corresponding parallax image according to each displacement amount.

承接上述例子,影像處理器130將子融合影像Ide作為主要影像,並將子融合影像Ide之相同影像部分Fde所在的影像位置設定為基準位置。再來,影像處理器130將根據子匹配關係計算未選擇的子融合影像Ief之第二位移量,且此第二位移量代表子融合影像Ief之相同影像部分Fef移動到基準位置(子融合影像Ide之相同影像部分Fde所在的影像位置)的距離。最後,影像處理器130將根據子融合影像Ief之移動量往右方向P3位移子融合影像Ief,以將子融合影像Ief之相同影像部分Fef調整到基準位置(即子融合影像Ide之相同影像部分Fde所在的影像位置)。 According to the above example, the image processor 130 sets the sub-fused image Ide as the main image, and sets the image position where the same image portion Fde of the sub-fused image Ide is located as the reference position. Then, the image processor 130 calculates a second displacement amount of the unselected sub-fused image Ief according to the sub-matching relationship, and the second displacement amount represents the same image portion Fef of the sub-fused image Ief moves to the reference position (sub-fused image) The distance of the image position where the same image portion of the Ide is located. Finally, the image processor 130 shifts the sub-fused image Ief to the right direction P3 according to the amount of movement of the sub-fused image Ief to adjust the same image portion Fef of the sub-fused image Ief to the reference position (ie, the same image portion of the sub-fused image Ide) The image location where Fde is located).

而在將每個子融合影像之相同影像部分調整到同一個影像位置之後(即步驟S337)之後,影像處理器130將執行步驟S240,以融合多個視差影像位移後的結果,並據此產生融合影像。承接上述例子,如圖6D所示,影像處理器130將融合視差影像Id、 Ie與If位移後的結果(即子融合影像Ide與Ief位移後的結果),以據此產生融合影像Idef。 After the same image portion of each sub-fused image is adjusted to the same image position (ie, step S337), the image processor 130 performs step S240 to fuse the results of the displacement of the plurality of parallax images, and thereby generate the fusion. image. In accordance with the above example, as shown in FIG. 6D, the image processor 130 will fuse the disparity image Id, The result of the displacement of Ie and If (the result of the sub-fusion image Ide and Ief displacement) is used to generate the fused image Idef.

而影像處理器130在產生融合影像之後,影像處理器130將移除融合影像之邊緣的多餘影像,以產生修正後的融合影像,以供影像處理器130產生出更好的融合影像。承接上述例子,如圖6D與6E所示,影像處理器130將進一步移除融合影像Idef之邊緣的多餘影像Wdef(在本實施例中為二個空白影像),以產生修正後的融合影像Fdef。 After the image processor 130 generates the fused image, the image processor 130 removes the redundant image of the edge of the fused image to generate the corrected fused image for the image processor 130 to generate a better fused image. According to the above example, as shown in FIGS. 6D and 6E, the image processor 130 further removes the extra image Wdef (two blank images in this embodiment) of the edge of the fused image Idef to generate the corrected fused image Fdef. .

綜上所述,本發明實施例所提供的使用多鏡頭之影像融合方法及其裝置,其為透過多個鏡頭同時擷取多個具有不同焦距之視差影像,並將每個視差影像之相同影像部分調整到同一個影像位置。且最後融合調整後的視差影像以產生融合影像。據此,使用多鏡頭之影像融合方法及其裝置可以同時解決相機移動以及每張視差影像的時間差問題,而不會有偽影或模糊的現象,使得影像融合後的結果更為清晰。此外,由於使用多鏡頭之影像融合方法及其裝置為同時擷取多個視差影像(即不會有每張視差影像的時間差問題),故即使拍攝正在移動的物體,也可以得到良好的影像融合結果。 In summary, the image fusion method and device using the multi-lens according to the embodiments of the present invention are capable of simultaneously capturing a plurality of parallax images having different focal lengths through multiple lenses, and the same image of each parallax image. Partially adjusted to the same image position. Finally, the adjusted parallax image is blended to generate a fused image. Accordingly, the multi-lens image fusion method and the device thereof can simultaneously solve the camera movement and the time difference of each parallax image without artifact or blurring, so that the result after image fusion is clearer. In addition, since the multi-lens image fusion method and the device thereof simultaneously capture multiple parallax images (that is, there is no time difference problem for each parallax image), good image fusion can be obtained even if the moving object is photographed. result.

以上所述僅為本發明之實施例,其並非用以侷限本發明之專利範圍。 The above description is only an embodiment of the present invention, and is not intended to limit the scope of the invention.

S210、S220、S230、S240、S250‧‧‧步驟 S210, S220, S230, S240, S250‧‧ steps

Claims (10)

一種使用多鏡頭之影像融合方法,適用於具有複數個鏡頭之一影像融合裝置,該影像融合方法包括:透過該些鏡頭同時擷取具有不同焦距之複數個視差影像;分析該些視差影像之複數個特徵點;計算該些視差影像之該些特徵點之間的一匹配關係;以及根據該匹配關係位移每一該視差影像,以將每一該視差影像之一相同影像部分調整至同一個影像位置;融合該些視差影像位移後的結果,並產生一融合影像;其中,於位移每一該視差影像的步驟中,更包括:選擇該些視差影像其中之一作為一主要影像,且該主要影像之該相同影像部分位於該影像位置;根據該匹配關係計算未選擇的每一該視差影像之一位移量,其中該位移量關聯於對應的該視差影像之該相同影像部分移動至該影像位置的距離;以及根據每一該位移量位移對應的該視差影像。 An image fusion method using a multi-lens is applicable to an image fusion device having a plurality of lenses. The image fusion method includes: capturing a plurality of parallax images having different focal lengths through the lenses; and analyzing the plurality of parallax images a feature point; calculating a matching relationship between the feature points of the parallax images; and shifting each of the parallax images according to the matching relationship to adjust one of the same image portions of each of the parallax images to the same image Positioning the result of the displacement of the parallax images and generating a fused image; wherein, in the step of displacing each of the parallax images, the method further comprises: selecting one of the parallax images as a main image, and the main image The same image portion of the image is located at the image position; and a displacement amount of each of the unselected parallax images is calculated according to the matching relationship, wherein the displacement amount is associated with the corresponding image portion of the corresponding parallax image to move to the image position The distance; and the parallax image corresponding to each displacement amount. 如請求項1之影像融合方法,其中,該些鏡頭設置於同一平面且相鄰的該些鏡頭之間具有一預定距離。 The image fusion method of claim 1, wherein the lenses are disposed on a same plane and have a predetermined distance between adjacent ones of the lenses. 如請求項1之影像融合方法,其中,於產生該融合影像後,更包括:移除該融合影像之邊緣的一多餘影像,以產生修正後的該融合影像。 The image fusion method of claim 1, wherein after the generating the fused image, the method further comprises: removing an extra image of the edge of the fused image to generate the fused image. 一種使用多鏡頭之影像融合方法,適用於具有複數個鏡頭之一影像融合裝置,該影像融合方法包括:透過該些鏡頭同時擷取具有不同焦距之複數個視差影像;分析該些視差影像之複數個特徵點; 計算該些視差影像之該些特徵點之間的一匹配關係;以及根據該匹配關係位移每一該視差影像,以將每一該視差影像之一相同影像部分調整至同一個影像位置;融合該些視差影像位移後的結果,並產生一融合影像;其中,於位移每一該視差影像的步驟中,更包括:分別選擇該些視差影像其中之二作為一待匹配影像組,且每一該視差影像至少被選擇一次;於每一該待匹配影像組中,選擇其中一個該視差影像作為一第一影像,選擇其中另一個該視差影像作為一第二影像,且該第一影像與該第二影像具有相同的一子影像;於每一該待匹配影像組中,根據該匹配關係計算該第二影像之一第一位移量,其中該第一位移量關聯於該第二影像之該子影像移動至該第一影像之該子影像的距離;於每一該待匹配影像組中,根據該第一位移量位移該第二影像;於每一該待匹配影像組中,融合該待匹配影像組位移後的結果,以分別成為一子融合影像,其中每一該子融合影像具有該相同影像部分;分析該些子融合影像之複數個子特徵點,且計算該些子融合影像之該些子特徵點之間的一子匹配關係;以及根據該子匹配關係位移每一該子融合影像,以調整每一該子融合影像之該相同影像部分至該影像位置。 An image fusion method using a multi-lens is applicable to an image fusion device having a plurality of lenses. The image fusion method includes: capturing a plurality of parallax images having different focal lengths through the lenses; and analyzing the plurality of parallax images Feature points; Calculating a matching relationship between the feature points of the parallax images; and shifting each of the parallax images according to the matching relationship to adjust one of the same image portions of each of the parallax images to the same image position; The result of the displacement of the parallax images and the generation of a fused image; wherein, in the step of displacing each of the parallax images, the method further comprises: respectively selecting two of the parallax images as a to-be-matched image group, and each of the images The parallax image is selected at least once; in each of the to-be-matched image groups, one of the parallax images is selected as a first image, and the other of the parallax images is selected as a second image, and the first image and the first image The second image has the same sub-image; in each of the image groups to be matched, a first displacement amount of the second image is calculated according to the matching relationship, wherein the first displacement amount is associated with the sub-image of the second image Moving the image to the distance of the sub-image of the first image; in each of the to-be-matched image groups, shifting the second image according to the first displacement amount; In the matched image group, the result of the displacement of the image group to be matched is merged to become a sub-fused image, wherein each of the sub-fused images has the same image portion; and a plurality of sub-feature points of the sub-fused images are analyzed, and Calculating a sub-matching relationship between the sub-feature points of the sub-fused images; and shifting each of the sub-fused images according to the sub-matching relationship to adjust the same image portion of each of the sub-fused images to the image position. 如請求項4之影像融合方法,其中,於位移每一該子融合影像的步驟中,更包括:選擇該些子融合影像其中之一作為一主要影像,且該主要影像之該相同影像部分位於該影像位置;根據該子匹配關係計算未選擇的每一該子融合影像之一第二 位移量,其中該第二位移量關聯於對應的該子融合影像之該相同影像部分移動至該影像位置的距離;以及根據每一該第二位移量位移對應的該子融合影像。 The image fusion method of claim 4, wherein the step of displacing each of the sub-fused images further comprises: selecting one of the sub-fused images as a primary image, and the same image portion of the primary image is located The image position; calculating, according to the sub-matching relationship, one of the unselected ones of the sub-fused images a displacement amount, wherein the second displacement amount is associated with a distance at which the same image portion of the corresponding sub-fused image moves to the image position; and the corresponding sub-fused image is displaced according to each of the second displacement amounts. 如請求項4之影像融合方法,其中,該些鏡頭設置於同一平面且相鄰的該些鏡頭之間具有一預定距離。 The image fusion method of claim 4, wherein the lenses are disposed on a same plane and have a predetermined distance between adjacent ones of the lenses. 如請求項4之影像融合方法,其中,於產生該融合影像後,更包括:移除該融合影像之邊緣的一多餘影像,以產生修正後的該融合影像。 The image fusion method of claim 4, wherein after the generating the fused image, the method further comprises: removing an extra image of the edge of the fused image to generate the fused image. 一種使用多鏡頭之影像融合裝置,包括:複數個鏡頭;一影像擷取器,電連接該些鏡頭,且透過該些鏡頭同時擷取具有不同焦距之複數個視差影像;一影像處理器,電連接該影像擷取器,接收該些視差影像,且用以執行下列步驟:分析該些視差影像之複數個特徵點;計算每一該視差影像之該些特徵點與其他的該視差影像之該些特徵點的一匹配關係;根據該匹配關係位移每一該視差影像,以將每一該視差影像之一相同影像部分調整至同一個影像位置;融合該些視差影像位移後的結果,並產生一融合影像;以及移除該融合影像之邊緣的一多餘影像,以產生修正後的該融合影像;其中,於該影像處理器執行位移每一該視差影像中,更包括: 選擇該些視差影像其中之一作為一主要影像,且該主要影像之該相同影像部分位於該影像位置;根據該匹配關係計算未選擇的每一該視差影像之一位移量,其中該位移量關聯於對應的該視差影像之該相同影像部分移動至該影像位置的距離;以及根據每一該位移量位移對應的該視差影像。 An image fusion device using a multi-lens, comprising: a plurality of lenses; an image capture device electrically connecting the lenses, and simultaneously capturing a plurality of parallax images having different focal lengths through the lenses; an image processor, electricity Connecting the image capture device to receive the parallax images, and performing the following steps: analyzing a plurality of feature points of the parallax images; calculating the feature points of each of the parallax images and the other of the parallax images a matching relationship of the feature points; shifting each of the parallax images according to the matching relationship to adjust the same image portion of each of the parallax images to the same image position; and merging the results of the parallax image displacements, and generating a fused image; and a superimposed image of the edge of the fused image to be generated to generate the fused image; wherein the image processor performs displacement in each of the parallax images, and further includes: Selecting one of the parallax images as a main image, and the same image portion of the main image is located at the image position; and calculating a displacement amount of each of the unselected parallax images according to the matching relationship, where the displacement amount is associated And shifting the corresponding image portion of the corresponding parallax image to the image position; and shifting the corresponding parallax image according to each of the displacement amounts. 一種使用多鏡頭之影像融合裝置,包括:複數個鏡頭;一影像擷取器,電連接該些鏡頭,且透過該些鏡頭同時擷取具有不同焦距之複數個視差影像;一影像處理器,電連接該影像擷取器,接收該些視差影像,且用以執行下列步驟:分析該些視差影像之複數個特徵點;計算每一該視差影像之該些特徵點與其他的該視差影像之該些特徵點的一匹配關係;根據該匹配關係位移每一該視差影像,以將每一該視差影像之一相同影像部分調整至同一個影像位置;融合該些視差影像位移後的結果,並產生一融合影像;以及移除該融合影像之邊緣的一多餘影像,以產生修正後的該融合影像;其中,於該影像處理器執行位移每一該視差影像中,更包括:分別選擇該些視差影像其中之二作為一待匹配影像組,且每一該視差影像至少被選擇一次;於每一該待匹配影像組中,選擇其中一個該視差影像作為一第一影像,選擇其中另一個該視差影像作為一第二影 像,且該第一影像與該第二影像具有相同的一子影像;於每一該待匹配影像組中,根據該匹配關係計算該第二影像之一第一位移量,其中該第一位移量關聯於該第二影像之該子影像移動至該第一影像之該子影像的距離;於每一該待匹配影像組中,根據該第一位移量位移對應的該第二影像;於每一該待匹配影像組中,融合該待匹配影像組位移後的結果,以分別成為一子融合影像,其中每一該子融合影像具有該相同影像部分;分析該些子融合影像之複數個子特徵點,且計算該些子融合影像之該些子特徵點之間的一子匹配關係;以及根據該子匹配關係位移每一該子融合影像,以調整每一該子融合影像之該相同影像部分至該影像位置。 An image fusion device using a multi-lens, comprising: a plurality of lenses; an image capture device electrically connecting the lenses, and simultaneously capturing a plurality of parallax images having different focal lengths through the lenses; an image processor, electricity Connecting the image capture device to receive the parallax images, and performing the following steps: analyzing a plurality of feature points of the parallax images; calculating the feature points of each of the parallax images and the other of the parallax images a matching relationship of the feature points; shifting each of the parallax images according to the matching relationship to adjust the same image portion of each of the parallax images to the same image position; and merging the results of the parallax image displacements, and generating a fused image; and a superimposed image of the edge of the fused image to be generated to generate the fused image; wherein the image processor performs displacement of each of the parallax images, further comprising: respectively selecting the images Two of the parallax images are used as a to-be-matched image group, and each of the parallax images is selected at least once; in each of the to-be-matched image groups Wherein the selecting a parallax image as a first image, wherein the other of the selected image as a second parallax Movies And the first image and the second image have the same sub-image; in each of the to-be-matched image groups, calculating a first displacement amount of the second image according to the matching relationship, wherein the first displacement The amount of the sub-image associated with the second image is moved to the distance of the sub-image of the first image; in each of the to-be-matched image groups, the corresponding second image is displaced according to the first displacement amount; In the image group to be matched, the result of the displacement of the image group to be matched is merged to become a sub-fused image, wherein each of the sub-fused images has the same image portion; and a plurality of sub-features of the sub-fused images are analyzed Pointing, and calculating a sub-matching relationship between the sub-feature points of the sub-fused images; and shifting each of the sub-fused images according to the sub-matching relationship to adjust the same image portion of each of the sub-fused images To the image location. 如請求項9之影像融合裝置,其中,更包括:於該影像處理器執行位移每一該子融合影像中,更包括:選擇該些子融合影像其中之一作為一主要影像,且該主要影像之該相同影像部分位於該影像位置;根據該子匹配關係計算未選擇的每一該子融合影像之一第二位移量,其中該第二位移量關聯於對應的該子融合影像之該相同影像部分移動至該影像位置的距離;以及根據每一該第二位移量位移對應的該子融合影像。 The image fusion device of claim 9, further comprising: performing, by the image processor, the displacement of each of the sub-fused images, further comprising: selecting one of the sub-fused images as a primary image, and the primary image The same image portion is located at the image position; and a second displacement amount of each of the un-selected sub-fused images is calculated according to the sub-matching relationship, wherein the second displacement amount is associated with the corresponding image of the corresponding sub-fused image a portion of the distance moved to the image position; and the corresponding sub-fused image is shifted according to each of the second displacement amounts.
TW105111820A 2016-04-15 2016-04-15 Image fusion method for multiple lens and device thereof TWI590658B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105111820A TWI590658B (en) 2016-04-15 2016-04-15 Image fusion method for multiple lens and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105111820A TWI590658B (en) 2016-04-15 2016-04-15 Image fusion method for multiple lens and device thereof

Publications (2)

Publication Number Publication Date
TWI590658B true TWI590658B (en) 2017-07-01
TW201737694A TW201737694A (en) 2017-10-16

Family

ID=60048340

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105111820A TWI590658B (en) 2016-04-15 2016-04-15 Image fusion method for multiple lens and device thereof

Country Status (1)

Country Link
TW (1) TWI590658B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116725467A (en) * 2023-03-31 2023-09-12 苏州宇懋医学科技有限公司 Endoscope device, endoscope medical assistance system, and endoscope image processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116725467A (en) * 2023-03-31 2023-09-12 苏州宇懋医学科技有限公司 Endoscope device, endoscope medical assistance system, and endoscope image processing method
CN116725467B (en) * 2023-03-31 2024-03-01 苏州宇懋医学科技有限公司 Endoscope device, endoscope medical assistance system, and endoscope image processing method

Also Published As

Publication number Publication date
TW201737694A (en) 2017-10-16

Similar Documents

Publication Publication Date Title
US9948869B2 (en) Image fusion method for multiple lenses and device thereof
CN104699842B (en) Picture display method and device
TWI554103B (en) Image capturing device and digital zooming method thereof
Havlena et al. Efficient structure from motion by graph optimization
JP6551743B2 (en) Image processing apparatus and image processing method
JP2016511562A (en) Imaging apparatus for imaging using a plurality of microlenses and imaging method therefor
JP2011022796A (en) Image processing method and image processor
TWI761684B (en) Calibration method of an image device and related image device and operational device thereof
US20140168371A1 (en) Image processing apparatus and image refocusing method
JP2006251683A (en) Stereoscopic image photographing system
CN113810676A (en) Image processing apparatus, method, system, medium, and method of manufacturing learning model
TWI590658B (en) Image fusion method for multiple lens and device thereof
JP2016005263A (en) Image generation system, terminal, program, and method that generate panoramic image from plurality of photographed images
CN111292380B (en) Image processing method and device
JP2019008582A (en) Video processing device, video processing method, and video processing program
CN114390219B (en) Shooting method, shooting device, electronic equipment and storage medium
JP2017050819A (en) Generation device for panoramic image data, generation method and program
JP6089742B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP2015211372A (en) Image generation device and image generation program
JP5086120B2 (en) Depth information acquisition method, depth information acquisition device, program, and recording medium
JP4757679B2 (en) Video composition device
CN109214983B (en) Image acquisition device and image splicing method thereof
JP5553862B2 (en) Image pickup apparatus and image pickup apparatus control method
JP6730214B2 (en) Parallax calculator
EP3624050B1 (en) Method and module for refocusing at least one plenoptic video