Android Bokeh application

The word Bokeh has been popular in the photography field in recent years. Commonly, people know Bokeh effect as image with sharp foreground object and blurred background. In order to have the Bokeh effect in a photo, one need to use lens that have shallow depth of field so that only part of the scen...

Full description

Saved in:
Bibliographic Details
Main Author: Keng, Wei Jack
Other Authors: School of Computer Engineering
Format: Final Year Project
Language:English
Published: 2014
Subjects:
Online Access:http://hdl.handle.net/10356/58985
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Nanyang Technological University
Language: English
Description
Summary:The word Bokeh has been popular in the photography field in recent years. Commonly, people know Bokeh effect as image with sharp foreground object and blurred background. In order to have the Bokeh effect in a photo, one need to use lens that have shallow depth of field so that only part of the scene will be focused. Only Digital Single-lens Reflex (DSLR) camera lenses have very large aperture diameter to create such shallow depth of field. However, not many people can afford to buy a DSLR camera because the price is very expensive. On the other hand, smartphones are much more affordable by everyone and according to J. Koetsier by the end of year 2013, 57% of the smartphones are run by Android. Therefore, here comes an idea to create an Android camera application which can take a photo with Bokeh effect in it. The approach used to create a Bokeh effect in this project is similar to the approach introduced by Prof. Marc Levoy who created Synthcam. Instead of taking one photo, record a few image frames while shifting the camera around the object to be focus on. This is to let the object appear in the image a few pixels away from other images. Then, align all the image frames according to the object and add the image frames together. In the end, the final image will have a sharp and focused object foreground, and a blurred background which is similar to Bokeh effect. The application is built based on the OpenCV library. OpenCV is an open source computer vision library. A few methods provided by OpenCV are used in the application to create the Bokeh effect. For example, matchTemplate method is used to find the location of the object to be focused on in the image. Then, warpAffine method is used to translate the image so that the object is at the same location as the other frames. Finally, addWeighted method is used to add all the image frames where the objects in the images are aligned to each other. The application’s basic functions were successfully implemented. However, due to this a new project, there are still rooms of improvement. Some improvements to increase the quality of the application are also recommended.