CN105592271A - Image-processing method and terminal - Google Patents

Image-processing method and terminal Download PDF

Info

Publication number
CN105592271A
CN105592271A CN201510966972.0A CN201510966972A CN105592271A CN 105592271 A CN105592271 A CN 105592271A CN 201510966972 A CN201510966972 A CN 201510966972A CN 105592271 A CN105592271 A CN 105592271A
Authority
CN
China
Prior art keywords
pixel
neighborhood territory
point
described pixel
imaging
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
Application number
CN201510966972.0A
Other languages
Chinese (zh)
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.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment Co Ltd
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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201510966972.0A priority Critical patent/CN105592271A/en
Publication of CN105592271A publication Critical patent/CN105592271A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention provides an image-processing method comprising steps of: acquiring a depth map of an image to be processed; determining, according to the depth map, an imaging shield relation between a pixel i and neighborhood pixels of the pixel i in the image to be processed, wherein the pixel i is any pixel in the image to be processed; performing fuzzy processing on the neighborhood pixels of the pixel i according to the imaging shield relation of the pixel i so as to obtain output image data corresponding to the pixel i; and superposing the output image data corresponding to all pixels in the image to be processed. The embodiment of the invention also provides a terminal. The image-processing method may acquire a background-fuzzed image complying with an optical rule and having a natural fuzzed effect.

Description

A kind of method of image processing and terminal
Technical field
The present invention relates to technical field of image processing, be specifically related to a kind of method and terminal of image processing.
Background technology
Along with the development of information technology, people require also taking pictures of terminal (as mobile phone, panel computer etc.)More and more higher, although, although existing terminal can realize the requirement of taking pictures under different mode, rareerTo background virtualization image.
In image imaging process, have such optics rule, close shot can produce and block distant view, far awayJing Buhui produces and blocks close shot. Thereby, in the time adopting large aperture to take pictures, if to the distant view region in imageCarry out Fuzzy processing, so, the distant view region after obfuscation and the border in close shot region are clearly; InsteadIt, if Fuzzy processing is carried out in the close shot region in image, so, the close shot region after obfuscation is with far awayThe border of scene area is fuzzy. At present, utilizing the terminal that large aperture is not installed to realize background virtualization figureIn the process of picture, there will be following phenomenon: while carrying out Fuzzy processing in the close shot region in image, mouldClose shot region after gelatinization and the border in distant view region are clearly, thereby, do not meet optics rule, virtualizationEffect is nature not.
Summary of the invention
The embodiment of the present invention provides a kind of method and terminal of image processing, can obtain meeting optics ruleAnd virtualization effect is background virtualization image comparatively naturally.
Embodiment of the present invention first aspect provides a kind of method of image processing, comprising:
Obtain the depth map of pending image;
According to described depth map, determine the neighborhood picture of pixel i and described pixel i in described pending imageImaging hiding relation between vegetarian refreshments, wherein, described pixel i is the arbitrary pixel in described pending imagePoint;
According to the imaging hiding relation of described pixel i, carry out fuzzy to the neighborhood territory pixel point of described pixel iChange and process, obtain output image data corresponding to described pixel i;
The described output image data that in described pending image, all pixels are corresponding is superposeed.
Embodiment of the present invention second aspect provides a kind of terminal, comprising:
The first acquiring unit, for obtaining the depth map of pending image;
The first determining unit, for the described depth map obtaining according to described the first acquiring unit, described in determiningImaging hiding relation in pending image between pixel i and the neighborhood territory pixel point of described pixel i, wherein,Described pixel i is the arbitrary pixel in described pending image;
The first processing unit, for blocking according to the imaging of the definite described pixel i of described the first determining unitRelation, carries out Fuzzy processing to the neighborhood territory pixel point of described pixel i, obtains described pixel i correspondingOutput image data;
Superpositing unit, for processing list by corresponding all pixels of described pending image by described firstUnit's described output image data after treatment superposes.
Implement the invention process example, there is following beneficial effect:
Obtain the depth map of pending image by the embodiment of the present invention, and determine that according to this depth map this waits to locateImaging hiding relation in reason image between pixel i and the neighborhood territory pixel point of this pixel i, wherein, this pictureVegetarian refreshments i is the arbitrary pixel in this pending image, according to the imaging hiding relation of this pixel i, to thisThe neighborhood territory pixel point of pixel i carries out Fuzzy processing, obtains output image data corresponding to this pixel i,Output image data corresponding to all pixels in this pending image superposeed. Thereby, according to opticsRule is determined the imaging hiding relation of each pixel in pending image, and, for this each pixelImaging hiding relation this each pixel neighborhood of a point is carried out to Fuzzy processing, therefore, treating after obfuscationProcess image and not only meet optics rule, and virtualization effect is more natural.
Brief description of the drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, institute in describing embodiment belowNeed the accompanying drawing using to be briefly described, apparently, the accompanying drawing in the following describes is of the present invention oneA little embodiment, for those of ordinary skill in the art, are not paying under the prerequisite of creative work, alsoCan obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the first embodiment schematic flow sheet of the method for a kind of image processing of providing of the embodiment of the present invention;
Fig. 1 a is the image-forming principle schematic diagram that the embodiment of the present invention provides;
Fig. 2 is the second embodiment schematic flow sheet of the method for a kind of image processing of providing of the embodiment of the present invention;
Fig. 2 a is the mask schematic diagram that the embodiment of the present invention provides;
Fig. 3 is the 3rd embodiment schematic flow sheet of the method for a kind of image processing of providing of the embodiment of the present invention;
Fig. 4 a is the first example structure schematic diagram of a kind of terminal of providing of the embodiment of the present invention;
Fig. 4 b is the another structural representation of the first embodiment of a kind of terminal of providing of the embodiment of the present invention;
Fig. 4 c is the another structural representation of the first embodiment of a kind of terminal of providing of the embodiment of the present invention;
Fig. 4 d is the another structural representation of the first embodiment of a kind of terminal of providing of the embodiment of the present invention;
Fig. 5 is the second example structure schematic diagram of a kind of terminal of providing of the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearlyChu, intactly description, obviously, described embodiment is the present invention's part embodiment, instead of allEmbodiment. Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative laborThe every other embodiment obtaining under moving prerequisite, belongs to the scope of protection of the invention.
The described terminal of the embodiment of the present invention can comprise smart mobile phone (as Android mobile phone, iOS mobile phone,WindowsPhone mobile phone etc.), panel computer, palm PC, notebook computer, mobile internet device(MID, MobileInternetDevices) or Wearable equipment etc., above-mentioned terminal is only for example, but not poorLift, including but not limited to above-mentioned terminal.
Refer to Fig. 1, the first embodiment flow process of the method for a kind of image processing providing for the embodiment of the present inventionSchematic diagram. The method of the image processing described in the present embodiment, comprises the following steps:
101, obtain the depth map of pending image.
In the embodiment of the present invention, pending image can be and utilizes the camera of terminal to take the image obtaining,Or pending image can be image in the RAM card of terminal or memory, or pending image canFor arbitrary image of downloading in users from networks. Wherein, the depth map of pending image can pass through depth of field sensingDevice obtains, or, can utilize dual camera to obtain the depth map of this pending image.
Alternatively, the depth map of pending image can only comprise close shot and distant view, or this depth map can wrapContaining close shot, middle scape and distant view, or this depth map can comprise more degree of depth levels, and (as: depth value isThe depth map of existing linear distribution).
102,, according to described depth map, determine pixel i and described pixel i in described pending imageImaging hiding relation between neighborhood territory pixel point, wherein, described pixel i is appointing in described pending imageOne pixel.
In the embodiment of the present invention, terminal can be by depth map to the arbitrary pixel in pending image and thisDepth value between the neighborhood territory pixel point of one pixel compares, to obtain the one-tenth about this arbitrary pixelPicture hiding relation, wherein, this imaging hiding relation can be based on following principle:
Because the degree of depth that each the pixel position in pending image is corresponding is different, thereby, forThe pixel of a certain assigned address, if the degree of depth of this pixel is less than other pixels of this neighborhood of pixel pointsPoint depth value time, this pixel can cause certain light to the pixel in this pixel neighborhood of a pointLine blocks; On the contrary, if the depth value of this pixel is greater than the degree of depth of other pixels of this neighborhood of pixel pointsWhen value, this pixel can be caused certain light to block by the pixel in this pixel neighborhood of a point.Particularly, as shown in Figure 1a, wherein, Fig. 1 a comprises distant view, close shot, camera lens, imageing sensor, levelThe object of axle is above-mentioned distant view, close shot, camera lens, imageing sensor to remain on same level axle, byIn Fig. 1 a, can find out, in the time that close shot blocks the light of distant view reflection, cannot be at imageing sensorOn carry out imaging.
Based on above-mentioned principle, as an example of pixel i example, imaging hiding relation is made an explanation, wherein, this pixelI is the arbitrary pixel in pending image. Terminal can be according to depth map, determine pixel i depth value andThe depth value of the neighborhood territory pixel point of this pixel i, successively by the depth value of described neighborhood territory pixel point and described pixelThe depth value of point i compares; In the time that the depth value of neighborhood territory pixel point j is greater than the depth value of this pixel i,Determine that this pixel j can not block this pixel i; When the depth value of this pixel j is less than the dark of this pixel iWhen degree value, determine that this pixel j blocks this pixel i, wherein, this pixel j is the arbitrary of this pixel iNeighborhood territory pixel point.
103,, according to the imaging hiding relation of described pixel i, the neighborhood territory pixel point of described pixel i is enteredRow Fuzzy processing, obtains output image data corresponding to described pixel i.
In the embodiment of the present invention, terminal can be to the imaging hiding relation of pixel i the neighborhood picture to this pixel iVegetarian refreshments carries out Fuzzy processing, supposes that pixel j is arbitrary neighborhood territory pixel point of this pixel i, if pixelThe depth value of i is greater than the depth value of pixel j, and so, terminal can be carried out Fuzzy processing to pixel j,Otherwise if the depth value of pixel i is less than the depth value of pixel j, so, terminal can be to pixel j notDeal with. The imaging hiding relation of terminal pixel i carries out Fuzzy processing to the neighborhood territory pixel point of pixel iAfterwards, can obtain output image data corresponding to this pixel i.
Alternatively, terminal can adopt parallel processing mode carry out obfuscation place to the neighborhood territory pixel point of pixel iReason, wherein, particularly, the configurable graphic process unit of terminal (GraphicsProcessingUnit, GPU)Module, adopts parallel processing mode to carry out Fuzzy processing to the neighborhood territory pixel point of pixel i based on this GPU.
104, the described output image data that in described pending image, all pixels are corresponding is superposeed.
In the embodiment of the present invention, terminal can be according to the imaging hiding relation of each pixel to each pixelNeighborhood all carries out Fuzzy processing, namely obtains the output image data that each pixel is corresponding. Thereby,The output image data of each pixel after Fuzzy processing can be superposeed.
Alternatively, the embodiment of the present invention not only can be carried out background virtualization for arbitrary pending image,
Obtain the depth map of pending image by the embodiment of the present invention, and determine that according to this depth map this waits to locateImaging hiding relation in reason image between pixel i and the neighborhood territory pixel point of this pixel i, wherein, this pictureVegetarian refreshments i is the arbitrary pixel in this pending image, according to the imaging hiding relation of this pixel i, to thisThe neighborhood territory pixel point of pixel i carries out Fuzzy processing, obtains output image data corresponding to this pixel i,Output image data corresponding to all pixels in this pending image superposeed. Thereby, according to opticsRule is determined the imaging hiding relation of each pixel in pending image, and, for this each pixelImaging hiding relation this each pixel neighborhood of a point is carried out to Fuzzy processing, therefore, treating after obfuscationProcess image and not only meet optics rule, and virtualization effect is more natural. At the depth map of pending imageComprise multiple degree of depth hierarchy charts, the degree of depth level that in multiple depth maps, depth value is little, can be to large its of depth valueHis degree of depth level causes and blocks, thereby degree of depth level is more, and virtualization effect approaches the anti-virtualization realizing of listEffect.
Refer to Fig. 2, the second embodiment flow process of the method for a kind of image processing providing for the embodiment of the present inventionSchematic diagram. The method of the image processing described in the present embodiment, comprises the following steps:
201, obtain the depth map of pending image.
Wherein, the depth map of pending image can only comprise close shot and distant view, or this depth map can compriseClose shot, middle scape and distant view, or this depth map can comprise more degree of depth levels and (as: present linear pointThe depth map of cloth).
202,, according to described depth map, determine pixel i and described pixel i in described pending imageImaging hiding relation between neighborhood territory pixel point, wherein, described pixel i is appointing in described pending imageOne pixel.
203, determine the blur radius of described pixel i.
In the embodiment of the present invention, because the imaging hiding relation of each pixel i is different, thereby terminal canDetermine respectively the blur radius of each pixel, like this, the follow-up Fuzzy processing virtualization effect afterwards of carrying outMore natural.
Alternatively, describe as an example of pixel i example, this pixel i is the arbitrary pixel in pending imagePoint. Terminal can be calculated current image distance according to current focusing distance, according to this current image distance and the estimation of this depth mapThe fuzzy diameter of pixel i in this depth map, the fuzzy diameter that amplifies this pixel i obtains this pixel i'sFuzzy diameter after amplification, calculates the blur radius of this pixel i according to the fuzzy diameter after this amplification.
Particularly, suppose that current focusing distance is D0, can obtain current image distance from v0 by following Solving Equations,This formula can be regarded as Gaussian imaging equation, specific as follows:
1 v 0 + 1 D 0 = 1 f
Wherein, current focusing distance can exist by the point in the picture of touch-screen or mouse selection for userIn depth map, the degree of depth of correspondence, can be also the corresponding degree of depth v0 in camera lens automatic focus position, wherein, and fFor focal length.
In the embodiment of the present invention, can be according to the fuzzy diameter of formula (1) estimation pixel i, this formula (1)As follows:
D ( i ) = ( v ( i ) - v 0 ) * A v ( i ) = v ( i ) - v 0 F N u m b e r ′ - - - ( 1 )
Wherein, i represents pixel i, and D (p) represents the fuzzy diameter of this i, and v (i) represents the image distance of this i, v0 tableShow that this is apart current, A represents the diameter in camera lens entrance pupil aperture,F′NumberRepresent camera lensThe efficient light number of turns, FNumberRepresent equivalent f-number, f represents focal length.
Then, amplify the fuzzy diameter of this pixel i, this formula (2) is as follows:
D ′ ( i ) = k * D ( i ) , i f D ( i ) > t h r e s h o l d D ( i ) , e l s e - - - ( 2 )
Wherein, i represents this pixel i, D'(i) represent the fuzzy diameter after the amplification of this i, D (i) is this iThe first fuzzy diameter, k represents multiplication factor, and this k > 1, threshold represents predetermined threshold value.
The number of the fuzzy diameter available pixel point after amplification represents, the fuzzy diameter after amplification is evenWhen number, corresponding blur radius is the half of the fuzzy diameter after this amplification, at the second fuzzy diameter isWhen odd number, blur radius=(fuzzy diameter-1 after amplification)/2.
204, construct the template of blocking of described pixel i according to the imaging hiding relation of described pixel i, itsIn, described in to block the size of template identical with the size of described blur radius.
In the embodiment of the present invention, first, construct the template of blocking of this pixel i according to formula (3), these public affairsFormula (3) is as follows:
H ′ ( i ) = H ( i ) , i f s h a p e _ m a s k ( i ) ∈ r ( i ) 0 , i f s h a p e _ m a s k ( i ) ∉ r ( i ) - - - ( 3 )
Wherein, H ' is (i) template of blocking of this i, and r (i) is this second blur radius, and shape_mask (i) representsImaging hiding relation between the neighborhood territory pixel point of this pixel i and this pixel i, H (i) is expressed as follows:
H ( i ) = 1 2 π δ exp ( - r 2 ( i ) 2 δ 2 ) · s h a p e _ m a s k ( i ) Σ S ( i ) 1 2 π δ exp ( - r 2 ( i ) 2 δ 2 ) · s h a p e _ m a s k ( i )
Wherein, δ represents the variance of Gaussian function.
205, based on the described template of blocking, the neighborhood of described pixel i is carried out to Fuzzy processing, described in obtainingThe output image data that pixel i is corresponding.
In the embodiment of the present invention, terminal can be calculated according to formula (4) output image of this i, this formula (4)As follows:
Iout(i)=H′(i)·Iin(i)·scheild(i)(4)
Wherein, S (i) represents the neighborhood of this i, Iout(i) represent the output image of this i, Iin(i) represent that this is pendingIn image, with the area image that position is corresponding and neighborhood size is consistent of this i, scheild (i) is expressed as picture and hidesGear is related to template, and the size of the neighborhood of this i is consistent with the size of the blur radius of this pixel i,This scheild (i) is as follows:
s h e i l d ( i ) = 0 , ( u ( S ( i ) ) ≥ u ( i ) ) 1 , e l s e
Wherein, u (i) represents the depth value of this i, and u (S (i)) represents the depth value of the neighborhood of this i.
Alternatively, first, can obtain mask shape_mask according to the shape that convolution mask is manually set, wherein,Point value of establishing of the template inside of this mask is 1, and some value of establishing of template outside is 0, for example, as shown in Figure 2 a, AFor square template, B is hexagon template, and C is octagon template, and above-mentioned default mask value also can be based on thisSquare template obtains corresponding value, or above-mentioned default mask value also can obtain based on this hexagon templateTo corresponding value, or above-mentioned default mask value also can obtain corresponding value based on this octagon template.Further, aforementioned mask can obtain by the digital picture of designated shape is implemented to binaryzation. For example,After the image of equilateral 6 limit shapes is implemented to convergent-divergent in various degree, then implement binaryzation, just obtain differenceThe equilateral hexagon template of yardstick. Again for example, default mask value also can be based on template in irregular shape, asMASK in Fig. 2 a.
Alternatively, terminal can adopt parallel processing mode carry out obfuscation place to the neighborhood territory pixel point of pixel iReason, wherein, particularly, the configurable graphic process unit of terminal (GraphicsProcessingUnit, GPU)Module, adopts parallel processing mode to carry out Fuzzy processing to the neighborhood of pixel i based on this GPU.
206, the described output image data that in described pending image, all pixels are corresponding is superposeed.
In the embodiment of the present invention, can obtain to output image data corresponding to each pixel i in depth map, inciting somebody to actionThe output image that in depth map, all pixels are corresponding superposes, just can obtain final output image, asShown in formula (5):
I o u t = Σ i ∈ I d e p t h I o u t ( i ) = Σ i ∈ I d e p t h [ H ′ ( t ) · I i n ( i ) · s c h e i l d ( i ) ] - - - ( 5 )
Wherein, IoutRepresent final output image, Iout(i) represent output image corresponding to pixel i, IdepthTableShow depth map, i ∈ IdepthRepresent that i is the arbitrary pixel in depth map. Wherein, formula (5) can be by GPUComplete the parallel processing to formula (5), can solve different pixels in depth map simultaneously and put corresponding output mapPicture, last, the output image that in depth map, all pixels are corresponding is superposeed, just can obtain output mapPicture.
It should be noted that, formula (5) also can be equivalent to:
I o u t = Σ P ∈ I d e p t h I o u t ( i ) = Σ P ∈ I d e p t h [ H ′ ( t ) · I i n ( i ) · s c h e i l d ( i ) ] = H ′ ( t ) · I i n ( 1 ) · s c h e i l d ( 1 ) + H ′ ( 2 ) · I i n ( 2 ) · s c h e i l d ( 2 ) + ..... + H ′ ( N ) · I i n ( N ) · s c h e i l d ( N ) - - - ( 6 )
Wherein, N is total number of pixel in depth map, can first be solved in depth map and be appointed by formula (6)A bit corresponding output image, then, then superposes output image corresponding all pixels.
Alternatively, the implementation of step S308 also can be as follows:
Iout(S(i))←Iout(S(i))+H′(i)·Iin(i)·sheild(i)(7)
Formula (7) can finally obtain final output image by iterative manner, supposes, N is in depth mapTotal number of pixel, the concrete implementation of formula (7) is as follows:
First, initialize Iout(S(1))=0;
Secondly, Iout(S(1))←Iout(S(1))+H'(1)·Iin(1) sheild (1), now, IoutIn middle pixel 1 neighborhoodPixel value is subject to the impact of pixel 1 and changes
Then, Iout(S(2))←Iout(S(2))+H'(2)·Iin(2) sheild (2), now, IoutIn middle pixel 2 neighborhoodsPixel value be subject to the impact of pixel 2 and change
And then, Iout(S(3))←Iout(S(3))+H'(3)·Iin(3) sheild (3), now, IoutMiddle pixel 3 neighborhoodsIn pixel value be subject to the impact of pixel 3 and change
Finally, Iout(S(N))←Iout(S(N))+H'(N)·Iin(N) sheild (N), now, IoutMiddle pixel NPixel value in neighborhood is subject to the impact of pixel N and changes.
In above-mentioned steps, the order of 1 to N step can be put upside down arbitrarily, still, and the each pixel in depth mapPoint calculates and only calculates once in formula (7).
Obtain the depth map of pending image by the embodiment of the present invention, and determine that according to this depth map this waits to locateImaging hiding relation in reason image between pixel i and the neighborhood territory pixel point of this pixel i, wherein, this pictureVegetarian refreshments i is the arbitrary pixel in this pending image, determines the blur radius of pixel i, fuzzy according to thisThe imaging hiding relation structure of radius and this pixel i blocks template, blocks template to this pixel i based on thisNeighborhood carry out Fuzzy processing, obtain output image data corresponding to this pixel i, by this pending imageIn output image data corresponding to all pixels superpose. Thereby, determine pending according to optics ruleThe imaging hiding relation of each pixel in image, and, for the imaging hiding relation of this each pixelThis each pixel neighborhood of a point is carried out to Fuzzy processing, and therefore, the pending image after obfuscation not only accords withClose optics rule, and virtualization effect is more natural. Comprise multiple depth layer at the depth map of pending imageInferior figure, the degree of depth level that in multiple depth maps, depth value is little, can cause other large degree of depth levels of depth valueBlock, thereby degree of depth level is more, virtualization effect approaches the anti-virtualization effect realizing of list.
Refer to Fig. 3, the 3rd embodiment flow process of the method for a kind of image processing providing for the embodiment of the present inventionSchematic diagram. The method of the image processing described in the present embodiment, comprises the following steps:
301, obtain the depth map of pending image.
Wherein, the depth map of pending image can only comprise close shot and distant view, or this depth map can compriseClose shot, middle scape and distant view, or this depth map can comprise more degree of depth levels, and (as: this depth value isThe depth map of existing linear distribution).
302,, according to described depth map, determine pixel i and described pixel i in described pending imageImaging hiding relation between neighborhood territory pixel point, wherein, described pixel i is appointing in described pending imageOne pixel.
303, obtain predeterminable area.
In the embodiment of the present invention, predeterminable area can be a certain region that user chooses, that is, and and when user passes through peopleMachine interactive mode, selects certain region in pending image, can be using this certain region as predeterminable area.
Alternatively, predeterminable area can carry out target detection to pending image by terminal, by the target detectingRegion is as predeterminable area. Or predeterminable area can carry out target detection to pending image by terminal,Region beyond using the target region detecting is as predeterminable area.
Alternatively, this predeterminable area can be 1 region or multiple region. Be multiple districts at this predeterminable area, when user is by man-machine interaction mode, select certain the several region in pending image when in the territory, can will be somebody's turn to doCertain several region is as predeterminable area.
304, determine the fringe region in described predeterminable area.
In the embodiment of the present invention, terminal can be to this predeterminable area is carried out to rim detection, to obtain this preset areasThe fringe region in territory. Alternatively, terminal can adopt canny edge detection algorithm to carry out edge inspection to predeterminable areaSurvey.
305, carry out fuzzy according to described imaging hiding relation to each pixel neighborhood of a point in described fringe regionChange and process.
In the embodiment of the present invention, can enter according to each pixel neighborhood of a point in imaging hiding relation edge regionRow Fuzzy processing.
Alternatively, after step 305, terminal also can to the region beyond fringe region in predeterminable area according toGaussian Blur algorithm carries out Fuzzy processing, so, can realize the Fuzzy processing to predeterminable area, meanwhile,Image after obfuscation meets optical principle, and obfuscation speed is fast.
306, the described output image data that in described pending image, all pixels are corresponding is superposeed.
In the embodiment of the present invention, can obtain the output image number after the fringe region Fuzzy processing of predeterminable areaAccording to, these output image datas are superposeed, can obtain the predeterminable area on obfuscation border.
Obtain the depth map of pending image by the embodiment of the present invention, and determine that according to this depth map this waits to locateImaging hiding relation in reason image between pixel i and the neighborhood territory pixel point of this pixel i, wherein, this pictureVegetarian refreshments i is the arbitrary pixel in this pending image, according to the imaging hiding relation of this pixel i, defaultFringe region in region carries out Fuzzy processing, obtains output map corresponding to each pixel in fringe regionPicture data, superpose output image data corresponding to all pixels in this pending image. Thereby,Determine the imaging hiding relation of each pixel in pending image according to optics rule, and, every for thisThe imaging hiding relation of one pixel carries out Fuzzy processing to the fringe region of user designated area, can obtainThe predeterminable area on obfuscation border, realizes a kind of edge special efficacy, therefore, and the pending image after obfuscationNot only meet optics rule, and virtualization effect is more natural.
Refer to Fig. 4 a, the first example structure schematic diagram of a kind of terminal providing for the embodiment of the present invention.Terminal described in the present embodiment, comprising:
The first acquiring unit 401, for obtaining the depth map of pending image.
The first determining unit 402, for the described depth map obtaining according to described the first acquiring unit 401, reallyPass is blocked in imaging in fixed described pending image between pixel i and the neighborhood territory pixel point of described pixel iSystem, wherein, described pixel i is the arbitrary pixel in described pending image.
The first processing unit 403, for the described pixel i's that determines according to described the first determining unit 402Imaging hiding relation, carries out Fuzzy processing to the neighborhood territory pixel point of described pixel i, obtains described pixelThe output image data that i is corresponding.
Superpositing unit 404, for by corresponding all pixels of described pending image processing by described firstUnit 403 described output image data after treatment superposes.
Alternatively, as shown in Figure 4 b, described first determining unit 402 of the terminal described in Fig. 4 a is wrappedDraw together:
The second determining unit 4021, for according to described depth map, determine described pixel i depth value andThe depth value of the neighborhood territory pixel point of described pixel i;
Comparing unit 4022, for the described neighborhood territory pixel point of successively described the second determining unit 4021 being determinedDepth value and the depth value of described pixel i compare, and be greater than institute when the depth value of neighborhood territory pixel point jWhile stating the depth value of pixel i, comparative result is that described pixel j can not block described pixel i;
In the time that the depth value of described pixel j is less than the depth value of described pixel i, comparative result is described pictureVegetarian refreshments j blocks described pixel i, and wherein, described pixel j is arbitrary neighborhood territory pixel point of described pixel i.
Alternatively, as shown in Fig. 4 c, described first processing unit 403 of the terminal described in Fig. 4 a comprises:
The 3rd determining unit 4031, for determining the blur radius of described pixel i;
Structural unit 4032, for constructing described pixel i according to the imaging hiding relation of described pixel iBlock template, wherein, described in block that the size of template and described the 3rd determining unit 4031 determineThe size of described blur radius is identical;
The second processing unit 4033 blocks template to institute described in constructing based on described structural unit 4032The neighborhood of stating pixel i carries out Fuzzy processing.
Alternatively, described the first processing unit 403 specifically for:
Adopt parallel processing mode to carry out Fuzzy processing to the neighborhood territory pixel point of described pixel i.
Alternatively, as shown in Fig. 4 d, the terminal described in Fig. 4 a also can comprise:
Second acquisition unit 405, in described the first determining unit 402 according to described the first acquiring unitThe 401 described depth maps that obtain, determine the neighborhood of pixel i and described pixel i in described pending imageAfter imaging hiding relation between pixel, obtain predeterminable area;
The 4th determining unit 406, for the described predeterminable area of determining that described second acquisition unit 405 getsIn fringe region, in the time of pixel that described pixel i is described fringe region, process single by described firstThe imaging hiding relation of the described pixel i that unit 403 determines according to described the first determining unit 402 is to described limitIn edge region, each pixel neighborhood of a point carries out Fuzzy processing.
Can obtain the depth map of pending image by the described terminal of the embodiment of the present invention, and dark according to thisDegree figure determines that in this pending image, pass is blocked in the imaging between pixel i and the neighborhood territory pixel point of this pixel iSystem, wherein, this pixel i is the arbitrary pixel in this pending image, according to the imaging of this pixel iHiding relation, carries out Fuzzy processing to the neighborhood territory pixel point of this pixel i, obtains this pixel i correspondingOutput image data, superposes output image data corresponding to all pixels in this pending image.Thereby, determine the imaging hiding relation of each pixel in pending image according to optics rule, and, pinThe imaging hiding relation of this each pixel is carried out to Fuzzy processing to this each pixel neighborhood of a point, therefore,Pending image after obfuscation not only meets optics rule, and virtualization effect is more natural. PendingThe depth map of image comprises multiple degree of depth hierarchy charts, and the degree of depth level that in multiple depth maps, depth value is little, can be rightOther degree of depth levels that depth value is large cause and block, thereby degree of depth level is more, and virtualization effect approaches listThe anti-virtualization effect realizing.
Refer to Fig. 5, the second example structure schematic diagram of a kind of terminal providing for the embodiment of the present invention. ThisTerminal described in embodiment, comprising: at least one input equipment 1000; At least one output equipment 2000;At least one processor 3000, for example CPU; With memory 4000, above-mentioned input equipment 1000, outputEquipment 2000, processor 3000 and memory 4000 are connected by bus 5000.
Wherein, above-mentioned input equipment 1000 specifically can be contact panel, physical button or mouse.
Above-mentioned output equipment 2000 specifically can be display screen.
Above-mentioned memory 4000 can be high-speed RAM memory, also can be non-unsettled memory(non-volatilememory), for example magnetic disc store. Above-mentioned memory 4000 is for storing batch processingCode, above-mentioned input equipment 1000, output equipment 2000 and processor 3000 are for calling memory 4000The program code of middle storage, carry out operation as follows:
Above-mentioned processor 3000, for:
Obtain the depth map of pending image;
According to described depth map, determine the neighborhood picture of pixel i and described pixel i in described pending imageImaging hiding relation between vegetarian refreshments, wherein, described pixel i is the arbitrary pixel in described pending imagePoint;
According to the imaging hiding relation of described pixel i, carry out fuzzy to the neighborhood territory pixel point of described pixel iChange and process, obtain output image data corresponding to described pixel i;
The described output image data that in described pending image, all pixels are corresponding is superposeed.
Alternatively, above-mentioned processor 3000, according to described depth map, is determined pixel in described pending imageHiding relation between the neighborhood territory pixel point of i and described pixel i, comprising:
According to described depth map, determine the depth value of described pixel i and the neighborhood territory pixel point of described pixel iDepth value;
Successively the depth value of the depth value of described neighborhood territory pixel point and described pixel i is compared;
In the time that the depth value of neighborhood territory pixel point j is greater than the depth value of described pixel i, determine described pixel jCan not block described pixel i;
In the time that the depth value of described pixel j is less than the depth value of described pixel i, determine described pixel jBlock described pixel i, wherein, described pixel j is arbitrary neighborhood territory pixel point of described pixel i.
Alternatively, above-mentioned processor 3000 is according to the imaging hiding relation of described pixel i, to described pixelThe neighborhood territory pixel point of point i carries out Fuzzy processing, comprising:
Determine the blur radius of described pixel i;
Construct the template of blocking of described pixel i according to the imaging hiding relation of described pixel i, wherein, instituteState that to block the size of template identical with the size of described blur radius;
Based on the described template of blocking, the neighborhood of described pixel i is carried out to Fuzzy processing.
Alternatively, above-mentioned processor 3000 carries out Fuzzy processing to the neighborhood territory pixel point of described pixel i,Comprise:
Parallel processing mode is carried out Fuzzy processing to the neighborhood territory pixel point of described pixel i.
Alternatively, above-mentioned processor 3000 is determined pixel i in described pending image according to described depth mapAnd after the imaging hiding relation between the neighborhood territory pixel point of described pixel i, also specifically for:
Obtain predeterminable area;
Determine the fringe region in described predeterminable area;
In the time of pixel that described pixel i is described fringe region, above-mentioned processor 3000 is according to described pictureThe imaging hiding relation of vegetarian refreshments i, carries out Fuzzy processing to the neighborhood territory pixel point of described pixel i, comprising:
According to the imaging hiding relation of described pixel i, each pixel neighborhood of a point in described fringe region is enteredRow Fuzzy processing.
In specific implementation, input equipment 1000, the output equipment 2000 described in the embodiment of the present invention and locatingReason device 3000 can be carried out first embodiment, second of the method for a kind of image processing that the embodiment of the present invention providesImplementation described in embodiment and the 3rd embodiment, also can carry out the one that the embodiment of the present invention providesThe implementation of the terminal described in the first embodiment of terminal, does not repeat them here.
Unit in all embodiment of the present invention, can pass through universal integrated circuit, for example CPU (CentralProcessingUnit, central processing unit), or by ASIC (ApplicationSpecificIntegratedCircuit, special IC) realize.
Step in embodiment of the present invention method can be carried out according to actual needs order and adjusted, merges and delete.
Unit in embodiment of the present invention terminal can merge according to actual needs, divides and delete.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method,Be can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a calculatingIn machine read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory,Or random access memory (RandomAccessMemory, be called for short RAM) etc. ROM).
Method and the terminal of a kind of image the processing above embodiment of the present invention being provided have been carried out detailed JieContinue, applied specific case herein principle of the present invention and embodiment are set forth, above enforcementThe explanation of example is just for helping to understand method of the present invention and core concept thereof; Meanwhile, for this areaThose skilled in the art, according to thought of the present invention, all can change in specific embodiments and applicationsPart, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a method for image processing, is characterized in that, comprising:
Obtain the depth map of pending image;
According to described depth map, determine the neighborhood picture of pixel i and described pixel i in described pending imageImaging hiding relation between vegetarian refreshments, wherein, described pixel i is the arbitrary pixel in described pending imagePoint;
According to the imaging hiding relation of described pixel i, carry out fuzzy to the neighborhood territory pixel point of described pixel iChange and process, obtain output image data corresponding to described pixel i;
The described output image data that in described pending image, all pixels are corresponding is superposeed.
2. the method for claim 1, is characterized in that, described according to described depth map, determines instituteState the hiding relation between pixel i and the neighborhood territory pixel point of described pixel i in pending image, comprising:
According to described depth map, determine the depth value of described pixel i and the neighborhood territory pixel point of described pixel iDepth value;
Successively the depth value of the depth value of described neighborhood territory pixel point and described pixel i is compared;
In the time that the depth value of neighborhood territory pixel point j is greater than the depth value of described pixel i, determine described pixel jCan not block described pixel i;
In the time that the depth value of described pixel j is less than the depth value of described pixel i, determine described pixel jBlock described pixel i, wherein, described pixel j is arbitrary neighborhood territory pixel point of described pixel i.
3. according to the method described in claim 1 or 2 any one, it is characterized in that, described according to described pictureThe imaging hiding relation of vegetarian refreshments i, carries out Fuzzy processing to the neighborhood territory pixel point of described pixel i, comprising:
Determine the blur radius of described pixel i;
Construct the template of blocking of described pixel i according to the imaging hiding relation of described pixel i, wherein, instituteState that to block the size of template identical with the size of described blur radius;
Based on the described template of blocking, the neighborhood of described pixel i is carried out to Fuzzy processing.
4. the method as described in claim 1 or 2 any one, is characterized in that, described to described pixelThe neighborhood territory pixel point of i carries out Fuzzy processing, comprising:
Adopt parallel processing mode to carry out Fuzzy processing to the neighborhood territory pixel point of described pixel i.
5. the method as described in claim 1 or 2 any one, is characterized in that, described according to the described degree of depthFigure determine pixel i and described pixel i in described pending image neighborhood territory pixel point between imaging screeningAfter gear relation, also comprise:
Obtain predeterminable area;
Determine the fringe region in described predeterminable area;
In the time of pixel that described pixel i is described fringe region, described according to the imaging of described pixel iHiding relation, carries out Fuzzy processing to the neighborhood territory pixel point of described pixel i, comprising:
According to the imaging hiding relation of described pixel i, each pixel neighborhood of a point in described fringe region is enteredRow Fuzzy processing.
6. a terminal, is characterized in that, comprising:
The first acquiring unit, for obtaining the depth map of pending image;
The first determining unit, for the described depth map obtaining according to described the first acquiring unit, described in determiningImaging hiding relation in pending image between pixel i and the neighborhood territory pixel point of described pixel i, wherein,Described pixel i is the arbitrary pixel in described pending image;
The first processing unit, for blocking according to the imaging of the definite described pixel i of described the first determining unitRelation, carries out Fuzzy processing to the neighborhood territory pixel point of described pixel i, obtains described pixel i correspondingOutput image data;
Superpositing unit, for processing list by corresponding all pixels of described pending image by described firstUnit's described output image data after treatment superposes.
7. terminal as claimed in claim 6, is characterized in that, described the first determining unit comprises:
The second determining unit, for according to described depth map, determines depth value and the described picture of described pixel iThe depth value of the neighborhood territory pixel point of vegetarian refreshments i;
Comparing unit, for the depth value of described neighborhood territory pixel point of successively described the second determining unit being determinedCompare with the depth value of described pixel i, and be greater than described pixel when the depth value of neighborhood territory pixel point jWhen the depth value of i, comparative result is that described pixel j can not block described pixel i;
In the time that the depth value of described pixel j is less than the depth value of described pixel i, comparative result is described pictureVegetarian refreshments j blocks described pixel i, and wherein, described pixel j is arbitrary neighborhood territory pixel point of described pixel i.
8. according to the terminal described in claim 6 or 7 any one, it is characterized in that, described first processes listUnit comprises:
The 3rd determining unit, for determining the blur radius of described pixel i;
Structural unit, constructs blocking of described pixel i for the imaging hiding relation according to described pixel iTemplate, wherein, described in block that the size of template and described the 3rd determining unit determine described fuzzy halfThe size in footpath is identical;
The second processing unit, for blocking template to described pixel i described in described structural unit structureNeighborhood carry out Fuzzy processing.
9. the terminal as described in claim 6 or 7 any one, is characterized in that described the first processing unitSpecifically for:
Adopt parallel processing mode to carry out Fuzzy processing to the neighborhood territory pixel point of described pixel i.
10. the terminal as described in claim 6 or 7 any one, is characterized in that, described terminal also comprises:
Second acquisition unit, for the institute obtaining according to described the first acquiring unit in described the first determining unitState depth map, determine in described pending image between pixel i and the neighborhood territory pixel point of described pixel iAfter imaging hiding relation, obtain predeterminable area;
The 4th determining unit, the limit of the described predeterminable area getting for definite described second acquisition unitEdge region, in the time of pixel that described pixel i is described fringe region, by described the first processing unit basisThe imaging hiding relation of the described pixel i that described determining unit is determined is to each pixel in described fringe regionNeighborhood of a point carry out obfuscation place.
CN201510966972.0A 2015-12-21 2015-12-21 Image-processing method and terminal Pending CN105592271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510966972.0A CN105592271A (en) 2015-12-21 2015-12-21 Image-processing method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510966972.0A CN105592271A (en) 2015-12-21 2015-12-21 Image-processing method and terminal

Publications (1)

Publication Number Publication Date
CN105592271A true CN105592271A (en) 2016-05-18

Family

ID=55931452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510966972.0A Pending CN105592271A (en) 2015-12-21 2015-12-21 Image-processing method and terminal

Country Status (1)

Country Link
CN (1) CN105592271A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530241A (en) * 2016-10-31 2017-03-22 努比亚技术有限公司 Image blurring processing method and apparatus
CN107133981A (en) * 2017-03-30 2017-09-05 腾讯科技(深圳)有限公司 Image processing method and device
CN107610057A (en) * 2017-08-22 2018-01-19 努比亚技术有限公司 A kind of depth map restorative procedure, terminal and computer-readable recording medium
CN108038817A (en) * 2017-10-30 2018-05-15 努比亚技术有限公司 A kind of image background weakening method, terminal and computer-readable recording medium
CN113139997A (en) * 2020-01-19 2021-07-20 武汉Tcl集团工业研究院有限公司 Depth map processing method, storage medium and terminal device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587586A (en) * 2008-05-20 2009-11-25 株式会社理光 Device and method for processing images
US20120007939A1 (en) * 2010-07-06 2012-01-12 Tessera Technologies Ireland Limited Scene Background Blurring Including Face Modeling
CN103945118A (en) * 2014-03-14 2014-07-23 华为技术有限公司 Picture blurring method and device and electronic equipment
CN104463775A (en) * 2014-10-31 2015-03-25 小米科技有限责任公司 Device and method for achieving depth-of-field effect of image
CN105120154A (en) * 2015-08-20 2015-12-02 深圳市金立通信设备有限公司 Image processing method and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587586A (en) * 2008-05-20 2009-11-25 株式会社理光 Device and method for processing images
US20120007939A1 (en) * 2010-07-06 2012-01-12 Tessera Technologies Ireland Limited Scene Background Blurring Including Face Modeling
CN103945118A (en) * 2014-03-14 2014-07-23 华为技术有限公司 Picture blurring method and device and electronic equipment
CN104463775A (en) * 2014-10-31 2015-03-25 小米科技有限责任公司 Device and method for achieving depth-of-field effect of image
CN105120154A (en) * 2015-08-20 2015-12-02 深圳市金立通信设备有限公司 Image processing method and terminal

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530241A (en) * 2016-10-31 2017-03-22 努比亚技术有限公司 Image blurring processing method and apparatus
CN106530241B (en) * 2016-10-31 2020-08-11 努比亚技术有限公司 Image blurring processing method and device
CN107133981A (en) * 2017-03-30 2017-09-05 腾讯科技(深圳)有限公司 Image processing method and device
CN107133981B (en) * 2017-03-30 2019-04-12 腾讯科技(深圳)有限公司 Image processing method and device
CN107610057A (en) * 2017-08-22 2018-01-19 努比亚技术有限公司 A kind of depth map restorative procedure, terminal and computer-readable recording medium
CN107610057B (en) * 2017-08-22 2020-11-27 努比亚技术有限公司 Depth map repairing method, terminal and computer readable storage medium
CN108038817A (en) * 2017-10-30 2018-05-15 努比亚技术有限公司 A kind of image background weakening method, terminal and computer-readable recording medium
CN113139997A (en) * 2020-01-19 2021-07-20 武汉Tcl集团工业研究院有限公司 Depth map processing method, storage medium and terminal device
CN113139997B (en) * 2020-01-19 2023-03-21 武汉Tcl集团工业研究院有限公司 Depth map processing method, storage medium and terminal device

Similar Documents

Publication Publication Date Title
JP7089106B2 (en) Image processing methods and equipment, electronic devices, computer-readable storage media and computer programs
CN105592271A (en) Image-processing method and terminal
CN111161349B (en) Object posture estimation method, device and equipment
CN110473137B (en) Image processing method and device
Chaudhuri et al. Depth from defocus: a real aperture imaging approach
CN103460705B (en) The real-time deep utilizing stereoscopic correspondence extracts
CN105335950A (en) Image processing method and image processing apparatus
KR20150046105A (en) System and method for perceiving images with multimodal feedback
CN105611154A (en) Image processing method and terminal
CN109816745A (en) Human body thermodynamic chart methods of exhibiting and Related product
CN114898028A (en) Scene reconstruction and rendering method based on point cloud, storage medium and electronic equipment
CN111163265A (en) Image processing method, image processing device, mobile terminal and computer storage medium
US20190102056A1 (en) User interface for manipulating light-field images
CN106464800A (en) Automatic anti-glare exposures for imaging devices
CN109815854B (en) Method and device for presenting associated information of icon on user equipment
CN102968814A (en) Image rendering method and equipment
US20180033156A1 (en) Method and device for filtering texture, using patch shift
CN115861667A (en) Self-attention multi-scale pyramid binocular stereo matching method and electronic equipment
Javidnia et al. Application of preconditioned alternating direction method of multipliers in depth from focal stack
CN112991208B (en) Image processing method and device, computer readable medium and electronic equipment
CN107945202B (en) Image segmentation method and device based on adaptive threshold value and computing equipment
KR101991401B1 (en) Method and apparatus for displaying augmented reality
CN115689947A (en) Image sharpening method, system, electronic device and storage medium
CN115346184A (en) Lane information detection method, terminal and computer storage medium
Cao et al. Depth image vibration filtering and shadow detection based on fusion and fractional differential

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20190423