Patent ID: 8494301

Claim:
A method of providing a refocused image, comprising using a processor to perform the steps of (a) acquiring at least two captured images of a scene with differing focus settings; (b) using the at least two captured images to provide an all-in-focus image; (c) generating a range map from the at least two captured images; (d) locating a region-of-interest (ROI) window from the range map including locating a first centroid of a region-of-interest (ROI) from the range map, refining the first centroid to locate a second centroid of a region of interest (ROI), and locating the region-of-interest (ROI) window from the second centroid and a predefined window shape and size; and (e) providing a refocused image from the all-in-focus image and the region-of-interest (ROI) window.