CN107563977A - A kind of image processing method, mobile terminal and computer-readable recording medium - Google Patents

A kind of image processing method, mobile terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107563977A
CN107563977A CN201710759335.5A CN201710759335A CN107563977A CN 107563977 A CN107563977 A CN 107563977A CN 201710759335 A CN201710759335 A CN 201710759335A CN 107563977 A CN107563977 A CN 107563977A
Authority
CN
China
Prior art keywords
image
pixel
profile
mobile terminal
graph outline
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
CN201710759335.5A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710759335.5A priority Critical patent/CN107563977A/en
Publication of CN107563977A publication Critical patent/CN107563977A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a kind of image processing method, mobile terminal and computer-readable recording medium, it is related to technical field of image processing.Wherein, methods described includes:Obtain the binary image of original image;Determine each graph outline in the binary image;According to the profile parameters of each graph outline, objective contour is determined from each graph outline;Determine to correspond to the target pixel points of the objective contour position in the original image;Landscaping treatment is carried out to the target pixel points.In embodiments of the present invention, mobile terminal can determine objective contour according to profile parameters, and then the target pixel points to corresponding to objective contour position in original image carry out landscaping treatment, pixel region is manually selected without user, the efficiency of image procossing can be improved, and the degree of accuracy for repairing the flaws such as image miscellaneous spot, better processing effect can be improved.

Description

A kind of image processing method, mobile terminal and computer-readable recording medium
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of image processing method, mobile terminal and computer Readable storage medium storing program for executing.
Background technology
With the fast development of image processing techniques, people can by mobile terminal to taking pictures obtained photo, or The image etc. downloaded from network carries out various processing, such as, people are by network platforms such as the photo uploads of self-timer to circle of friends Before being shared, the pox spots of face in photo can generally be repaired by mobile terminal, then by the photograph after reparation Piece is uploaded to the network platform;For another example, due to photography environment or photographic equipment, it is miscellaneous that some be there may be in some images Spot, people can be removed by mobile terminal to the miscellaneous spot in image, so as to obtain the image of no miscellaneous spot.
In first technology, image can generally be handled by following manner:When mobile terminal is received at image During reason instruction, detection is directed to the selection operation of pixel region in the image;When detecting the choosing for pixel region in the image When selecting operation, the processing indicated by image processing commands is carried out to the pixel in the pixel region and is operated.
Inventor has found during the above-mentioned formerly technology of application, when user is needed to some pixel regions in image When being handled, rather than whole image being handled, such as when the pox spots of face in photo are repaired, user needs Pixel region pending in image is manually selected by the selection operation such as clicking on or sliding, however, when pending When pixel region is smaller, user can be deposited by the pixel region selected by selection operation with actually wanting to the pixel region of processing , therefore, can not be accurately to image when the pixel region that mobile terminal is selected user is handled in certain position deviation The flaws such as miscellaneous spot are repaired, and so as to be unable to reach preferable treatment effect, and then greatly reduce the efficiency of image procossing.
The content of the invention
The present invention provides a kind of image processing method, mobile terminal and computer-readable recording medium, to solve user's hand During dynamic processing image, accurately the flaws such as image miscellaneous spot can not be repaired, so as to cause mobile terminal processing image efficiency low The problem of lower.
First aspect, there is provided a kind of image processing method, applied to mobile terminal, this method includes:
Obtain the binary image of original image;
Determine each graph outline in the binary image;
According to the profile parameters of each graph outline, objective contour is determined from each graph outline;
Determine to correspond to the target pixel points of the objective contour position in the original image;
Landscaping treatment is carried out to the target pixel points.
Second aspect, there is provided a kind of mobile terminal, the mobile terminal include:
Acquisition module, for obtaining the binary image of original image;
First determining module, for determining each graph outline in the binary image;
Second determining module, for the profile parameters according to each graph outline, from each graph outline Determine objective contour;
3rd determining module, for determining to correspond to the target pixel points of the objective contour position in the original image;
Processing module, for carrying out landscaping treatment to the target pixel points.
The third aspect, there is provided a kind of mobile terminal, the mobile terminal include processor, memory and be stored in described deposit On reservoir and the computer program that can run on the processor, realized when the computer program is by the computing device The step of image processing method of the present invention.
Fourth aspect, there is provided a kind of computer-readable recording medium, store on the computer-readable recording medium and calculate Machine program, the step of image processing method of the present invention is realized when computer program is executed by processor.
So, in embodiments of the present invention, mobile terminal can be according to the profile of each graph outline in binary image Parameter determines objective contour, and then the target pixel points to corresponding to objective contour position in original image carry out landscaping treatment, Pixel region is manually selected without user, the time for being chosen over and handling is effectively shortened, improves image procossing Efficiency, and the degree of accuracy for repairing the flaw such as image miscellaneous spot, better processing effect can be improved.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention The accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the present invention Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 shows a kind of flow chart of image processing method in the embodiment of the present invention one;
Fig. 2 shows a kind of flow chart of image processing method in the embodiment of the present invention two;
Fig. 3 shows a kind of structured flowchart of mobile terminal in the embodiment of the present invention three;
Fig. 4 shows a kind of structured flowchart of acquisition module in the embodiment of the present invention three;
Fig. 5 shows a kind of structured flowchart of second determining module in the embodiment of the present invention three;
Fig. 6 shows the structured flowchart of the determining module of another kind second in the embodiment of the present invention three;
Fig. 7 shows a kind of structured flowchart of processing module in the embodiment of the present invention three;
Fig. 8 shows a kind of structured flowchart of mobile terminal in the embodiment of the present invention four;
Fig. 9 shows a kind of structured flowchart of mobile terminal in the embodiment of the present invention five.
Embodiment
The exemplary embodiment of the present invention is more fully described below with reference to accompanying drawings.Although the present invention is shown in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here Limited.Conversely, there is provided these embodiments are to be able to be best understood from the present invention, and can be by the scope of the present invention Completely it is communicated to those skilled in the art.
Embodiment one
Reference picture 1, the flow chart of the image processing method of the embodiment of the present invention one is shown, can specifically include following step Suddenly:
Step 101, the binary image of original image is obtained.
In embodiments of the present invention, it is mobile whole when user triggers image processing function by the operation clicked on or slided End can receive image processing commands, and mobile terminal obtains original image by the either type in following two ways afterwards Binary image, including:
The first acquisition modes:Thresholding processing is carried out to original image, obtains binary image.
Second of acquisition modes:Original image is carried out respectively down-sampling, Fuzzy Processing, absolute difference computing, on adopt Sample, the samplings such as max pixel value, thresholding processing and the processing of noise reduction operation are taken, obtain binary image.
In the binary image of original image, gray value only has two kinds of values, such as, binaryzation corresponding to 8 bit images The gray value of image only has 0 (black) and 255 (pure white), namely in binary image, pixel is non-black i.e. white.
Step 102, each graph outline in binary image is determined.
In embodiments of the present invention, for any pixel point in binary image, if the pixel is white point, and with this The adjacent multiple pixels of pixel are stain, then can determine the pixel that the pixel is graph outline;Or if should Pixel is stain, and the multiple pixels adjacent with the pixel are white point, then it is figure wheel that can determine the pixel Wide pixel.
It should be noted that in figure namely binary image in binary image each element flat shape, than The flat shape of face in such as binary image, the flat shape of cup, the flat shape in house, wherein, Ge Geyuan It can also include representing that sub- flat shape in greater detail, such as the flat shape of cup can include cup in the flat shape of element The sub- flat shape of lid, and sub- flat shape of cup body etc..Accordingly, the graph outline in binary image, that is to say The edge pixel point of the flat shape of each element in binary image.
Step 103, according to the profile parameters of each graph outline, objective contour is determined from each graph outline.
In embodiments of the present invention, profile parameters can include the length-width ratio of contour area and profile boundary rectangle, or Other profile parameters, mobile terminal can filter out the mesh that profile parameters meet certain parameter condition from each graph outline Profile is marked, so as to handle objective contour, and to the graph outline in each graph outline in addition to objective contour Any processing can not be made, or carry out other processing.
Step 104, determine to correspond to the target pixel points of objective contour position in original image.
In embodiments of the present invention, the position of objective contour is determined at the binary image of original image, mobile afterwards whole End in original image, can determine the target pixel points of corresponding objective contour position, that is to say and determine in original image Need the pixel of progress landscaping treatment.
Step 105, landscaping treatment is carried out to target pixel points.
In embodiments of the present invention, for either objective pixel, mobile terminal can determine and the target pixel points phase The pixel value of adjacent pixel, and at least one neighbor pixel for meeting beautification condition is selected from neighbor pixel, so The pixel average of at least one neighbor pixel is determined afterwards, and then the current pixel value of the target pixel points is replaced with this Pixel average, so as to realize the landscaping treatment to target pixel points.
In embodiments of the present invention, mobile terminal can be true according to the profile parameters of each graph outline in binary image Objective contour is made, and then the target pixel points to corresponding to objective contour position in original image carry out landscaping treatment, without use Family manually selects to pixel region, effectively shortens the time for being chosen over and handling, and improves the efficiency of image procossing, And the degree of accuracy for repairing the flaws such as image miscellaneous spot, better processing effect can be improved.
Embodiment two
Reference picture 2, the flow chart of the image processing method of the embodiment of the present invention two is shown, can specifically include following step Suddenly:
Step 201, down-sampling is carried out to original image, obtains the different multiple down-sampled images of size.
In embodiments of the present invention, to the down-sampling of original image, it that is to say and the pixel of original image is extracted, Mobile terminal can be stored the image that each down-sampling obtains, and the image that each down-sampling obtains is carried out down again Sampling, because each down-sampled images are that the extraction of pixel, therefore, warp are carried out on the basis of a upper down-sampled images Cross after multiple down-sampling, the different multiple down-sampled images of size can be obtained.
Specifically, mobile terminal can carry out first time down-sampling by pyramid Downsapling method to original image, its Implementation process can include:Convolution is carried out to the pixel value of each pixel in original image by default Gauss nuclear matrix, Obtain the first convolved image;The even number line or odd-numbered line in the first convolved image are deleted, and is deleted in the first convolved image Even column or odd column, obtain first time down-sampled images.
First time down-sampled images are reduced into the half of original image compared to original image, its length and width, it Afterwards, mobile terminal can carry out down-sampling again to first time down-sampled images, so as to obtain second of down-sampled images, with this Analogize, mobile terminal can obtain the different multiple down-sampled images of size, wherein the length and width of every down-sampled images It is the half of a upper down-sampled images.
It should be noted that mobile terminal can carry out down-sampling by pyramid Downsapling method to original image, when So, in actual applications, mobile terminal can also carry out down-sampling to original image by other method of samplings, and the present invention is implemented Example for original image carry out down-sampling used by the method for sampling be not especially limited.
By carrying out down-sampling to original image, so as to further be located to obtained multiple down-sampled images Reason, because the pixel quantity of down-sampled images is less than the pixel quantity of original image, therefore, mobile terminal is to down-sampling figure As carry out subsequent treatment time, by less than directly to original image carry out subsequent treatment time, so as to improve movement The efficiency of terminal processes image.
For example, original image can be 1440 × 2560 portrait photo, mobile terminal can carry out 4 to the original image Secondary pyramid down-sampling, it can obtain under the first down-sampled images, second that size is 360 × 640 that size is 720 × 1280 Sampled images, the 3rd down-sampled images that size is 180 × 320 and the 4th down-sampled images that size is 90 × 160.
Step 202, Fuzzy Processing is carried out to multiple down-sampled images respectively, obtains multiple blurred pictures.
In embodiments of the present invention, the reasons such as shooting environmental or capture apparatus are typically due to, there may be in image Pixel noise, mobile terminal can carry out Fuzzy Processing to multiple down-sampled images, and that is to say to obscure in down-sampled images Details, so as to effectively remove pixel noise.
Wherein, mobile terminal can carry out Fuzzy Processing by average blur method to any down-sampled images, and it is realized Process can include:For any pixel point in any down-sampled images, it is determined that the multiple pixels adjacent with the pixel Pixel average;The current pixel value of the pixel is replaced with into the pixel average.
It should be noted that for any down-sampled images, mobile terminal is needed it is determined that finishing all pictures in the image Pixel average corresponding to vegetarian refreshments and then the replacement for carrying out pixel value, rather than determine that a pixel average is just replaced One pixel, otherwise, first replace the determination of other pixel averages after the pixel of pixel value can influence so that image The effect of processing is deteriorated.Average is carried out by the pixel average of neighbor pixel to down-sampled images to obscure, so as to go Except pixel noise.
It should be noted that mobile terminal can carry out Fuzzy Processing by average blur method to down-sampled images, when So, in actual applications, mobile terminal other blur methods can also be obscured by Gaussian Blur etc. to down-sampled images Processing, the embodiment of the present invention for down-sampled images carry out Fuzzy Processing used by blur method be not especially limited.
For example, mobile terminal can use average blur method, it is respectively 720 × 1280,360 × 640,180 to size × 320,90 × 160 four down-sampled images carry out Fuzzy Processing, obtain the first blurred picture that size is 720 × 1280, The second blurred picture, the 3rd blurred picture that size is 180 × 320 and the size that size is 360 × 640 are 90 × 160 4th blurred picture.
Step 203, multiple down-sampled images and corresponding blurred picture are carried out with the absolute difference computing of pixel, is obtained Multiple absolute difference images.
In embodiments of the present invention, for any down-sampled images, and corresponding size identical blurred picture, Mobile terminal can be to pixel co-located in the down-sampled images and blurred picture, and the difference for carrying out pixel is absolute It is worth computing, that is to say for two co-located pixels, it is first determined the pixel value of two pixels, then The absolute value of the pixel value is determined, so as to obtain the different absolute difference image of multiple sizes, absolute difference Image can characterize the value differences between down-sampled images and blurred picture.
For example, mobile terminal can respectively to size be 720 × 1280 the first down-sampled images and the first blurred picture, The second down-sampled images and the second blurred picture, the 3rd down-sampled images that size is 720 × 1280 that size is 720 × 1280 With the 4th down-sampled images and the 4th blurred picture that the 3rd blurred picture and size are 720 × 1280, the difference of pixel is carried out It is worth signed magnitude arithmetic(al), obtains the first absolute difference image, the second difference that size is 360 × 640 that size is 720 × 1280 Absolute value images, the 3rd absolute difference image that size is 180 × 320 and the 4th difference that size is 90 × 160 are absolute It is worth image.
Step 204, multiple absolute difference images are up-sampled respectively, obtained more with original image size identical Individual up-sampling image.
In embodiments of the present invention, mobile terminal can up-sample to multiple absolute difference images respectively, namely It is the insertion that respectively multiple absolute difference images are carried out with pixel.Wherein, any absolute difference image adopt The number of sample, should the number of down-sampling corresponding with the absolute difference image be consistent, thereby may be ensured that what is obtained Each up-sampling image is identical with the size of original image.
Specifically, mobile terminal can be carried out for the first time by pyramid top sampling method to any absolute difference image Up-sampling, its implementation process can include:For the often row pixel in absolute difference image, in the top of the row pixel Or the pixel value identical pixel of a line and the row pixel is added in lower section, and for each column in absolute difference image Pixel, in the left of the row pixel or the row of right addition one and the pixel value identical pixel of the row pixel, obtain Interpolation image;Convolution is carried out to the pixel value of each pixel in interpolation image by Gauss nuclear matrix used in down-sampling, Obtain the second convolved image;The pixel value of each pixel in second convolved image is multiplied by 4, so as to approach the pixel of loss Value, obtain up-sampling image for the first time.
Up-sampling image expands as absolute difference figure compared to absolute difference image, its length and width for the first time Twice of picture, afterwards, mobile terminal can up-sample again to first time up-sampling image, so as to obtain being adopted on second Sampled images, by that analogy, mobile terminal can obtain and the multiple up-sampling images of original image size identical.
It should be noted that mobile terminal can carry out adopting by pyramid top sampling method to absolute difference image Sample, certainly, in actual applications, mobile terminal can also carry out adopting by other method of samplings to absolute difference image Sample, the embodiment of the present invention for being up-sampled to absolute difference image used by the method for sampling be not especially limited.
For example, mobile terminal can carry out a pyramid to the first absolute difference image that size is 720 × 1280 Up-sampling, obtain the first up-sampling image that size is 1440 × 2560;To the second absolute difference that size is 360 × 640 Image carries out pyramid twice and up-sampled, and obtains the second up-sampling image that size is 1440 × 2560;To size be 180 × 320 the 3rd absolute difference image carries out pyramid three times and up-sampled, and obtains the 3rd up-sampling that size is 1440 × 2560 Image;And four pyramid up-samplings are carried out to the 4th absolute difference image that size is 90 × 160, obtaining size is 1440 × 2560 the 4th up-sampling image.
Step 205, the pixel maximum of the pixel of same position in multiple up-sampling images is determined.
In embodiments of the present invention, for the pixel of same position in multiple up-sampling images, mobile terminal can be true It is fixed these with position pixel pixel maximum, that is to say can determine it is identical in every group of down-sampled images and blurred picture The value differences of which pixel on position are maximum.
For example, it is 1440 × 2560 the first up-sampling image, the second up-sampling image, the 3rd up-sampling for size Image and the 4th up-sampling image, mobile terminal can determine the pixel of the pixel of same position in this four up-sampling images Maximum.
Step 206, according to the pixel maximum of each position correspondence, maximum image is generated.
In embodiments of the present invention, mobile terminal can generate maximum according to the pixel maximum of each position correspondence Image, in maximum image, the pixel value of each position correspondence pixel is equal to the pixel maximum of the position correspondence.
For example, it is 1440 × 2560 the first up-sampling image, the second up-sampling image, the 3rd up-sampling for size The pixel maximum of each position correspondence determined by image and the 4th up-sampling image, mobile terminal can be according to each position Corresponding pixel maximum, generation maximum image MAX.
Step 207, thresholding processing is carried out to maximum image, obtains binary image.
In embodiments of the present invention, the implementation of this step can include:According to default pixel value and gray value it Between conversion relation, the gray value of each pixel in determining maximum image;Determine gray threshold;For in maximum image Gray value is more than or equal to the pixel of gray threshold, and the pixel value of the pixel replaced with into white pixel value, and for Gray value is less than the pixel of gray threshold in maximum image, and the pixel value of the pixel is replaced with into black pixel value, obtained To binary image.
Wherein, mobile terminal can determine gray threshold by any of following two kinds of determination modes, including:
The first determination mode:Default gray value is defined as gray threshold.
Second of determination mode:Determine the minimum gray value and gray scale maximum of original image;By minimum gray value and ash The average value of degree maximum is defined as gray threshold.
For the first above-mentioned determination mode, gray threshold will not according to the different and different of original image, namely Gray threshold during thresholding processing is unified, so as to save the time of thresholding processing, improves the effect of image procossing Rate.For above-mentioned second of determination mode, original image is different, then gray threshold is also by difference, namely mobile terminal can be right Original image carries out adaptive thresholding processing, so that thresholding processing is better.
It should be noted that mobile terminal can obtain the binary picture of original image by step 201 to step 207 Picture, certainly, in actual applications, mobile terminal directly can also carry out thresholding processing to original image, obtain binary picture Picture, the present invention are not especially limited for the mode of acquisition for mobile terminal binary image.
For example, the conversion relation between default pixel value and gray value can be gray value Gray=R*0.299+G* 0.587+B*0.114, mobile terminal can determine that the pixel minimum of 1440 × 2560 original image is (R=0, G=0, B =0), corresponding minimum gray value is 0, and pixel maximum is (R=240, G=230, B=250), corresponding gray scale maximum For 236, and then the average value 118 that gray threshold is minimum gray value 0 and gray scale maximum 236 is determined, for maximum image Gray value is more than or equal to the pixel of gray threshold 118 in MAX, and the pixel value of the pixel is replaced with into white pixel value (R =255, G=255, B=255), and it is less than the pixel of gray threshold 118 for gray value in maximum image MAX, will The pixel value of the pixel replaces with black pixel value (R=0, G=0, B=0), obtains binary image Image A.
Step 208, each graph outline in binary image is determined.
This step is similar with the implementation process of above-mentioned steps 102, will not be described in detail herein.
It should be noted that in order to eliminate pixel noise, mobile terminal has carried out Fuzzy Processing to down-sampled images, but While eliminating pixel noise, the part details of original image is also eliminated, because Fuzzy Processing is made even on pixel periphery Average, therefore Fuzzy Processing influences less for the pixel value of figure interior pixels point, what is mainly influenceed is graph outline edge Pixel, therefore, in the absolute difference image that mobile terminal is obtained by down-sampled images and blurred picture, pixel value Larger pixel can then characterize the edge details for the graph outline being eliminated after Fuzzy Processing, so as to which mobile terminal can be from Graph outline is determined in the binary image of absolute difference image, it is true compared to directly from the binary image of original image Determine graph outline, determine that the degree of accuracy of graph outline is higher.
For example, for the pixel P in binary image Image A, pixel P is white point, and with pixel P phases Adjacent multiple pixels are stain, then can determine the pixel that pixel P is graph outline;For binary image B In pixel Q, pixel Q is stain, and the multiple pixels adjacent with pixel Q are white point, then can determine Pixel Q is the pixel of graph outline, and the figure wheel in binary image Image A can be determined so as to mobile terminal Exterior feature is GO1, GO2, GO3, GO4 and GO5.
Step 209, according to the profile parameters of each graph outline, objective contour is determined from each graph outline.
In embodiments of the present invention, it is mobile when profile parameters include the length-width ratio of contour area and profile boundary rectangle Terminal can determine that contour area is less than preset area threshold value and the length and width of profile boundary rectangle from each graph outline Than belonging at least one objective contour in default aspect ratio range.
Specifically, mobile terminal can determine that contour area is less than preset area threshold first from each graph outline At least one graph outline of value, then it is less than from contour area at least one graph outline of preset area threshold value, it is determined that Go out at least one objective contour that the length-width ratio of profile boundary rectangle belongs in default aspect ratio range.Certainly, in practical application In, mobile terminal first from each graph outline, can also determine that the length-width ratio of profile boundary rectangle belongs to default length and width At least one graph outline than in the range of, then from the length-width ratio of profile boundary rectangle belong in default aspect ratio range to In a few graph outline, determine that contour area is less than at least one objective contour of preset area threshold value.
Each graph outline is screened by the length-width ratio of contour area and profile boundary rectangle, so as to select Go out to influence image miscellaneous spot attractive in appearance, such as the flaw such as the whelk of portrait face and spot, or due to imaging environment or shooting Equipment causes small miscellaneous spot occurred in whole image etc..
In addition, the flaw of face skin area carries out U.S. face processing in user only needs to portrait image, without When handling the region outside people's face skin, profile parameters can include contour area, the length-width ratio of profile boundary rectangle and profile The contour area surrounded, correspondingly, mobile terminal can also determine that contour area belongs to the colour of skin from each graph outline Pixel region, contour area are less than preset area threshold value and the length-width ratio of profile boundary rectangle belongs in default aspect ratio range At least one objective contour.
Specifically, when the profile that profile parameters are surrounded including contour area, the length-width ratio of profile boundary rectangle and profile During region, mobile terminal can determine objective contour by following manner, including:From original image, out position category is determined Belong to the face skin area of default skin color range in human face region and pixel value;From each graph outline, determine to belong to At least one graph outline of face skin area;It is subordinated at least one graph outline of face skin area, determines Contour area is less than at least one graph outline of preset area threshold value;It is less than at least the one of preset area threshold value from contour area In individual graph outline, at least one target wheel that the length-width ratio of profile boundary rectangle belongs in default aspect ratio range is determined It is wide.
Compared to the mode that objective contour is directly determined according to the length-width ratio of contour area and profile boundary rectangle, upper State in determination mode, mobile terminal also needs to the face skin area in original image, and further graph outline is carried out Screening, so as to select the objective contour that profile parameters meet U.S. face treatment conditions, so as to carry out U.S. face processing when mobile terminal When, U.S. face only can be carried out to the flaw of face skin area, and there is no other influences to the region outside people's face skin, so as to The display effect of speckle removing, acne removing can be reached so that the result of image more conforms to the demand of user.It is further, since mobile Terminal need to only handle face skin area, without handling other regions, therefore can shorten the response time of processing image, from And the efficiency of image procossing can be improved.
In addition, in the mode of above-mentioned determination objective contour, only determine to belong to face skin region first with mobile terminal The profile in domain, then on the basis of the profile of face skin area is belonged to, determine that contour area is more than preset area threshold value Profile, and then on the basis of contour area is more than the profile of preset area threshold value, determine the length and width of profile boundary rectangle Illustrated exemplified by execution sequence than belonging to the objective contour in default aspect ratio range, the execution sequence is not to the present invention Form and limit, in actual applications, the determination order of profile parameters can be different, so as to which mobile terminal can be according to upper one On the basis of the profile that profile parameters filter out, profile is screened according further to other profile parameters.
Furthermore mobile terminal directly can determine area of skin color by skin pixel scope, certainly, in practical application In, mobile terminal can also determine human face region first by face recognition technology, determine again in human face region afterwards Area of skin color, so as to exclude the non-skin region in face, and then target wheel is determined by area of skin color and profile parameters again Exterior feature, it can further improve the degree of accuracy for determining pending area.
For example, profile parameters can include the profile that contour area, the length-width ratio of profile boundary rectangle and profile are surrounded Region, preset area threshold value can be 45 pixels, and default aspect ratio range can be [0.8,1.2], and default skin color range can Think R ∈ [205,255], G ∈ [175,250], B ∈ [149,240], mobile terminal can determine position from original image Put and belong to human face region and pixel value belongs to default skin color range R ∈ [205,255], G ∈ [175,250], B ∈ [149,240] Face skin area, then from graph outline GO1, GO2, GO3, GO4 and GO5, determine that contour area belongs to people's face The graph outline in skin region is GO1, GO2, GO3 and GO5, afterwards from graph outline GO1, GO2, GO3 and GO5, determines to take turns Profile surface product is less than graph outline GO1, GO2, GO3 and GO5 of 45 pixels of preset area threshold value, and then is less than in advance from contour area If in graph outline GO1, GO2, GO3 and GO5 of area threshold, determine that the length-width ratio of profile boundary rectangle belongs to default length and width Than objective contour GO1, GO3 and GO5 in scope [0.8,1.2].
Step 210, determine to correspond to the target pixel points of objective contour position in original image.
In embodiments of the present invention, can be original after mobile terminal determines objective contour in binary image The target pixel points of corresponding objective contour position are determined in image, that is to say and determine to need to carry out at beautification in original image The pixel of reason.
For example, the objective contour in binary image Image A can be GO1, GO3 and GO5, mobile terminal can be from In 1440 × 2560 original image, r target pixel points for determining corresponding objective contour GO1 are { a1, a2, a3... ..., ar, s target pixel points for determining corresponding objective contour GO3 are { b1, b2, b3... ..., bs, determine corresponding objective contour GO5 t target pixel points are { c1, c2, c3... ..., ct}。
Step 211, landscaping treatment is carried out to target pixel points.
In embodiments of the present invention, mobile terminal can be by least one of following two kinds of processing modes to target picture Vegetarian refreshments carries out landscaping treatment, including:
The first processing mode:Determine the pixel average of the neighbor pixel of target pixel points;Target pixel points are worked as Preceding pixel value replaces with pixel average.
In the first above-mentioned processing mode, because the target pixel points inside human face region are generally also the colour of skin, therefore, Mobile terminal directly by the current pixel value of target pixel points, can replace with the pixel average of all neighbor pixels, from And the landscaping treatment to the target pixel points inside human face region can be realized, therefore the first above-mentioned processing mode is especially suitable Target pixel points inside human face region.
Second of processing mode:From the neighbor pixel of target pixel points, selected pixels value belongs to default skin color range At least one neighbor pixel;It is determined that the pixel average at least one neighbor pixel chosen;Target pixel points are worked as Preceding pixel value replaces with pixel average.
In above-mentioned second of processing mode, because the usual side of the target pixel points at human face region edge is skin region Domain, opposite side are probably the region outside the skins such as hair, and therefore, mobile terminal can be selected first belongs to default colour of skin model The neighbor pixel enclosed, then by the current pixel value of target pixel points, the pixel for replacing with the neighbor pixel selected is put down Average, rather than the pixel average of all neighbor pixels is replaced with, therefore above-mentioned second of processing mode is particularly suitable for use in The target pixel points at human face region edge.
For above-mentioned second of processing mode, the current pixel value of target pixel points can be replaced with skin by mobile terminal The pixel average of the neighbor pixel of color range, so as to during image U.S. face is realized, can further optimize U.S. face Effect, and multiple landscaping treatment is carried out manually without user, so as to greatly improve the efficiency of landscaping treatment.
It should be noted that in actual applications, mobile terminal can combine above two processing mode to object pixel Point carries out landscaping treatment, for example use the first processing mode for human face region inside, and the is used for human face region edge Two kinds of processing modes, certainly, because independent a kind of mode in above two mode can also reach landscaping effect, thus it is mobile Terminal can also be carried out at beautification by any of above two mode, or the combination of two ways to target pixel points Reason, the embodiment of the present invention are not especially limited to this.
For example, the target pixel points a for objective contour GO11, mobile terminal can be from target pixel points a18 it is adjacent Pixel { a11, a12, a13, a14, a15, a16, a17, a18In, select pixel value belong to default skin color range R ∈ [205, 255], G ∈ [175,250], B ∈ [149,240] neighbor pixel { a13, a14, a15, a16, it then can determine what is selected Neighbor pixel { a13, a14, a15, a16Pixel average be (R=238, G=223, B=204), and then can be by target picture Vegetarian refreshments a1Current pixel value (R=139, G=137, B=137) replaces with pixel average (R=238, G=223, B= 204)。
In embodiments of the present invention, mobile terminal can be true according to the profile parameters of each graph outline in binary image Objective contour is made, and then the target pixel points to corresponding to objective contour position in original image carry out landscaping treatment, without use Family manually selects to pixel region, effectively shortens the time for being chosen over and handling, and improves the efficiency of image procossing, And the degree of accuracy for repairing the flaws such as image miscellaneous spot, better processing effect can be improved.
Embodiment three
Reference picture 3, a kind of structured flowchart of mobile terminal 300 of the embodiment of the present invention three is shown, can specifically be included:
Acquisition module 301, for obtaining the binary image of original image;
First determining module 302, for determining each graph outline in the binary image;
Second determining module 303, for the profile parameters according to each graph outline, from each graph outline In determine objective contour;
3rd determining module 304, for determining to correspond to the object pixel of the objective contour position in the original image Point;
Processing module 305, for carrying out landscaping treatment to the target pixel points.
Alternatively, reference picture 4, the acquisition module 301 include:
Down-sampling submodule 3011, for carrying out down-sampling to original image, obtain the different multiple down-sampling figures of size Picture;
Fuzzy submodule 3012, for carrying out Fuzzy Processing to the multiple down-sampled images respectively, obtain multiple fuzzy Image;
Computing submodule 3013, for the multiple down-sampled images and corresponding blurred picture to be carried out with the difference of pixel Signed magnitude arithmetic(al), obtain multiple absolute difference images;
Submodule 3014 is up-sampled, for being up-sampled respectively to the multiple absolute difference image, is obtained and institute State the multiple up-sampling images of original image size identical;
First determination sub-module 3015, for determining the pixel of the pixel of same position in the multiple up-sampling image Maximum;
Submodule 3016 is generated, for the pixel maximum according to each position correspondence, generates maximum image;
Thresholding submodule 3017, for carrying out thresholding processing to the maximum image, obtain binary image.
Alternatively, the profile parameters include the length-width ratio of contour area and profile boundary rectangle;
Correspondingly, reference picture 5, second determining module 303 include:
Second determination sub-module 3031, for from each graph outline, determining that contour area is less than default face At least one objective contour that product threshold value and the length-width ratio of profile boundary rectangle belong in default aspect ratio range.
Alternatively, the profile parameters include the wheel that contour area, the length-width ratio of profile boundary rectangle and profile are surrounded Wide region;
Correspondingly, reference picture 6, second determining module 303 include:
3rd determination sub-module 3032, for from each graph outline, determining that contour area belongs to colour of skin picture Plain region, contour area are less than preset area threshold value and the length-width ratio of profile boundary rectangle belongs in default aspect ratio range At least one objective contour.
Alternatively, reference picture 7, the processing module 305 include:
Submodule 3051 is selected, for from the neighbor pixel of the target pixel points, selected pixels value to belong to default At least one neighbor pixel of skin color range;
4th determination sub-module 3052, for the pixel average at least one neighbor pixel for determining to choose;
Submodule 3053 is replaced, for the current pixel value of the target pixel points to be replaced with into the pixel average.
In embodiments of the present invention, mobile terminal can be true according to the profile parameters of each graph outline in binary image Objective contour is made, and then the target pixel points to corresponding to objective contour position in original image carry out landscaping treatment, without use Family manually selects to pixel region, effectively shortens the time for being chosen over and handling, and improves the efficiency of image procossing, And the degree of accuracy for repairing the flaws such as image miscellaneous spot, better processing effect can be improved.
Example IV
Fig. 8 is the block diagram of the mobile terminal of another embodiment of the present invention.Mobile terminal 500 shown in Fig. 8 includes:At least One processor 501, memory 502, at least one network interface 504 and user interface 503.It is each in mobile terminal 500 Component is coupled by bus system 505.It is understood that bus system 505 is used to realize that the connection between these components is led to Letter.Bus system 505 is in addition to including data/address bus, in addition to power bus, controlling bus and status signal bus in addition.But it is For the sake of clear explanation, in fig. 8 various buses are all designated as bus system 505.
Wherein, user interface 503 can include display, keyboard or pointing device (for example, mouse, trace ball (trackball), touch-sensitive plate or flexible screen etc..
It is appreciated that the memory 502 in the embodiment of the present invention can be volatile memory or nonvolatile memory, Or it may include both volatibility and nonvolatile memory.Wherein, nonvolatile memory can be read-only storage (Read- Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), the read-only storage of erasable programmable Device (Erasable PROM, EPROM), Electrically Erasable Read Only Memory (Electrically EPROM, EEPROM) or Flash memory.Volatile memory can be random access memory (Random Access Memory, RAM), and it is used as outside high Speed caching.By exemplary but be not restricted explanation, the RAM of many forms can use, such as static RAM (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), double data speed synchronous dynamic RAM (Double Data Rate SDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronized links Dynamic random access memory (Synchlink DRAM, SLDRAM) and direct rambus random access memory (Direct Rambus RAM, DRRAM).The embodiment of the present invention description system and method memory 502 be intended to including but not limited to these With the memory of any other suitable type.
In some embodiments, memory 502 stores following element, can perform module or data structure, or Their subset of person, or their superset:Operating system 5021 and application program 5022.
Wherein, operating system 5021, comprising various system programs, such as ccf layer, core library layer, driving layer etc., it is used for Realize various basic businesses and the hardware based task of processing.Application program 5022, include various application programs, such as media Player (Media Player), browser (Browser) etc., for realizing various applied business.Realize the embodiment of the present invention The program of method may be embodied in application program 5022.
In embodiments of the present invention, by calling program or the instruction of the storage of memory 502, specifically, can be application The program stored in program 5022 or instruction, processor 501 are used for the binary image for obtaining original image;Determine the two-value Change each graph outline in image;It is true from each graph outline according to the profile parameters of each graph outline Make objective contour;Determine to correspond to the target pixel points of the objective contour position in the original image;To the target picture Vegetarian refreshments carries out landscaping treatment.
The method that the embodiments of the present invention disclose can apply in processor 501, or be realized by processor 501. Processor 501 is probably a kind of IC chip, has the disposal ability of signal.In implementation process, the above method it is each Step can be completed by the integrated logic circuit of the hardware in processor 501 or the instruction of software form.Above-mentioned processing Device 501 can be general processor, digital signal processor (Digital Signal Processor, DSP), special integrated electricity Road (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field Programmable Gate Array, FPGA) either other PLDs, discrete gate or transistor logic, Discrete hardware components.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general Processor can be microprocessor or the processor can also be any conventional processor etc..With reference to institute of the embodiment of the present invention The step of disclosed method, can be embodied directly in hardware decoding processor and perform completion, or with the hardware in decoding processor And software module combination performs completion.Software module can be located at random access memory, flash memory, read-only storage, may be programmed read-only In the ripe storage medium in this area such as memory or electrically erasable programmable memory, register.The storage medium is located at Memory 502, processor 501 read the information in memory 502, with reference to the step of its hardware completion above method.
It is understood that the embodiment of the present invention description these embodiments can use hardware, software, firmware, middleware, Microcode or its combination are realized.Realized for hardware, processing unit can be realized in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general place Manage in device, controller, microcontroller, microprocessor, other electronic units for performing herein described function or its combination.
For software realize, can by perform the module (such as process, function etc.) of function described in the embodiment of the present invention come Realize the technology described in the embodiment of the present invention.Software code is storable in memory and passes through computing device.Memory can To realize within a processor or outside processor.
Alternatively, the processor 501 is additionally operable to when obtaining the binary image of original image:Original image is entered Row down-sampling, obtain the different multiple down-sampled images of size;Fuzzy Processing is carried out to the multiple down-sampled images respectively, obtained To multiple blurred pictures;The multiple down-sampled images and corresponding blurred picture are carried out with the absolute difference computing of pixel, Obtain multiple absolute difference images;The multiple absolute difference image is up-sampled respectively, obtain with it is described original The multiple up-sampling images of picture size identical;Determine the pixel of the pixel of same position in the multiple up-sampling image most Big value;According to the pixel maximum of each position correspondence, maximum image is generated;The maximum image is carried out at thresholding Reason, obtains binary image.
Alternatively, the profile parameters include the length-width ratio of contour area and profile boundary rectangle, correspondingly, the processing Device 501 is in the profile parameters according to each graph outline, when determining objective contour from each graph outline, also For:From each graph outline, determine that contour area is less than preset area threshold value and the length and width of profile boundary rectangle Than belonging at least one objective contour in default aspect ratio range.
Alternatively, the profile parameters include the wheel that contour area, the length-width ratio of profile boundary rectangle and profile are surrounded Wide region, correspondingly, the processor 501 is in the profile parameters according to each graph outline, from each figure wheel When objective contour is determined in exterior feature, it is additionally operable to:From each graph outline, determine that contour area belongs to face skin region Domain, contour area are less than preset area threshold value and the length-width ratio of profile boundary rectangle belongs in default aspect ratio range at least One objective contour.
Alternatively, the processor 501 is additionally operable to when carrying out landscaping treatment to the target pixel points:From the mesh In the neighbor pixel for marking pixel, selected pixels value belongs at least one neighbor pixel of default skin color range;It is determined that choosing The pixel average of at least one neighbor pixel taken;The current pixel value of the target pixel points is replaced with into the pixel Average value.
Mobile terminal 500 can realize each process that mobile terminal is realized in previous embodiment, to avoid repeating, here Repeat no more.In the embodiment of the present invention, mobile terminal 500 can be according to the profile parameters of each graph outline in binary image Objective contour is determined, and then the target pixel points to corresponding to objective contour position in original image carry out landscaping treatment, without User manually selects to pixel region, effectively shortens the time for being chosen over and handling, and improves the effect of image procossing Rate, and the degree of accuracy for repairing the flaws such as image miscellaneous spot, better processing effect can be improved.
Embodiment five
Fig. 9 is the structural representation of the mobile terminal of another embodiment of the present invention.Specifically, the mobile terminal in Fig. 9 600 can be mobile phone, tablet personal computer, personal digital assistant (Personal Digital Assistant, PDA) or vehicle mounted electric Brain etc..
Mobile terminal 600 in Fig. 9 includes radio frequency (Radio Frequency, RF) circuit 610, memory 620, input Unit 630, display unit 640, processor 660, voicefrequency circuit 670, WLAN (Wireless Fidelity) module 680 and power supply 690.
Wherein, input block 630 can be used for the numeral or character information for receiving user's input, and generation and mobile terminal The signal input that 600 user is set and function control is relevant.Specifically, in the embodiment of the present invention, the input block 630 can With including contact panel 631.Contact panel 631, collecting touch operation of the user on or near it, (for example user uses hand The operation of any suitable object such as finger, stylus or annex on contact panel 631), and driven according to formula set in advance Corresponding attachment means.Optionally, contact panel 631 may include both touch detecting apparatus and touch controller.Wherein, Touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation is brought, and transmits a signal to touch control Device;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives the processor 660, and the order sent of reception processing device 660 and can be performed.Furthermore, it is possible to use resistance-type, condenser type, infrared ray with And the polytype such as surface acoustic wave realizes contact panel 631.Except contact panel 631, input block 630 can also include other Input equipment 632, other input equipments 632 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, the one or more in action bars etc..
Wherein, display unit 640 can be used for display by the information of user's input or be supplied to information and the movement of user The various menu interfaces of terminal 600.Display unit 640 may include display panel 641, optionally, can use LCD or organic hairs The forms such as optical diode (Organic Light-Emitting Diode, OLED) configure display panel 641.
It should be noted that contact panel 631 can cover display panel 641, touch display screen is formed, when the touch display screen is examined After measuring the touch operation on or near it, processor 660 is sent to determine the type of touch event, is followed by subsequent processing device 660 provide corresponding visual output according to the type of touch event in touch display screen.
Touch display screen includes Application Program Interface viewing area and conventional control viewing area.The Application Program Interface viewing area And arrangement mode of the conventional control viewing area does not limit, can be arranged above and below, left-right situs etc. can distinguish two it is aobvious Show the arrangement mode in area.The Application Program Interface viewing area is displayed for the interface of application program.Each interface can be with The interface element such as the icon comprising at least one application program and/or widget desktop controls.The Application Program Interface viewing area It can also be the empty interface not comprising any content.The conventional control viewing area is used to show the higher control of utilization rate, for example, Application icons such as settings button, interface numbering, scroll bar, phone directory icon etc..
Wherein processor 660 is the control centre of mobile terminal 600, utilizes various interfaces and connection whole mobile phone Various pieces, by running or performing the software program and/or module that are stored in first memory 621, and call storage Data in second memory 622, the various functions and processing data of mobile terminal 600 are performed, so as to mobile terminal 600 Carry out integral monitoring.Optionally, processor 660 may include one or more processing units.
In embodiments of the present invention, by call store the first memory 621 in software program and/or module and/ Or the data in the second memory 622, processor 660 are used for the binary image for obtaining original image;Determine the two-value Change each graph outline in image;It is true from each graph outline according to the profile parameters of each graph outline Make objective contour;Determine to correspond to the target pixel points of the objective contour position in the original image;To the target picture Vegetarian refreshments carries out landscaping treatment.
Alternatively, the processor 660 is additionally operable to when obtaining the binary image of original image:Original image is entered Row down-sampling, obtain the different multiple down-sampled images of size;Fuzzy Processing is carried out to the multiple down-sampled images respectively, obtained To multiple blurred pictures;The multiple down-sampled images and corresponding blurred picture are carried out with the absolute difference computing of pixel, Obtain multiple absolute difference images;The multiple absolute difference image is up-sampled respectively, obtain with it is described original The multiple up-sampling images of picture size identical;Determine the pixel of the pixel of same position in the multiple up-sampling image most Big value;According to the pixel maximum of each position correspondence, maximum image is generated;The maximum image is carried out at thresholding Reason, obtains binary image.
Alternatively, the profile parameters include the length-width ratio of contour area and profile boundary rectangle, correspondingly, the processing Device 660 is in the profile parameters according to each graph outline, when determining objective contour from each graph outline, also For:From each graph outline, determine that contour area is less than preset area threshold value and the length and width of profile boundary rectangle Than belonging at least one objective contour in default aspect ratio range.
Alternatively, the profile parameters include the wheel that contour area, the length-width ratio of profile boundary rectangle and profile are surrounded Wide region, correspondingly, the processor 660 is in the profile parameters according to each graph outline, from each figure wheel When objective contour is determined in exterior feature, it is additionally operable to:From each graph outline, determine that contour area belongs to face skin region Domain, contour area are less than preset area threshold value and the length-width ratio of profile boundary rectangle belongs in default aspect ratio range at least One objective contour.
Alternatively, the processor 660 is additionally operable to when carrying out landscaping treatment to the target pixel points:From the mesh In the neighbor pixel for marking pixel, selected pixels value belongs at least one neighbor pixel of default skin color range;It is determined that choosing The pixel average of at least one neighbor pixel taken;The current pixel value of the target pixel points is replaced with into the pixel Average value.
It can be seen that in the embodiment of the present invention, mobile terminal 600 can be according to the profile of each graph outline in binary image Parameter determines objective contour, and then the target pixel points to corresponding to objective contour position in original image carry out landscaping treatment, Pixel region is manually selected without user, the time for being chosen over and handling is effectively shortened, improves image procossing Efficiency, and the degree of accuracy for repairing the flaw such as image miscellaneous spot, better processing effect can be improved.
For said apparatus embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, The relevent part can refer to the partial explaination of embodiments of method.
Embodiment six
Preferably, the embodiment of the present invention also provides a kind of mobile terminal, including processor, memory, is stored in memory Computer program that is upper and can running on the processor, the computer program are realized when being executed by processor at above-mentioned image Each process of embodiment of the method is managed, and identical technique effect can be reached, to avoid repeating, is repeated no more here.
Embodiment seven
The embodiment of the present invention also provides a kind of computer-readable recording medium, and meter is stored with computer-readable recording medium Calculation machine program, the computer program realize each process of above-mentioned image processing method embodiment, and energy when being executed by processor Reach identical technique effect, to avoid repeating, repeat no more here.Wherein, described computer-readable recording medium, such as only Read memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic disc or CD etc..
Each embodiment in this specification is described by the way of progressive, what each embodiment stressed be with The difference of other embodiment, between each embodiment identical similar part mutually referring to.
It would have readily occurred to a person skilled in the art that be:Any combination application of above-mentioned each embodiment is all feasible, therefore Any combination between above-mentioned each embodiment is all embodiment of the present invention, but this specification exists as space is limited, This is not just detailed one by one.
Provided herein image processing method not with the intrinsic phase of any certain computer, virtual system or miscellaneous equipment Close.Various general-purpose systems can also be used together with teaching based on this.As described above, construction has present invention side Structure required by the system of case is obvious.In addition, the present invention is not also directed to any certain programmed language.Should be bright In vain, various programming languages can be utilized to realize the content of invention described herein, and that is done above to language-specific retouches State is to disclose the preferred forms of the present invention.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the present invention and help to understand one or more of each inventive aspect, Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as right As claim reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows tool Thus claims of body embodiment are expressly incorporated in the embodiment, wherein the conduct of each claim in itself The separate embodiments of the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any Mode it can use in any combination.
The all parts embodiment of the present invention can be realized with hardware, or to be run on one or more processor Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice Microprocessor or digital signal processor (DSP) come realize in image processing method according to embodiments of the present invention some or The some or all functions of person's whole part.The present invention is also implemented as perform method as described herein one Divide either whole equipment or program of device (for example, computer program and computer program product).It is such to realize this hair Bright program can store on a computer-readable medium, or can have the form of one or more signal.It is such Signal can be downloaded from internet website and obtained, and either provided on carrier signal or provided in the form of any other.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.

Claims (12)

1. a kind of image processing method, applied to mobile terminal, it is characterised in that methods described includes:
Obtain the binary image of original image;
Determine each graph outline in the binary image;
According to the profile parameters of each graph outline, objective contour is determined from each graph outline;
Determine to correspond to the target pixel points of the objective contour position in the original image;
Landscaping treatment is carried out to the target pixel points.
2. according to the method for claim 1, it is characterised in that the binary image for obtaining original image, including:
Down-sampling is carried out to original image, obtains the different multiple down-sampled images of size;
Fuzzy Processing is carried out to the multiple down-sampled images respectively, obtains multiple blurred pictures;
The multiple down-sampled images and corresponding blurred picture are carried out with the absolute difference computing of pixel, obtains multiple differences Absolute value images;
The multiple absolute difference image is up-sampled respectively, obtain with the original image size identical it is multiple on Sampled images;
Determine the pixel maximum of the pixel of same position in the multiple up-sampling image;
According to the pixel maximum of each position correspondence, maximum image is generated;
Thresholding processing is carried out to the maximum image, obtains binary image.
3. according to the method for claim 1, it is characterised in that the profile parameters include contour area and the external square of profile The length-width ratio of shape;
Correspondingly, the profile parameters according to each graph outline, target is determined from each graph outline Profile, including:
From each graph outline, determine that contour area is less than preset area threshold value and the length and width of profile boundary rectangle Than belonging at least one objective contour in default aspect ratio range.
4. according to the method for claim 1, it is characterised in that the profile parameters include contour area, the external square of profile The contour area that the length-width ratio and profile of shape are surrounded;
Correspondingly, the profile parameters according to each graph outline, target is determined from each graph outline Profile, including:
From each graph outline, determine that contour area belongs to face skin area, contour area is less than preset area At least one objective contour that threshold value and the length-width ratio of profile boundary rectangle belong in default aspect ratio range.
5. according to the method for claim 1, it is characterised in that described that the target pixel points are carried out with landscaping treatment, bag Include:
From the neighbor pixel of the target pixel points, selected pixels value belongs at least one adjacent picture of default skin color range Vegetarian refreshments;
It is determined that the pixel average at least one neighbor pixel chosen;
The current pixel value of the target pixel points is replaced with into the pixel average.
6. a kind of mobile terminal, it is characterised in that the mobile terminal includes:
Acquisition module, for obtaining the binary image of original image;
First determining module, for determining each graph outline in the binary image;
Second determining module, for the profile parameters according to each graph outline, determined from each graph outline Go out objective contour;
3rd determining module, for determining to correspond to the target pixel points of the objective contour position in the original image;
Processing module, for carrying out landscaping treatment to the target pixel points.
7. mobile terminal according to claim 6, it is characterised in that the acquisition module includes:
Down-sampling submodule, for carrying out down-sampling to original image, obtain the different multiple down-sampled images of size;
Fuzzy submodule, for carrying out Fuzzy Processing to the multiple down-sampled images respectively, obtain multiple blurred pictures;
Computing submodule, the absolute difference for the multiple down-sampled images and corresponding blurred picture to be carried out with pixel are transported Calculate, obtain multiple absolute difference images;
Submodule is up-sampled, for being up-sampled respectively to the multiple absolute difference image, is obtained and the original graph As the multiple up-sampling images of size identical;
First determination sub-module, for determining the pixel maximum of the pixel of same position in the multiple up-sampling image;
Submodule is generated, for the pixel maximum according to each position correspondence, generates maximum image;
Thresholding submodule, for carrying out thresholding processing to the maximum image, obtain binary image.
8. mobile terminal according to claim 6, it is characterised in that the profile parameters are included outside contour area and profile Connect the length-width ratio of rectangle;
Correspondingly, second determining module includes:
Second determination sub-module, for from each graph outline, determine contour area be less than preset area threshold value and At least one objective contour that the length-width ratio of profile boundary rectangle belongs in default aspect ratio range.
9. according to the method for claim 6, it is characterised in that the profile parameters include contour area, the external square of profile The contour area that the length-width ratio and profile of shape are surrounded;
Correspondingly, second determining module includes:
3rd determination sub-module, for from each graph outline, determining that contour area belongs to skin pixel region, wheel Profile surface product is less than at least one mesh that the length-width ratio of preset area threshold value and profile boundary rectangle belongs in default aspect ratio range Mark profile.
10. mobile terminal according to claim 6, it is characterised in that the processing module includes:
Submodule is selected, for from the neighbor pixel of the target pixel points, selected pixels value to belong to default skin color range At least one neighbor pixel;
4th determination sub-module, for the pixel average at least one neighbor pixel for determining to choose;
Submodule is replaced, for the current pixel value of the target pixel points to be replaced with into the pixel average.
11. a kind of mobile terminal, it is characterised in that including processor, memory and be stored on the memory and can be in institute The computer program run on processor is stated, the computer program is realized such as claim 1 to 5 during the computing device Any one of image processing method the step of.
12. a kind of computer-readable recording medium, it is characterised in that computer journey is stored on the computer-readable recording medium Sequence, the image processing method as any one of claim 1 to 5 is realized when the computer program is executed by processor Step.
CN201710759335.5A 2017-08-28 2017-08-28 A kind of image processing method, mobile terminal and computer-readable recording medium Pending CN107563977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710759335.5A CN107563977A (en) 2017-08-28 2017-08-28 A kind of image processing method, mobile terminal and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710759335.5A CN107563977A (en) 2017-08-28 2017-08-28 A kind of image processing method, mobile terminal and computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN107563977A true CN107563977A (en) 2018-01-09

Family

ID=60977588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710759335.5A Pending CN107563977A (en) 2017-08-28 2017-08-28 A kind of image processing method, mobile terminal and computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN107563977A (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989604A (en) * 2018-07-20 2018-12-11 京东方科技集团股份有限公司 Image encryption method, image transfer method, electronic equipment, readable storage medium storing program for executing
CN109325924A (en) * 2018-09-20 2019-02-12 广州酷狗计算机科技有限公司 Image processing method, device, terminal and storage medium
CN109493293A (en) * 2018-10-30 2019-03-19 京东方科技集团股份有限公司 A kind of image processing method and device, display equipment
CN110148147A (en) * 2018-11-07 2019-08-20 腾讯大地通途(北京)科技有限公司 Image detecting method, device, storage medium and electronic device
CN110276742A (en) * 2019-05-07 2019-09-24 平安科技(深圳)有限公司 Tail light for train monitoring method, device, terminal and storage medium
CN110298858A (en) * 2019-07-01 2019-10-01 北京奇艺世纪科技有限公司 A kind of image cropping method and device
CN110855897A (en) * 2019-12-20 2020-02-28 维沃移动通信有限公司 Image shooting method and device, electronic equipment and storage medium
CN111292262A (en) * 2020-01-19 2020-06-16 腾讯科技(深圳)有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111353946A (en) * 2018-12-21 2020-06-30 腾讯科技(深圳)有限公司 Image restoration method, device, equipment and storage medium
CN111767924A (en) * 2020-07-03 2020-10-13 杭州睿琪软件有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111899237A (en) * 2020-07-27 2020-11-06 长沙大端信息科技有限公司 Scale precision measuring method, scale precision measuring device, computer equipment and storage medium
CN112070708A (en) * 2020-08-21 2020-12-11 杭州睿琪软件有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN112529793A (en) * 2020-11-25 2021-03-19 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN112581359A (en) * 2020-12-23 2021-03-30 Oppo(重庆)智能科技有限公司 Image processing method, device, terminal and storage medium
CN112686131A (en) * 2020-12-28 2021-04-20 中国平安人寿保险股份有限公司 Image processing method, device, equipment and storage medium
CN112750162A (en) * 2020-12-29 2021-05-04 北京电子工程总体研究所 Target identification positioning method and device
CN113096022A (en) * 2019-12-23 2021-07-09 RealMe重庆移动通信有限公司 Image blurring processing method and device, storage medium and electronic equipment
CN113129210A (en) * 2021-04-27 2021-07-16 维沃移动通信有限公司 Image processing method, image processing device and electronic equipment
CN113256785A (en) * 2021-05-31 2021-08-13 北京字跳网络技术有限公司 Image processing method, apparatus, device and medium
CN114596314A (en) * 2022-05-09 2022-06-07 合肥联亚制衣有限公司 Training method, device, equipment and medium for cloth flaw detection model
WO2023108444A1 (en) * 2021-12-14 2023-06-22 深圳传音控股股份有限公司 Image processing method, intelligent terminal, and storage medium
CN117058014A (en) * 2023-07-14 2023-11-14 北京透彻未来科技有限公司 LAB color space matching-based dyeing normalization system and method

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050069219A1 (en) * 2003-09-29 2005-03-31 Shang-Yun Wu Method of processing red eye in digital images
CN101299267A (en) * 2008-07-02 2008-11-05 北京中星微电子有限公司 Method and device for processing human face image
CN102163284A (en) * 2011-04-11 2011-08-24 西安电子科技大学 Chinese environment-oriented complex scene text positioning method
CN102243736A (en) * 2011-04-28 2011-11-16 大连亿创天地科技发展有限公司 Health management system based on Internet and video electronic medical record
CN102353680A (en) * 2011-07-08 2012-02-15 中国科学院宁波材料技术与工程研究所 Method for evaluating surface detects of small-sized workpieces and flow for detecting unqualified workpieces
CN103268475A (en) * 2013-05-10 2013-08-28 中科创达软件股份有限公司 Skin beautifying method based on face and skin color detection
CN103957397A (en) * 2014-04-02 2014-07-30 宁波大学 Method for achieving up-sampling of low-resolution depth image based on image features
CN104318603A (en) * 2014-09-12 2015-01-28 上海明穆电子科技有限公司 Method and system for generating 3D model by calling picture from mobile phone photo album
CN104899410A (en) * 2015-03-09 2015-09-09 中国人民解放军第四军医大学 Clinical pharmacist informatization interaction system based on IOS
CN105447854A (en) * 2015-11-12 2016-03-30 程涛 Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system
CN105844649A (en) * 2016-04-12 2016-08-10 中国科学院长春光学精密机械与物理研究所 Statistical method, apparatus and system for the quantity of people
CN106447627A (en) * 2016-09-08 2017-02-22 阔地教育科技有限公司 Image processing method and apparatus
CN106454349A (en) * 2016-10-18 2017-02-22 哈尔滨工业大学 Motion estimation block matching method based on H.265 video coding

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050069219A1 (en) * 2003-09-29 2005-03-31 Shang-Yun Wu Method of processing red eye in digital images
CN101299267A (en) * 2008-07-02 2008-11-05 北京中星微电子有限公司 Method and device for processing human face image
CN102163284A (en) * 2011-04-11 2011-08-24 西安电子科技大学 Chinese environment-oriented complex scene text positioning method
CN102243736A (en) * 2011-04-28 2011-11-16 大连亿创天地科技发展有限公司 Health management system based on Internet and video electronic medical record
CN102353680A (en) * 2011-07-08 2012-02-15 中国科学院宁波材料技术与工程研究所 Method for evaluating surface detects of small-sized workpieces and flow for detecting unqualified workpieces
CN103268475A (en) * 2013-05-10 2013-08-28 中科创达软件股份有限公司 Skin beautifying method based on face and skin color detection
CN103957397A (en) * 2014-04-02 2014-07-30 宁波大学 Method for achieving up-sampling of low-resolution depth image based on image features
CN104318603A (en) * 2014-09-12 2015-01-28 上海明穆电子科技有限公司 Method and system for generating 3D model by calling picture from mobile phone photo album
CN104899410A (en) * 2015-03-09 2015-09-09 中国人民解放军第四军医大学 Clinical pharmacist informatization interaction system based on IOS
CN105447854A (en) * 2015-11-12 2016-03-30 程涛 Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system
CN105844649A (en) * 2016-04-12 2016-08-10 中国科学院长春光学精密机械与物理研究所 Statistical method, apparatus and system for the quantity of people
CN106447627A (en) * 2016-09-08 2017-02-22 阔地教育科技有限公司 Image processing method and apparatus
CN106454349A (en) * 2016-10-18 2017-02-22 哈尔滨工业大学 Motion estimation block matching method based on H.265 video coding

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989604B (en) * 2018-07-20 2020-05-05 京东方科技集团股份有限公司 Image encryption method, image transmission method, electronic device and readable storage medium
US11140138B2 (en) 2018-07-20 2021-10-05 Boe Technology Group Co., Ltd. Method for encrypting an image, method for transmitting an image, electronic device and computer readable storage medium
CN108989604A (en) * 2018-07-20 2018-12-11 京东方科技集团股份有限公司 Image encryption method, image transfer method, electronic equipment, readable storage medium storing program for executing
CN109325924B (en) * 2018-09-20 2020-12-04 广州酷狗计算机科技有限公司 Image processing method, device, terminal and storage medium
CN109325924A (en) * 2018-09-20 2019-02-12 广州酷狗计算机科技有限公司 Image processing method, device, terminal and storage medium
CN109493293A (en) * 2018-10-30 2019-03-19 京东方科技集团股份有限公司 A kind of image processing method and device, display equipment
CN110148147A (en) * 2018-11-07 2019-08-20 腾讯大地通途(北京)科技有限公司 Image detecting method, device, storage medium and electronic device
CN110148147B (en) * 2018-11-07 2024-02-09 腾讯大地通途(北京)科技有限公司 Image detection method, image detection device, storage medium and electronic device
CN111353946A (en) * 2018-12-21 2020-06-30 腾讯科技(深圳)有限公司 Image restoration method, device, equipment and storage medium
CN111353946B (en) * 2018-12-21 2023-04-11 腾讯科技(深圳)有限公司 Image restoration method, device, equipment and storage medium
CN110276742A (en) * 2019-05-07 2019-09-24 平安科技(深圳)有限公司 Tail light for train monitoring method, device, terminal and storage medium
CN110276742B (en) * 2019-05-07 2023-10-10 平安科技(深圳)有限公司 Train tail lamp monitoring method, device, terminal and storage medium
CN110298858A (en) * 2019-07-01 2019-10-01 北京奇艺世纪科技有限公司 A kind of image cropping method and device
CN110855897A (en) * 2019-12-20 2020-02-28 维沃移动通信有限公司 Image shooting method and device, electronic equipment and storage medium
CN110855897B (en) * 2019-12-20 2021-10-15 维沃移动通信有限公司 Image shooting method and device, electronic equipment and storage medium
CN113096022A (en) * 2019-12-23 2021-07-09 RealMe重庆移动通信有限公司 Image blurring processing method and device, storage medium and electronic equipment
CN111292262A (en) * 2020-01-19 2020-06-16 腾讯科技(深圳)有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111292262B (en) * 2020-01-19 2023-10-13 腾讯科技(深圳)有限公司 Image processing method, device, electronic equipment and storage medium
CN111767924A (en) * 2020-07-03 2020-10-13 杭州睿琪软件有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111767924B (en) * 2020-07-03 2024-01-26 杭州睿琪软件有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111899237A (en) * 2020-07-27 2020-11-06 长沙大端信息科技有限公司 Scale precision measuring method, scale precision measuring device, computer equipment and storage medium
CN112070708B (en) * 2020-08-21 2024-03-08 杭州睿琪软件有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN112070708A (en) * 2020-08-21 2020-12-11 杭州睿琪软件有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN112529793A (en) * 2020-11-25 2021-03-19 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN112581359A (en) * 2020-12-23 2021-03-30 Oppo(重庆)智能科技有限公司 Image processing method, device, terminal and storage medium
CN112686131B (en) * 2020-12-28 2023-11-24 中国平安人寿保险股份有限公司 Image processing method, device, equipment and storage medium
CN112686131A (en) * 2020-12-28 2021-04-20 中国平安人寿保险股份有限公司 Image processing method, device, equipment and storage medium
CN112750162A (en) * 2020-12-29 2021-05-04 北京电子工程总体研究所 Target identification positioning method and device
CN113129210A (en) * 2021-04-27 2021-07-16 维沃移动通信有限公司 Image processing method, image processing device and electronic equipment
CN113256785A (en) * 2021-05-31 2021-08-13 北京字跳网络技术有限公司 Image processing method, apparatus, device and medium
WO2023108444A1 (en) * 2021-12-14 2023-06-22 深圳传音控股股份有限公司 Image processing method, intelligent terminal, and storage medium
CN114596314A (en) * 2022-05-09 2022-06-07 合肥联亚制衣有限公司 Training method, device, equipment and medium for cloth flaw detection model
CN117058014A (en) * 2023-07-14 2023-11-14 北京透彻未来科技有限公司 LAB color space matching-based dyeing normalization system and method
CN117058014B (en) * 2023-07-14 2024-03-29 北京透彻未来科技有限公司 LAB color space matching-based dyeing normalization system and method

Similar Documents

Publication Publication Date Title
CN107563977A (en) A kind of image processing method, mobile terminal and computer-readable recording medium
CN105847674A (en) Preview image processing method based on mobile terminal, and mobile terminal therein
CN107454330B (en) A kind of image processing method, mobile terminal and computer readable storage medium
CN107566723B (en) A kind of image pickup method, mobile terminal and computer readable storage medium
CN107172296A (en) A kind of image capturing method and mobile terminal
CN104731446B (en) Spot recovery technique based on prompt
CN109951635B (en) Photographing processing method and device, mobile terminal and storage medium
CN107147852A (en) Image capturing method, mobile terminal and computer-readable recording medium
CN106131398B (en) A kind of image browsing method and mobile terminal
CN107464206A (en) A kind of watermark adding method and mobile terminal
CN106126108A (en) A kind of breviary map generalization method and mobile terminal
CN107172346A (en) A kind of weakening method and mobile terminal
CN107229911A (en) A kind of fingerprint identification method and mobile terminal
US11734805B2 (en) Utilizing context-aware sensors and multi-dimensional gesture inputs to efficiently generate enhanced digital images
CN106993091A (en) A kind of image weakening method and mobile terminal
CN106973222A (en) The control method and mobile terminal of a kind of Digital Zoom
CN106097398B (en) A kind of detection method and mobile terminal of Moving Objects
CN106412457B (en) A kind of image processing method and mobile terminal
CN109671061A (en) A kind of image analysis method, calculates equipment and storage medium at device
CN110503704A (en) Building method, device and the electronic equipment of three components
CN107026982A (en) The photographic method and mobile terminal of a kind of mobile terminal
CN114255223A (en) Deep learning-based method and equipment for detecting surface defects of two-stage bathroom ceramics
CN107395956A (en) Determine method, mobile terminal and the computer-readable recording medium of acquisition parameters
CN116168040B (en) Component direction detection method and device, electronic equipment and readable storage medium
CN109065001A (en) A kind of down-sampled method, apparatus, terminal device and the medium of image

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: 20180109

RJ01 Rejection of invention patent application after publication