TW201611606A - Image capturing method and electronic apparatus - Google Patents
Image capturing method and electronic apparatus Download PDFInfo
- Publication number
- TW201611606A TW201611606A TW103130812A TW103130812A TW201611606A TW 201611606 A TW201611606 A TW 201611606A TW 103130812 A TW103130812 A TW 103130812A TW 103130812 A TW103130812 A TW 103130812A TW 201611606 A TW201611606 A TW 201611606A
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- electronic device
- image frame
- maximum rotation
- rotation angle
- Prior art date
Links
Landscapes
- Studio Devices (AREA)
- Stereoscopic And Panoramic Photography (AREA)
Abstract
Description
本揭示文件係關於影像擷取方法,尤指一種用以產生全景影像的影像擷取方法。 The present disclosure relates to an image capture method, and more particularly to an image capture method for generating a panoramic image.
近來,數位相機、智慧型手機及平板電腦等電子裝置已普遍成為現代生活中的必備物品,藉此,使用者可以便利地記錄生活周遭的景物或重要事件。然而,電子裝置上的攝影鏡頭通常有一定的限制(例如廣角端僅能容納一定的取像範圍)。當使用者想拍攝壯觀的自然景色、巨大的建築物、圓形廣場的人群、大篇幅的藝術創作或是在拍攝團體照時,經常會遭遇到無法在同一張照片中容納攝影主題的全貌。 Recently, electronic devices such as digital cameras, smart phones, and tablet computers have become popular items in modern life, so that users can conveniently record scenes or important events around them. However, the photographic lens on the electronic device usually has certain restrictions (for example, the wide-angle end can only accommodate a certain imaging range). When users want to take spectacular natural scenery, huge buildings, crowds in circular squares, large-scale artistic creations, or when taking group photos, they often encounter the inability to accommodate the entire picture in the same photo.
在高階的攝影器材中或許可以更換超廣角的鏡頭或利用特殊的魚眼鏡頭來擷取更大角度的景色,但一般的數位相機、智慧型手機及平板電腦並無法任意更換鏡頭或相機模組。 In high-end photographic equipment, it may be possible to replace the super wide-angle lens or use a special fisheye lens to capture a larger angle of view, but the general digital camera, smart phone and tablet cannot change the lens or camera module at will. .
近來發展出以軟體處理方式實現全景影像(PANORAMA IMAGE)攝影的解決方案。一般來說,進入全景影像攝影模式時,由使用者手動拍攝多張影像,隨後將多張影像接合形成全景影像。 Recently, a solution for realizing panoramic photography (PANORAMA IMAGE) photography by software processing has been developed. Generally, when entering the panoramic image shooting mode, a plurality of images are manually taken by a user, and then multiple images are joined to form a panoramic image.
目前常見的作法,是由使用者自行調整多張影像取景位置,再由攝影裝置或電腦進行影像處理與接合,產生全景影像。然而,目前的作法使用者需要一定的拍攝技巧,由使用者自行判斷應該旋轉多少角度後拍攝下一張影像,否則會造成影像接合的處理難度提高(例如無法判斷兩張待接合影像之間的相對關係),或是影像接合後的整體效果不如預期(例如影像接合處明顯不自然或有錯誤)。 At present, it is common practice for the user to adjust multiple image viewing positions by themselves, and then image processing and joining by a photographing device or a computer to generate a panoramic image. However, current users need certain shooting skills. The user decides how many angles should be rotated and then shoots the next image. Otherwise, the processing of image bonding is difficult (for example, it is impossible to judge between two images to be joined). The relative relationship), or the overall effect of the image after bonding is not as expected (for example, the image joint is obviously unnatural or has errors).
依據本揭示文件之一實施態樣,其揭示一種用於電子裝置的影像擷取方法,影像擷取方法包含:計算電子裝置拍攝之第一影像畫面中的複數個特徵點;根據第一影像畫面中該些特徵點之分佈,計算電子裝置往一方向旋轉時的最大旋轉角度;以及,當電子裝置往該方向旋轉已達最大旋轉角度時,自動拍攝第二影像畫面。 According to an embodiment of the present disclosure, an image capture method for an electronic device is disclosed. The image capture method includes: calculating a plurality of feature points in a first image frame captured by an electronic device; The distribution of the feature points calculates a maximum rotation angle when the electronic device rotates in one direction; and automatically captures the second image frame when the electronic device has rotated the maximum rotation angle in the direction.
依據本揭示文件之另一實施態樣,其揭示一種用於電子裝置的全景影像產生方法,全景影像產生方法包含:拍攝第一影像畫面;計算第一影像畫面中的複數個特徵點;根據第一影像畫面中該些特徵點之分佈,計算電子裝置往一方向旋轉時的最大旋轉角度;當電子裝置往該方 向旋轉已達最大旋轉角度時,自動拍攝第二影像畫面,第一影像畫面與第二影像畫面用以接合為全景影像。 According to another embodiment of the present disclosure, a method for generating a panoramic image for an electronic device is disclosed. The method for generating a panoramic image includes: capturing a first image frame; calculating a plurality of feature points in the first image frame; a distribution of the feature points in an image frame, and calculating a maximum rotation angle when the electronic device rotates in one direction; when the electronic device is to the side When the rotation has reached the maximum rotation angle, the second image frame is automatically captured, and the first image frame and the second image frame are used to be joined as a panoramic image.
依據本揭示文件之另一實施態樣,其揭示一種電子裝置,包含動態感測器、影像擷取單元、顯示單元以及處理單元。動態感測器用以偵測電子裝置之軸向。顯示單元用以顯示使用者介面。處理單元耦接動態感測器、影像擷取單元以及顯示單元。 According to another embodiment of the present disclosure, an electronic device includes a dynamic sensor, an image capturing unit, a display unit, and a processing unit. The dynamic sensor is used to detect the axial direction of the electronic device. The display unit is used to display the user interface. The processing unit is coupled to the dynamic sensor, the image capturing unit, and the display unit.
當影像擷取單元拍攝第一影像畫面時,處理單元用以計算第一影像畫面中的複數個特徵點,根據第一影像畫面中該些特徵點之分佈計算電子裝置往一方向旋轉時的最大旋轉角度,並於使用者介面上提示最大旋轉角度的相對位置。 When the image capturing unit captures the first image frame, the processing unit is configured to calculate a plurality of feature points in the first image frame, and calculate a maximum when the electronic device rotates in one direction according to the distribution of the feature points in the first image frame. Rotate the angle and indicate the relative position of the maximum rotation angle on the user interface.
當動態感測器偵測電子裝置往該方向旋轉已達最大旋轉角度時,處理單元用以驅動影像擷取單元拍攝第二影像畫面,第一影像畫面與第二影像畫面用以接合為全景影像。 When the dynamic sensor detects that the electronic device has rotated to the maximum rotation angle in the direction, the processing unit is configured to drive the image capturing unit to capture the second image frame, and the first image frame and the second image frame are used to be combined into the panoramic image. .
如上述實施態樣,本揭示文件提出影像擷取方法、全景影像產生方法以及電子裝置,其可根據當前的影像畫面計算其中的特徵點之分佈,並根據各方向邊界上的特徵點分佈,得知各方向上的最大旋轉角度,方便使用者快速的將電子裝置旋轉至最佳的位置,確保影像接合的效果,並可有效利用較少的影像擷取次數形成覆蓋最大視角範圍的全景影像。 As described in the above embodiments, the present disclosure provides an image capturing method, a panoramic image generating method, and an electronic device, which can calculate a distribution of feature points according to a current image frame, and obtain a feature point distribution according to each direction boundary. Knowing the maximum rotation angle of each direction, the user can quickly rotate the electronic device to the optimal position, ensure the effect of image bonding, and effectively use less image capturing times to form a panoramic image covering the maximum viewing angle range.
為讓本揭示內容能更明顯易懂,所附符號之說明如下: In order to make the disclosure more obvious, the attached symbols are as follows:
100‧‧‧影像擷取方法 100‧‧‧Image acquisition method
200‧‧‧電子裝置 200‧‧‧Electronic devices
220‧‧‧動態感測器 220‧‧‧Dynamic sensor
240‧‧‧影像擷取單元 240‧‧‧Image capture unit
260‧‧‧顯示單元 260‧‧‧ display unit
280‧‧‧處理單元 280‧‧‧Processing unit
ZONE1‧‧‧右側畫面 ZONE1‧‧‧right screen
ZONE2‧‧‧左側畫面 ZONE2‧‧‧left screen
IMG1‧‧‧第一影像畫面 IMG1‧‧‧ first image screen
IMG2R、IMG2L、IMG2T、IMG2B‧‧‧第二影像畫面 IMG2R, IMG2L, IMG2T, IMG2B‧‧‧ second image screen
FP‧‧‧特徵點 FP‧‧‧ feature points
AX0‧‧‧初始軸向 AX0‧‧‧ initial axial direction
AX1、AX2、AX3、AX4‧‧‧軸向 AX1, AX2, AX3, AX4‧‧‧ axial
OL1、OL2、OL3、OL4‧‧‧重疊部份 OL1, OL2, OL3, OL4‧‧‧ overlap
θ 1、θ 2、θ 3、θ 4‧‧‧最大旋轉角度 θ 1, θ 2, θ 3, θ 4‧‧‧ maximum rotation angle
TO、TR、TL、TT、TB‧‧‧對焦框 TO, TR, TL, TT, TB‧‧‧ focus frame
S102~S116‧‧‧步驟 S102~S116‧‧‧Steps
為讓本案能更明顯易懂,所附圖式之說明如下:第1圖繪示根據本揭示文件之一實施例中一種影像擷取方法的方法流程圖;第2圖繪示根據本揭示文件之一實施例中一種電子裝置的功能方塊圖;第3A圖繪示根據本揭示文件之一實施例中電子裝置拍攝之第一影像畫面的示意圖;第3B圖繪示第3A圖之第一影像畫面中的特徵點的示意圖;第4圖繪示在不同方向上旋轉並拍攝之第二影像畫面的示意圖;以及第5圖繪示在不同方向上旋轉並拍攝之第二影像畫面的示意圖。 In order to make the present invention more obvious and understandable, the description of the drawings is as follows: FIG. 1 is a flowchart of a method for capturing an image according to an embodiment of the present disclosure; FIG. 2 is a diagram showing a method according to the present disclosure. A functional block diagram of an electronic device in an embodiment; FIG. 3A is a schematic diagram of a first image frame captured by an electronic device according to an embodiment of the present disclosure; and FIG. 3B is a first image of FIG. 3A A schematic diagram of feature points in the picture; FIG. 4 is a schematic diagram showing a second image frame rotated and photographed in different directions; and FIG. 5 is a schematic diagram showing a second image frame rotated and photographed in different directions.
以下將以圖式及詳細敘述清楚說明本揭示內容之精神,任何所屬技術領域中具有通常知識者在瞭解本揭示內容之較佳實施例後,當可由本揭示內容所教示之技術,加以改變及修飾,其並不脫離本揭示內容之精神與範圍。 The spirit and scope of the present disclosure will be apparent from the following description of the preferred embodiments of the present disclosure. Modifications do not depart from the spirit and scope of the disclosure.
請參閱第1圖,其繪示根據本揭示文件之一實施例中一種影像擷取方法100的方法流程圖,於此實施例中,影像擷取方法100可用來產生全景影像(panorama image),也就是說,影像擷取方法100所擷取的多個影像可彼此接合(stitch)為對應較大視角的全景影像。 Please refer to FIG. 1 , which is a flowchart of a method for capturing an image 100 according to an embodiment of the present disclosure. In this embodiment, the image capturing method 100 can be used to generate a panoramic image. That is to say, the plurality of images captured by the image capturing method 100 can be stitched to each other as a panoramic image corresponding to a larger viewing angle.
此實施例中的影像擷取方法100可應用於電子裝置上,請參閱第2圖,其繪示根據本揭示文件之一實施例中一種電子裝置200的功能方塊圖。如第2圖所示,電子裝置200包含動態感測器220、影像擷取單元240、顯示單元260以及處理單元280。處理單元280耦接動態感測器220、影像擷取單元240以及顯示單元260。 The image capturing method 100 in this embodiment can be applied to an electronic device. Referring to FIG. 2, a functional block diagram of an electronic device 200 according to an embodiment of the present disclosure is shown. As shown in FIG. 2 , the electronic device 200 includes a dynamic sensor 220 , an image capturing unit 240 , a display unit 260 , and a processing unit 280 . The processing unit 280 is coupled to the dynamic sensor 220, the image capturing unit 240, and the display unit 260.
影像擷取單元240可包含鏡頭、光學模組以及影像感測單元,此為習知技藝之人所熟知,在此不另贅述,影像擷取單元240可設置於電子裝置200其中一側表面上,朝向取景之方向拍攝影像畫面。電子裝置200可為數位相機、數位單反相機、數位無反相機、照相手機、智慧型手機或其他具有影像擷取單元240的等效性電子設備。 The image capturing unit 240 can include a lens, an optical module, and an image sensing unit, which are well known to those skilled in the art. The image capturing unit 240 can be disposed on one side surface of the electronic device 200. , shoot the image in the direction of the framing. The electronic device 200 can be a digital camera, a digital SLR camera, a digital cameraless camera, a camera phone, a smart phone, or other equivalent electronic device having an image capture unit 240.
動態感測器220用以偵測電子裝置200之軸向,例如電子裝置200的機身的水平偏轉向量、垂直偏轉向量、相較地磁北的偏轉角度至少其一。也就是說,動態感測器220可得知影像擷取單元240拍攝影像畫面時所面對的取景軸向;此外,在取景過程中顯示即時畫面的同時,動態感測器220亦可偵測影像擷取單元240當下面對的即時軸向。實際應用中,動態感測器220包含陀螺儀(gyro sensor)、電子羅盤(electronic compass)與重力感測器(gravity sensor,G-sensor)中至少一者。 The dynamic sensor 220 is configured to detect an axial direction of the electronic device 200, for example, a horizontal deflection vector of the body of the electronic device 200, a vertical deflection vector, and a deflection angle of at least one of the magnetic north. In other words, the dynamic sensor 220 can know the framing axis that the image capturing unit 240 faces when capturing the image frame; in addition, the dynamic sensor 220 can also detect the instant image during the framing process. The image capturing unit 240 is in the immediate axial direction of the pair. In practical applications, the dynamic sensor 220 includes at least one of a gyro sensor, an electronic compass, and a gravity sensor (G-sensor).
顯示單元260用以顯示使用者介面(user interface,UI),使用者介面上可展示影像擷取單元240所擷取的影像畫面、取景過程中的即時取景畫面、攝影過程的相關訊息(例 如光圈、快門、電量、時間、焦距等)以及其他的使用提示。 The display unit 260 is configured to display a user interface (UI), and the user interface can display the image captured by the image capturing unit 240, the live view screen during the framing process, and the related information of the shooting process (eg, Such as aperture, shutter, power, time, focus, etc.) and other tips for use.
如第1圖之實施例所示,影像擷取方法100首先執行步驟S102,利用影像擷取單元240拍攝第一影像畫面。於此實施例中,當第一影像畫面拍攝時,影像擷取方法100執行步驟S104,利用動態感測器220取得電子裝置200之初始軸向,第一影像畫面拍攝時電子裝置200的三維軸向。 As shown in the embodiment of FIG. 1 , the image capturing method 100 first performs step S102 , and the image capturing unit 240 captures the first image frame. In this embodiment, when the first image frame is captured, the image capturing method 100 executes step S104, and uses the dynamic sensor 220 to obtain the initial axial direction of the electronic device 200, and the three-dimensional axis of the electronic device 200 when the first image frame is captured. to.
接著,影像擷取方法100執行步驟S106,計算拍攝之第一影像畫面中的複數個特徵點。請一併參閱第3A圖及第3B圖,第3A圖繪示根據本揭示文件之一實施例中電子裝置200拍攝之第一影像畫面IMG1的示意圖,第3B圖繪示第3A圖之第一影像畫面IMG1中的特徵點FP的示意圖。如第3A圖所示之例子,步驟S106拍攝的第一影像畫面IMG1,內容可能包含多個物件,例如,人物、背景、車輛、樹木或各種物體、形狀、色塊等。處理單元280可根據第一影像畫面IMG1的內容進行影像處理,以找出第一影像畫面IMG1中的複數個特徵點(feature point)FP,第一影像畫面IMG1中包含許多個特徵點FP,特徵點FP的分佈情況如第3B圖所示。 Next, the image capturing method 100 executes step S106 to calculate a plurality of feature points in the captured first image frame. Please refer to FIG. 3A and FIG. 3B together. FIG. 3A is a schematic diagram of a first image frame IMG1 captured by the electronic device 200 according to an embodiment of the present disclosure, and FIG. 3B is a first diagram of FIG. 3A. A schematic diagram of a feature point FP in the image screen IMG1. As shown in FIG. 3A, the first image frame IMG1 captured in step S106 may contain a plurality of objects such as a character, a background, a vehicle, a tree or various objects, shapes, color patches, and the like. The processing unit 280 can perform image processing according to the content of the first image frame IMG1 to find a plurality of feature points FP in the first image frame IMG1, and the first image frame IMG1 includes a plurality of feature points FP. The distribution of the point FP is as shown in Fig. 3B.
在影像處理的實際應用中,在影像內容中辨識特徵點的演算法有非常多方式,例如人臉特徵辨識、指紋辨識、邊緣偵測、轉角偵測、區塊偵測、脊偵測等各種在影像中擷取特徵點的演算法,本實施例可採用一種或結合多種演算法由第一影像畫面IMG1找出特徵點FP,第3A圖與第3B圖所繪示的特徵點FP主要是以邊緣偵測演算法作例 示性的說明,但本揭示文件並不以特定演算法為限。 In the practical application of image processing, there are many ways to identify feature points in image content, such as face feature recognition, fingerprint recognition, edge detection, corner detection, block detection, ridge detection, etc. The algorithm for extracting feature points in the image, in this embodiment, the feature point FP can be found by the first image frame IMG1 in combination with a plurality of algorithms, and the feature points FP depicted in the 3A and 3B are mainly Example of edge detection algorithm An illustrative description, but the disclosure is not limited to a particular algorithm.
此外,本揭示文件以特徵點FP來舉例說明影像處理後得到之特徵圖案位置所在,但特徵點FP並不僅限於單一個點(point)或單一個座標,亦可為多個像素組成的圖像區塊或圖像特徵範圍等。 In addition, the present disclosure exemplifies the position of the feature pattern obtained by the image processing by using the feature point FP, but the feature point FP is not limited to a single point or a single coordinate, and may also be an image composed of multiple pixels. Block or image feature range, etc.
影像擷取方法100執行步驟S108,根據第一影像畫面IMG1中該些特徵點FP之分佈,計算電子裝置200往特定方向旋轉時的最大旋轉角度。下列段落將詳細說明如何由第一影像畫面IMG1中該些特徵點FP之分佈計算最大旋轉角度。 The image capturing method 100 executes step S108 to calculate a maximum rotation angle when the electronic device 200 rotates in a specific direction according to the distribution of the feature points FP in the first image frame IMG1. The following paragraphs will explain in detail how to calculate the maximum rotation angle from the distribution of the feature points FP in the first image frame IMG1.
如第3A圖及第3B圖所示的例子當中,第一影像畫面IMG1原構圖的右側畫面ZONE1變化較少、物件較分散或可分辨的特徵較少;相對的左側畫面ZONE2變化較多、物件較集中或可分辨的特徵較多。第一影像畫面IMG1中右側畫面ZONE1的特徵點FP密度較低,左側畫面ZONE2的特徵點FP密度較高。 As shown in the examples shown in FIG. 3A and FIG. 3B, the right image ZONE1 of the original image frame IMG1 has less variation, and the objects are more dispersed or distinguishable; the opposite left side image ZONE2 changes more, and the object More concentrated or distinguishable features. The feature point FP density of the right picture ZONE1 in the first video picture IMG1 is low, and the feature point FP density of the left picture ZONE2 is high.
當使用者旋轉電子裝置200試圖想要拍攝另一影像畫面,並且將另一影像畫面與原影像畫面(即第一影像畫面IMG1)接合,使兩張影像畫面結合為視角範圍較廣的全景影像時,使用者必須決定需要旋轉電子裝置200多少角度。 When the user rotates the electronic device 200 and tries to capture another image frame, and joins another image frame with the original image frame (ie, the first image frame IMG1), the two image frames are combined into a panoramic image with a wide viewing angle range. The user must decide how many angles the electronic device 200 needs to be rotated.
若使用者旋轉的角度過大,使另一影像畫面與原影像畫面重疊的部分過少(甚至沒有任何重疊)時,電子裝置200將無法透過影像處理的分式找出兩個影像之間的對應關係,因此無法進行有效的影像接合(image stitching)。若旋 轉的角度過小,使另一影像畫面與原影像畫面重疊的部分過大(甚至兩張影像角度差異不大)時,則電子裝置200需要多次拍攝新的影像才能覆蓋新的視野角度,因此,使用者可能需要拍攝許多張影像,並反覆進行許多次的影像接合,將造成處理效率低落。 If the angle of the user's rotation is too large, and the portion where the other image frame overlaps with the original image frame is too small (even without any overlap), the electronic device 200 cannot find the correspondence between the two images through the fraction of the image processing. Therefore, effective image stitching cannot be performed. If If the angle of the rotation is too small, the portion where the other image frame overlaps with the original image frame is too large (even if the difference between the two image angles is not large), the electronic device 200 needs to take a new image multiple times to cover the new viewing angle. Therefore, The user may need to take a lot of images and repeat the image bonding many times, which will result in inefficient processing.
請一併參閱第4圖,其繪示在不同方向上旋轉並拍攝之第二影像畫面IMG2R,IMG2L的示意圖。上述步驟S108中,往特定方向旋轉時的最大旋轉角度之計算,是基於第一影像畫面IMG1中對應特定方向之側邊界附近的特徵點密度。 Please refer to FIG. 4 together, which shows a schematic diagram of the second image frames IMG2R, IMG2L rotated and photographed in different directions. In the above step S108, the calculation of the maximum rotation angle when rotating in a specific direction is based on the feature point density in the vicinity of the side boundary corresponding to the specific direction in the first video screen IMG1.
假設,使用者將往右側旋轉拍攝下一張影像畫面,以便與第一影像畫面IMG1接合。步驟S108更包含計算第一影像畫面IMG1中與預定拍攝之第二影像畫面IMG2R的重疊部份OL1涵蓋之特徵點FP的數目(如第4圖所示),並使得第一影像畫面IMG1中與第二影像畫面IMG2R重疊部份OL1涵蓋之特徵點FP的數目在門檻值以上,假設於此實施例中,特徵點FP的門檻值為至少十個特徵點,電子裝置200的處理單元280需要十個特徵點方可對第一影像畫面IMG1中與第二影像畫面IMG2R進行有效的影像接合。 Assume that the user will rotate to the right to take the next image frame to engage with the first image frame IMG1. Step S108 further includes calculating the number of feature points FP covered by the overlapping portion OL1 of the first image frame IMG2R in the first image frame IMG1 (as shown in FIG. 4), and making the first image frame IMG1 The number of feature points FP covered by the overlapping portion OL1 of the second image frame IMG2R is above the threshold. It is assumed that the threshold value of the feature point FP is at least ten feature points in this embodiment, and the processing unit 280 of the electronic device 200 needs ten The feature points can perform effective image bonding with the second image frame IMG2R in the first image frame IMG1.
如此一來,處理單元280可在第一影像畫面IMG1中右側方向的側邊界附近,決定需要多大(水平寬度多少)的重疊部份OL1方能具備十個特徵點。進而,由重疊部份OL1的大小,得知往右側方向旋轉時最大旋轉角度θ 1,以及推算出最大旋轉角度θ 1對應之第二影像畫面IMG2R的 位置所在。 In this way, the processing unit 280 can determine how many overlapping portions OL1 that need to be large (horizontal width) in the vicinity of the side boundary in the right direction of the first image frame IMG1 to have ten feature points. Further, from the size of the overlapping portion OL1, the maximum rotation angle θ1 when rotating in the right direction and the second image screen IMG2R corresponding to the maximum rotation angle θ1 are obtained. Where the location is.
另一方面,假設,使用者將往左側旋轉拍攝下一張影像畫面,以便與第一影像畫面IMG1接合。步驟S108更包含計算第一影像畫面IMG1中與預定拍攝之第二影像畫面IMG2L的重疊部份OL2涵蓋之特徵點FP的數目(如第4圖所示),並使得第一影像畫面IMG1中與第二影像畫面IMG2L重疊部份OL2涵蓋之特徵點FP的數目為至少十個特徵點。 On the other hand, assume that the user will rotate to the left to take the next image frame to be engaged with the first image frame IMG1. Step S108 further includes calculating the number of feature points FP covered by the overlapping portion OL2 of the first image frame IMG2L in the first image frame IMG1 (as shown in FIG. 4), and making the first image frame IMG1 The number of feature points FP covered by the overlapping portion OL2 of the second image frame IMG2L is at least ten feature points.
如此一來,處理單元280可在第一影像畫面IMG1中左側方向的側邊界附近,決定需要多大(水平寬度多少)的重疊部份OL2方能具備十個特徵點。進而,由重疊部份OL2的大小,得知往右側方向旋轉時最大旋轉角度θ 2,以及推算出最大旋轉角度θ 2對應之第二影像畫面IMG2L的位置所在。 In this way, the processing unit 280 can determine the number of overlapping portions OL2 that need to be large (horizontal width) in the vicinity of the side boundary in the left direction of the first image frame IMG1 to have ten feature points. Further, from the size of the overlapping portion OL2, the maximum rotation angle θ 2 when rotating in the right direction is obtained, and the position of the second image screen IMG2L corresponding to the maximum rotation angle θ 2 is estimated.
如第4圖所示,第一影像畫面IMG1往右側方向的側邊界附近的特徵點密度較低,因此,所需的重疊部份OL1較大才能符合影像接合的最低門檻,因此,步驟S108計算得到往右側旋轉的最大旋轉角度θ 1較小。另一方面,第一影像畫面IMG1往左側方向的側邊界附近的特徵點密度較高,因此,所需的重疊部份OL2較小即可符合影像接合的最低門檻,因此,步驟S108計算得到往左側旋轉的最大旋轉角度θ 2較大。於此實施例中,最大旋轉角度θ 1與θ 2正相關於第一影像畫面IMG1右側與左側邊界附近的特徵點密度。 As shown in FIG. 4, the density of feature points near the side boundary of the first image frame IMG1 in the right direction is low. Therefore, the required overlap portion OL1 is large to meet the minimum threshold of image bonding, and therefore, step S108 is calculated. The maximum rotation angle θ 1 obtained to rotate to the right side is small. On the other hand, the density of the feature points near the side boundary of the first image frame IMG1 in the left direction is high. Therefore, the required overlapping portion OL2 is small to meet the minimum threshold of image bonding, and therefore, step S108 is calculated. The maximum rotation angle θ 2 of the left rotation is large. In this embodiment, the maximum rotation angles θ 1 and θ 2 are positively correlated with the feature point density near the right and left boundaries of the first image frame IMG1.
於上述第4圖之實施例中繪示,影像擷取方法100與電子裝置200可在水平旋轉方向(向右旋轉或向左旋轉)上計算不同的最大旋轉角度,並確保水平方向上的第二影像畫面IMG2R,IMG2L與第一影像畫面IMG1的重疊部分具有足夠的特徵點FP,但本揭示文件並不僅以水平方向為限。請一併參閱第5圖,其繪示在不同方向上旋轉並拍攝之第二影像畫面IMG2T、IMG2B的示意圖。 In the embodiment of FIG. 4 , the image capturing method 100 and the electronic device 200 can calculate different maximum rotation angles in the horizontal rotation direction (rotating to the right or to the left), and ensuring the horizontal direction. The overlapping portions of the two image frames IMG2R, IMG2L and the first image frame IMG1 have sufficient feature points FP, but the present disclosure is not limited to the horizontal direction. Please refer to FIG. 5 together, which shows a schematic diagram of the second image frames IMG2T and IMG2B rotated and photographed in different directions.
如第5圖所示,第一影像畫面IMG1往頂部方向的側邊界附近的特徵點密度較高,因此,所需的重疊部份OL3較小即能符合影像接合的最低門檻,因此,步驟S108計算得到往上方旋轉的最大旋轉角度θ 3較大。另一方面,第一影像畫面IMG1往底部方向的側邊界附近的特徵點密度較低,因此,所需的重疊部份OL4較大方能符合影像接合的最低門檻,因此,步驟S108計算得到往下方旋轉的最大旋轉角度θ 4較小。於此實施例中,最大旋轉角度θ 3與θ 4正相關於第一影像畫面IMG1頂部與底部邊界附近的特徵點密度。 As shown in FIG. 5, the density of the feature points near the side boundary of the first image frame IMG1 toward the top direction is high. Therefore, the required overlapping portion OL3 is small to meet the minimum threshold of image bonding, and therefore, step S108 It is calculated that the maximum rotation angle θ 3 that is rotated upward is large. On the other hand, the density of the feature points near the side boundary of the first image frame IMG1 toward the bottom direction is low, and therefore, the required overlap portion OL4 is larger than the minimum threshold for image joint, and therefore, step S108 is calculated downward. The maximum rotation angle θ 4 of the rotation is small. In this embodiment, the maximum rotation angles θ 3 and θ 4 are positively related to the feature point density near the top and bottom boundaries of the first image frame IMG1.
綜合第4圖與第5圖之實施例,第一影像畫面IMG1包含多個側邊界,影像擷取方法100的步驟S108可根據該些側邊界附近的特徵點密度,分別計算往左、右水平方向或上、下垂直方向旋轉時各自的最大旋轉角度,並且各最大旋轉角度分別正相關於相對應之各側邊界附近的特徵點密度。 In the embodiment of FIG. 4 and FIG. 5, the first image frame IMG1 includes a plurality of side boundaries, and the step S108 of the image capturing method 100 can calculate the left and right levels according to the feature point density near the side boundaries. The respective maximum rotation angles when the directions are rotated in the vertical direction of the upper and lower directions, and each of the maximum rotation angles is positively correlated with the density of the feature points near the respective side boundaries.
於該最大旋轉角度計算完成後(即步驟S108完成 後),影像擷取方法100可執行步驟S110,透過電子裝置200之顯示單元260,在使用者介面上提示沿著特定方向(如右、左、上或下)之最大旋轉角度θ 1、θ 2、θ 3及/或θ 4。 After the calculation of the maximum rotation angle is completed (ie, step S108 is completed). Thereafter, the image capturing method 100 can perform step S110, and through the display unit 260 of the electronic device 200, prompt the maximum rotation angle θ 1 , θ along a specific direction (such as right, left, up, or down) on the user interface. 2. θ 3 and/or θ 4 .
舉例來說,當電子裝置200沿著初始軸向AX0拍攝第一影像畫面IMG1時,第一影像畫面IMG1的中心點位於對焦框TO。當最大旋轉角度θ 1、θ 2、θ 3及θ 4計算完成之後,即可得到對應最大旋轉角度θ 1、θ 2、θ 3及θ 4的目標對焦框TR、TL(如第4圖所示)與TT、TB(如第5圖所示)。 For example, when the electronic device 200 captures the first image frame IMG1 along the initial axis AX0, the center point of the first image frame IMG1 is located in the focus frame TO. After the calculation of the maximum rotation angles θ 1 , θ 2 , θ 3 , and θ 4 is completed, the target focus frames TR and TL corresponding to the maximum rotation angles θ 1 , θ 2 , θ 3 , and θ 4 are obtained (as shown in FIG. 4 Show) with TT, TB (as shown in Figure 5).
接著,使用者可參考上述提示,並沿著水平方向或垂直方向旋轉電子裝置200的軸向。在使用者旋轉電子裝置200的過程中,影像擷取方法100執行步驟S112,利用動態感測器220偵測電子裝置200之即時軸向。 Then, the user can refer to the above prompt and rotate the axial direction of the electronic device 200 in the horizontal direction or the vertical direction. During the process of rotating the electronic device 200, the image capturing method 100 performs step S112 to detect the instantaneous axial direction of the electronic device 200 by using the dynamic sensor 220.
接著,影像擷取方法100可執行步驟S114,利用動態感測器220感測的即時軸向相對初始軸向(參見步驟S104)的差距,進而判斷電子裝置200往特定方向(如右、左、上或下)的旋轉是否已達最大旋轉角度θ 1、θ 2、θ 3及/或θ 4。例如,當動態感測器220感測的即時軸向為軸向AX1時,此時利用即時軸向AX1相對初始軸向AX0的差距判斷電子裝置200已往右旋轉達最大旋轉角度θ 1;同理,可根據軸向AX2、軸向AX3、軸向AX4與初始軸向AX0的差距進行判斷。 Then, the image capturing method 100 can perform step S114, using the difference between the instantaneous axial direction sensed by the dynamic sensor 220 and the initial axial direction (see step S104), thereby determining the electronic device 200 to a specific direction (eg, right, left, Whether the rotation of the up or down has reached the maximum rotation angles θ 1 , θ 2, θ 3 and/or θ 4 . For example, when the instantaneous axial direction sensed by the dynamic sensor 220 is the axial direction AX1, the difference between the instantaneous axial direction AX1 and the initial axial direction AX0 is used to determine that the electronic device 200 has been rotated to the right by the maximum rotation angle θ 1; It can be judged according to the difference between the axial direction AX2, the axial direction AX3, the axial direction AX4 and the initial axial direction AX0.
若步驟S114判斷目前電子裝置200的即時軸向尚未達到特定方向的最大旋轉角度θ 1、θ 2、θ 3及/或θ 4, 則回到步驟S112,繼續監控偵測電子裝置200之即時軸向。 If it is determined in step S114 that the current axial direction of the electronic device 200 has not reached the maximum rotation angle θ 1 , θ 2 , θ 3 , and/or θ 4 in a specific direction, Then, returning to step S112, the monitoring of the instantaneous axial direction of the electronic device 200 is continued.
若步驟S114判斷目前電子裝置200的即時軸向已達到特定方向的最大旋轉角度θ 1、θ 2、θ 3及/或θ 4,則影像擷取方法100執行步驟S116,拍攝第二影像畫面。於部份實施例中,當即時軸向已達到特定方向的最大旋轉角度時,電子裝置200係自動觸發拍攝第二影像畫面,不需要額外的使用者指令,提高操作上的便利性。如第4圖所示,若已達最大旋轉角度θ 1則自動拍攝第二影像畫面IMG2R,若已達最大旋轉角度θ 2則自動拍攝第二影像畫面IMG2L;如第5圖所示,若已達最大旋轉角度θ 3則自動拍攝第二影像畫面IMG2T,若已達最大旋轉角度θ 4則自動拍攝第二影像畫面IMG2B。 If it is determined in step S114 that the current axial direction of the electronic device 200 has reached the maximum rotation angles θ 1 , θ 2, θ 3 and/or θ 4 in the specific direction, the image capturing method 100 executes step S116 to capture the second image frame. In some embodiments, when the instantaneous axial direction has reached the maximum rotation angle in a specific direction, the electronic device 200 automatically triggers the shooting of the second image frame without additional user instructions, thereby improving the convenience of operation. As shown in Fig. 4, if the maximum rotation angle θ 1 has been reached, the second image frame IMG2R is automatically captured, and if the maximum rotation angle θ 2 has been reached, the second image frame IMG2L is automatically captured; as shown in Fig. 5, if When the maximum rotation angle θ 3 is reached, the second image frame IMG2T is automatically captured, and if the maximum rotation angle θ 4 has been reached, the second image frame IMG2B is automatically captured.
前述第一影像畫面IMG1與第二影像畫面IMG2R、IMG2L、IMG2T或IMG2B可以用以接合為全景影像。 The first image frame IMG1 and the second image frame IMG2R, IMG2L, IMG2T or IMG2B may be used to be joined as a panoramic image.
於一實施例中,影像擷取方法100可更進一步將第二影像畫面IMG2R、IMG2L、IMG2T或IMG2B與第一影像畫面IMG1接合,藉此形成全景影像。此外,全景影像的產生並不僅限於兩張影像畫面的接合,影像擷取方法100可循環進行以實現三張、四張或更多張影像的接合,以形成更廣視角的全景影像,循環進行的作法可由上述兩張影像的接合得知,在此不另贅述。須特別說明的是,當兩張的接合影像形成後,影像擷取方法100可根據接合後的影像產生新的特徵點分佈,藉由新的特徵點分佈中各側邊界的 特徵點密度計算新的各方向上最大旋轉角度。此外,多次擷取的影像並不僅限於同一旋轉方向,例如來說,可先往右擷取下一張影像畫面,接著往上擷取另一張影像畫面,再接著往右擷取再一張影像畫面。 In an embodiment, the image capturing method 100 can further join the second image frame IMG2R, IMG2L, IMG2T or IMG2B with the first image frame IMG1, thereby forming a panoramic image. In addition, the generation of the panoramic image is not limited to the joining of the two image images, and the image capturing method 100 can be cyclically performed to realize the joining of three, four or more images to form a panoramic image with a wider viewing angle, and the cycle is performed. The method can be known from the joining of the above two images, and will not be further described herein. It should be particularly noted that after the two joined images are formed, the image capturing method 100 may generate a new feature point distribution according to the combined image, by using the side borders of the new feature point distribution. The feature point density calculates the new maximum rotation angle of each party. In addition, the images captured multiple times are not limited to the same direction of rotation. For example, you can first grab the next image frame, then upload another image frame, and then drag it to the right. Image image.
此外,影像擷取方法100並不限於拍攝兩個影像畫面後立刻進行影像接合。於另一實施例中,用以產生全景影像的影像擷取方法100可連續拍攝多個影像畫面(如兩個影像畫面、三個影像畫面或更多個影像畫面)或當使用者將所有影像畫面都拍攝完成後一次進行影像接合。 In addition, the image capturing method 100 is not limited to performing image bonding immediately after capturing two image frames. In another embodiment, the image capturing method 100 for generating a panoramic image can continuously capture multiple image images (such as two image images, three image images or more image frames) or when the user images all the images. The image is joined once after the shooting is completed.
此外,當使用者旋轉電子裝置200的過程中,動態感測器220將感測電子裝置200的即時軸向。同時,顯示單元260的使用者介面上顯示即時的取景畫面將顯示此即時軸向上的中央對焦點。當使用者往右旋轉接近最大旋轉角度θ 1時,目標對焦框TR將出現在顯示單元260的使用者介面中,使用者僅需要根據使用者介面上提示的目標對焦框TR,將中央對焦點對準目標對焦框TR,便可確保電子裝置200準確地旋轉到預定的最大旋轉角度θ 1。同理,往其他方向旋轉時亦然,目標對焦框TL、目標對焦框TT與目標對焦框TB可用以提示使用者將電子裝置200準確地旋轉到預定的最大旋轉角度θ 2、θ 3與θ 4。 In addition, the dynamic sensor 220 will sense the immediate axial direction of the electronic device 200 as the user rotates the electronic device 200. At the same time, displaying the instant viewfinder screen on the user interface of the display unit 260 will display the center focus point on the instant axis. When the user rotates to the right to approach the maximum rotation angle θ 1 , the target focus frame TR will appear in the user interface of the display unit 260 , and the user only needs to focus the target focus frame TR on the user interface to center the focus point. By aligning the target focus frame TR, it is ensured that the electronic device 200 is accurately rotated to a predetermined maximum rotation angle θ 1 . Similarly, when rotating in other directions, the target focus frame TL, the target focus frame TT and the target focus frame TB can be used to prompt the user to accurately rotate the electronic device 200 to a predetermined maximum rotation angle θ 2, θ 3 and θ. 4.
綜上所述,本揭示文件提出影像擷取方法、全景影像產生方法以及電子裝置,其可根據當前的影像畫面計算其中的特徵點之分佈,並根據各方向邊界上的特徵點分佈,得知各方向上的最大旋轉角度,方便使用者快速的將 電子裝置旋轉至最佳的位置,確保影像接合的效果,並可有效利用較少的影像擷取次數形成覆蓋最大視角範圍的全景影像。 In summary, the present disclosure provides an image capturing method, a panoramic image generating method, and an electronic device, which can calculate a distribution of feature points according to a current image frame, and learn from the distribution of feature points on each direction boundary. The maximum rotation angle of each direction is convenient for the user to quickly The electronic device rotates to the optimal position to ensure the image joint effect, and can effectively use the fewer image capture times to form a panoramic image covering the maximum viewing angle range.
雖然本案已以實施例揭露如上,然其並非用以限定本案,任何熟習此技藝者,在不脫離本案之精神和範圍內,當可作各種之更動與潤飾,因此本案之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present case. Anyone skilled in the art can make various changes and refinements without departing from the spirit and scope of the present case. The scope defined in the patent application is subject to change.
100‧‧‧影像擷取方法 100‧‧‧Image acquisition method
S102~S116‧‧‧步驟 S102~S116‧‧‧Steps
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW103130812A TWI569641B (en) | 2014-09-05 | 2014-09-05 | Image capturing method and electronic apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW103130812A TWI569641B (en) | 2014-09-05 | 2014-09-05 | Image capturing method and electronic apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201611606A true TW201611606A (en) | 2016-03-16 |
TWI569641B TWI569641B (en) | 2017-02-01 |
Family
ID=56085334
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW103130812A TWI569641B (en) | 2014-09-05 | 2014-09-05 | Image capturing method and electronic apparatus |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI569641B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111693254A (en) * | 2019-03-12 | 2020-09-22 | 纬创资通股份有限公司 | Vehicle-mounted lens offset detection method and vehicle-mounted lens offset detection system |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7436438B2 (en) * | 2004-03-16 | 2008-10-14 | Creative Technology Ltd. | Digital still camera and method of forming a panoramic image |
US20070081081A1 (en) * | 2005-10-07 | 2007-04-12 | Cheng Brett A | Automated multi-frame image capture for panorama stitching using motion sensor |
KR100800804B1 (en) * | 2006-12-27 | 2008-02-04 | 삼성전자주식회사 | Method for photographing panorama picture |
US8115801B2 (en) * | 2008-05-15 | 2012-02-14 | Arcsoft, Inc. | Method of automatic photographs stitching |
US9307165B2 (en) * | 2008-08-08 | 2016-04-05 | Qualcomm Technologies, Inc. | In-camera panorama image stitching assistance |
TW201030637A (en) * | 2009-02-10 | 2010-08-16 | Alibaba Group Holding Ltd | A method providing internet service and service integration platform system |
TW201200960A (en) * | 2010-06-18 | 2012-01-01 | Hon Hai Prec Ind Co Ltd | Panoramic capturing device and method thereof |
TWI485632B (en) * | 2012-02-24 | 2015-05-21 | Htc Corp | Image alignment method and image alignment system |
-
2014
- 2014-09-05 TW TW103130812A patent/TWI569641B/en active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111693254A (en) * | 2019-03-12 | 2020-09-22 | 纬创资通股份有限公司 | Vehicle-mounted lens offset detection method and vehicle-mounted lens offset detection system |
CN111693254B (en) * | 2019-03-12 | 2022-09-20 | 纬创资通股份有限公司 | Vehicle-mounted lens offset detection method and vehicle-mounted lens offset detection system |
Also Published As
Publication number | Publication date |
---|---|
TWI569641B (en) | 2017-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2993894B1 (en) | Image capturing method and electronic apparatus | |
TWI539809B (en) | Method of positional sensor-assisted image registration for panoramic photography and program storage device and electronic device for the same | |
JP5659305B2 (en) | Image generating apparatus and image generating method | |
JP5659304B2 (en) | Image generating apparatus and image generating method | |
JP5769813B2 (en) | Image generating apparatus and image generating method | |
WO2017088678A1 (en) | Long-exposure panoramic image shooting apparatus and method | |
JP5865388B2 (en) | Image generating apparatus and image generating method | |
US9516214B2 (en) | Information processing device and information processing method | |
JP2020053774A (en) | Imaging apparatus and image recording method | |
TWI696147B (en) | Method and system for rendering a panoramic image | |
TWI615808B (en) | Image processing method for immediately producing panoramic images | |
TW201342303A (en) | Three-dimensional image obtaining system and three-dimensional image obtaining method | |
TWI502271B (en) | Controlling method and electronic apparatus | |
TWI569641B (en) | Image capturing method and electronic apparatus | |
CN105472232B (en) | Image acquisition method and electronic device | |
WO2018072087A1 (en) | Method for realizing effect of photo being taken by others through selfie, and photographing device | |
CN104320576B (en) | A kind of image processing method and image processing apparatus for portable terminal | |
TWI516120B (en) | Method for generating panoramic image and image capturing device thereof | |
JP2018032991A (en) | Image display unit, image display method and computer program for image display | |
TWI524213B (en) | Controlling method and electronic apparatus | |
TWI559731B (en) | Production method for a three dimensional image | |
JP2008199550A (en) | Image processing device and image processing method | |
Chu et al. | Pan360: INS Assisted 360-Degree Panorama | |
CN104349131B (en) | A kind of information processing method and electronic equipment | |
CN105516706A (en) | Method for making stereo images |