CN105450943B - Generate method and image acquiring device that image dissipates scape effect - Google Patents

Generate method and image acquiring device that image dissipates scape effect Download PDF

Info

Publication number
CN105450943B
CN105450943B CN201410498341.6A CN201410498341A CN105450943B CN 105450943 B CN105450943 B CN 105450943B CN 201410498341 A CN201410498341 A CN 201410498341A CN 105450943 B CN105450943 B CN 105450943B
Authority
CN
China
Prior art keywords
current
image
pixel
fuzzy
blurred picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410498341.6A
Other languages
Chinese (zh)
Other versions
CN105450943A (en
Inventor
李树仁
曾开瑜
张文彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Glomerocryst Semiconductor Ltd Co
Original Assignee
Glomerocryst Semiconductor Ltd Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Glomerocryst Semiconductor Ltd Co filed Critical Glomerocryst Semiconductor Ltd Co
Priority to CN201410498341.6A priority Critical patent/CN105450943B/en
Publication of CN105450943A publication Critical patent/CN105450943A/en
Application granted granted Critical
Publication of CN105450943B publication Critical patent/CN105450943B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The present invention provides a kind of method and image acquiring device of the scattered scape effect of generation image, and the method includes the following steps.It includes the image frame for inputting pixel at present to obtain, it is utilized respectively the first image fuzzy filter and the second image fuzzy filter again, Fuzzy processing is carried out for image frame, to generate multiple first blurred pictures and the second blurred picture corresponding to different fog-levels.Input the distance between pixel and focal plane at present is calculated, to obtain current distance.According to current distance, the first current blurred picture and the second current blurred picture are selected from first blurred picture and the second blurred picture respectively, further according to current distance, the first of the first current blurred picture the second current fuzzy pixel for obscuring pixel at present with the second current blurred picture is synthesized, to generate current output pixel.

Description

Generate method and image acquiring device that image dissipates scape effect
Technical field
The invention relates to methods and image acquiring device that a kind of generation image dissipates scape effect.
Background technology
In photography, so-called " scattered scape " (Bokeh) refers to being fallen other than the depth of field in the shallower photographic imagery of the depth of field Picture, which has, gradually generates loosely fuzzy effect, to highlight the theme in captured image, or the artistic feeling of enhancing image.
In general, the scattered scape effect that camera lens can produce is limited.To obtain preferably scattered scape effect, usually It needs to meet following several important conditions simultaneously:Large aperture, long-focus.In other words, it need to be relied on greatly to reach scattered scape effect Aperture camera lens reinforces the blurring of remote object, and the theme of clear imaging is allowed to be able to highlight from background.However, High-aperture lenses it is bulky and expensive, not general consumption-orientation camera can be equipped with.Current existing generation image dissipates Image is mainly divided into foreground area and background area by the mode of scape effect, recycles fuzzy filter (blur Filter) blurring program is carried out to be directed to background area.At present more advanced mode be then according to the pixel of image with it is right The distance between focal plane sets different blurring degree.
However, existing means often have ignored the optical characteristics of image acquiring device.For example, aberration (optical Aberration it is) the practical difference as with ideal picture caused by refraction action in optics, and then generates varying strength point The circle of confusion (circle of confusion, abbreviation CoC) of cloth and size.So-called " circle of confusion " refers to before focus Afterwards, the image that light starts to assemble or dissipate and put starts smudgy to be formed by diffusing circular.In other words, the circle of confusion is strong Degree distribution and size can according between focal plane it is opposite at a distance from and position before and after difference and change.Therefore, It is existing that naturally scattered scape effect can not be simulated in a manner of single fuzzy filter.
Invention content
The present invention provides a kind of method and image acquiring device of the scattered scape effect of generation image, can simulate scattered scape effect Natural image.
The present invention proposes that a kind of generation image dissipates the method for scape effect, is suitable for image acquiring device, under the method includes Row step.An image frame is obtained, wherein image frame includes inputting pixel at present.It is utilized respectively the first image fuzzy filter And the second image fuzzy filter, Fuzzy processing is carried out for image frame, corresponds to multiple and different fuzzy journeys to generate Multiple first blurred pictures and multiple second blurred pictures of degree.Calculate at present input pixel and focal plane between away from From to obtain current distance.According to current distance, respectively among first blurred picture and second blurred picture Select the first current blurred picture and the second current blurred picture.Then, according to current distance, the first current fuzzy graph is synthesized Fuzzy pixel obscures pixel to the first of picture at present with the second of the second current blurred picture at present, corresponds to input at present to generate The current output pixel of pixel, wherein first at present fuzzy pixel and second at present fuzzy pixel respectively with the current input picture Element pixel coordinate having the same.
In one embodiment of this invention, above-mentioned to be utilized respectively the first image fuzzy filter and the fuzzy filter of the second image Wave device, for image frame carry out Fuzzy processing, with generate with different fog-levels first blurred picture and The step of second blurred picture includes first according to default maximum blur radius, mould of the setting corresponding to each fog-level Radius is pasted, the first image fuzzy filter and the second image fuzzy filter are recycled, it is right respectively with each blur radius Image frame carries out fuzzy filter processing, to generate corresponding to first blurred picture of each blur radius and described Second blurred picture, wherein the blur radius is no more than default maximum blur radius.
In one embodiment of this invention, the current distance of above-mentioned basis, respectively from first blurred picture and described The first current blurred picture is selected among second blurred picture and include respectively described in the step of the second current blurred picture Among first blurred picture and second blurred picture selection corresponding to current distance the first current blurred picture and Second current blurred picture, wherein distance is fuzzy with the first current blurred picture and the second current blurred picture respectively at present Degree is directly proportional.
In one embodiment of this invention, the current distance of above-mentioned basis, the first of the first current blurred picture of synthesis are current Second current fuzzy pixel of fuzzy pixel and the second current blurred picture, the current defeated of pixel is inputted to generate to correspond at present The step of going out pixel includes that the first the first synthetic weight and second for obscuring pixel at present first is set separately according to current distance Second synthetic weight of fuzzy pixel at present, and according to the first synthetic weight and the second synthetic weight, synthesis first is at present Fuzzy pixel obscures pixel to the first of blurred picture at present with the second of the second current blurred picture at present, to generate output at present Pixel.
In one embodiment of this invention, above-mentioned first image fuzzy filter is round fuzzy filter, and above-mentioned the Two image fuzzy filters are Gaussian blur filter.
In one embodiment of this invention, above-mentioned first image fuzzy filter using integrogram method for image frame into Row Fuzzy processing, to generate first blurred picture.
In one embodiment of this invention, above-mentioned first synthetic weight is inversely proportional with current distance.
In one embodiment of this invention, above-mentioned according to the first synthetic weight and the second synthetic weight, synthesize the first mesh Fuzzy pixel obscures pixel to the first of preceding blurred picture at present with the second of the second current blurred picture at present, defeated at present to generate The step of going out pixel includes first judging that the current position of input pixel at present is located at the front or rear of focal plane, when current When position is located at the front of focal plane, with the first synthetic weight and the second synthetic weight add up first at present fuzzy pixel with Second obscures pixel at present, to generate current output pixel, wherein the summation of the first synthetic weight and the second synthetic weight is 1, And when current position is located at the rear of focal plane, the first current mould is subtracted each other with the first synthetic weight and the second synthetic weight Pixel and the second fuzzy pixel at present are pasted, to generate current output pixel, wherein the first synthetic weight and the second synthetic weight Difference is 1.
The present invention separately proposes a kind of image acquiring device, including an at least camera lens, storage unit and at least one processing list Member, wherein the processing unit couples the camera lens and storage unit.Storage unit is recording multiple modules.Processing unit To access and execute the module recorded in storage unit, wherein the module includes image collection module, fuzzy filter Module, distance calculation module, Image selection module and image synthesis unit.Image collection module obtains figure using the camera lens As picture, wherein image frame includes inputting pixel at present.Fuzzy filter module be utilized respectively the first image fuzzy filter with And the second image fuzzy filter, Fuzzy processing is carried out for image frame, corresponds to multiple and different fog-levels to generate Multiple first blurred pictures and multiple second blurred pictures.Distance calculation module calculates input pixel and focal plane at present The distance between, to obtain current distance.Image selection module according to current distance, respectively from first blurred picture and The first current blurred picture and the second current blurred picture are selected among second blurred picture.Image synthesis unit according to Current distance, the first of the first current blurred picture of synthesis obscures the second current mould of pixel and the second current blurred picture at present Pixel is pasted, the current output pixel of input pixel at present is corresponded to generation, wherein first obscures pixel and the second mesh at present Preceding fuzzy pixel inputs pixel pixel coordinate having the same with current respectively.
In one embodiment of this invention, above-mentioned fuzzy filter module corresponds to according to default maximum blur radius, setting The blur radius of each fog-level, and the first image fuzzy filter and the second image fuzzy filter are utilized, with Each blur radius carries out fuzzy filter processing to image frame respectively, is corresponded to described in each blur radius with generating First blurred picture and second blurred picture, wherein the blur radius is no more than default maximum blur radius.
In one embodiment of this invention, above-mentioned Image selection module is respectively from first blurred picture and described Selection is corresponding to the first current blurred picture and the second current blurred picture of current distance, wherein mesh among two blurred pictures Front distance is directly proportional to the fog-level of the first current blurred picture and the second current blurred picture respectively.
In one embodiment of this invention, the first current mould is set separately according to current distance in above-mentioned image synthesis unit Paste the first synthetic weight of pixel and the second synthetic weight of the second fuzzy pixel at present, and according to the first synthetic weight with And second synthetic weight, the first fuzzy pixel and the second of the second current blurred picture at present of the first current blurred picture of synthesis Fuzzy pixel at present, to generate current output pixel.
In one embodiment of this invention, above-mentioned first image fuzzy filter is round fuzzy filter, and above-mentioned the Two image fuzzy filters are Gaussian blur filter.
In one embodiment of this invention, above-mentioned first image fuzzy filter is carried out with integrogram method for image frame Fuzzy processing, to generate first blurred picture.
In one embodiment of this invention, above-mentioned first synthetic weight is inversely proportional with current distance.
In one embodiment of this invention, above-mentioned image synthesis unit judges that the current position of input pixel at present is located at pair The front or rear of focal plane.When current position is located at the front of focal plane, image synthesis unit is weighed with the first synthesis Weight and the second synthetic weight add up first and obscure pixel and the second current fuzzy pixel at present, to generate current output pixel, Wherein the summation of the first synthetic weight and the second synthetic weight is 1.When current position is located at the rear of focal plane, image closes Subtract each other first with the first synthetic weight and the second synthetic weight at module and obscures pixel and the second current fuzzy pixel at present, with Current output pixel is generated, wherein the difference of the first synthetic weight and the second synthetic weight is 1.
Based on above-mentioned, the proposed by the invention method and image acquiring device that generate image and dissipate scape effect, it is being contemplated In the case that the intensity distribution and size of the circle of confusion can be changed according to the positional distance opposite between focal plane, By combining the fuzzy filter of two kinds of different characteristics, can simulate with the image for dissipating scape effect naturally.
To make the foregoing features and advantages of the present invention clearer and more comprehensible, special embodiment below, and it is detailed to coordinate attached drawing to make Carefully it is described as follows.
Description of the drawings
Fig. 1 is the block diagram of the image acquiring device shown by one embodiment of the invention;
Fig. 2 is the method flow diagram for generating image and dissipating scape effect shown by one embodiment of the invention;
Fig. 3 is the position of each pixel of the circle of confusion and the circle of confusion diametrically shown by one embodiment of the invention With the relational graph of brightness value.
Reference sign:
100:Image acquiring device;
10:Camera lens;
20:Storage unit;
30:Processing unit;
110:Image collection module;
120:Fuzzy filter module;
130:Distance calculation module;
140:Image selection module;
150:Image synthesis unit;
S202~S210:Generate the method flow that image dissipates scape effect;
310a,310b,310c:The circle of confusion;
315a,315b,315c:Fuzzy loop diameter;
320a,320b,320c:Each pixel of the circle of confusion diametrically is in the coordinate of X-axis and the relation curve of brightness value.
Specific implementation mode
Next the section Example of the present invention will coordinate attached drawing to be described in detail, the element cited in description below Symbol will be regarded as same or analogous element when identical component symbol occur in different attached drawings.These embodiments are the present invention A part, the embodiment of all present invention is not disclosed.More precisely, these embodiments are the patent of the present invention The example of apparatus and method in application range.
Fig. 1 is the block diagram of the image acquiring device shown by one embodiment of the invention, but this is merely for convenience Illustrate, is not intended to limit the invention.Fig. 1 first first introduces all components and configuration relation of image acquiring device, in detail Function will coordinate Fig. 2 to illustrate together.
Fig. 1 is please referred to, image acquiring device 100 includes that an at least camera lens 10, storage unit 20 and at least one processing are single Member 30.In the present embodiment, image acquiring device 100 is, for example, digital camera, slr camera, digital code camera or other tools There are the electronic devices such as the smart mobile phone, tablet computer, personal digital assistant of image-acquisition functions, invention is not limited thereto.
Camera lens 10 includes photosensitive element, to sense the light intensity into camera lens 10 respectively, and then generates image respectively. The photosensitive element is, for example, charge coupled cell (Charge Coupled Device, abbreviation CCD), complementary gold oxide Belong to semiconductor (Complementary Metal-Oxide Semiconductor, abbreviation CMOS) element or other elements, this hair It is bright not limit herein.
Storage unit 20 is, for example, any form of fixed or packaged type random access memory (Random Access Memory, abbreviation RAM), read-only memory (Read-Only Memory, abbreviation ROM), flash memory (Flash Memory), the combination of hard disk or other similar devices or these devices.Storage unit 20 can be held to record by processing unit 30 Capable multiple modules, these modules can be loaded into processing unit 30, to the image acquired in image acquiring device 100 Reason makes it generate and dissipates scape effect.
Processing unit 30 may, for example, be central processing unit (Central Processing Unit, abbreviation CPU), or It is the general service of other programmables or microprocessor (Microprocessor), the digital signal processor of specific use (Digital Signal Processor, abbreviation DSP), programmable controller, application-specific integrated circuit (Application Specific Integrated Circuits, abbreviation ASIC), programmable logic device (Programmable Logic Device, abbreviation PLD) or other similar devices or these devices combination.Processing unit 30 couples camera lens 10 and storage is single Member 20, can access and execute the module being recorded in storage unit 20.
Above-mentioned module includes image collection module 110, fuzzy filter module 120, distance calculation module 130, image selection Module 140 and image synthesis unit 150, can be loaded into processing unit 30, with to the image acquired in image acquiring device 100 Picture is handled, and the image that makes that treated, which has, dissipates scape effect.
Fig. 2 is the method flow diagram for generating image and dissipating scape effect shown by one embodiment of the invention, and in Fig. 2 The method for generating the scattered scape effect of image can be realized with each element of the image acquiring device 100 of Fig. 1.
Referring to Fig. 1 and Fig. 2, first, image collection module 110 obtains image frame, wherein image frame packet Include input pixel (step S202) at present.Image frame acquired in this image collection module 110 is, for example, preview image (preview image) comprising multiple pixels of a matrix are arranged in a manner of row and column.In the present embodiment, by It is all identical in the processing routine of each pixel, thus will be come below with one of pixel (being defined as " inputting pixel at present ") into Row explanation.
In general, the intensity distribution and size of the circle of confusion can be different because of aberration.In the ideal of not aberration Under state, the circle of confusion will appear as the discoid of brightness uniformity.However, the circle of confusion by according to its between focal plane it is opposite Distance and position before and after difference and change.
For example, Fig. 3 is the circle of confusion shown by one embodiment of the invention and the circle of confusion diametrically each The position of pixel and the relational graph of brightness value.
Fig. 3 is please referred to, circle of confusion 310a is the circle of confusion ideally, and appearance is rendered into the disk of brightness uniformity Shape, therefore each pixel on fuzzy loop diameter 315a is straight line in the coordinate of X-axis and the relation curve 320a of brightness value.
Circle of confusion 310b is the circle of confusion before focal plane, and appearance is rendered into that edge brightness is higher and center is bright Spend lower discoid, therefore each pixel on fuzzy loop diameter 315b is in the coordinate of X-axis and the relation curve 320b of brightness value For both sides numerical value is higher and the lower curve of intermediate value.
Circle of confusion 310c is the circle of confusion after focal plane, and appearance is rendered into that edge brightness is milder and center Brightness is higher discoid, therefore each pixel on fuzzy loop diameter 315c is in the coordinate of X-axis and the relation curve of brightness value 320c is both sides numerical value is relatively low and the higher curve of intermediate value.
Based on above-mentioned observation, the present embodiment will simulate different dissipate using two different image fuzzy filters Scape effect.Therefore, for image collection module 110 after obtaining image frame, fuzzy filter module 120 is utilized respectively the first image Fuzzy filter and the second image fuzzy filter carry out Fuzzy processing for image frame, to generate corresponding to multiple Multiple first blurred pictures of different fog-levels and multiple second blurred pictures (step S204).In the present embodiment, it is Such as circle of confusion 310a, circle of confusion 310b, the ideal circles of confusion under nonideality of circle of confusion 310c can be simulated simultaneously, First image fuzzy filter can be that circular mode pastes filter (circular blur filter), and the second image obscures filter Wave device is Gaussian blur filter (Gaussian blur filter).However, the first image fuzzy filter and the second figure It is set as the visual actual state of fuzzy filter or the final output image special-effect to be reached.For example, first Image fuzzy filter can be circular mode paste filter or Gaussian blur filter, and the second image fuzzy filter can be with It is triangle fuzzy filter, box filter device or other kinds of fuzzy filter, the present invention does not limit herein.
In addition, the clarity of image is decided by the size of the circle of confusion, smaller then its overlapped part of the circle of confusion is fewer, Thus image is also clearer.For another viewpoint, the size of the circle of confusion by be associated with its between focal plane it is opposite away from From.Base this, fuzzy filter module 120 will utilize the first image fuzzy filter and the second image fuzzy filter respectively to figure As picture carries out different degrees of Fuzzy processing.In detail, fuzzy filter module 120 will be according to one default maximum fuzzy half Multiple blur radius of the diameter setting corresponding to different fog-levels.Default maximum blur radius in this can be user according to happiness Good and setting numerical value, will determine the quantity of different blur radius.In one embodiment, it is assumed that maximum blur radius is 8 Pixel, then blur radius can be respectively 2,4,6,8 pixels.Later, fuzzy filter module 120 will be obscured using the first image Filter and the second image fuzzy filter, respectively obtain image collection module 110 with above-mentioned set blur radius The image frame taken carries out fuzzy filter processing, fuzzy with first blurred picture of the generation with different fog-levels and second Image.
It should be noted that in the present embodiment using Gaussian blur filter as the second image fuzzy filter, It is the conversion (transformation) that each pixel in image frame is calculated with two-dimensional space normal distribution.Due to Gauss Fuzzy filter is a kind of separable filter (separable filter), can be directed to independent to two on two dimensional image The one-dimensional space is respectively calculated, to reduce time complexity when fuzzy filter processing.
On the other hand, for using round fuzzy filter as the second image fuzzy filter, since it is with inseparable From property (non-separability), thus for two dimensional image must processing time complexity be O (n2).Due to circular mode The mean value of partial block of the paste filter belonging to each processing pixel is filtered, in the present embodiment, round fuzzy filter Image frame can be first divided into the partial block of multiple rectangles by device, recycle integrogram method (integral image Algorithm or summed-area-table algorithm) come obtain it is each processing pixel partial block integrated value Afterwards, can further obtain it is each processing pixel filter result, institute must handle time complexity can then be reduced to O (n).
Fuzzy filter module 120 is obtaining the first fuzzy graph corresponding to different fuzzy filters and different fog-levels After picture and the second blurred picture, distance calculation module 130 calculates input the distance between pixel and focal plane at present, to take Distance (step S206) at present, and Image selection module 140 is according to current distance, respectively from the first blurred picture and the The first current blurred picture and the second current blurred picture (step S208) are selected among two blurred pictures.In detail, distance After computing module 130 can obtain focal plane according to the focal length of camera lens 10, further in accordance with the depth data of current input pixel (depth information) inputs the distance between pixel and focal plane at present to calculate.Due to the first blurred picture with And second the fog-level of blurred picture correspond to relative distance between region and focal plane shot, the proportional pass of the two System.Therefore Image selection module 140 can be calculated according to distance calculation module 130 at present input pixel corresponding to it is current away from From the first current blurred picture and second fuzzy at present is selected among the first blurred picture and the second blurred picture respectively Image.For example, if distance is infinity (such as 5 meters or more), the first current blurred picture and the second mesh at present Preceding blurred picture is respectively then the image with maximum fog-level among the first blurred picture and the second blurred picture.
Then, image synthesis unit 150 synthesizes the first current vague image of the first current blurred picture according to current distance Element obscures pixel at present with the second of the second current blurred picture, to generate the current output pixel for corresponding to input pixel at present (step S210), wherein input pixel at present obscures pixel and the second current fuzzy pixel with identical at present with first respectively Pixel coordinate.In this step, image synthesis unit 150 is mainly based upon current distance to determine to be set separately the first current mould Paste the synthetic weight that pixel obscures pixel at present with second.The synthetic weight of the two is respectively defined as " the first synthesis power herein Weight " and " the second synthetic weight ".Image synthesis unit 150 can be synthesized according to the first synthetic weight and the second synthetic weight First obscures pixel at present obscures pixel at present with second, to generate current output pixel.
For using the round fuzzy filter in above-described embodiment as the first image fuzzy filter, due to closer to right The circle of confusion of focal plane will be closer to effect ideally, therefore corresponds to the first synthetic weight with current distance at anti- Than.In addition, the circle of confusion can also be changed with its relative forward/backward position with focal plane.According to aforementioned circle of confusion 310b And the observation of circle of confusion 310c, the circle of confusion being located at before focal plane, edge brightness is higher and center brightness is relatively low, and The circle of confusion after focal plane, edge brightness is milder and center brightness is higher.Therefore, image synthesis unit 150 It can first judge that the current position for inputting pixel at present is located at the front or rear of focal plane, to simulate varying strength distribution The circle of confusion.
When image synthesis unit 150 judges that current position is located at the front of focal plane, will with the first synthetic weight with And second synthetic weight add up the first fuzzy pixel and the second fuzzy pixel at present at present, to generate current output pixel, wherein The summation of first synthetic weight and the second synthetic weight is 1.Specifically, in one embodiment, image synthesis unit 150 can root Current output pixel is generated according to equation (1):
Iout(x)=w1×Iblur1(x)+w2×Iblur2(x) equation (1)
Wherein Iout(x) indicate that pixel coordinate is the current input pixel of x;Iblur1(x) and Iblur2(x) it is respectively pixel The the first current fuzzy pixel and second that coordinate is x obscure pixel at present;w1And w2Respectively the first synthetic weight and Two synthetic weights and meet w1+w2=1.
On the other hand, it when image synthesis unit 150 judges that current position is located at the rear of focal plane, will be closed with first Subtract each other first at weight and the second synthetic weight and obscure pixel and the second current fuzzy pixel at present, to generate current output picture Element, wherein the difference of the first synthetic weight and the second synthetic weight is 1.Specifically, in one embodiment, image synthesis unit 150 can generate current output pixel according to equation (2):
Iout(x)=w1×Iblur1(x)-w2×Iblur2(x) equation (2)
Wherein the first synthetic weight w1And the second synthetic weight w2Meet w1-w2=1.
When distance calculation module 130, Image selection module 140 and image synthesis unit 150 are directed to the institute of image frame After thering is pixel to execute the step S206, S208 and S210, it will generate the output image for having and dissipating scape effect.
In conclusion the proposed by the invention method and image acquiring device that generate image and dissipate scape effect, are being contemplated In the case that the intensity distribution and size of the circle of confusion can be changed according to the positional distance opposite between focal plane, By combining the fuzzy filter of two kinds of different characteristics, can simulate with the image for dissipating scape effect naturally.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, it will be understood by those of ordinary skill in the art that:Its according to So can with technical scheme described in the above embodiments is modified, either to which part or all technical features into Row equivalent replacement;And these modifications or replacements, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1. a kind of method for generating image and dissipating scape effect, which is characterized in that be suitable for image acquiring device, this method includes:
Image frame is obtained, the wherein image frame includes inputting pixel at present;
It is utilized respectively the first image fuzzy filter and the second image fuzzy filter, is blurred for the image frame Processing, to generate multiple first blurred pictures and multiple second blurred pictures corresponding to multiple and different fog-levels;
The distance between the current input pixel and focal plane are calculated, to obtain current distance;
According to the current distance, selection first is current among first blurred picture and second blurred picture respectively Blurred picture and the second current blurred picture;And
Synthesize the first of the first current blurred picture the second current mould for obscuring pixel and the second current blurred picture at present Pixel is pasted, to generate the current output pixel corresponding to the current input pixel, including:
It is located at the front or rear of the focal plane according to the current position of the current distance and the current input pixel, point The first synthetic weight of the first current fuzzy pixel and second synthetic weight of the second current fuzzy pixel are not set;
When the current position is located at the front of the focal plane, added up with first synthetic weight and second synthetic weight First fuzzy pixel and the second fuzzy pixel at present at present, to generate the current output pixel, wherein the first synthesis power The summation of weight and second synthetic weight is 1;And
When the current position is located at the rear of the focal plane, subtracted each other with first synthetic weight and second synthetic weight First fuzzy pixel and the second fuzzy pixel at present at present, to generate the current output pixel, wherein the first synthesis power The difference of weight and second synthetic weight is 1,
Wherein the first current fuzzy pixel and the second current fuzzy pixel have with the current input pixel identical respectively Pixel coordinate.
2. according to the method described in claim 1, it is characterized in that, be utilized respectively the first image fuzzy filter and this Two image fuzzy filters carry out Fuzzy processing for the image frame, to generate described the with different fog-levels The step of one blurred picture and second blurred picture includes:
According to default maximum blur radius, setting corresponds to the blur radius of each fog-level, wherein the blur radius No more than the default maximum blur radius;And
Using the first image fuzzy filter and the second image fuzzy filter, with each blur radius respectively to this Image frame carries out fuzzy filter processing, to generate corresponding to first blurred picture of each blur radius and described Second blurred picture.
3. according to the method described in claim 1, it is characterized in that, according to the current distance, respectively from first fuzzy graph The step of first current blurred picture and the second current blurred picture being selected among picture and second blurred picture Including:
Respectively among first blurred picture and second blurred picture selection corresponding to the current distance this One current blurred picture and the second current blurred picture, the wherein current distance respectively with the first current blurred picture with And the fog-level of the second current blurred picture is directly proportional.
4. according to the method described in claim 1, it is characterized in that, the first image fuzzy filter is round fuzzy filter Device, the second image fuzzy filter are Gaussian blur filter.
5. according to the method described in claim 4, it is characterized in that, the first image fuzzy filter is directed to using integrogram method The image frame carries out Fuzzy processing, to generate first blurred picture.
6. according to the method described in claim 4, it is characterized in that, first synthetic weight is inversely proportional with the current distance.
7. a kind of image acquiring device, which is characterized in that including:
An at least camera lens;
Storage unit records multiple modules;And
An at least processing unit couples the camera lens and the storage unit, is recorded in the storage unit with accessing and executing The module, the module include:
Image collection module obtains image frame using the camera lens, and the wherein image frame includes inputting pixel at present;
Fuzzy filter module is utilized respectively the first image fuzzy filter and the second image fuzzy filter, for the image Picture carries out Fuzzy processing, to generate multiple first blurred pictures and multiple second corresponding to multiple and different fog-levels Blurred picture;
Distance calculation module calculates the distance between the current input pixel and focal plane, to obtain current distance;
Image selection module, according to the current distance, respectively from first blurred picture and second blurred picture it The first current blurred picture of middle selection and the second current blurred picture;And
Image synthesis unit, synthesize the first current blurred picture first obscure pixel and the second current blurred picture at present The second fuzzy pixel at present, to generate the current output pixel corresponding to the current input pixel, the wherein first current mould Paste pixel and this second at present fuzzy pixel respectively with the current input pixel pixel coordinate having the same, wherein:
The image synthesis unit is located at the focal plane according to the current position of the current distance and the current input pixel First first synthetic weight of fuzzy pixel and the second fuzzy pixel at present at present is set separately in front or rear Second synthetic weight;
When the image synthesis unit judges that the current position is located at the front of the focal plane, the image synthesis unit with this One synthetic weight and second synthetic weight add up the first current fuzzy pixel and the second current fuzzy pixel, with generation The summation of the current output pixel, wherein first synthetic weight and second synthetic weight is 1;And
When the image synthesis unit judges that the current position is located at the rear of the focal plane, the image synthesis unit with this One synthetic weight and second synthetic weight subtract each other the first current fuzzy pixel and the second current fuzzy pixel, with generation The difference of the current output pixel, wherein first synthetic weight and second synthetic weight is 1.
8. image acquiring device according to claim 7, which is characterized in that the fuzzy filter module is according to default maximum norm Radius is pasted, setting corresponds to the blur radius of each fog-level, and using the first image fuzzy filter and is somebody's turn to do Second image fuzzy filter carries out fuzzy filter processing, with generation pair to the image frame respectively with each blur radius First blurred picture that should be in each blur radius and second blurred picture, wherein the blur radius is little In the default maximum blur radius.
9. image acquiring device according to claim 7, which is characterized in that the Image selection module is respectively from described first Among blurred picture and second blurred picture selection corresponding to the current distance the first current blurred picture and The second current blurred picture, the wherein current distance respectively with the first current blurred picture and the second current fuzzy graph The fog-level of picture is directly proportional.
10. image acquiring device according to claim 7, which is characterized in that the first image fuzzy filter is circle Fuzzy filter, the second image fuzzy filter are Gaussian blur filter.
11. image acquiring device according to claim 10, which is characterized in that the first image fuzzy filter is to integrate Figure method carries out Fuzzy processing for the image frame, to generate first blurred picture.
12. image acquiring device according to claim 10, which is characterized in that first synthetic weight and the current distance It is inversely proportional.
CN201410498341.6A 2014-09-25 2014-09-25 Generate method and image acquiring device that image dissipates scape effect Active CN105450943B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410498341.6A CN105450943B (en) 2014-09-25 2014-09-25 Generate method and image acquiring device that image dissipates scape effect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410498341.6A CN105450943B (en) 2014-09-25 2014-09-25 Generate method and image acquiring device that image dissipates scape effect

Publications (2)

Publication Number Publication Date
CN105450943A CN105450943A (en) 2016-03-30
CN105450943B true CN105450943B (en) 2018-11-02

Family

ID=55560674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410498341.6A Active CN105450943B (en) 2014-09-25 2014-09-25 Generate method and image acquiring device that image dissipates scape effect

Country Status (1)

Country Link
CN (1) CN105450943B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110022430A (en) * 2018-01-10 2019-07-16 中兴通讯股份有限公司 Image weakening method, device, mobile terminal and computer readable storage medium
US10706328B2 (en) * 2018-05-07 2020-07-07 Google Llc Focus-weighted, machine learning disease classifier error prediction for microscope slide images
US10482583B1 (en) * 2018-05-10 2019-11-19 Google Llc Generating and displaying blur in images
CN109785264B (en) * 2019-01-15 2021-11-16 北京旷视科技有限公司 Image enhancement method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764925A (en) * 2008-12-25 2010-06-30 华晶科技股份有限公司 Simulation method for shallow field depth of digital image
CN102256056A (en) * 2010-05-17 2011-11-23 索尼公司 Image processing apparatus, image processing method, and program
CN102801908A (en) * 2011-05-23 2012-11-28 联咏科技股份有限公司 Shallow depth-of-field simulation method and digital camera

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9007441B2 (en) * 2011-08-04 2015-04-14 Semiconductor Components Industries, Llc Method of depth-based imaging using an automatic trilateral filter for 3D stereo imagers
US9019310B2 (en) * 2012-03-02 2015-04-28 Adobe Systems Incorporated Methods and apparatus for applying complex continuous gradients to images

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764925A (en) * 2008-12-25 2010-06-30 华晶科技股份有限公司 Simulation method for shallow field depth of digital image
CN102256056A (en) * 2010-05-17 2011-11-23 索尼公司 Image processing apparatus, image processing method, and program
CN102801908A (en) * 2011-05-23 2012-11-28 联咏科技股份有限公司 Shallow depth-of-field simulation method and digital camera

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于GPU的实时景深模拟》;黄蓝枭;《计算机应用研究》;20081031;第25卷(第10期);全文 *

Also Published As

Publication number Publication date
CN105450943A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
TWI554106B (en) Method and image capturing device for generating image bokeh effect
Wadhwa et al. Synthetic depth-of-field with a single-camera mobile phone
Wang et al. Selective light field refocusing for camera arrays using bokeh rendering and superresolution
US10645368B1 (en) Method and apparatus for estimating depth of field information
US10015469B2 (en) Image blur based on 3D depth information
Blahnik et al. Smartphone imaging technology and its applications
CN107454332B (en) Image processing method and device and electronic equipment
TWI538512B (en) Method for adjusting focus position and electronic apparatus
Cossairt et al. When does computational imaging improve performance?
CN113168670A (en) Bright spot removal using neural networks
TWI566601B (en) Image processing device and image depth processing method
KR20170005009A (en) Generation and use of a 3d radon image
CN105450943B (en) Generate method and image acquiring device that image dissipates scape effect
JP5459523B2 (en) System and method for depth estimation using defocused pillbox images
Dutta et al. Stacked deep multi-scale hierarchical network for fast bokeh effect rendering from a single image
US9538074B2 (en) Image processing apparatus, imaging apparatus, and image processing method
CN108513057A (en) Image processing method and device
CN111105370B (en) Image processing method, image processing apparatus, electronic device, and readable storage medium
US10692199B2 (en) Image processing method and device, and non-transitory computer-readable storage medium
JP6068351B2 (en) Image processing device, integrated circuit, program, imaging device, display device
CN105791659A (en) Image processing method and electronic device
KR20150032764A (en) Method and image capturing device for generating artificially defocused blurred image
JP6006506B2 (en) Image processing apparatus, image processing method, program, and storage medium
CN104125385B (en) Image editing method and image processor
Yan et al. Interactive background blurring

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant