Single Image Refocusing and Defocusing
A post processing method for single-image refocusing and defocusing using focus-map estimation and blind de-convolution framework
by Mr. Guruprasad Patil*, Mr. Kanchan Ballolli,
- Published in Journal of Advances in Science and Technology, E-ISSN: 2230-9659
Volume 12, Issue No. 25, Dec 2016, Pages 262 - 265 (4)
Published by: Ignited Minds Journals
ABSTRACT
A post processing method to tackle the single-image refocusing-and-defocusing problem. The proposed method can accomplish the tasks of focus-map estimation and image refocusing and defocusing. Given an image with a mixture of focused and defocused objects, we first detect the edges of objects within in image and then estimate the focus map based on the edge blurriness. In focus map image we find the difference in foreground and background objects present within that image. Thresholding is process to extract the objects from the background by selecting the threshold value T that separates the two modes. That is if pixel value is less than the threshold value T then we replace the pixel value by black and if pixel value is less than the threshold value T then we replace the pixel value by white. The image refocusing problem is addressed in a blind de-convolution framework and image defocusing problem is addressed by using filters.
KEYWORD
single-image refocusing, defocusing, post processing method, focus-map estimation, image refocusing, image defocusing, edge detection, foreground objects, background objects, thresholding, blind de-convolution framework, filters
INTRODUCTION
Single-Image refocusing and defocusing is an interesting research topic and has received recently a lot of attention. Two tasks are involved mainly in this topic. One is image refocusing, which is to recover the sharpness of the blurry defocused objects in an input image and to generate a virtual all-focused image. The other is defocusing, which is to blur an image and to create defocus effects. It is a novel method, which is able to handle the tasks of focus-map estimation and image refocusing and defocusing. The proposed method first estimates a focus map and then uses it to separate the focused and defocused objects. The focus-map estimation is based on the assumption that the blurring of edges is only due to the defocus effect therefore, the focus information can be indicated by edge blurriness. Methodology of refocusing and defocusing is shown in figure 1.1 and figure 1.2. Edge detection [1]-[3] is an image processing technique for finding the boundaries of objects within image. In [1] it was used to detect discontinuities in brightness and in [3] to significantly reduce the amount of data in an image, while preserving the structural properties to be used for further image processing. Focus map estimation is used to estimate automatically the focus map for an image containing a mixture of focused and defocused objects. The occurrence of edge blurriness is only due to the defocusing effect. It is difficult to obtain focus map estimation [4]-[5] for naturally blurry objects such as clouds. In is used for robot and the 3D reconstruction in [4]. Thresholding [1] methods replace each pixel in an image with a black pixel if the image intensity I is less than some fixed constant T or a white pixel if the image intensity is greater than that constant. Thresholding is the simplest method for image segmentation. In [1] it was used for document image analysis. The Blind de-convolution is a method to analyse and evaluate recent blind deconvolution [2] algorithms. Since the kernel size is often smaller than the image size a map estimation of the kernel alone can be well constrained and accurately recover the true blur. It is the recovery of a sharp version of a blurred image when the blur kernel is unknown. In image processing filters [1] are mainly used to suppressed either the higher frequencies in the image that is smoothening the image or low frequencies that is enhancing or detecting edges in the image. In [1] it was used to remove noise.
1) METHODOLOGY :
Fig 1.1 and fig 1.2 represents proposed block diagrams of Single Image Refocusing and Defocusing. The blocks of proposed block diagram are briefly explained below. The Fig 1.1 represents defocusing of an image to which the input image is the original image which we provide. The Fig 1.2 represents refocusing of an image to which the input image is the output image of the defocusing process. The output of Fig 1.2 is the final output we obtain which is almost similar to the provided input image at Fig 1.1.
Guruprasad Patil1*, Kanchan Ballolli2 2
EDGE DETECTION:
It is an image processing technique for finding the boundaries of objects within image. It works by detecting discontinuities in brightness. Edge detection is an image processing technique for finding the boundaries of objects within an image. It works by detecting discontinuities in brightness. With the help of edge detection, more perceptible information can be taken out by knowing the physical and geometrical changes in an input image. There are four different operators i.e., Prewitt, Sobel, Robert Cross, Canny edge detector Operators
FOCUS MAP ESTIMATION (FME):
A method is proposed in this section to estimate automatically the focus map for an image containing a mixture of focused and defocused objects. The occurrence of edge blurriness is only due to the defocusing effect. It is difficult to obtain focus map estimation for naturally blurry objects such as clouds. Conventional methods of depth map estimation have relied on multiple images, video sequences, calibrated cameras or specific scenes, or a huge training database. Stereo vision measures disparities between a pair of images of the same scene taken from two different viewpoints, and it uses these disparities to recover the depth map.
THRESHOLDING:
It is the simplest method of image segmentation. Thresholding methods replace each pixel in an image with a black pixel if the image intensity I is less than some fixed constant T or a white pixel if the image intensity is greater than that constant. There are several techniques for determination of threshold a) Global Method b) Local Method c) Ni-Black's Method It is the recovery of a sharp version of a blurred image when the blur kernel is unknown. The goal is to analyze and evaluate recent blind de-convolution algorithms. Since the kernel sizes is often smaller than the image size a map estimation of the kernel alone can be well constrained and accurately recover the true blur. One of the puzzling aspects of blind de-convolution is the failure of the MAP approach. Recent papers emphasize the usage of a sparse derivative prior to favour sharp images. To overcome this aspect the iterative blind de-convolution method proposed by Ayers and Dainty was used.
FILTER:
In image processing filters are mainly used to suppress either the higher frequencies in the image that is smoothening the image or low frequencies that is enhancing or detecting edges in the image. Gaussian filtering is used to blur images and remove noise and detail. In one dimension, the Gaussian function is: G(x)= Where σ is the standard deviation of the distribution. The distribution is assumed to have a mean of 0. Shown graphically, we see the familiar bell shaped Gaussian distribution as shown in the fig (a)
Figure (a): 1-D Gaussian distribution with mean 0 and σ=1
2
(A) Input image : This is the original image on which we will carry out experiment and verify outputs with our expected results. (B) Edge detection : In this step all the possible edges of the objects present in the images are detected. We can observe this through the image shown below. (C) FME Image : In this step the objects/parts which we want to focus and which we want defocus are identified as marked likewise.
defocusing process. This image has both focused as well as defocused objects/parts as per the FME assumptions. (E) Blurred image : This is an intermediate image, in this step all the image is made blur i.e., all refocused as well as defocused objects/parts. (F) Refocused image : This is the final output image. All the objects/parts in the image which are defocused are virtually refocused and an image is produced which is almost similar to the input image provided.
Guruprasad Patil1*, Kanchan Ballolli2 2
3) CONCLUSION AND FUTURE SCOPE:
There are various tools in which we can execute this image processing program such as MATLAB, VISUAL STUDIO, Qt. We have used MATLAB for our results and comparison. In MATLAB Different images have been studied for detecting edges using various types of edge detection methods and to extract some area. Sobel, prewitt, roberts, canny edge detectors have been experimented to identify the edges by using the MATLAB (Matrix Laboratory) software. The result are analysed and compared. Sobel edge detector method is somewhat tough than prewitt edge detector. Prewitt produces slightly noisy results. Robert edge detector gives minor details about image. Canny edge detector gives the most prominent results than other detectors and makes the features of image properly visible. Future scopes are it can be even used for multiple images than single image. There may be auto focus in future days. It would be interesting to consider applying heavy-tailed priors also to blur estimation, which we did not do in this paper because we assumed the blur to be uniform within each segment, which may be interpreted as a heavy-tailed prior that allows discontinuities in a blur radius field occasionally at segment boundaries. For better blur estimation, it would also be useful to improve segmentation quality. Skilled retouching software users could further improve the quality by directly working on latent images. We would like to consider developing example-based touch-up tools for ordinary users.
REFERENCES
Single-Image Refocusing and Defocusing Wei Zhang, Member, IEEE, and Wai-Kuen Cham, Senior Member, IEEE Digital image processing (Rafael C Gonzalez, Richard E Woods). Y. C. Lin, Depth Estimation and Focus Recovery, Master thesis, National Taiwan Univ., Taipei, Taiwan, R.O.C, 2008 A.N. Rajagopalan, S Chaudhuri, and U. Mudenagudi, “Depth estimation and image restoration using defocused stereo pairs,”IEEE Trans. Pattern Anal. Mach. Intell., vol.26,11, pp.1521-1525, Nov.2004.
Corresponding Author Guruprasad Patil*
Student Dept. Of ECE KLS Vdrit Haliyal, Karnataka, India
E-Mail – furupatilgr8@gmail.com