CN104134198A - Method for carrying out local processing on image - Google Patents

Method for carrying out local processing on image Download PDF

Info

Publication number
CN104134198A
CN104134198A CN201410362793.1A CN201410362793A CN104134198A CN 104134198 A CN104134198 A CN 104134198A CN 201410362793 A CN201410362793 A CN 201410362793A CN 104134198 A CN104134198 A CN 104134198A
Authority
CN
China
Prior art keywords
image
carried out
smearing
local treatment
full
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
CN201410362793.1A
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.)
Xiamen Meitu Technology Co Ltd
Original Assignee
Xiamen Meitu Technology 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 Xiamen Meitu Technology Co Ltd filed Critical Xiamen Meitu Technology Co Ltd
Priority to CN201410362793.1A priority Critical patent/CN104134198A/en
Publication of CN104134198A publication Critical patent/CN104134198A/en
Pending legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a method for carrying out local processing on images. According to the method, an image to be processed is subjected to image segmentation and full-image effect processing in advance; then, all segmentation blocks referred by a daubed region are calculated according to daubing operation of a user; next, a mask layer is set according to a daubing result, and the mask layer is subjected to fuzzy processing; and finally, the mask layer subjected to fuzzy processing is used as the transparency to carry out hybrid processing on the image to be processed and a full-image effect picture, and a result image is obtained. The method has the advantages that in the daubing process, similar pixel points in the same segmentation bock can also be intelligently selected even if the similar pixel points are not daubed, so the daubing accuracy rate is improved, the operation time of the user is reduced, and the operation experience of the user is greatly improved.

Description

A kind of method of image being carried out to Local treatment
Technical field
The present invention relates to a kind of image method, particularly a kind of method of image being carried out to Local treatment.
Background technology
Conventional images software exists the function of a lot of parts, comprise topography's processing capacities such as local virtualization, local beauty, local mosaic, but these functions are all to need user carefully to go accurately to smear to need position to be processed can realize good partial result.
Summary of the invention
The present invention, for addressing the above problem, provides a kind of method of image being carried out to Local treatment, and the pending position of intelligent selection accurately promotes user's operating experience.
For achieving the above object, the technical solution used in the present invention is:
A method of image being carried out to Local treatment, is characterized in that, comprises the following steps:
10. receive pending image, and this pending image is carried out to image in advance cut apart, pending image is divided into a plurality of blocks;
20. pairs of pending images carry out the effect process of full figure, obtain full figure design sketch;
30. calculate according to user's the operation of smearing all blocks that related to by application area, obtain smearing result;
40. smear the result layer that sets Matte according to described, and this masking-out layer is carried out to Fuzzy Processing;
50. carry out hybrid processing using the masking-out layer after Fuzzy Processing as transparency to pending image and full figure design sketch, obtain result images.
Preferably, in described step 10, the result of cutting apart according to image, is numbered each block, and the same numbering of mark is carried out in the region that belongs to same block.
Preferably, in described step 20, pending image being carried out the effect process of full figure, is mainly in advance full figure to be carried out to the effect process corresponding with this Local treatment function according to required Local treatment function.
Preferably, all blocks that related to by application area are calculated in the operation of smearing according to user in described step 30, are mainly when user smears a region, calculate all blocks and corresponding numbering thereof that this region relates to.
Preferably, utilize described numbering to apply for the array that a quantity is block sum, and all values of initialization array is for not smearing, when user smears a region, according to smearing result, the value of array is modified, numbering corresponding to the block of smearing is made as and smeared.
Preferably, when user selects erasing rubber function, numbering corresponding to the block of smearing do not smeared by smearing to change to.
Preferably, to the region of having smeared, adopt white to mark, to the region of not smearing, adopt black to mark.
Preferably, in described step 40, this masking-out layer is carried out to Fuzzy Processing, described Fuzzy Processing comprises following one or more: intermediate value Fuzzy Processing, Gaussian Blur processing, average Fuzzy Processing, convolution blur are processed.
Preferably, in described step 50, using the masking-out layer after Fuzzy Processing as transparency, pending image and full figure design sketch are carried out to hybrid processing, obtain result images, its computing method are as follows:
alpha=mask/255.0;
result=oral*(1.0-alpha)+alpha*proc;
Wherein, result is the color value of the red, green, blue passage of corresponding pixel points on result images; Mask is the color value of the masking-out layer after Fuzzy Processing; Oral is the color value of the red, green, blue passage of corresponding pixel points on pending image; Proc is the color value of the red, green, blue passage of corresponding pixel points on full figure design sketch; Alpha is that masking-out layer corresponding pixel points after Fuzzy Processing is as the value of transparency.
The invention has the beneficial effects as follows:
A kind of method of image being carried out to Local treatment of the present invention, by pending image is carried out in advance, image is cut apart and the effect process of full figure for it, according to user's the operation of smearing, calculate all blocks that related to by application area again, then according to smearing the result layer that sets Matte, and this masking-out layer is carried out to Fuzzy Processing, finally using the masking-out layer after Fuzzy Processing as transparency, pending image and full figure design sketch are carried out to hybrid processing, obtain result images; The similar pixel of its same block in the process of smearing even without smeared also can intelligence selected, thereby improved the accuracy rate of smearing, and reduced user's running time, greatly promoted user's operating experience.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a part of the present invention, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is a kind of general flow chart that image is carried out to the method for Local treatment of the present invention;
Fig. 2 is pending image of the present invention;
Fig. 3 is for to carry out the design sketch after image dividing processing to Fig. 2;
Fig. 4 is the full figure design sketch to Fig. 2;
Fig. 5 is for to smear the design sketch after operation to Fig. 2, and wherein white is application area, and black is application area not;
Fig. 6 is net result image.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearer, clear, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As shown in Figure 1, a kind of method of image being carried out to Local treatment of the present invention, it comprises the following steps:
10. receive pending image (as Fig. 2), and this pending image is carried out to image in advance cut apart, pending image is divided into a plurality of blocks (as Fig. 3);
20. pairs of pending images carry out the effect process of full figure, obtain full figure design sketch (as Fig. 4);
30. calculate according to user's the operation of smearing all blocks that related to by application area, obtain smearing result (as Fig. 5);
40. smear the result layer that sets Matte according to described, and this masking-out layer is carried out to Fuzzy Processing;
50. carry out hybrid processing using the masking-out layer after Fuzzy Processing as transparency to pending image and full figure design sketch, obtain result images (as Fig. 6).
Described image is cut apart exactly image is divided into several specific, to have the region of peculiar property and propose interesting target technology and processes.It is by image, to be processed the committed step of graphical analysis.Existing image partition method mainly divides following a few class: the dividing method based on threshold value, the dividing method based on region, the dividing method based on edge and the dividing method based on particular theory etc.In described step 10, the result of cutting apart according to image, is numbered each block, and the same numbering of mark is carried out in the region that belongs to same block.The all blocks that related to by application area are calculated in the operation of smearing according to user in described step 30, and are mainly when user smears a region, calculate all blocks and corresponding numbering thereof that this region relates to.And, utilize described numbering to apply for the array that a quantity is block sum, and all values of initialization array is for not smearing, when user smears a region, according to smearing result, the value of array is modified, numbering corresponding to the block of smearing is made as and smeared.When user selects erasing rubber function, numbering corresponding to the block of smearing do not smeared by smearing to change to.To the region of having smeared, adopt white to mark, to the region of not smearing, adopt black to mark.
In described step 20, pending image being carried out the effect process of full figure, is mainly in advance full figure to be carried out to the effect process corresponding with this Local treatment function according to required Local treatment function.For example, if the object that image is carried out to Local treatment is to carry out local mosaic, in this step, pending image is carried out the mosaic processing of full figure; If image being carried out to the object of Local treatment is local virtualization, in this step, pending image is carried out the virtualization processing of full figure.
For the edge that makes to smear more level and smooth, thereby make the better effects if of smearing, in described step 40, this masking-out layer is also carried out to Fuzzy Processing, described Fuzzy Processing comprises following one or more: intermediate value Fuzzy Processing, Gaussian Blur processing, average Fuzzy Processing, convolution blur are processed.
Intermediate value Fuzzy Processing, be that medium filtering is processed, mainly that the color value of pixel to be processed N*N template pixel is around carried out to sequence from big to small or from small to large, middle that color value after being sorted, be median, then the color value of this pixel is set to the color value of its median; Wherein, N is fuzzy radius.
Gaussian Blur is processed, and is mainly the conversion that adopts each pixel in normal distribution computed image, wherein, at the normal distribution equation of N dimension space, is:
G ( r ) = 1 2 π σ 2 N e - r 2 / ( 2 σ 2 ) ;
Normal distribution equation at two-dimensional space is:
G ( u , v ) = 1 2 π σ 2 e - ( u 2 + v 2 ) / ( 2 σ 2 ) ;
Wherein r is blur radius, r 2=u 2+ v 2, σ is the standard deviation of normal distribution, and u is the position off-set value of former pixel on x axle, and v is the position off-set value of former pixel on y axle.
Average Fuzzy Processing is typical linear filtering algorithm, and it refers on image that to object pixel, to a template, this template has comprised its adjacent pixels around; This adjacent pixels refers to 8 pixels of surrounding centered by target pixel, forms a Filtering Template, removes target pixel itself; With the mean value of all pixels in template, replace original pixel value again.
Convolution blur is processed: convolution is the operation that each element in matrix is carried out, the function that convolution realizes is to be determined by the form of its convolution kernel, convolution kernel is the matrix that a size fixes, has numerical parameter to form, the center of matrix is reference point or anchor point, and the size of matrix is called core and supports; Calculate the color value after the convolution of a pixel, first the reference point of core is navigated to this pixel, all the other elements of core cover part corresponding in matrixes point around; For in each core pixel, obtain the product of the value of specified point in the value of this pixel and convolution kernel array and ask the cumulative sum of all these products, i.e. the convolution value of this specified point, substitutes the color value of this pixel by this result; By mobile convolution kernel on whole image, each pixel of image is repeated to this operation.
In the present embodiment, in described step 50, using the masking-out layer after Fuzzy Processing as transparency, pending image and full figure design sketch are carried out to hybrid processing, obtain result images, its computing method are as follows:
alpha=mask/255.0;
result=oral*(1.0-alpha)+alpha*proc;
Wherein, result is the color value of the red, green, blue passage of corresponding pixel points on result images; Mask is the color value of the masking-out layer after Fuzzy Processing; Oral is the color value of the red, green, blue passage of corresponding pixel points on pending image; Proc is the color value of the red, green, blue passage of corresponding pixel points on full figure design sketch; Alpha is that masking-out layer corresponding pixel points after Fuzzy Processing is as the value of transparency.
Above-mentioned explanation illustrates and has described the preferred embodiments of the present invention, be to be understood that the present invention is not limited to disclosed form herein, should not regard the eliminating to other embodiment as, and can be used for various other combinations, modification and environment, and can, in invention contemplated scope herein, by technology or the knowledge of above-mentioned instruction or association area, change.And the change that those skilled in the art carry out and variation do not depart from the spirit and scope of the present invention, all should be in the protection domain of claims of the present invention.

Claims (9)

1. image is carried out to a method for Local treatment, it is characterized in that, comprise the following steps:
10. receive pending image, and this pending image is carried out to image in advance cut apart, pending image is divided into a plurality of blocks;
20. pairs of pending images carry out the effect process of full figure, obtain full figure design sketch;
30. calculate according to user's the operation of smearing all blocks that related to by application area, obtain smearing result;
40. smear the result layer that sets Matte according to described, and this masking-out layer is carried out to Fuzzy Processing;
50. carry out hybrid processing using the masking-out layer after Fuzzy Processing as transparency to pending image and full figure design sketch, obtain result images.
2. a kind of method of image being carried out to Local treatment according to claim 1, is characterized in that: in described step 10, the result of cutting apart according to image, is numbered each block, and the same numbering of mark is carried out in the region that belongs to same block.
3. a kind of method of image being carried out to Local treatment according to claim 1, it is characterized in that: in described step 20, pending image being carried out the effect process of full figure, is mainly in advance full figure to be carried out to the effect process corresponding with this Local treatment function according to required Local treatment function.
4. a kind of method of image being carried out to Local treatment according to claim 2, it is characterized in that: all blocks that related to by application area are calculated in the operation of smearing according to user in described step 30, be mainly when user smears a region, calculate all blocks and corresponding numbering thereof that this region relates to.
5. a kind of method of image being carried out to Local treatment according to claim 4, it is characterized in that: utilize described numbering to apply for the array that a quantity is block sum, and all values of initialization array is not for smearing, when user smears a region, according to smearing result, the value of array is modified, numbering corresponding to the block of smearing is made as and smeared.
6. a kind of method of image being carried out to Local treatment according to claim 5, is characterized in that: when user selects erasing rubber function, numbering corresponding to the block of smearing do not smeared by smearing to change to.
7. according to a kind of method of image being carried out to Local treatment described in claim 5 or 6, it is characterized in that: to the region of having smeared, adopt white to mark, to the region of not smearing, adopt black to mark.
8. a kind of method of image being carried out to Local treatment according to claim 1, it is characterized in that: in described step 40, this masking-out layer is carried out to Fuzzy Processing, described Fuzzy Processing comprises following one or more: intermediate value Fuzzy Processing, Gaussian Blur processing, average Fuzzy Processing, convolution blur are processed.
9. a kind of method of image being carried out to Local treatment according to claim 1, it is characterized in that: in described step 50, using the masking-out layer after Fuzzy Processing as transparency, pending image and full figure design sketch are carried out to hybrid processing, obtain result images, its computing method are as follows:
alpha=mask/255.0;
result=oral*(1.0-alpha)+alpha*proc;
Wherein, result is the color value of the red, green, blue passage of corresponding pixel points on result images; Mask is the color value of the masking-out layer after Fuzzy Processing; Oral is the color value of the red, green, blue passage of corresponding pixel points on pending image; Proc is the color value of the red, green, blue passage of corresponding pixel points on full figure design sketch; Alpha is that masking-out layer corresponding pixel points after Fuzzy Processing is as the value of transparency.
CN201410362793.1A 2014-07-28 2014-07-28 Method for carrying out local processing on image Pending CN104134198A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410362793.1A CN104134198A (en) 2014-07-28 2014-07-28 Method for carrying out local processing on image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410362793.1A CN104134198A (en) 2014-07-28 2014-07-28 Method for carrying out local processing on image

Publications (1)

Publication Number Publication Date
CN104134198A true CN104134198A (en) 2014-11-05

Family

ID=51806868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410362793.1A Pending CN104134198A (en) 2014-07-28 2014-07-28 Method for carrying out local processing on image

Country Status (1)

Country Link
CN (1) CN104134198A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331868A (en) * 2014-11-17 2015-02-04 厦门美图网科技有限公司 Optimizing method of image border
CN104461439A (en) * 2014-12-29 2015-03-25 联想(北京)有限公司 Information processing method and electronic equipment
CN104599230A (en) * 2015-01-16 2015-05-06 腾讯科技(深圳)有限公司 Visual focus displaying method and device
CN104700371A (en) * 2015-03-18 2015-06-10 厦门美图之家科技有限公司 Generation method and system of masking
CN105611154A (en) * 2015-12-21 2016-05-25 深圳市金立通信设备有限公司 Image processing method and terminal
CN105989575A (en) * 2015-03-02 2016-10-05 腾讯科技(深圳)有限公司 Image fuzzy processing method and device
CN106530309A (en) * 2016-10-24 2017-03-22 成都品果科技有限公司 Video matting method and system based on mobile platform
CN110298813A (en) * 2019-06-28 2019-10-01 北京金山安全软件有限公司 Method and device for processing picture and electronic equipment
CN110852967A (en) * 2019-11-06 2020-02-28 成都品果科技有限公司 Method for quickly removing flaws of portrait photo

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7463785B2 (en) * 2002-09-12 2008-12-09 Riso Kagaku Corporation Image processing system
CN101663885A (en) * 2007-04-27 2010-03-03 夏普株式会社 Image processing device and method, and image display device and method
EP2339532A1 (en) * 2009-11-17 2011-06-29 Vestel Elektronik Sanayi ve Ticaret A.S. Depth compensated noise reduction in multi-view video
CN103593834A (en) * 2013-12-03 2014-02-19 厦门美图网科技有限公司 Image enhancement method achieved by intelligently increasing field depth

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7463785B2 (en) * 2002-09-12 2008-12-09 Riso Kagaku Corporation Image processing system
CN101663885A (en) * 2007-04-27 2010-03-03 夏普株式会社 Image processing device and method, and image display device and method
EP2339532A1 (en) * 2009-11-17 2011-06-29 Vestel Elektronik Sanayi ve Ticaret A.S. Depth compensated noise reduction in multi-view video
CN103593834A (en) * 2013-12-03 2014-02-19 厦门美图网科技有限公司 Image enhancement method achieved by intelligently increasing field depth

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331868A (en) * 2014-11-17 2015-02-04 厦门美图网科技有限公司 Optimizing method of image border
CN104331868B (en) * 2014-11-17 2019-04-02 厦门美图网科技有限公司 A kind of optimization method of image border
CN104461439A (en) * 2014-12-29 2015-03-25 联想(北京)有限公司 Information processing method and electronic equipment
CN104599230A (en) * 2015-01-16 2015-05-06 腾讯科技(深圳)有限公司 Visual focus displaying method and device
CN105989575B (en) * 2015-03-02 2019-08-30 腾讯科技(深圳)有限公司 A kind of image fuzzy processing method and device
CN105989575A (en) * 2015-03-02 2016-10-05 腾讯科技(深圳)有限公司 Image fuzzy processing method and device
CN104700371A (en) * 2015-03-18 2015-06-10 厦门美图之家科技有限公司 Generation method and system of masking
CN104700371B (en) * 2015-03-18 2017-11-03 厦门美图之家科技有限公司 The generation method and system of a kind of masking-out
CN105611154A (en) * 2015-12-21 2016-05-25 深圳市金立通信设备有限公司 Image processing method and terminal
CN106530309A (en) * 2016-10-24 2017-03-22 成都品果科技有限公司 Video matting method and system based on mobile platform
CN106530309B (en) * 2016-10-24 2019-07-12 成都品果科技有限公司 A kind of video matting method and system based on mobile platform
CN110298813A (en) * 2019-06-28 2019-10-01 北京金山安全软件有限公司 Method and device for processing picture and electronic equipment
CN110852967A (en) * 2019-11-06 2020-02-28 成都品果科技有限公司 Method for quickly removing flaws of portrait photo
CN110852967B (en) * 2019-11-06 2023-09-12 成都品果科技有限公司 Method for rapidly removing flaws in portrait photo

Similar Documents

Publication Publication Date Title
CN104134198A (en) Method for carrying out local processing on image
CN103699900B (en) Building horizontal vector profile automatic batch extracting method in satellite image
Machairas et al. Waterpixels: Superpixels based on the watershed transformation
CN103914699A (en) Automatic lip gloss image enhancement method based on color space
CN105513105B (en) Image background weakening method based on notable figure
CN103793888B (en) Image enhancing method based on main colors of reference image
CN104331868B (en) A kind of optimization method of image border
CN104517110A (en) Binarization method and system of two-dimensional code image
CN104143186B (en) A kind of SLIC super-pixel piecemeal optimization method
CN109858487A (en) Weakly supervised semantic segmentation method based on watershed algorithm and image category label
DE102015009820A1 (en) Image segmentation for a live camera recording
CN105046658A (en) Low-illumination image processing method and device
CN104574328A (en) Color image enhancement method based on histogram segmentation
CN111179196B (en) Multi-resolution depth network image highlight removing method based on divide-and-conquer
CN104021531A (en) Improved method for enhancing dark environment images on basis of single-scale Retinex
CN105023252A (en) Method and system for enhancement processing of beautified image and shooting terminal
CN111489322A (en) Method and device for adding sky filter to static picture
CN107516302A (en) A kind of method of the mixed image enhancing based on OpenCV
CN105763768A (en) Image processing method, device and system
CN109635809B (en) Super-pixel segmentation method for visual degradation image
Liao et al. Multi-scale mutual feature convolutional neural network for depth image denoise and enhancement
CN103295205A (en) Low-light-level image quick enhancement method and device based on Retinex
CN103929629A (en) Image processing method based on image major colors
CN113450282B (en) Method and system for beautifying image
CN108537852B (en) Self-adaptive color constancy method based on image local contrast

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141105

RJ01 Rejection of invention patent application after publication