201031193 六、發明說明: •【發明所屬之技術領域】 本發明係關於一種光場相機之光度校正方法,特別係 指一種不需要設定比對物即可進行光度校正的光場相機光 度校正方法》 【先前技術】 相機是人們普遍用來記錄生活中特殊事件的工具,不 ❹管是特殊節曰或是各地旅遊,都可以藉由相機來記錄下每 一吋美景及每一幕令人難忘的場景。 隨著科學的進步,傳統上需要更換底片的光學相機早 已被數位相機所取代’但是不論是光學相機或是數位相 機,都是將三維空間的立艎場景以二維景象的方式呈現, 在整體景觀的呈現上,難免有立體感、真實感不足的缺憾。 光場相機(light field camera )是一種擷取場景中四維 光場資訊的裝置,一個完整的四維光場可以提供觀賞者對 ❹於景觀所有視覺上的資訊’亦即對於同一場景進行拍攝 時,在同一光場的不同角度下所呈現的相片效果也會有所 不同’本案發明人所提出之中華民國第2〇〇823595公開號 專利,專利名稱係「利用可程式化光圈之影像擷取裝置」 即在光學鏡頭與感應器間設置一可程式化光學透鏡,來將 由被拍攝物體射入至光學鏡頭後由感應器所接收到的光線 進行適當開放或遮蔽,以得到光學鏡頭上不同位置的入射 光線記錄,並進而可還原成被拍攝物體的完整光場資料,以 利後續進行任意焦距影像處理。 201031193 然而利用光場相機進行拍 因為不同的視角不同視角下,相…有可能會 亮度不同而引發整張相片的光=各部位區:光線的明 區塊景象模糊的現象或疋造成局部 度。 進而在觀賞相片時影響視覺的舒適 既有光場相機為了避免上述 問題’必須先在場景中 ::-权正物’進行相片拍攝後,將所得的相片做為參, ❹後再針對同一場景進行拍攝,將所得的相片做為 : 並制該校正相片中的校正物進行標的相以 光度校正,在執行過程中十分不便。 【發明内容】 本發明之主要目的為提供一種可以針對光場相機顯傷 結果進行光度校正的方法,係藉由演算方法,在不需使用 -校正物趙的狀態下,對於光度失真的相片進行光度校正 本發月光场相機之光度校正方法係包括下列步驟:201031193 VI. Description of the invention: • Technical field to which the invention pertains The present invention relates to a method for correcting the luminosity of a light field camera, in particular to a method for correcting the luminosity of a light field camera capable of performing photometric correction without setting a contrast. [Prior Art] A camera is a tool commonly used to record special events in life. Whether it is a special thrift or a local tour, you can record every beautiful scene and every unforgettable scene with a camera. . With the advancement of science, optical cameras that traditionally need to replace negatives have long been replaced by digital cameras. But whether it is an optical camera or a digital camera, the three-dimensional scene is presented in a two-dimensional scene. In the presentation of the landscape, it is inevitable that there will be a lack of three-dimensionality and lack of authenticity. A light field camera is a device that captures four-dimensional light field information in a scene. A complete four-dimensional light field can provide viewers with all the visual information about the landscape, that is, when shooting the same scene. The effect of the photos presented at different angles of the same light field will be different. The inventor of the present invention proposed the Patent No. 2, 823,595 of the Republic of China. The patent name is "image capture device using a programmable aperture. That is, a programmable optical lens is arranged between the optical lens and the sensor to appropriately open or shield the light received by the sensor after being incident on the optical lens to obtain different positions on the optical lens. The incident light is recorded and can be restored to the complete light field data of the object to be used for subsequent arbitrary focal length image processing. 201031193 However, using a light field camera for shooting, because of different viewing angles, different phases, there may be different brightness to trigger the light of the entire photo = area of each part: the bright scene of the light is blurred or the locality is caused by the phenomenon. In addition, the visual comfort is affected when viewing photos. In order to avoid the above problem, the photo must be taken in the scene::-right thing, the photo will be taken as the reference, and then the same scene. The photograph is taken, and the obtained photograph is taken as: and the calibration object in the calibration photograph is used to perform the photometric correction of the target phase, which is very inconvenient in the execution process. SUMMARY OF THE INVENTION The main object of the present invention is to provide a method for performing photometric correction for a light field camera damage result, which is performed by using a calculation method for a photometrically distorted photograph without using a calibrator Zhao. Photometric Correction The photometric calibration method of the moonlight field camera includes the following steps:
(1)拍攝相片:利用一光場相機攝取同一個光場下不 同視角的複數張相片; (2)特徵點擷取:對該複數張相片中至少兩張相片進 行相片上複數個特徵點擷取,#中一張相片為參考相片, 其餘張則為需要進行光度校正之標的相片; (3 ) — 角分割(deiaunay triangUiati〇n ):分別選取參 考相片及標的相片上的三個特徵點形成複數個三角平面; (4 )變形化處理(def〇rmati〇n ):將參考相片及標的 相片重疊進行位置比對,將位置偏移量過大之三角平面剔 201031193 除; (5 )光度誤差計算:在標的相片和參考相片設定相對 應的N假比較點,利用該參考相片為基準取 各點的光度誤差;及 (6)光度校正:依照步驟(5)所得之光度誤差還原 片之光度。 【實施方式】 本發明係關於一種光場相機之光度校正方法,包括下 列步驟: (1) 拍攝相片:利用一光場相機攝取同一個光場下不 同視角的複數張相片; (2) 特徵點擷取:對該複數張相片中至少兩張相片進 行相片上複數個特徵點擷取,其係選定一張相片為校正基 準之參考相片,其餘張則為需要進行光度校正之標的相片; (3 )二角分割(delaunay triangulation ):分別選取參 ❹考相片及標的相片的三個特徵點形成複數個三角平面,· (4 )變形化處理(def〇rmati〇n ):將參考相片及標的 相片重疊進行位置比對; (5)光度誤差计算:在標的相片和參考相片設定相對 應的N個比較點,每一個點的位置係以χ表示將該標的 相片和該參考相片每一個對應點的光度值相除即可獲得 標的相片光度誤差值你),將該標的相片上光度最高的一點 之位置設定為Ce’在已知該N個比較點於該標的相片和該參 考相片上之光度分別為<(χ)和人(χ)及每一個比較點的位置為 201031193 X下可藉由方程式(1)計算出每一個比較點之JC位置所 對應的〜值’選取每一個比較點中最小的〜值,再帶回每一 - 個X位置中許質立 T异母—個X比較點的q值,如此重複運算至α„, 和C“為最小收敛值’將該化和之最小收斂值帶回方程式(1 ) 中’即可^獲得標的相片上每-比較點光度誤J:值/u(x); W=/“W/„W=(|;aa,卜......................⑴ /*〇 Δ 其中X為標的相片或參考相片上的一定點 φ Μ為相片編號 人(Χ)為標的相片中定點JC之光度 d為標的相片 人卜)為參考相片中定點JC之光度 /“卜)為標的相片光度誤差值 〜為光度誤差係數(1) Photographing: Using a light field camera to capture a plurality of photos of different viewing angles in the same light field; (2) Feature point capture: performing multiple feature points on at least two photos of the plurality of photos. Take, one of the photos in # is the reference photo, and the other one is the photo that needs to be photometrically corrected; (3) — Deiaunay triangUiati〇n: select the three feature points on the reference photo and the target photo respectively (3) Deformation processing (def〇rmati〇n): the reference photo and the target photo are overlapped for positional alignment, and the triangular offset of the position offset is too large to be removed by 201031193; (5) Photometric error calculation : setting the corresponding N-false comparison point of the target photo and the reference photo, using the reference photo as a reference to take the luminosity error of each point; and (6) luminosity correction: reducing the luminosity of the slice according to the luminosity error obtained in the step (5). [Embodiment] The present invention relates to a luminosity correction method for a light field camera, comprising the following steps: (1) taking a photo: using a light field camera to take a plurality of photos of different viewing angles under the same light field; (2) feature points Capture: at least two of the plurality of photos in the plurality of photos are subjected to a plurality of feature points, wherein the selected one is a reference photo of the calibration reference, and the remaining ones are the photos that need to be photometrically corrected; (3) ) delaunay triangulation: selects three feature points of the reference photo and the target photo to form a plurality of triangular planes, (4) deformation processing (def〇rmati〇n): reference photo and target photo Overlap for positional comparison; (5) Photometric error calculation: N corresponding comparison points are set in the target photo and the reference photo, and the position of each point is represented by χ for each corresponding point of the target photo and the reference photo The photometric value is divided to obtain the photo photometric error value of the target photo, and the position of the highest photometric illuminance of the target photo is set to Ce' where the N comparison points are known. The luminosity of the target photo and the reference photo are respectively <(χ) and person(χ) and the position of each comparison point is 201031193 X. The JC position of each comparison point can be calculated by equation (1). The value of 'value' selects the smallest value of each comparison point, and brings back the q value of the X-comparison point in each of the X positions, so repeat the operation to α„, and C“is the minimum The convergence value 'brings the minimum convergence value of the sum to the equation (1)' to obtain the luminosity error per-comparison point on the target photo: value /u(x); W=/"W/„W= (|;aa,卜......................(1) /*〇Δ where X is a certain point on the subject photo or reference photo φ Μ is the photo number The person (Χ) is the photo of the spot JC, and the photometric d is the photo of the person in the photo. The photometric error value of the spot JC of the reference photo is the photometric error value of the photo.
Ce為標的相片申最亮點之位置 卜啫為歐幾里得距離(Euclidean distance) ® (6)光度校正:利用步驟(5)所計算之光度誤差值乂㈠ 調整、校正該標的相片之光度。 實施例 請參考附件中的相片, 电^ 巧以明瞭本發明的光場相機之光 度校正方法實施狀態, 用光%相機進行拍攝時,可以依 "、、相機的設定掏取^張相 鍊浪相片(G 2) ’在本實施例中係以 、生由先場相機所擷取同一個實 柏1固1ί景下於9個不同光場的影像 相片來進行說明,該9張影伤如u \ 張影像相片分別標號為0-8。 本方法係利用下述步驟: 201031193 像相片⑴選拍:相片:利用光場相機拍攝9個不同光場的影 -其標號為Γ來一做右為Γ度Γ高、左侧光度較低之相片並將 稱為標的相片=用中之:的相“附件-,後簡 狀向外降低光度丄==區塊光度較高並以輕射 考 標號為〇(附件二,後簡稱為參考相片)· 點二):徵點擁取:對於標的相片和參考相片進行特徵 ❹相片中』门:件一和附件二中綠色標點),該特徵點可為 同色塊之分界點,或相片中某項物艘形狀或顏色 較為突出之點; ,角分割:將摘取出的特徵點相互連結形成複數 個二角平面(如附件三所示); (4)變形化處理:將標的相片和參考相片重疊進行標 的相片和參考相片上三角平面之比對,剔除拍攝時,光場 角度不同所導致物品在相片上的位置造成偏移量過大之三 ❹肖平面’或是剔除標的相片上,和參考相片之三角平面位 置無法對應之三角平面(如附件四所示之黑色區域); 、,(5)光度比對:在標的相片和參考相片設定相對應且 平均分佈的500個比較點,每一個點的位置係以:表示將 該標的相片和該參考相片每一個對應點的光度值相除即 可獲得標的相片光度誤差值你),該標的相片因光度誤差變 化所導致之光度變化如附件五所示,將該標的相片上光度 最高的一點之位置設定為c“,在已知該5〇〇個比較點於該標 的相片和該參考相片上之光度分別為打㈠和^㈤及每一個比 201031193 較點的位置為x下’可藉由方程式⑴計算出500個比較 點之X位置所對應的%值,選取5⑽個比較點中最小的〜 值再帶回每-個:位置中計算每一個X比較點的^值,如 此重複運算至〜和〜為最小收斂值,將該〜和c“之最小收斂 值帶回方程式⑴中’即可獲得標的相片上每-比較點光 度誤差值/a(x); fu W=/„ W/„ w=-caf )/,,(^)......................(i) 其中x為標的相片或參考相片上的一定點 w為相片編號 為標的相片中定點X之光度 β為標的相片 人(x)為參考相片中定點JC之光度 人(x)為標的相片光度誤差值 ~為光度誤差係數 c»為標的相片中最亮點之位置 |丨^»|2為歐幾里得距離(Euclidean distance) (6)光度校正:利用步驟(5)所計算之光度誤差值入㈠ 調整、校正該標的相片之光度,經由校正後該標的相片之 顯像如附件六所示。 ,該標的相片在校正前、後,經由標的相片截取任意水 平刀線上不同位置之光度如第一圖所示,其中縱轴為光 度,橫軸為對應於該標的相片水平切線上的不同位置,符 號A為校正前相片水平切面上不同位置的光度變化線,符 號為校正後相片水平切面上不同位置的光度變化線,由 201031193 圖中可以看出,經過校正後,該標的相片水平切線上的不 同位置之光度趨近於一致,因此能使得相片整體不再有左 侧光度較暗之情況發生。 201031193 【圖式簡單說明】 二第一圖為利用本發明之光度校正方法針對相片進行 正刚後’相片水平切面的光度變化情形。 【附件說明】 附件—為標的相片。 附件二為參考相片。 附件三為標的相片之三角分割結果。 附件四為標的相片之變形化處理結果。 附件五為標的相片之光度誤差變化。 附件六為經校正後的標的相片。 【主要元件符號說明】 A校正則相片水平切面上不同位置的光度變化線。 核正後'相片水平切面上不同位置的光度變化線。 ❿Ce is the position of the highlight of the photo. Diurnal distance (Euclidean distance) ® (6) Photometric correction: Use the luminosity error value calculated in step (5) 乂 (1) to adjust and correct the luminosity of the target photo. For the embodiment, please refer to the photo in the attached file, and the state of the photometric correction method of the light field camera of the present invention is clearly explained. When shooting with the light % camera, the photo of the phase chain can be taken according to the settings of the camera and the camera. (G 2) 'In this embodiment, the image taken by the first field camera and the same cypress 1 illusion is recorded in 9 different light fields. The 9 shadows are like u \ Image images are numbered 0-8. The method utilizes the following steps: 201031193 Photographs (1) Photographs: Photographs: Photographs of nine different light fields are taken by a light field camera - the label is Γ 一 做 右 右 右 右 、 、 、 、 、 、 The photo will be called the photo of the target = the middle of the phase: "Attachment -, the outline will be reduced outwards 丄 == The block luminosity is higher and the light shot is marked as 〇 (Attachment 2, hereinafter referred to as the reference photo) ) · Point 2): Call for points: for the target photo and the reference photo, the feature is in the photo "door: one and the green punctuation in the second", the feature point can be the boundary point of the same color block, or a photo in the photo The shape or color of the item is more prominent; angle segmentation: the extracted feature points are connected to each other to form a plurality of two-corner planes (as shown in Annex III); (4) Deformation processing: the photo and reference of the target The photos are overlapped to compare the triangular photos on the reference photos and the reference photos, and the positions of the objects on the photos caused by the different angles of the light field are caused by the difference of the angle of the light field, or the smeared photos are removed, or Reference photo triangle The triangle plane where the position cannot correspond (such as the black area shown in Annex 4); , (5) Photometric comparison: Set the 500 comparison points corresponding to the average distribution of the target photo and the reference photo, and the position of each point is By: indicating that the photo photo value of each corresponding point of the reference photo and the reference photo is divided to obtain the photo photometric error value of the target photo, and the photometric change caused by the change of the photometric error is as shown in Annex V, The position of the highest illuminance point of the target photo is set to c", and the luminosity of the 5 photos comparison point on the target photo and the reference photo is known as playing (1) and ^ (5) and each is compared with 201031193. The position is x lower', the % value corresponding to the X position of 500 comparison points can be calculated by equation (1), and the smallest ~ value of 5 (10) comparison points is selected and then brought back to each - position: each X comparison is calculated. The value of the point, so repeat the operation until ~ and ~ are the minimum convergence values, and bring the minimum convergence value of ~ and c back to the equation (1) to obtain the luminosity error value per-comparison point on the target photo /a(x ); Fu W=/„ W/„ w=-caf )/,,(^)................(i) where x is the subject photo or The certain point w on the reference photo is the photo number of the photo in the photo numbered as the target photo. The photo person (x) is the photometric (x) of the reference point in the reference photo. The photo luminosity error value is the photometric error coefficient c. »The position of the brightest point in the target photo|丨^»|2 is the Euclidean distance (6) Photometric correction: Use the luminosity error value calculated in step (5) to (1) Adjust and correct the photo of the target The illuminance, after the correction of the target photo is shown in the attached figure 6. The photo of the target is taken before and after the correction, and the luminosity of the different positions on any horizontal knife line is intercepted by the target photo as shown in the first figure, wherein the vertical axis For luminosity, the horizontal axis is the different position corresponding to the horizontal tangent of the target photo, the symbol A is the luminosity change line at different positions on the horizontal slice of the corrected photo, and the symbol is the luminosity change line at different positions on the horizontal slice of the corrected photo. 201031193 It can be seen that after correction, the standard photo is not horizontally tangential The luminosity of the same position is close to the same, so that the photo overall no longer has a dark luminosity on the left side. 201031193 [Simple Description of the Drawings] The first figure is a photometric change of the horizontal slice of the photo immediately after the photo is corrected by the photometric correction method of the present invention. [Description of attachments] Attachment - is the subject photo. Annex II is a reference photo. Annex III is the result of the triangulation of the subject photo. Attachment 4 is the result of the deformation processing of the subject photo. Annex V is the change in luminosity error of the subject photo. Annex VI is the corrected subject photo. [Main component symbol description] A correction is the luminosity change line at different positions on the horizontal slice of the photo. After the correction, the luminosity change line at different positions on the horizontal slice of the photo. ❿