CN110022430A - Image weakening method, device, mobile terminal and computer readable storage medium - Google Patents
Image weakening method, device, mobile terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN110022430A CN110022430A CN201810023154.0A CN201810023154A CN110022430A CN 110022430 A CN110022430 A CN 110022430A CN 201810023154 A CN201810023154 A CN 201810023154A CN 110022430 A CN110022430 A CN 110022430A
- Authority
- CN
- China
- Prior art keywords
- image
- blurred
- original image
- pixel
- filtering
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4038—Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
Abstract
The present invention provides a kind of image weakening method, device, mobile terminal and computer readable storage medium, determine that part to be blurred in image, part to be blurred include pixel to be blurred in original image;By the corresponding Filtering Template of preset shape, the part for treating virtualization is filtered, and by treated, part is synthesized with the other parts in original image, forms target image.Implementation through the invention, the principle angle blurred from image, different apertures is simulated by the way that Filtering Template of various shapes is arranged, to realize the custom effect of image virtualization, do not increasing hardware, the freedom degree of image virtualization is improved under the premise of the shape and structure for not changing terminal, improves user experience.
Description
Technical field
The present invention relates to field of terminal technology more particularly to a kind of image weakening method, device, mobile terminal and calculating can
Read storage medium.
Background technique
In Professional Photography, high-end photographic goods its distinctive large scale sensor, long-focus large aperture camera lens configuration under,
Imaging can show scene depth in closer distance, that is, --- focal plane --- front and back scenery is clear in focal distance,
The definition range is referred to as the depth of field, and the depth of field is outside then according to different fog-levels is gone out apart from different manifestations, to really restore field
Scape space hierarchy, and prominent main body obtain better artistic effect, and this virtualization is referred to as bokeh, i.e. afocal dissipates scape.
The halation shape that afocal dissipates scape presentation is related with the shape of aperture, since the physical form opening of aperture is round mostly
Perhaps the shape of halation is also to be partial to round or regular polygon to shape in regular polygon therefore obtained shooting image.And
Some shutterbugs, special iris shape is also equivalent to using blocking on camera lens after black paper jam hollow out in order to obtain
The shape for changing aperture is come so that the halation on the scattered scape of afocal is in blocks shows oneself desired shape.Above image is empty
Change scheme is suitable only for the high-end photographic goods of Professional Photography, and since its aperture is big, lens set mostly just has such effect, and
Such condition is not had on mobile terminals, can not change the iris shape of terminal by the hollow out scraps of paper, and is directly set
Setting aperture is that corresponding physical form can not be then changed again, it is difficult to achieve the effect that switching of following one's inclinations, user experience is bad.
Summary of the invention
The embodiment of the invention provides a kind of video compress image weakening method, device, multimedia terminal mobile terminal and
Computer readable storage medium, it is intended to which compression ratio and content, abstract effect can not be combined by solving video frequency abstract in the prior art
The problem of image virtualization processing freedom degree of the problem terminal of fruit difference is low, poor user experience.
In order to solve the above-mentioned technical problem, the embodiment of the invention provides a kind of image weakening methods, are applied to mobile whole
End, described image weakening method include:
Determine that part to be blurred in original image, the part to be blurred include pixel to be blurred in original image;
By the corresponding Filtering Template of preset shape, the part to be blurred is filtered;
By treated, part synthesize with the other parts in original image, and formation target image is according to the start bit of each determination
It sets, each frame set is synthesized, form summarized radio.
In addition, the embodiment of the present invention also provides a kind of image virtualization device, comprising:
Module of target detection, for determining part to be blurred in original image, the part to be blurred includes original image
In pixel to be blurred;
Filter module, for being filtered place to the part to be blurred by the corresponding Filtering Template of preset shape
Reason;
Synthesis module, for by treated, part synthesize with the other parts in original image, formation target image.
In addition, the embodiment of the present invention also provides a kind of mobile terminal, including processor, memory and communication bus;It is described
Communication bus is for realizing the connection communication between the processor and memory;The processor is for executing the memory
The image of middle storage blurs program, the step of to realize image weakening method above-mentioned.
In addition, the embodiment of the present invention also provides a kind of computer readable storage medium, the computer readable storage medium
It is stored with one or more computer program, before the computer program can be executed by one or more processor to realize
The step of image weakening method stated.
The beneficial effects of the present invention are:
The present invention provides a kind of image weakening method, device, mobile terminal and computer readable storage mediums, determine figure
The part to be blurred as in, part to be blurred includes pixel to be blurred in original image;Pass through the corresponding filter of preset shape
Wave template, the part for treating virtualization are filtered, and by treated, part is synthesized with the other parts in original image,
Form target image.Implementation through the invention, the principle angle blurred from image, by the way that Filtering Template of various shapes is arranged
Different apertures is simulated, to realize the custom effect of image virtualization, is not increasing hardware, does not change the shape knot of terminal
The freedom degree of image virtualization is improved under the premise of structure, improves user experience.
Detailed description of the invention
Fig. 1 is a kind of image weakening method flow chart that first embodiment of the invention provides;
Fig. 2 is a kind of circular filter template schematic diagram that first embodiment of the invention provides;
Fig. 3 is that a kind of image that first embodiment of the invention provides blurs contrast schematic diagram;
Fig. 4 is that a kind of image that first embodiment of the invention provides blurs contrast schematic diagram;
Fig. 5 is a kind of heart-shaped Filtering Template schematic diagram that first embodiment of the invention provides;
Fig. 6 is that a kind of image that first embodiment of the invention provides blurs contrast schematic diagram;
Fig. 7 is a kind of image weakening method refined flow chart that second embodiment of the invention provides;
Fig. 8 provides a kind of applied to double image weakening methods refinement processes for taking the photograph terminal for second embodiment of the invention
Figure;
Fig. 9 is that a kind of image that third embodiment of the invention provides blurs device composition schematic diagram;
Figure 10 is a kind of mobile terminal composition schematic diagram that fourth embodiment of the invention provides.
Specific embodiment
First embodiment
Referring to FIG. 1, Fig. 1 is a kind of image weakening method flow chart that first embodiment of the invention provides, comprising:
S101, determine that part to be blurred in original image, part to be blurred include pixel to be blurred in original image;
S102, pass through the corresponding Filtering Template of preset shape, the part for treating virtualization is filtered;
S103, by treated, part synthesize with the other parts in original image, formation target image.
For the image to be blurred for one, virtualization processing be it is often local, primary purpose is prominent
Main body is shot, embodies the depth information of image, wherein depth information at least embodies the depth of view information of image, i.e., in field depth
Interior image is visually appearing to be clearly, and the image outside field depth then passes through virtualization and is processed into fuzzy image.It is empty
Change processing is that the observation with naked eyes is consistent in fact;When people is using scenery is visually observed, in addition on the object that naked eyes focus
Except, other objects be all it is fuzzy, the principle of image taking and the principle of eye-observation communicate.
In S101, it is first determined part to be blurred in image.Part to be blurred will videlicet carry out virtualization processing,
Pixel in image, and the result blurred is exactly to change the pixel value of the pixel in image, makes its pixel with surrounding
The pixel value of point is close, has thus achieved the effect that virtualization.
Specifically, determining that part to be blurred in image may include: to determine original image by the analysis to original image
Depth of view information;Based on depth of view information, part to be blurred in original image is determined.Specifically, the image outside field depth, generally
It is image to be blurred.For mobile terminal, the means of shooting have had been detached from the epoch of an only camera module,
One mobile terminal can have two or above camera module.And when mobile terminal acquires original image using dual camera
When picture, then depth of view information can be determined by the analysis to the respective collected preview image of two cameras;Wherein, original image
As being that respectively collected preview image passes through synthesis processing gained to two cameras.Image taking is being carried out using dual camera
When, due to the particularity of dual camera imaging, two cameras can be individually imaged, and the position natural due to two cameras
Difference is set, i.e., the position that two cameras are arranged at the terminal necessarily there are certain intervals, and takes the photograph based on this interval and two
The preview image acquired as head, so that it may determine depth of view information.It is noted that original image is that two cameras respectively acquire
The preview image that arrives is by synthesis processing gained, and the synthesis of two collected preview images of camera institute is handled and is not limited to
Simple superposition synthesis, two image first acquisition color information in actual process, an acquisition grayscale information, so
Two preview images are performed corresponding processing according to specific demand in flakes afterwards.
In addition, when using single camera acquisition original image, then it can be according to the feature of the main reference object in original image
Information determines depth of view information.If the single camera used is shot, single camera is different from dual camera, does not have
The standby natural condition of single camera, but single camera can also be determined according to the characteristic information of main reference object, such as main
Image of the reference object in original image is often partial to middle position, can belong to whole object with middle position
Image as main reference object, so that the part of main reference object imaging clearly is field depth, other parts are exactly
Part to be blurred other than the depth of field;It is also possible that when the information such as containing face in the original image of shooting, and have existing for personage
Original image, personage are often main reference objects, then determining people with information such as hair, face edges the characteristics of according to personage
The boundary of object image, the position where person image are exactly field depth, and other parts are exactly the portion to be blurred other than the depth of field
Point.
In S102, by the corresponding Filtering Template of preset shape, the part for treating virtualization is filtered.Preset shape
Filtering Template, the shape of aperture is simulated exactly from software view.After the completion of virtualization, it is blurred the halation of part
Shape, exactly imaging are formed by shape after the filtering processing of Filtering Template, directly related with the shape of Filtering Template.?
When being filtered, specific process, comprising:
For determining pixel to be filtered, selectes the pixel and it is in other pictures within the scope of Filtering Template
The pixel value of these pixels is carried out two-dimensional convolution operation, resulting knot with filter factor corresponding in Filtering Template by vegetarian refreshments
Fruit is exactly somebody's turn to do the pixel value of pixel to be blurred at target image.And specific Filtering Template, it may include mean filter
Or at least one of weighted filtering.
Wherein, mean filter indicates that in Filtering Template, each filter factor is identical.Below with circular filter mould
For plate, detailed process and application of the Filtering Template of mean filter in filtering processing are specifically introduced.Referring to FIG. 2, Fig. 2 shows
The Filtering Template for the mean filter that radius is r is gone out, the number of pixel within the circle point is S, and the weight of each pixel is all the same
It and is 1/S, that is to say, that the weights sum of all pixels is 1, indicates the pixel of these pixels after the filtering
It is consistent before brightness and filtering;And, weight 0 outer in circle.Wherein, using the Filtering Template to the pixel to be blurred in original image
Two-dimensional convolution operation is carried out, is expressed as follows with formula:
Wherein, Ibokeh(i, j) indicates pixel value of the target image at coordinate (i, j) after virtualization, that is, virtualization after image
The pixel value of vegetarian refreshments;Ioriginal(i, j) indicates pixel value of the original image at coordinate (i, j) before blurring, that is, picture to be blurred
The pixel value of vegetarian refreshments, and Ioriginal(i+k, j+l) then indicates other pixels of pixel to be blurred within the scope of Filtering Template
The pixel value of point;W (k, l) indicate Filtering Template in filter factor, with set radius for r circle center point coordinate for (0,0),
Then haveIt indicates in circle range, that is, the pixel pair within the scope of virtualization template
The coefficient answered is 1, is 0 outside range.By such processing, referring to FIG. 3, Fig. 3 shows the image comparison of virtualization front and back
Schematic diagram, it is worth noting that, Fig. 3 illustrates only the comparison diagram of the image of virtualization part, does not blur part not in original image
It shows.It can be found that image obviously obscures much after virtualization, principle is to be, needs the pixel value of pixel blurred
And the pixel value of other surrounding pixels has carried out a degree of mixing, therefore the pixel of the pixel after each virtualization
Value degree of approximation compared with the pixel value of the pixel in original image is higher.
In addition, in the present embodiment, Filtering Template can also include weighted filtering.The mean value of above-described embodiment institute volume is filtered
Wave can be blurred normally, but the information such as light source original in original image can be watered down, so that photo lacks expression.This
Weighted filtering in embodiment, so that it may according to the brightness value of pixel respectively to be blurred in original image, to determine in Filtering Template
Filter factor corresponding to respective pixel point.It is specifically exactly that the weight of the higher pixel of brightness is higher, in this way in filtering
The part of high brightness can be protruded in image afterwards, so that picture is more lively, visual effect more begs for happiness.Since weighted filtering exists
Be in the present embodiment using brightness as Primary Reference, and it is outstanding be the higher pixel of brightness pixel value, weighted filtering this
Bloom filtering is also referred to as in embodiment.
Specifically, the expression formula of the filter factor in Filtering Template is as follows in the case where weighted filtering:
Wherein lightI(i,j)Refer to the intensity of brightness on (i, j) pixel, lightthresholdIt is the high optical gate of setting
Limit, gamma are the weight increments of setting, experiments verify that, thresholding is set as 240, gamma and is set as r2/ 4, it can be obtained satisfied
As a result, can be adjusted again according to the actual situation in concrete application.Referring to FIG. 4, Fig. 4 show original image, according to mean filter into
Row filtering processing after virtualization target image, be filtered according to weighted filtering after virtualization target image, it is found that
The highlighted of the filtering image of weighted filtering more protrudes, and target image is more lively.In addition, filtering system shown by above-mentioned formula
Several values has carried out two groups of differentiation according to brightness, and specifically distinguish can also according to the progress of more multiple groups, such as, then set
A fixed bloom thresholding distributes higher filter factor, or filtering for the pixel that brightness value is more than or equal to the bloom thresholding
Coefficient is directly directly related with the brightness value of pixel with the relationship of approximate direct proportion, these embodiments are equal in the present embodiment
It is feasible.
In addition, above-described embodiment is the virtualization processing that image is carried out by taking circular filter template as an example, than circular,
His figure is also feasible, for example, referring to FIG. 5, Fig. 5 shows the Filtering Template schematic diagram of heart pattern, wherein heart shape diagram
The expression formula of case are as follows:
Wherein k, l respectively indicate the heart
Transverse and longitudinal coordinate in shape pattern;Correspondingly, if using heart pattern Filtering Template under the premise of, using weighted filtering
Mode is filtered, and the expression formula of corresponding filter factor can be with are as follows:
Wherein
lightI(i,j)Refer to the intensity of brightness on (i, j) pixel, lightthresholdIt is the bloom thresholding of setting, gamma is to set
The weight increment set.Correspondingly, other shapes can also be used other than above-mentioned circular filter model, heart-shaped Filtering Model
The figure of shape, difference is, in the expression formula of corresponding filter factor, the difference of the condition met needed for each coordinate, i.e., on
State the difference of the condition part of expression formula.Referring to FIG. 6, Fig. 6 is shown by original image, according to the virtualization after round weighted filtering
Target image, according to after heart-shaped weighted filtering virtualization target image comparison diagram, it is found that after heart-shaped weighted filtering
Target image in halation be also rendered as heart, there is good visual effect, picture also more begs for happiness.
In S103, by treated, part synthesize with the other parts in original image, formation target image.Treated portion
Dividing is exactly to complete the part of virtualization processing, and other parts are exactly not carry out the part of virtualization processing, for one wait blur
Image for, should at least have the part after virtualization after being filtered, and other parts are in the premise being not present
Under, the virtualization process of whole image can be completed after handling by virtualization, obtain target image;And if there are also other
The part of non-virtualization, the usually main body of picture, the part at the place of focus point, these parts are synthesized with virtualization part
Afterwards, obtained image is exactly target image.
A kind of image weakening method is present embodiments provided, is applied to mobile terminal, determines part to be blurred in image,
Part to be blurred includes pixel to be blurred in original image;By the corresponding Filtering Template of preset shape, virtualization is treated
Part is filtered, and by treated, part is synthesized with the other parts in original image, forms target image.Pass through
The implementation of the present embodiment, the principle angle blurred from image, simulates different light by the way that Filtering Template of various shapes is arranged
Circle, so that the custom effect of image virtualization is realized, using the render process that the scheme of the present embodiment is not complicated, calculation amount
It is small, it can accomplish live preview, there is good user experience.
Second embodiment
Referring to FIG. 7, Fig. 7 is the image weakening method refined flow chart that second embodiment of the invention provides.
S701, the depth of view information that image is analyzed from original image;
S702, according to optical principle, determine the corresponding virtualization region of each pixel;
S703, simultaneously, determines the corresponding graphics shape of Filtering Template;
S704, according to the corresponding graphics shape of Filtering Template and corresponding pixel, determine corresponding filter factor;
S705, based on pixel to be blurred, virtualization region and Filtering Template, the pixel for treating virtualization carries out two dimension
Convolution algorithm;
S706, by treated, the output of preview data real-time perfoming is shown;
After the completion of S707, virtualization, target image is obtained.
In addition, main feature is double take the photograph specifically, the image in the present embodiment is blurred in double applications taken the photograph in terminal
Depth information determination part;It is double to take the photograph virtualization, in addition to the image data that main camera obtains, got there are also secondary camera
Grayscale information can analyze to obtain the letter of the depth of field in original image according to the preview graph of the preview graph of main camera and secondary camera
Breath can determine part to be blurred in original image according to depth of view information and further blur process.Referring to FIG. 8, Fig. 8
For double virtualization flow diagrams for taking the photograph terminal provided in this embodiment, comprising:
S801, main camera and secondary camera respectively acquire preview image;
Two S802, analysis preview images, obtain the depth of view information in original image;
S803, according to optical principle, determine the corresponding virtualization region of pixel respectively to be blurred;
S804, simultaneously, determines the corresponding graphics shape of Filtering Template;
S805, according to the corresponding graphics shape of Filtering Template and corresponding pixel, determine corresponding filter factor;
S806, based on pixel to be blurred, virtualization region and Filtering Template, the pixel for treating virtualization carries out two dimension
Convolution algorithm;
S807, by treated, the output of preview data real-time perfoming is shown;
After the completion of S808, virtualization, target image is obtained.
It is taken the photograph unlike terminal from double, singly takes the photograph the method for determination of the depth of view information of terminal and singly take the photograph different, singly take the photograph end
End can further be analyzed by the characteristic information of main reference object to be obtained, such as face information;Other the step of, take the photograph terminal with double
Process flow be consistent, which is not described herein again.
3rd embodiment
Referring to FIG. 9, Fig. 9 is a kind of image virtualization device composition schematic diagram that third embodiment of the invention provides, comprising:
Module of target detection 901, for determining that part to be blurred in original image, part to be blurred include in original image
Pixel to be blurred;
Filter module 902, for by the corresponding Filtering Template of preset shape, the part for treating virtualization to be filtered place
Reason;
Synthesis module 903, for by treated, part synthesize with the other parts in original image, formation target image.
For the image to be blurred for one, virtualization processing be it is often local, primary purpose is prominent
Main body is shot, embodies the depth information of image, wherein depth information at least embodies the depth of view information of image, i.e., in field depth
Interior image is visually appearing to be clearly, and the image outside field depth then passes through virtualization and is processed into fuzzy image.It is empty
Change processing is that the observation with naked eyes is consistent in fact;When people is using scenery is visually observed, in addition on the object that naked eyes focus
Except, other objects be all it is fuzzy, the principle of image taking and the principle of eye-observation communicate.
Module of target detection 901 determines part to be blurred in image first.Part to be blurred will videlicet carry out empty
Change processing, the pixel in image, and the result blurred is exactly to change the pixel value of the pixel in image, makes itself and week
The pixel value of the pixel enclosed is close, has thus achieved the effect that virtualization.
Specifically, module of target detection 901 can be also used for: by the analysis to original image, determining the depth of field of original image
Information;Based on depth of view information, part to be blurred in original image is determined.Specifically, the image outside field depth, be generally exactly to
The image of virtualization.For mobile terminal, shooting means had been detached from only a camera module epoch, one
Mobile terminal can have two or above camera module.And when mobile terminal acquires original image using dual camera
When, then depth of view information can be determined by the analysis to the respective collected preview image of two cameras;Wherein, original image
For two cameras, respectively collected preview image handles gained by synthesis.Image taking is being carried out using dual camera
When, due to the particularity of dual camera imaging, two cameras can be individually imaged, and the position natural due to two cameras
Difference is set, i.e., the position that two cameras are arranged at the terminal necessarily there are certain intervals, and takes the photograph based on this interval and two
The preview image acquired as head, so that it may determine depth of view information.It is noted that original image is that two cameras respectively acquire
The preview image that arrives is by synthesis processing gained, and the synthesis of two collected preview images of camera institute is handled and is not limited to
Simple superposition synthesis, two image first acquisition color information in actual process, an acquisition grayscale information, so
Two preview images are performed corresponding processing according to specific demand in flakes afterwards.
In addition, when using single camera acquisition original image, then it can be according to the feature of the main reference object in original image
Information determines depth of view information.If the single camera used is shot, single camera is different from dual camera, does not have
The standby natural condition of single camera, but single camera can also be determined according to the characteristic information of main reference object, such as main
Image of the reference object in original image is often partial to middle position, can belong to whole object with middle position
Image as main reference object, so that the part of main reference object imaging clearly is field depth, other parts are exactly
Part to be blurred other than the depth of field;It is also possible that when the information such as containing face in the original image of shooting, and have existing for personage
Original image, personage are often main reference objects, then determining people with information such as hair, face edges the characteristics of according to personage
The boundary of object image, the position where person image are exactly field depth, and other parts are exactly the portion to be blurred other than the depth of field
Point.
Filter module 902 is used for through the corresponding Filtering Template of preset shape, and the part for treating virtualization is filtered.
The Filtering Template of preset shape simulates the shape of aperture exactly from software view.After the completion of virtualization, it is blurred portion
The halation shape divided, exactly imaging are formed by shape after the filtering processing of Filtering Template, straight with the shape of Filtering Template
Connect correlation.When being filtered, filter module 902 can be used for:
For determining pixel to be filtered, selectes the pixel and it is in other pictures within the scope of Filtering Template
The pixel value of these pixels is carried out two-dimensional convolution operation, resulting knot with filter factor corresponding in Filtering Template by vegetarian refreshments
Fruit is exactly somebody's turn to do the pixel value of pixel to be blurred at target image.And specific Filtering Template, it may include mean filter
Or at least one of weighted filtering.
Wherein, mean filter indicates that in Filtering Template, each filter factor is identical.Below with circular filter mould
For plate, detailed process and application of the Filtering Template of mean filter in filtering processing are specifically introduced.Referring to FIG. 2, Fig. 2 shows
The Filtering Template for the mean filter that radius is r is gone out, the number of pixel within the circle point is S, and the weight of each pixel is all the same
It and is 1/S, that is to say, that the weights sum of all pixels is 1, indicates the pixel of these pixels after the filtering
It is consistent before brightness and filtering;And, weight 0 outer in circle.Wherein, using the Filtering Template to the pixel to be blurred in original image
Two-dimensional convolution operation is carried out, is expressed as follows with formula:
Wherein, Ibokeh(i, j) indicates pixel value of the target image at coordinate (i, j) after virtualization, that is, virtualization after image
The pixel value of vegetarian refreshments;Ioriginal(i, j) indicates pixel value of the original image at coordinate (i, j) before blurring, that is, picture to be blurred
The pixel value of vegetarian refreshments, and Ioriginal(i+k, j+l) then indicates other pixels of pixel to be blurred within the scope of Filtering Template
The pixel value of point;W (k, l) indicate Filtering Template in filter factor, with set radius for r circle center point coordinate for (0,0),
Then haveIt indicates in circle range, that is, the pixel pair within the scope of virtualization template
The coefficient answered is 1, is 0 outside range.By such processing, referring to FIG. 3, Fig. 3 shows the image comparison of virtualization front and back
Schematic diagram, it is worth noting that, Fig. 3 illustrates only the comparison diagram of the image of virtualization part, does not blur part not in original image
It shows.It can be found that image obviously obscures much after virtualization, principle is to be, needs the pixel value of pixel blurred
And the pixel value of other surrounding pixels has carried out a degree of mixing, therefore the pixel of the pixel after each virtualization
Value degree of approximation compared with the pixel value of the pixel in original image is higher.
In addition, in the present embodiment, Filtering Template can also include weighted filtering.The mean value of above-described embodiment institute volume is filtered
Wave can be blurred normally, but the information such as light source original in original image can be watered down, so that photo lacks expression.This
Weighted filtering in embodiment, so that it may according to the brightness value of pixel respectively to be blurred in original image, to determine in Filtering Template
Filter factor corresponding to respective pixel point.It is specifically exactly that the weight of the higher pixel of brightness is higher, in this way in filtering
The part of high brightness can be protruded in image afterwards, so that picture is more lively, visual effect more begs for happiness.Since weighted filtering exists
Be in the present embodiment using brightness as Primary Reference, and it is outstanding be the higher pixel of brightness pixel value, weighted filtering this
Bloom filtering is also referred to as in embodiment.
Specifically, the expression formula of the filter factor in Filtering Template is as follows in the case where weighted filtering:
Wherein lightI(i,j)Refer to the intensity of brightness on (i, j) pixel, lightthresholdIt is the high optical gate of setting
Limit, gamma are the weight increments of setting, experiments verify that, thresholding is set as 240, gamma and is set as r2/ 4, it can be obtained satisfied
As a result, can be adjusted again according to the actual situation in concrete application.Referring to FIG. 4, Fig. 4 show original image, according to mean filter into
Row filtering processing after virtualization target image, be filtered according to weighted filtering after virtualization target image, it is found that
The highlighted of the filtering image of weighted filtering more protrudes, and target image is more lively.In addition, filtering system shown by above-mentioned formula
Several values has carried out two groups of differentiation according to brightness, and specifically distinguish can also according to the progress of more multiple groups, such as, then set
A fixed bloom thresholding distributes higher filter factor, or filtering for the pixel that brightness value is more than or equal to the bloom thresholding
Coefficient is directly directly related with the brightness value of pixel with the relationship of approximate direct proportion, these embodiments are equal in the present embodiment
It is feasible.
In addition, above-described embodiment is the virtualization processing that image is carried out by taking circular filter template as an example, than circular,
His figure is also feasible, for example, referring to FIG. 5, Fig. 5 shows the Filtering Template schematic diagram of heart pattern, wherein heart shape diagram
The expression formula of case are as follows:
Wherein k, l respectively indicate the heart
Transverse and longitudinal coordinate in shape pattern;Correspondingly, if using heart pattern Filtering Template under the premise of, using weighted filtering
Mode is filtered, and the expression formula of corresponding filter factor can be with are as follows:
Wherein
lightI(i,j)Refer to the intensity of brightness on (i, j) pixel, lightthresholdIt is the bloom thresholding of setting, gamma is to set
The weight increment set.Correspondingly, other shapes can also be used other than above-mentioned circular filter model, heart-shaped Filtering Model
The figure of shape, difference is, in the expression formula of corresponding filter factor, the difference of the condition met needed for each coordinate, i.e., on
State the difference of the condition part of expression formula.Referring to FIG. 6, Fig. 6 is shown by original image, according to the virtualization after round weighted filtering
Target image, according to after heart-shaped weighted filtering virtualization target image comparison diagram, it is found that after heart-shaped weighted filtering
Target image in halation be also rendered as heart, there is good visual effect, picture also more begs for happiness.
By treated, part synthesize with the other parts in original image synthesis module 903, formation target image.After processing
Part be exactly complete virtualization processing part, and other parts be exactly do not carry out virtualization processing part, for one to
For the image of virtualization, should at least have the part after virtualization after being filtered, and other parts are being not present
Under the premise of, the virtualization process of whole image can be completed after handling by virtualization, obtain target image;And if there are also it
The part of his non-virtualization, the usually main body of picture, the part at the place of focus point, these parts are closed with virtualization part
Cheng Hou, obtained image are exactly target image.
A kind of image virtualization device is present embodiments provided, is applied to mobile terminal, determines part to be blurred in image,
Part to be blurred includes pixel to be blurred in original image;By the corresponding Filtering Template of preset shape, virtualization is treated
Part is filtered, and by treated, part is synthesized with the other parts in original image, forms target image.Pass through
The implementation of the present embodiment, the principle angle blurred from image, simulates different light by the way that Filtering Template of various shapes is arranged
Circle, so that the custom effect of image virtualization is realized, using the render process that the scheme of the present embodiment is not complicated, calculation amount
It is small, it can accomplish live preview, there is good user experience.
Fourth embodiment
Referring to FIG. 10, Figure 10 is a kind of mobile terminal composition schematic diagram that fourth embodiment of the invention provides, comprising: place
Manage device 101, memory 102 and communication bus 103;Communication bus 103 is for realizing between processor 101 and memory 102
Connection communication;Processor 101 is used to execute the image virtualization program stored in memory 102, to realize image virtualization above-mentioned
Method, which is not described herein again.
In addition, the present embodiment additionally provides a kind of computer readable storage medium, deposited in the computer readable storage medium
One or more computer program is contained, computer program can be executed by one or more processor, above-mentioned to realize
Image weakening method, which is not described herein again.
Obviously, those skilled in the art should be understood that each module of aforementioned present invention or each step can be with general
Computing device realizes that they can be concentrated on a single computing device, or be distributed in constituted by multiple computing devices
On network, optionally, they can be realized with the program code that computing device can perform, it is thus possible to be stored in
It is performed by computing device in storage medium (ROM/RAM, magnetic disk, CD), and in some cases, it can be to be different from this
The sequence at place executes shown or described step, perhaps they are fabricated to each integrated circuit modules or by it
In multiple modules or step be fabricated to single integrated circuit module to realize.So the present invention is not limited to any specific
Hardware and software combine.
The above content is specific embodiment is combined, further detailed description of the invention, and it cannot be said that this hair
Bright specific implementation is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, it is not taking off
Under the premise of from present inventive concept, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to protection of the invention
Range.
Claims (10)
1. a kind of image weakening method, is applied to mobile terminal, described image weakening method includes:
Determine that part to be blurred in original image, the part to be blurred include pixel to be blurred in original image;
By the corresponding Filtering Template of preset shape, the part to be blurred is filtered;
By treated, part synthesize with the other parts in original image, formation target image.
2. image weakening method as described in claim 1, which is characterized in that part to be blurred packet in the determining original image
It includes:
By the analysis to the original image, the depth of view information of the original image is determined;
Based on the depth of view information, part to be blurred in original image is determined.
3. image weakening method as claimed in claim 2, which is characterized in that the analysis by the original image, really
The depth of view information of the original image includes: calmly
When acquiring the original image using dual camera, by the way that two cameras, respectively collected preview image divides
Analysis determines the depth of view information, and for two cameras, respectively collected preview image handles institute by synthesis to the original image
?;
When acquiring the original image using single camera, according to the characteristic information of the main reference object in original image, institute is determined
State depth of view information.
4. image weakening method as described in any one of claims 1-3, which is characterized in that the Filtering Template includes mean value filter
At least one of wave or weighted filtering;It is described by the corresponding Filtering Template of preset shape, to the part to be blurred into
Row is filtered
In the pixel value and Filtering Template of selected pixel and its other pixels within the scope of Filtering Template to be blurred
Filter factor carries out two-dimensional convolution operation, and operation result is pixel of the pixel to be blurred at the target image
Value;Wherein, when the Filtering Template includes mean filter, the filter factor in Filtering Template is identical.
5. image weakening method as claimed in claim 4, which is characterized in that when the Filtering Template includes weighted filtering,
The weighted filtering includes: the brightness value according to pixel to be blurred, and determines and corresponds to respective pixel in the Filtering Template
The filter factor of point.
6. a kind of image blurs device characterized by comprising
Module of target detection, for determining part to be blurred in original image, the part to be blurred include in original image to
The pixel of virtualization;
Filter module, for being filtered to the part to be blurred by the corresponding Filtering Template of preset shape;
Synthesis module, for by treated, part synthesize with the other parts in original image, formation target image.
7. image as claimed in claim 6 blurs device, which is characterized in that the Filtering Template includes mean filter or weighting
At least one of filtering;The filter module is also used to:
By pixel to be blurred and its other pixels within the scope of Filtering Template and the filter factor point in Filtering Template
It carry out not two-dimensional convolution operation;Wherein, the filter factor phase when the Filtering Template includes mean filter, in Filtering Template
Together.
8. image as claimed in claim 7 blurs device, which is characterized in that when the Filtering Template includes weighted filtering,
The weighted filtering includes: the brightness value according to pixel to be blurred, and determines and corresponds to respective pixel in the Filtering Template
The filter factor of point.
9. a kind of mobile terminal, which is characterized in that including processor, memory and communication bus;The communication bus is for real
Connection communication between the existing processor and memory;It is empty that the processor is used to execute the image stored in the memory
Change program, the step of to realize image weakening method as described in any one in claim 1-5.
10. a kind of computer readable storage medium, which is characterized in that be stored in the computer readable storage medium one or
The multiple computer programs of person, the computer program can be executed by one or more processor, to realize such as claim 1-5
The step of described in any item image weakening methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810023154.0A CN110022430A (en) | 2018-01-10 | 2018-01-10 | Image weakening method, device, mobile terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810023154.0A CN110022430A (en) | 2018-01-10 | 2018-01-10 | Image weakening method, device, mobile terminal and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110022430A true CN110022430A (en) | 2019-07-16 |
Family
ID=67188079
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810023154.0A Pending CN110022430A (en) | 2018-01-10 | 2018-01-10 | Image weakening method, device, mobile terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110022430A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110944111A (en) * | 2019-10-27 | 2020-03-31 | 张姣姣 | Big data analysis platform, method and storage medium based on channel detection |
CN111161136A (en) * | 2019-12-30 | 2020-05-15 | 深圳市商汤科技有限公司 | Image blurring method, image blurring device, image blurring equipment and storage device |
CN111583104A (en) * | 2020-05-14 | 2020-08-25 | 展讯通信(上海)有限公司 | Light spot blurring method and device, storage medium and computer equipment |
CN113724129A (en) * | 2020-05-25 | 2021-11-30 | 武汉Tcl集团工业研究院有限公司 | Image blurring method, storage medium and terminal device |
CN114143442A (en) * | 2020-09-03 | 2022-03-04 | 武汉Tcl集团工业研究院有限公司 | Image blurring method, computer device, computer-readable storage medium |
WO2023245362A1 (en) * | 2022-06-20 | 2023-12-28 | 北京小米移动软件有限公司 | Image processing method and apparatus, electronic device, and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080106615A1 (en) * | 2004-12-29 | 2008-05-08 | Petri Ahonen | Electronic Device and Method In an Electronic Device For Processing Image Data |
CN101587586A (en) * | 2008-05-20 | 2009-11-25 | 株式会社理光 | Device and method for processing images |
CN103139476A (en) * | 2011-11-30 | 2013-06-05 | 佳能株式会社 | Image pickup apparatus, control method for image pickup apparatus |
CN105100615A (en) * | 2015-07-24 | 2015-11-25 | 青岛海信移动通信技术股份有限公司 | Image preview method, apparatus and terminal |
CN105450943A (en) * | 2014-09-25 | 2016-03-30 | 聚晶半导体股份有限公司 | Generation method of image bokeh effect and image acquisition device |
CN106960413A (en) * | 2017-03-24 | 2017-07-18 | 深圳市金立通信设备有限公司 | A kind of method and terminal of image virtualization |
-
2018
- 2018-01-10 CN CN201810023154.0A patent/CN110022430A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080106615A1 (en) * | 2004-12-29 | 2008-05-08 | Petri Ahonen | Electronic Device and Method In an Electronic Device For Processing Image Data |
CN101587586A (en) * | 2008-05-20 | 2009-11-25 | 株式会社理光 | Device and method for processing images |
CN103139476A (en) * | 2011-11-30 | 2013-06-05 | 佳能株式会社 | Image pickup apparatus, control method for image pickup apparatus |
CN105450943A (en) * | 2014-09-25 | 2016-03-30 | 聚晶半导体股份有限公司 | Generation method of image bokeh effect and image acquisition device |
CN105100615A (en) * | 2015-07-24 | 2015-11-25 | 青岛海信移动通信技术股份有限公司 | Image preview method, apparatus and terminal |
CN106960413A (en) * | 2017-03-24 | 2017-07-18 | 深圳市金立通信设备有限公司 | A kind of method and terminal of image virtualization |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110944111A (en) * | 2019-10-27 | 2020-03-31 | 张姣姣 | Big data analysis platform, method and storage medium based on channel detection |
CN111161136A (en) * | 2019-12-30 | 2020-05-15 | 深圳市商汤科技有限公司 | Image blurring method, image blurring device, image blurring equipment and storage device |
CN111161136B (en) * | 2019-12-30 | 2023-11-03 | 深圳市商汤科技有限公司 | Image blurring method, image blurring device, equipment and storage device |
CN111583104A (en) * | 2020-05-14 | 2020-08-25 | 展讯通信(上海)有限公司 | Light spot blurring method and device, storage medium and computer equipment |
CN111583104B (en) * | 2020-05-14 | 2022-08-19 | 展讯通信(上海)有限公司 | Light spot blurring method and device, storage medium and computer equipment |
CN113724129A (en) * | 2020-05-25 | 2021-11-30 | 武汉Tcl集团工业研究院有限公司 | Image blurring method, storage medium and terminal device |
CN113724129B (en) * | 2020-05-25 | 2024-02-13 | 武汉Tcl集团工业研究院有限公司 | Image blurring method, storage medium and terminal equipment |
CN114143442A (en) * | 2020-09-03 | 2022-03-04 | 武汉Tcl集团工业研究院有限公司 | Image blurring method, computer device, computer-readable storage medium |
CN114143442B (en) * | 2020-09-03 | 2023-08-01 | 武汉Tcl集团工业研究院有限公司 | Image blurring method, computer device, and computer-readable storage medium |
WO2023245362A1 (en) * | 2022-06-20 | 2023-12-28 | 北京小米移动软件有限公司 | Image processing method and apparatus, electronic device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110022430A (en) | Image weakening method, device, mobile terminal and computer readable storage medium | |
CN111402135B (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN108537155B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN105323425B (en) | Scene motion correction in blending image system | |
EP3496383A1 (en) | Image processing method, apparatus and device | |
CN107833197B (en) | Image processing method and device, computer readable storage medium and electronic equipment | |
US8665341B2 (en) | Methods and apparatus for rendering output images with simulated artistic effects from focused plenoptic camera data | |
WO2022042049A1 (en) | Image fusion method, and training method and apparatus for image fusion model | |
KR101662846B1 (en) | Apparatus and method for generating bokeh in out-of-focus shooting | |
US10970821B2 (en) | Image blurring methods and apparatuses, storage media, and electronic devices | |
CN107977940A (en) | background blurring processing method, device and equipment | |
CN110324532B (en) | Image blurring method and device, storage medium and electronic equipment | |
US11004179B2 (en) | Image blurring methods and apparatuses, storage media, and electronic devices | |
CN108259770B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN109906599B (en) | Terminal photographing method and terminal | |
CN109242794B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
TWI777098B (en) | Method, apparatus and electronic device for image processing and storage medium thereof | |
CN106255990A (en) | Image for camera array is heavily focused | |
CN113313661A (en) | Image fusion method and device, electronic equipment and computer readable storage medium | |
CN108024058A (en) | Image virtualization processing method, device, mobile terminal and storage medium | |
CN111163265A (en) | Image processing method, image processing device, mobile terminal and computer storage medium | |
CN114627034A (en) | Image enhancement method, training method of image enhancement model and related equipment | |
CN113781370A (en) | Image enhancement method and device and electronic equipment | |
Wang et al. | Exposure fusion based on sparse coding in pyramid transform domain | |
CN106469435B (en) | Image processing method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190716 |
|
RJ01 | Rejection of invention patent application after publication |