IP Library › Granted Patent US 9,342,875
Granted Patent B2
US 9,342,875 · App. 14/552,485 · Granted May 17, 2016

Method for generating image bokeh effect and image capturing device

Inventors: Su Ian Alias Eugene Lei (Hsinchu, TW); Kaiyu Tseng (Changhua County, TW); Wen-Yan Chang (Miaoli County, TW)
Assignee: Altek Semiconductor Corp.
G06T5/50G06T5/002G06T2207/20024
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,342,875
App. No.
14/552,485
Granted
May 17, 2016
Kind
B2
Abstract

An image capturing device and a method for generating a bokeh effect are provided. The method includes the following steps. An image including a current input pixel is captured. Next, blurring processes are performed on the image by using a first image blur filter and a second image blur filter so as to generate a plurality of first blur images and second blur images corresponding to different blur levels. A distance between the current input pixel and a focal plane is calculated to obtain a current distance. A first current blur image and a second current blur image are respectively selected from the first blur images and the second blur images according to the current distance. Next, a first current blur pixel of the first current blur image and a second current blur pixel of the second current blur image are combined to generate a current output pixel.

Claims (38)

1. A method for generating a bokeh effect, adapted to an image capturing device, comprising:

capturing an image, wherein the image comprises a current input pixel;

performing a plurality of blurring processes on the image by using a first image blur filter and a second image blur filter to generate a plurality of first blur images and a plurality of second blur images corresponding to different blur levels;

calculating a distance between the current input pixel and a focal plane to obtain a current distance;

selecting a first current blur image and a second current blur image respectively from the first blur images and the second blur images according to the current distance; and

combining a first current blur pixel of the first current blur image and a second current blur pixel of the second current blur image according to the current distance to generate a current output pixel corresponding to the current input pixel, comprising:

setting a first combining weight of the first current blur pixel and a second combining weight of the second current blur pixel according to the current distance; and

combining the first current blur pixel of the first current blur image and the second current blur pixel of the second current blur image according to the first combining weight and the second combining weight to generate the current output pixel,

wherein each of the first current blur pixel and the second current blur pixel has a same pixel coordinate as the current input pixel.

2. The method according to claim 1 , wherein the step of performing the blurring processes on the image respectively by the first image blur filter and the second image blur filter to generate the first blur images and the second blur images corresponding to the blur levels comprises:

setting a blur radius corresponding to each of the blur levels according to a predetermined maximum blur radius, wherein each of the blur radiuses is not greater than the predetermined maximum blur radius; and

performing the blurring processes on the image with each of the blur radiuses by using the first image blur filter and the second image blur filter to generate the first blur images and the second blur images corresponding to each of the blur radiuses.

3. The method according to claim 1 , wherein the step of selecting the first current blur image and the second current blur image respectively from the first blur images and the second blur images according to the current distance comprises:

selecting the first current blur image and the second current blur image both corresponding to the current distance respectively from the first blur images and the second blur images, wherein the current distance is proportional to both of the blur level of the first current blur image and the blur level of the second current blur image.

4. The method according to claim 1 , wherein the first image blur filter is a circular blur filter, and the second image blur filter is a Gaussian blur filter.

5. The method according to claim 4 , wherein the first image blur filter performs the blurring processes on the image by leveraging a summed-area table algorithm to generate the first blur images.

6. The method according to claim 4 , wherein the first combining weight is inversely proportional to the current distance.

7. The method according to claim 6 , wherein the step of combining the first current blur pixel of the first current blur image and the second current blur pixel of the second current blur image according to the current distance to generate the current output pixel corresponding to the current input pixel comprises:

determining whether a current position of the current input pixel is ahead of or behind the focal plane;

when the current position is ahead of the focal plane, adding the first current blur pixel and the second current blur pixel with the first combining weight and the second combining weight to generate the current output pixel, wherein a summation of the first combining weight and the second combining weight is 1; and

when the current position is behind the focal plane, subtracting the second current blur pixel from the first current blur pixel with the first combining weight and the second combining weight to generate the current output pixel, wherein a difference of the first combining weight and the second combining weight is 1.

8. An image capturing device comprising:

at least one lens;

a memory; and

at least one processor, coupled to the lens and the memory, and configured for:

capturing an image by using the lens, wherein the image comprises a current input pixel;

performing a plurality of blurring processes on the image by using a first image blur filter and a second image blur filter to generate a plurality of first blur images and a plurality of second blur images corresponding to different blur levels;

calculating a distance between the current input pixel and a focal plane to obtain a current distance;

selecting a first current blur image and a second current blur image respectively from the first blur images and the second blur images according to the current distance; and

combining a first current blur pixel of the first current blur image and a second current blur pixel of the second current blur image according to the current distance to generate a current output pixel corresponding to the current input pixel by setting a first combining weight of the first current blur pixel and a second combining weight of the second current blur pixel according to the current distance and by combining the first current blur pixel of the first current blur image and the second current blur pixel of the second current blur image according to the first combining weight and the second combining weight to generate the current output pixel, wherein each of the first current blur pixel and the second current blur pixel has a same pixel coordinate as the current input pixel.

9. The image capturing device according to claim 8 , wherein the processor sets a blur radius corresponding to each of the blur levels according to a predetermined maximum blur radius, and performs the blurring processes on the image with each of the blur radiuses by using the first image blur filter and the second image blur filter to generate the first blur images and the second blur images corresponding to each of the blur radiuses, wherein each of the blur radiuses is not greater than the predetermined maximum blur radius.

10. The image capturing device according to claim 8 , wherein the processor selects the first current blur image and the second current blur image both corresponding to the current distance respectively from the first blur images and the second blur images, wherein the current distance is proportional to both of the blur level of the first current blur image and the blur level of the second current blur image.

11. The image capturing device according to claim 8 , wherein the first image blur filter is a circular blur filter, and the second image blur filter is a Gaussian blur filter.

12. The image capturing device according to claim 11 , wherein the first image blur filter performs the blurring processes on the image by leveraging a summed-area table algorithm to generate the first blur images.

13. The image capturing device according to claim 11 , wherein the first combining weight is inversely proportional to the current distance.

14. The image capturing device according to claim 13 , wherein the processor determines whether a current position of the current input pixel is ahead of or behind the focal plane,

wherein when the current position is ahead of the focal plane, the processor adds the first current blur pixel and the second current blur pixel with the first combining weight and the second combining weight to generate the current output pixel, wherein a summation of the first combining weight and the second combining weight is 1, and

wherein when the current position is behind the focal plane, the processor subtracts the second current blur pixel from the first current blur pixel with the first combining weight and the second combining weight to generate the current output pixel, wherein a difference of the first combining weight and the second combining weight is 1.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 26, 2014
From: LEI, SU IAN ALIAS EUGENE; TSENG, KAIYU; CHANG, WEN-YAN
To: ALTEK SEMICONDUCTOR CORP.
Reel/Frame 034266/0610 →
Priority Claims (1)
TW 103133223 A · Sep 25, 2014 · national
Continuity (1)
Related Publication 20160093032A1 · Mar 31, 2016