Method for adjusting focus position and electronic apparatus
AssigneeAltek Semiconductor Corp.
InventorsChe-Lun Chuang, Yun-Chin Li, Chia-Chun Tseng
Life of this patent
Estimating the term…
Abstract
A method for adjusting focus position and an electronic apparatus are provided. Herein, a depth map is obtained according to a first image and a second image which are captured by a first lens and a second lens, respectively. A plurality of depth values included in the depth map is compared with a depth of field (DOF) table for obtaining a plurality of focus distances. An All-in-Focus (AIF) image is generated according to a plurality of focus images captured by the first lens with the focus distances, respectively. A blur process is executed for a plurality of pixels excluding a focus selected location in the AIF image, so as to obtain an adjusting image.
Claims10
A method for adjusting focus position, for an electronic apparatus, the method comprising:
- obtaining a depth map according to a first image and a second image which are respectively captured by a first lens and a second lens, comprises:
- simultaneously capturing the first image and the second image by the first lens and the second lens respectively with a base focus;
- calculating a horizontal shift value of the first image and the second image;
- and
- obtaining the depth map by using the first image as a reference according to a lens distance between the first lens and the second lens, the base focus and the horizontal shift value;
- obtaining a plurality of focus distances by comparing a plurality of depth values included in the depth map with a depth of field table;
- generating an all-in-focus image according to a plurality of focus images captured by the first lens respectively with the focus distances;
- and
- obtaining an adjusting image by executing a blur process for a plurality of pixels excluding a focus selected location in the all-in-focus image.
An electronic apparatus, comprising:
- an image capturing unit including a first lens and a second lens;
- a storage unit storing images captured by the image capturing unit;
- and
- a processing unit coupled to the image capturing unit and the storage unit, and configured to execute an image processing module, wherein the image processing module comprises:
- a depth map capturing module obtaining a depth map according to a first image and a second image which are respectively captured by the first lens and the second lens;
- a comparing module obtaining a plurality of focus distances by comparing a plurality of depth values included in the depth map with a depth of field table;
- an all-in-focus generation module generating an all-in-focus image according to a plurality of focus images captured by the first lens respectively with the focus distances;
- and
- a focus adjusting module obtaining an adjusting image by executing a blur process for a plurality of pixels excluding a focus selected location in the all-in-focus image;
- wherein the first image and the second image are simultaneously captured by the first lens and the second lens respectively with a base focus;
- wherein the depth map capturing module calculates a horizontal shift value of the first image and the second image, and obtains the depth map by using the first image as a reference according to a lens distance between the first lens and the second lens, the base focus and the horizontal shift value.
Dependencies are inferred from the claim text.