近來手持式光場相機的發明在攝影學上掀起了一場革命。雖然光場相機的概念在多年以前早被提出,但卻因為早期的設計過於笨重且不便於攜帶因此無法被廣泛的應用。有別於一般相機,透過其特殊的設計,在拍攝照片時光場相機除了紀錄光的強度之外,同時也記錄了光的角度。有了光的角度這項額外的資訊,我們可進行許多如數位變焦、改變視角及深度估測等應用,並且可於電腦視覺、計算機圖學、機械視覺上廣泛的使用。在本篇論文中,我們主要使用數位變焦的功能來獲得聚焦在不同深度的一連串影像。 我們設計了一個能量函數,經由將此能量函數最小化可得到一張標籤圖,圖中每點的值代表該點在哪張影像中最為清晰。該能量函數的主要核心是以一個像元基礎(pixel-based)的自適應式聚焦估測(adaptive focus measure)為主,並輔以一個區域式(region-based)的Adaboost分類法。藉由這個能量函數,我們可以獲得比使用傳統聚焦測深的方法更為強健且適應性更高的結果。為了便於其他的應用,我們同時也利用這張標籤圖來產生一張虛擬的全聚焦圖。 我們使用Lytro的手持式光場相機來捕捉現實世界的場景,並透過電腦將其重新聚焦在不同的深度以取得一連串的影像集合。接著我們利用上述的能量函數來對每個標籤給予每個像素不同的能量。最後,透過將此能量最小化來產生一張標籤圖及一張虛擬的全聚焦圖。
Recently, the invention of hand-held light field camera raises a revolution in photography. We can record not only the intensity of light but also the direction of light by the light field camera. With the additional information, we could process many applications such as digital refocusing, moving observer, and depth estimation which can be utilized to computer vision, computer graphics, and machine vision. In this thesis, we mainly concentrate on the function of digital refocusing which can easily get series of images with different focal length. We design an energy function and minimize it to get a label map which represents the index of sharpest image for each pixel. The primary core of the energy function is a pixel-based AFM method and a region-based adaboost classification method is secondary. We get a more robust result than traditional depth from focus (DFF) method through this energy function. We also generate a virtual all-focus image for further applications by utilizing the label map. We us the Lytro light field camera to capture real world scene and refocus it to a set which contains several images with different focal length. For each pixel, we compute the cost to each label by applying the energy function described above. Finally, we generate a label map and a virtual all-focus image by our algorithm.