CPC G06T 5/003 (2013.01) [G06T 5/50 (2013.01); G06T 2207/30024 (2013.01); G06T 2207/30072 (2013.01)] | 7 Claims |
1. An image processing method for generating an all-in-focus image based on a plurality of captured images, comprising:
(a) obtaining N captured images each constituted by a plurality of pixels by imaging an object while a focus position is changed in N stages along an optical axis, wherein N is a natural number equal to or greater than 2;
(b) obtaining M image reference values and corrective sharpness for each pixel, the image reference value being a number of the captured image to be referred to as a luminance value of each set of coordinates of the all-in-focus image, wherein M is a natural number equal to or greater than 2 and smaller than N;
(c) calculating the luminance value based on the image reference values and the corrective sharpness for each set of coordinates; and
(d) generating the all-in-focus image by combining the calculated luminance values,
wherein the operation (b) includes:
(b-1) obtaining N individual sharpnesses by calculating a sharpness at each focus position; and
(b-2) obtaining the corrective sharpness and the image reference value from the N individual sharpnesses,
wherein top M significant ones of the N individual sharpnesses are extracted as the corrective sharpness and numbers of the captured images respectively corresponding to the M extracted corrective sharpness are set as the M image reference values for each pixel in the operation (b-2).
|