CN108038836A - A kind of image processing method, device and mobile terminal - Google Patents

A kind of image processing method, device and mobile terminal Download PDF

Info

Publication number
CN108038836A
CN108038836A CN201711229689.5A CN201711229689A CN108038836A CN 108038836 A CN108038836 A CN 108038836A CN 201711229689 A CN201711229689 A CN 201711229689A CN 108038836 A CN108038836 A CN 108038836A
Authority
CN
China
Prior art keywords
gray level
level image
mentioned
pixel
target person
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.)
Granted
Application number
CN201711229689.5A
Other languages
Chinese (zh)
Other versions
CN108038836B (en
Inventor
刘智杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201711229689.5A priority Critical patent/CN108038836B/en
Publication of CN108038836A publication Critical patent/CN108038836A/en
Application granted granted Critical
Publication of CN108038836B publication Critical patent/CN108038836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

An embodiment of the present invention provides a kind of image processing method, device and mobile terminal, the described method includes:Obtain target person picture;According to the target person picture, the gray level image of at least one exposure parameter is generated;Determine the location parameter in region to be finished in the face area of the gray level image;Modify target area corresponding with the location parameter in the target person picture.The embodiment of the present invention, as corresponding gray level image, determines region to be finished, can lift the fineness of image procossing, reduce the missing of facial detail, improve the texture of image according to target person.

Description

A kind of image processing method, device and mobile terminal
Technical field
The present embodiments relate to the communications field, more particularly to a kind of image processing method, device and mobile terminal.
Background technology
With the rapid development of nearly twenty or thirty year digital technology, the dribs and drabs that people are recorded by way of taking pictures is Through as a kind of fashion.Nowadays, the device for taking pictures is more and more, and various image processing methods also emerge in an endless stream, popular Popularity rate also rapidly increase, function for image procossing and superior degree require also higher and higher, the function of particularly U.S. face, Be intended to the effect of U.S. face with it is real oneself more close to being also more intended to naturally, but being higher than real effect.
At present, most of image processing method is to select area to be finished by color value in red, green, blue passage Domain, then carries out mill skin using various filtering methods, and treating modified regions for example with gaussian filtering carries out Fuzzy Processing.
But above-mentioned image processing method selects region to be finished not fine enough, can cause the missing of face's fine feature, Face's three-dimensional sense is caused to be weakened, image lacks texture.
The content of the invention
The embodiment of the present invention provides a kind of image processing method, device and mobile terminal, to solve first technical finesse The problem of obtained image lacks texture.
In order to solve the above-mentioned technical problem, the present invention is realized in:
In a first aspect, a kind of image processing method, the described method includes:
Obtain target person picture;
According to the target person picture, the gray level image of at least one exposure parameter is generated;
Determine the location parameter in region to be finished in the face area of the gray level image;
Modify target area corresponding with the location parameter in the target person picture.
Second aspect, the embodiment of the present invention additionally provide a kind of image processing apparatus, and described device includes:
Target person is as acquisition module, for obtaining target person picture;
Gray level image generation module, for according to the target person picture, generating the gray-scale map of at least one exposure parameter Picture;
Location parameter determining module, the position ginseng in region to be finished in the face area for determining the gray level image Number;
Module is modified in target area, for modifying target area corresponding with the location parameter in the target person picture.
The third aspect, the embodiment of the present invention are additionally provided with a kind of mobile terminal, including processor, memory and are stored in On the memory and the computer program that can run on the processor, the computer program are performed by the processor The step of image processing methods of the Shi Shixian as any one of the claims.
Fourth aspect, the embodiment of the present invention still further provides a kind of computer-readable recording medium, and the computer can Read to store computer program on storage medium, realized when the computer program is executed by processor as appointed in the claims The step of image processing method described in one.
In embodiments of the present invention, as corresponding gray level image, determine region to be finished according to target person, can be lifted The fineness of image procossing, reduces the missing of facial detail, improves the texture of image.
Brief description of the drawings
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts Example, belongs to the scope of protection of the invention.
Fig. 1 is a kind of flow chart of image processing method step of the embodiment of the present invention one;
Fig. 2 is a kind of flow chart of image processing method step of the embodiment of the present invention two;
Fig. 3 is a kind of one of structure diagram of image processing apparatus of the embodiment of the present invention three;
Fig. 4 is the two of the structure diagram of a kind of image processing apparatus of the embodiment of the present invention three;
Fig. 5 is the three of the structure diagram of a kind of image processing apparatus of the embodiment of the present invention three;
Fig. 6 is a kind of hardware architecture diagram of mobile terminal of the embodiment of the present invention four.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts Example, belongs to the scope of protection of the invention.
Embodiment one
With reference to shown in Fig. 1, an embodiment of the present invention provides a kind of image processing method, can specifically include step 101- 104:
Step 101:Obtain target person picture.
The embodiment of the present invention, which can be applied to mobile terminal, camera etc., to be had the function of in the device of shooting image, Ke Yi The target person picture that shooting event is obtained after occurring by the above-mentioned image processing method processing shooting of the embodiment of the present invention;Certainly Image procossing can be carried out for existing target person picture.
Certainly, in embodiments of the present invention, above-mentioned steps 101 can include:Obtain target image;To above-mentioned target image Recognition of face is carried out, to determine above-mentioned target image as target person picture.
Step 102:According to above-mentioned target person picture, the gray level image of at least one exposure parameter is generated.
Exemplarily, human face region is regarded as a sphere, a lamp is projected on sphere, and sphere can nature generation black and white Grey three faces:Fine flour is smooth surface (bright face);Black flour is not smooth surface (dark face);And plastering cover be between smooth surface and dark face one A zone of transition, determines whether the texture of face is strong, and whether face is smooth etc..
If above-mentioned face area is there are the flaws such as small pox, scar, pit or local feature, just as occurring on this ball Little particle, can cause the clear and definite ball of original shade relation to produce many new shade relations, will destroy overall smooth Shade relation, causes rough effect.So as it can be seen that the correctness of shade relation decides the flat of spherical surface body surface Whether sliding.So when handling the flaw problem of face area, this shade relation can be used to carry out image procossing.
Exemplarily, when face area small pox occurs when protrusion, if the color value of above-mentioned elevated regions is close to peripheral region The skin tone value in domain or inclined light tone, then under low exposure, above-mentioned defect areas is brighter with respect to peripheral region, i.e., gray value is higher; Under high exposure, above-mentioned defect areas does not have significant difference with respect to peripheral region.If the color value of above-mentioned elevated regions is partially dim It is light, or there are the defect areas such as pit in face area, then under high exposure, above-mentioned defect areas is with respect to peripheral region more Secretly, i.e., gray value is relatively low;Under low exposure, above-mentioned defect areas does not have significant difference with respect to peripheral region.
Certainly, in practice there is also under middle exposure, defect areas becomes apparent from respect to peripheral region;And in high and low exposure Under luminosity, defect areas is with respect to the unconspicuous scene in peripheral region.
In addition, in order to avoid causing the erroneous judgement to relationship between light and dark because of color, therefore in embodiments of the present invention, by To the gray level image of at least one exposure parameter of above-mentioned target image, show based on facial regions under above-mentioned exposure parameter The different relationship between light and dark of the local feature in domain;Specifically, above-mentioned relationship between light and dark is presented as the ash under above-mentioned exposure parameter Angle value.
Alternatively, it is above-mentioned according to above-mentioned target person picture, the step of generating the gray level image of at least one exposure parameter 102, it can include:It is at least one intermediate image to replicate above-mentioned target person picture;Obtain exposure corresponding with above-mentioned intermediate image Spend parameter;According to above-mentioned exposure parameter, above-mentioned intermediate image is adjusted;Intermediate image after above-mentioned adjustment is converted into gray-scale map Picture.
Above-mentioned exposure parameter can be default exposure parameter, or the exposure parameter of input.In this hair In bright embodiment, it can be obtained according to above-mentioned target person picture with above-mentioned target person as corresponding gray level image;According to default exposure Photometric parameter adjusts the exposure of above-mentioned gray level image.
Exemplarily, above-mentioned target image is Pixel-level;The color value of each pixel of above-mentioned each target image or Pixel value can be represented by RGB (R-G-B color) values, can also be by HSB (form and aspect-saturation degree-brightness) come table Show, or a kind of other color moulds such as YUV (color coding form represented by a luminance signal and two carrier chrominance signals) Formula.Certainly, can be mutually converted between above-mentioned color mode.
Exemplarily, above-mentioned target person picture can be replicated, when the target person picture of duplication then being converted into gray level image;Then The rgb value of each pixel of above-mentioned target person picture, i.e., be converted into the gray value of each pixel of gray level image accordingly, such as Gray value=A1 × R+A2 × G+A3 × B, wherein A1, A2, A3 be respectively R values, G values, B values be more than 0 be less than 1 coefficient, one As A1+A2+A3=1.
The change of above-mentioned exposure parameter can all have the pixel values such as the saturation degree of each pixel, brightness and influence;In 0- Value between 100%, is unable to value 0 or 100% certainly;Because when exposure parameter is 0, above-mentioned gray level image becomes black figure Picture;When exposure parameter is 100%, above-mentioned gray level image is white image;Gray level image under above-mentioned exposure parameter is equal Above-mentioned target person can not be embodied as because light and shade is cloudy caused by the local feature (such as small pox, scar, pit etc.) of face area The difference of shadow relation.
Step 103:Determine the location parameter in region to be finished in the face area of above-mentioned gray level image.
In embodiments of the present invention, can the relationship between light and dark based on the same area should be identical or be close to evidence, filter out The region to be finished of the relationship between light and dark of peripheral region is not met, can be according to face area in above-mentioned gray level image;Above-mentioned light and shade Relation is presented as the gray value under above-mentioned exposure parameter.
For example, the face area of above-mentioned gray level image can be determined by recognition of face first;Then to above-mentioned facial regions Domain carries out contrast enhancing;In face area after above-mentioned contrast enhancement processing, the location parameter in region to be finished is determined.
Above-mentioned contrast enhancing can use a variety of sides such as gray threshold, gray level segmentation, linear stretch, Nonlinear extension Formula.Simple examples, for by the way of gray threshold, i.e., by setting gray threshold, detecting the gray value of each pixel With the magnitude relationship of gray threshold, all pixels point is at least divided into two class of A, B, then belongs to the pixel of A classes or belongs to B classes Pixel be region to be finished;The location parameter in above-mentioned region to be finished includes the above-mentioned pixel for belonging to A classes or belongs to B The location parameter of the pixel of class.
Each pixel is classified by the difference of the gray value between each pixel, filters out and does not meet peripheral region Relationship between light and dark a kind of pixel.
Certainly in practical applications, above-mentioned mode classification can be finer, can be divided into multiple classes, with more it is fine really Fixed region to be finished.
In embodiments of the present invention, above-mentioned face area includes but not limited to cheek region, forehead region, chin area Deng.
In embodiments of the present invention, can be under the gray scale observing pattern by least one exposure parameter, because above-mentioned Target person as corresponding at least one exposure parameter gray level image in the gray value in each region just characterize the bright of each region Dark relation, therefore under the gray scale observing pattern of above-mentioned at least one exposure parameter, it may be determined that the target in target person picture Region is simultaneously modified, the meeting when selecting small pox, scar to wait modified regions of the above-mentioned image processing method of the embodiment of the present invention More fine, it is stiff caused by a large amount of missings of face's fine feature to avoid, and makes face's texture stronger.
Meanwhile first image processing method cannot effectively handle the local characteristic regions such as above-mentioned small pox, scar, in mill skin Above-mentioned local characteristic region is the paste color lump that one piece of unobvious but color are deeper than other facial zones after processing, face it is clean Degree and skin makeup degree decline;And the embodiment of the present invention can more subtly handle above-mentioned local feature, the clean degree of face is improved With skin makeup degree.
Region more fully to be finished can be determined when using the gray scale observing pattern of multiple exposure parameters, further Lift modification effect.
Alternatively, it is above-mentioned determine above-mentioned gray level image face area in region to be finished location parameter step 103, It can include:
Determine the face area of above-mentioned gray level image;
The face area of above-mentioned gray level image is divided into multiple block diagram pictures;
According to the gray value of each pixel of above-mentioned block diagram picture, the signature grey scale value of above-mentioned block diagram picture is determined;
Detect the difference of the gray value of each pixel and features described above gray value in above-mentioned block diagram picture;
When the gray value of above-mentioned pixel and the difference of features described above gray value are more than predetermined threshold value, determine above-mentioned to be repaired The location parameter in decorations region includes the location parameter of above-mentioned pixel.
In embodiments of the present invention, the position ginseng of the face area of above-mentioned target person picture can be determined by recognition of face Number;According to the location parameter of the face area of above-mentioned target person picture, the face area of above-mentioned gray level image is determined.
Above-mentioned division face area can carry out etc. drawing for multiple block diagram pictures according to default size or presetted pixel point quantity Point, template can also be divided according to default face area to be divided.
The signature grey scale value for the block diagram picture mentioned in foregoing description, can be the average ash of each pixel of above-mentioned block diagram picture Angle value, middle position gray value, or the ash of the overall gray value size that can characterize above-mentioned block diagram picture that other calculations obtain Angle value.
Obviously, above-mentioned predetermined threshold value can be preset, and can also be carried out according to the size of above-mentioned exposure parameter corresponding Adjustment.It is understood that above-mentioned exposure parameter closer to 100% or closer to 10%, then above-mentioned gray level image integrally becomes White or entirety becomes black, then can reduce above-mentioned predetermined threshold value.
It is to be finished in the above-mentioned face area for determining above-mentioned gray level image in a kind of embodiment of the embodiment of the present invention The step 103 of the location parameter in region, can include:
When detect to it is default repair the selection operation of chart-pattern manually when, into repairing chart-pattern manually;
When detecting the selection operation to the face area of above-mentioned gray level image, the corresponding position of above-mentioned selection operation is determined Put the location parameter that parameter is above-mentioned region to be finished.
The embodiment of the present invention can at least include repairing chart-pattern automatically and repair chart-pattern manually;Therefore can pre-set A variety of selection mechanisms for repairing chart-pattern are stated, are made choice for user.For example, can be in the screen of the terminal such as mobile terminal or camera The select button of the above-mentioned various modes of upper display, when detecting that touching of the user to the above-mentioned select button for repairing chart-pattern manually grasp When making, then enter and repair chart-pattern manually.
In embodiments of the present invention, can be grasped according to selection of the user to the gray level image under above-mentioned each exposure parameter Make, change the observing pattern of user;Default amplifieroperation or default reduction operation of the user to above-mentioned gray level image can be detected, Above-mentioned gray level image is zoomed in or out accordingly.
User can be respectively under the observing pattern of the gray level image of above-mentioned at least one exposure parameter, to above-mentioned gray scale The abnormal area that relationship between light and dark is not met in image makes choice operation;User can make choice behaviour by touching ScreenMode Make, operation, such as lasso trick, choice box etc. can also be made choice by default figure instrument of repairing, which is not described herein again.Compared to Automatic to repair chart-pattern, user can like tendency according to itself and carry out actively repairing graphic operation, and sense of participation is strong.
Step 104:Modify target area corresponding with above-mentioned location parameter in above-mentioned target person picture.
In embodiments of the present invention, after the location parameter in region to be finished of above-mentioned gray level image is determined, Ke Yigen Target area corresponding with above-mentioned location parameter in above-mentioned target person picture is determined according to the location parameter in above-mentioned region to be finished, is In the face area of above-mentioned target person picture there is abnormal region in relationship between light and dark, it is likely to the small pox of face area, scar etc. Local characteristic region;Then above-mentioned target area is modified according to various method of modifying, such as all kinds of blur methods, whitening Method.
Exemplarily, in embodiments of the present invention, can be according to the average pixel value of the peripheral region of above-mentioned target area As the character pixel value of above-mentioned target area, the pixel value of above-mentioned each target area then can be corrected in above-mentioned average picture The fluctuation nearby of element value.Certainly, the regional extent of above-mentioned peripheral region can be determined according to above-mentioned target area;Above-mentioned fluctuation model Enclose and specific modification method can then be preset;The embodiment of the present invention is not restricted this.
In embodiments of the present invention, above-mentioned mesh can be worth to according to the mean pixel of the peripheral region of above-mentioned target area Mark the pixel value size in region;Above-mentioned target area can be pixel rank, or the block of multiple pixel compositions, The embodiment of the present invention is not restricted this.
In a kind of embodiment of the embodiment of the present invention, in the above-mentioned above-mentioned target person picture of modification with above-mentioned location parameter pair The step of target area answered, including:Determine that target pixel points corresponding with above-mentioned location parameter are upper in above-mentioned target person picture State target area;According to the pixel value of the surrounding pixel of above-mentioned target pixel points point, the pixel value of above-mentioned target pixel points is corrected.
Exemplarily, the average value of the surrounding pixel point in the range of above-mentioned target pixel points pre-set radius can be calculated or added Weight average value, obtains the pixel value of above-mentioned target pixel points.Certainly, because the surrounding pixel point of above-mentioned target pixel points may wrap Include other target pixel points, it is thus possible to there are needs and repeatedly calculate until the problem of pixel value is restrained, which is not described herein again.
It is understood that the area to be finished obtained in above-mentioned steps 103 in the gray level image of same exposure parameter Domain may be multiple color lumps;Above-mentioned each color lump is made of at least one pixel respectively;May phase between above-mentioned each color lump Connect, it is also possible to be separated from each other.
Repair figure effect to reach more balanced, in embodiments of the present invention, when need at the same time to M regions to be finished into During row modification, the pixel in the above-mentioned M region to be finished of composition according to the location parameter in above-mentioned M regions to be finished, can be determined Connection relation between point;According to above-mentioned connection relation, the pixel for recombinating above-mentioned M regions to be finished is N number of color to be finished Block;Modify multiple target areas corresponding with above-mentioned N number of color lump to be finished in above-mentioned target person picture.
Wherein, above-mentioned connection relation can at least include neighbouring relations and separation relation;According to above-mentioned connection relation, restructuring The step of pixel in above-mentioned M regions to be finished is N number of color lump can be carried out by the method for cluster, and which is not described herein again.
In this way, above-mentioned M regions to be finished can be divided into the N number of color lump to be finished being separated from each other, more as much as possible Meet the actual characteristic that the local characteristic regions such as small pox, scar are distributed independently of one another in face area so that modification is more balanced Precisely.
In embodiments of the present invention, as corresponding gray level image, determine region to be finished according to target person, can be lifted The fineness of image procossing, reduces the missing of facial detail, improves the texture of image.
Embodiment two
With reference to shown in Fig. 2, an embodiment of the present invention provides a kind of image processing method, can specifically include step 201- 204:
Step 201:Obtain target person picture.
Step 202:According to above-mentioned target person picture, generation is with above-mentioned target person as the ash of corresponding high exposure parameter Spend image, the gray level image of middle exposure parameter and the gray level image of low exposure parameter.
Exemplarily, above-mentioned high exposure parameter, middle exposure parameter and low exposure parameter can be it is default, such as Respectively 90%, 40%, 5%;The corresponding gray level image of above-mentioned each exposure parameter can be characterized in bright, grey, dark three kinds respectively Relationship between light and dark under observing pattern.
Exemplarily, in embodiments of the present invention, it is three intermediate images that can replicate above-mentioned target person picture;Obtain with it is upper The corresponding exposure parameter 90%, 40%, 5% of three intermediate images is stated, and adjusts above three intermediate image respectively Exposure parameter is respectively 90%, 40%, 5%;Then gray processing is carried out to above three intermediate image, obtains bright, grey, dark three Kind gray level image, while also obtain the different relationship between light and dark that the gray level image under bright, grey, dark Three models shows.
Step 203:Determine the location parameter in region to be finished in the face area of each above-mentioned gray level image.
Step 204:Modify target area corresponding with above-mentioned location parameter in above-mentioned target person picture.
In a kind of embodiment of the embodiment of the present invention, it can be obtained first in the gray level image of high exposure parameter The first position parameter in corresponding first region to be finished, is modified corresponding with above-mentioned first position parameter in above-mentioned target person picture First object region;Then the second of corresponding second region to be finished is obtained in the corresponding gray level image of middle exposure parameter Location parameter, modifies the second target area corresponding with said second position parameter in above-mentioned target person picture;Finally in low exposure The third place parameter in corresponding 3rd region to be finished is obtained in the corresponding gray level image of degree parameter, modifies above-mentioned target person picture In the 3rd target area corresponding with above-mentioned the third place parameter.
Gray-scale map of the embodiment of the present invention to the above-mentioned gray level image in high exposure parameter respectively, middle exposure parameter As the gray level image of, low exposure parameter observing pattern under carry out the order of image modification, be not intended to limit.
In the another embodiment of the embodiment of the present invention, can above-mentioned high exposure parameter gray level image, in The gray level image of exposure parameter, low exposure parameter gray level image observing pattern under, respectively determine each region to be finished Each position parameter, and target area corresponding with each above-mentioned location parameter in above-mentioned target person picture is modified.
In embodiments of the present invention, can also be by the target person picture after above-mentioned modification, according to above-mentioned steps 202 to step 204 image processing method, carries out overall modification, before solving again to the face area of the target person picture after above-mentioned modification The problems such as transition caused by modification is possible is unnatural, identification mistake.
In embodiments of the present invention, trickle image can also be added to the face area of the target person picture after modification to make an uproar Point, to add miscellaneous point, improves face's texture.Exemplarily, the picture of preset number can be selected in above-mentioned Adding Area at random Vegetarian refreshments, the pixel value for then correcting above-mentioned pixel are default miscellaneous pixel value.
In embodiments of the present invention, because above-mentioned target person as corresponding different exposure parameter gray level image in it is each The gray value in region just characterizes the relationship between light and dark of the different levels in each region, thus respectively above-mentioned high exposure parameter, in , can be from bright, grey, dark three kinds of angles, more comprehensively subtly under exposure parameter, the gray scale observing pattern of low exposure parameter Determine the target area in target person picture and modified, further improve modification effect.
Embodiment three
With reference to shown in Fig. 3, an embodiment of the present invention provides a kind of image processing apparatus, above device can specifically include:
Target person is as acquisition module 301, for obtaining target person picture;
Gray level image generation module 302, for according to above-mentioned target person picture, generating the gray scale of at least one exposure parameter Image;
Location parameter determining module 303, the position in region to be finished in the face area for determining above-mentioned gray level image Parameter;
Module 304 is modified in target area, for modifying target area corresponding with above-mentioned location parameter in above-mentioned target person picture Domain.
With reference to shown in Fig. 4, on the basis of above-mentioned Fig. 3, alternatively, above-mentioned gray level image generation module 302 can include:
Copying image unit 3021, is at least one intermediate image for replicating above-mentioned target person picture;
Parameter acquiring unit 3022, for obtaining exposure parameter corresponding with above-mentioned intermediate image;
Exposure adjustment unit 3023, for according to above-mentioned exposure parameter, adjusting above-mentioned intermediate image;
First gray level image generation unit 3024, for the intermediate image after above-mentioned adjustment to be converted to gray level image.
Alternatively, above-mentioned location parameter determining module 303 can include:
Face area determination unit, for determining the face area of above-mentioned gray level image;
Image division unit, for the face area of above-mentioned gray level image to be divided into multiple block diagram pictures;
Gray value computing unit, for the gray value of each pixel according to above-mentioned block diagram picture, determine above-mentioned block diagram as Signature grey scale value;
Pixel detection unit, for detecting the gray value of each pixel and features described above gray value in above-mentioned block diagram picture Difference;
Location parameter determination unit, for being more than in advance when the gray value of above-mentioned pixel and the difference of features described above gray value If during threshold value, determining the location parameter in above-mentioned region to be finished includes the location parameter of above-mentioned pixel.
Alternatively, above-mentioned target area modification module 304 can include:
Target area determination unit, for determining target pixel points corresponding with above-mentioned location parameter in above-mentioned target person picture For above-mentioned target area;
Unit is modified in target area, for the pixel value of the surrounding pixel point according to above-mentioned target pixel points, corrects above-mentioned The pixel value of target pixel points.
With reference to shown in Fig. 5, alternatively, on the basis of above-mentioned Fig. 3, above-mentioned gray level image generation module 302 can include:
Second gray level image generation unit 3025, for being distinguished according to above-mentioned target person picture, generation with above-mentioned target person picture The gray level image of the gray level image of corresponding high exposure parameter, the gray level image of middle exposure parameter and low exposure parameter.
Image processing apparatus provided in an embodiment of the present invention can realize mobile terminal in the embodiment of the method for Fig. 1 to Fig. 2 The each process realized, to avoid repeating, which is not described herein again.
In embodiments of the present invention, as corresponding gray level image, determine region to be finished according to target person, can be lifted The fineness of image procossing, reduces the missing of facial detail, improves the texture of image.
Example IV
Fig. 6 is a kind of hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention,
The mobile terminal 600 includes but not limited to:It is radio frequency unit 601, mixed-media network modules mixed-media 602, audio output unit 603, defeated Enter unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, processor The component such as 610 and power supply 611.It will be understood by those skilled in the art that mobile terminal structure shown in Fig. 6 is not formed Restriction to mobile terminal, mobile terminal can be included than illustrating more or fewer components, either combine some components or Different component arrangements.In embodiments of the present invention, mobile terminal include but not limited to mobile phone, tablet computer, laptop, Palm PC, car-mounted terminal, wearable device and pedometer etc..
Wherein, processor 610, for obtaining target person picture;According to above-mentioned target person picture, at least one exposure ginseng is generated Several gray level images;Determine the location parameter in region to be finished in the face area of above-mentioned gray level image;Modify above-mentioned target person The target area corresponding with above-mentioned location parameter as in.
In embodiments of the present invention, because above-mentioned target person as corresponding at least one exposure parameter gray level image in The gray value in each region just characterizes the relationship between light and dark in each region, therefore is observed in the gray scale of above-mentioned at least one exposure parameter Under pattern, determine the target area in target person picture and modified;The above-mentioned image processing method of the embodiment of the present invention is selecting Select small pox, can be more fine when scar waits modified regions, it is stiff caused by a large amount of missings of face's fine feature to avoid, and makes Face's texture is stronger;Region more fully to be finished can be determined when using the gray scale observing pattern of multiple exposure parameters, Further lift modification effect.
It should be understood that in the embodiment of the present invention, radio frequency unit 601 can be used for receiving and sending messages or communication process in, signal Reception and transmission, specifically, by from base station downlink data receive after, handled to processor 610;In addition, by uplink Data sending is to base station.In general, radio frequency unit 601 includes but not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 601 can also by wireless communication system and network and other set Standby communication.
Mobile terminal has provided wireless broadband internet to the user by mixed-media network modules mixed-media 602 and has accessed, and such as helps user to receive Send e-mails, browse webpage and access streaming video etc..
Audio output unit 603 can be receiving by radio frequency unit 601 or mixed-media network modules mixed-media 602 or in memory 609 It is sound that the voice data of storage, which is converted into audio signal and exports,.Moreover, audio output unit 603 can also be provided and moved The relevant audio output of specific function that dynamic terminal 600 performs is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 603 includes loudspeaker, buzzer and receiver etc..
Input unit 604 is used to receive audio or video signal.Input unit 604 can include graphics processor (Graphics Processing Unit, GPU) 6041 and microphone 6042, graphics processor 6041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) carry out Reason.Picture frame after processing may be displayed on display unit 606.Picture frame after the processing of graphics processor 6041 can be deposited Storage is transmitted in memory 609 (or other storage mediums) or via radio frequency unit 601 or mixed-media network modules mixed-media 602.Mike Wind 6042 can receive sound, and can be voice data by such acoustic processing.Voice data after processing can be The form output of mobile communication base station can be sent to via radio frequency unit 601 by being converted in the case of telephone calling model.
Mobile terminal 600 further includes at least one sensor 605, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 6061, and proximity sensor can close when mobile terminal 600 is moved in one's ear Display panel 6061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, size and the direction of gravity are can detect that when static, available for identification mobile terminal posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Pass Sensor 605 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, wet Meter, thermometer, infrared ray sensor etc. are spent, details are not described herein.
Display unit 606 is used for the information for showing by information input by user or being supplied to user.Display unit 606 can wrap Display panel 6061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 6061.
User input unit 607 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is related.Specifically, user input unit 607 include contact panel 6071 and Other input equipments 6072.Contact panel 6071, also referred to as touch-screen, collect user on it or neighbouring touch operation (for example user uses any suitable objects or annex such as finger, stylus on contact panel 6071 or in contact panel 6071 Neighbouring operation).Contact panel 6071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects the signal that touch operation is brought, and transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 610, receiving area Manage the order that device 610 is sent and performed.It is furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes contact panel 6071.Except contact panel 6071, user input unit 607 can also include other input equipments 6072.Specifically, other input equipments 6072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operation lever, details are not described herein.
Further, contact panel 6071 can be covered on display panel 6061, when contact panel 6071 is detected at it On or near touch operation after, send to processor 610 with determine touch event type, be followed by subsequent processing device 610 according to touch The type for touching event provides corresponding visual output on display panel 6061.Although in figure 6, contact panel 6071 and display Panel 6061 is the component independent as two to realize the function that outputs and inputs of mobile terminal, but in some embodiments In, can be integrated by contact panel 6071 and display panel 6061 and realize the function that outputs and inputs of mobile terminal, it is specific this Place does not limit.
Interface unit 608 is the interface that external device (ED) is connected with mobile terminal 600.For example, external device (ED) can include Line or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end Mouth, port, audio input/output (I/O) port, video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 608 can be used for receive the input (for example, data message, electric power etc.) from external device (ED) and One or more elements that the input received is transferred in mobile terminal 600 can be used in 600 He of mobile terminal Data are transmitted between external device (ED).
Memory 609 can be used for storage software program and various data.Memory 609 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 609 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 610 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection A part, by running or performing the software program and/or module that are stored in memory 609, and calls and is stored in storage Data in device 609, perform the various functions and processing data of mobile terminal, so as to carry out integral monitoring to mobile terminal.Place Reason device 610 may include one or more processing units;Preferably, processor 610 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 610.
Mobile terminal 600 can also include the power supply 611 (such as battery) to all parts power supply, it is preferred that power supply 611 Can be logically contiguous by power-supply management system and processor 610, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
In addition, mobile terminal 600 includes some unshowned function modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of mobile terminal, including processor 610, and memory 609, is stored in On memory 609 and the computer program that can be run on above-mentioned processor 610, the computer program are performed by processor 610 Each process of the above-mentioned image processing method embodiments of Shi Shixian, and identical technique effect can be reached, to avoid repeating, here Repeat no more.
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, which is not described herein again.Wherein, the 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..
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And other elements that are not explicitly listed are further included, or further include as this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Also there are other identical element in the process of key element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal (can be mobile phone, computer, services Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The embodiment of the present invention is described above in conjunction with attached drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, those of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make very much Form, belongs within the protection of the present invention.

Claims (12)

  1. A kind of 1. image processing method, it is characterised in that the described method includes:
    Obtain target person picture;
    According to the target person picture, the gray level image of at least one exposure parameter is generated;
    Determine the location parameter in region to be finished in the face area of the gray level image;
    Modify target area corresponding with the location parameter in the target person picture.
  2. 2. according to the method described in claim 1, it is characterized in that, described according to the target person picture, at least one exposure is generated The step of gray level image of photometric parameter, including:
    It is at least one intermediate image to replicate the target person picture;
    Obtain exposure parameter corresponding with the intermediate image;
    According to the exposure parameter, the intermediate image is adjusted;
    Intermediate image after the adjustment is converted into gray level image.
  3. It is 3. according to the method described in claim 1, it is characterized in that, to be repaired in the face area for determining the gray level image The step of adoring the location parameter in region, including:
    Determine the face area of the gray level image;
    The face area of the gray level image is divided into multiple block diagram pictures;
    According to the gray value of each pixel of the block diagram picture, the signature grey scale value of the block diagram picture is determined;
    Detect the gray value of each pixel and the difference of the signature grey scale value in the block diagram picture;
    When the gray value of the pixel and the difference of the signature grey scale value are more than predetermined threshold value, the area to be finished is determined The location parameter in domain includes the location parameter of the pixel.
  4. 4. according to the method described in claim 1, it is characterized in that, in the modification target person picture with the location parameter The step of corresponding target area, including:
    Determine that target pixel points corresponding with the location parameter are the target area in the target person picture;
    According to the pixel value of the surrounding pixel of target pixel points point, the pixel value of the target pixel points is corrected.
  5. 5. according to the method described in claim 1, it is characterized in that, described according to the target person picture, at least one exposure is generated The step of gray level image of photometric parameter, includes:
    According to the target person picture, generation and gray level image of the target person as corresponding high exposure parameter, middle exposure The gray level image of the gray level image of photometric parameter and low exposure parameter.
  6. 6. a kind of image processing apparatus, it is characterised in that described device includes:
    Target person is as acquisition module, for obtaining target person picture;
    Gray level image generation module, for according to the target person picture, generating the gray level image of at least one exposure parameter;
    Location parameter determining module, the location parameter in region to be finished in the face area for determining the gray level image;
    Module is modified in target area, for modifying target area corresponding with the location parameter in the target person picture.
  7. 7. device according to claim 6, it is characterised in that the gray level image generation module includes:
    Copying image unit, is at least one intermediate image for replicating the target person picture;
    Parameter acquiring unit, for obtaining exposure parameter corresponding with the intermediate image;
    Exposure adjustment unit, for according to the exposure parameter, adjusting the intermediate image;
    First gray level image generation unit, for the intermediate image after the adjustment to be converted to gray level image.
  8. 8. device according to claim 6, it is characterised in that the location parameter determining module includes:
    Face area determination unit, for determining the face area of the gray level image;
    Image division unit, for the face area of the gray level image to be divided into multiple block diagram pictures;
    Gray value computing unit, for the gray value of each pixel according to the block diagram picture, determines the feature of the block diagram picture Gray value;
    Pixel detection unit, for detecting the gray value of each pixel and the difference of the signature grey scale value in the block diagram picture Value;
    Location parameter determination unit, for being more than default threshold when the gray value of the pixel and the difference of the signature grey scale value During value, determining the location parameter in the region to be finished includes the location parameter of the pixel.
  9. 9. device according to claim 6, it is characterised in that the target area modification module includes:
    Target area determination unit, for determining that target pixel points corresponding with the location parameter are institute in the target person picture State target area;
    Unit is modified in target area, for the pixel value of the surrounding pixel point according to the target pixel points, corrects the target The pixel value of pixel.
  10. 10. according to the device described in claim 6, it is characterised in that the gray level image generation module includes:
    Second gray level image generation unit, for according to the target person picture, generation to be with the target person as corresponding height The gray level image of the gray level image of exposure parameter, the gray level image of middle exposure parameter and low exposure parameter.
  11. 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, such as claim 1 to 5 is realized when the computer program is performed by the processor Any one of image processing method the step of.
  12. 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.
CN201711229689.5A 2017-11-29 2017-11-29 Image processing method and device and mobile terminal Active CN108038836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711229689.5A CN108038836B (en) 2017-11-29 2017-11-29 Image processing method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711229689.5A CN108038836B (en) 2017-11-29 2017-11-29 Image processing method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN108038836A true CN108038836A (en) 2018-05-15
CN108038836B CN108038836B (en) 2020-04-17

Family

ID=62094519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711229689.5A Active CN108038836B (en) 2017-11-29 2017-11-29 Image processing method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN108038836B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109584153A (en) * 2018-12-06 2019-04-05 北京旷视科技有限公司 Modify the methods, devices and systems of eye
CN109584150A (en) * 2018-11-28 2019-04-05 维沃移动通信(杭州)有限公司 A kind of image processing method and terminal device
CN109697422A (en) * 2018-12-19 2019-04-30 深圳市瑞立视多媒体科技有限公司 Optics motion capture method and optics motion capture cameras
CN109816602A (en) * 2018-12-29 2019-05-28 维沃移动通信有限公司 A kind of processing method and terminal of image
CN111338545A (en) * 2020-02-24 2020-06-26 北京字节跳动网络技术有限公司 Image processing method, assembly, electronic device and storage medium
CN111563850A (en) * 2020-03-20 2020-08-21 维沃移动通信有限公司 Image processing method and electronic equipment
CN112477438A (en) * 2020-11-13 2021-03-12 深圳汉弘软件技术有限公司 Printing method, printing device, ink-jet printer and storage medium
US20220067330A1 (en) * 2019-05-29 2022-03-03 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Calibration method, electronic device, and non-transitory computer-readable storage medium
TWI775087B (en) * 2020-05-29 2022-08-21 鴻海精密工業股份有限公司 Image identification method, device, computer device and storage media
US11521310B2 (en) 2020-05-29 2022-12-06 Hon Hai Precision Industry Co., Ltd. Image marking method and computing device implementing image marking method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318262A (en) * 2014-09-12 2015-01-28 上海明穆电子科技有限公司 Method and system for replacing skin through human face photos
CN104994369A (en) * 2013-12-04 2015-10-21 中兴通讯股份有限公司 Image processing method, user terminal, and image processing terminal and system
CN105704395A (en) * 2016-04-05 2016-06-22 广东欧珀移动通信有限公司 Shooting method and shooting device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104994369A (en) * 2013-12-04 2015-10-21 中兴通讯股份有限公司 Image processing method, user terminal, and image processing terminal and system
CN104318262A (en) * 2014-09-12 2015-01-28 上海明穆电子科技有限公司 Method and system for replacing skin through human face photos
CN105704395A (en) * 2016-04-05 2016-06-22 广东欧珀移动通信有限公司 Shooting method and shooting device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李颖 等: "《Photoshop CS3/CS4创意密码》", 31 August 2009, 中国铁道出版社 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109584150A (en) * 2018-11-28 2019-04-05 维沃移动通信(杭州)有限公司 A kind of image processing method and terminal device
CN109584153A (en) * 2018-12-06 2019-04-05 北京旷视科技有限公司 Modify the methods, devices and systems of eye
CN109697422A (en) * 2018-12-19 2019-04-30 深圳市瑞立视多媒体科技有限公司 Optics motion capture method and optics motion capture cameras
CN109816602A (en) * 2018-12-29 2019-05-28 维沃移动通信有限公司 A kind of processing method and terminal of image
US20220067330A1 (en) * 2019-05-29 2022-03-03 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Calibration method, electronic device, and non-transitory computer-readable storage medium
CN111338545A (en) * 2020-02-24 2020-06-26 北京字节跳动网络技术有限公司 Image processing method, assembly, electronic device and storage medium
US11880556B2 (en) 2020-02-24 2024-01-23 Douyin Vision Co., Ltd. Image processing for implementing multiple graph repairing functions
CN111563850A (en) * 2020-03-20 2020-08-21 维沃移动通信有限公司 Image processing method and electronic equipment
CN111563850B (en) * 2020-03-20 2023-12-05 维沃移动通信有限公司 Image processing method and electronic equipment
TWI775087B (en) * 2020-05-29 2022-08-21 鴻海精密工業股份有限公司 Image identification method, device, computer device and storage media
US11521310B2 (en) 2020-05-29 2022-12-06 Hon Hai Precision Industry Co., Ltd. Image marking method and computing device implementing image marking method
CN112477438A (en) * 2020-11-13 2021-03-12 深圳汉弘软件技术有限公司 Printing method, printing device, ink-jet printer and storage medium

Also Published As

Publication number Publication date
CN108038836B (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN108038836A (en) A kind of image processing method, device and mobile terminal
CN107566730B (en) A kind of panoramic picture image pickup method and mobile terminal
CN108540724A (en) A kind of image pickup method and mobile terminal
CN107707827A (en) A kind of high-dynamics image image pickup method and mobile terminal
CN107172364A (en) A kind of image exposure compensation method, device and computer-readable recording medium
CN108111754A (en) A kind of method and mobile terminal of definite image acquisition modality
CN107302663A (en) A kind of brightness of image method of adjustment, terminal and computer-readable recording medium
CN107958470A (en) A kind of color correcting method, mobile terminal
CN107592471A (en) A kind of high dynamic range images image pickup method and mobile terminal
CN108492246A (en) A kind of image processing method, device and mobile terminal
CN107948498B (en) A kind of elimination camera Morie fringe method and mobile terminal
CN107895352A (en) A kind of image processing method and mobile terminal
CN108184037A (en) A kind of method for displaying image and mobile terminal
CN107845057A (en) One kind is taken pictures method for previewing and mobile terminal
CN108877737A (en) Screen adjustment method, mobile terminal and computer readable storage medium
CN107886321A (en) A kind of method of payment and mobile terminal
CN107566749A (en) Image pickup method and mobile terminal
CN107845363B (en) A kind of display control method and mobile terminal
CN107820022A (en) A kind of photographic method and mobile terminal
CN109104578B (en) Image processing method and mobile terminal
CN108198127A (en) A kind of image processing method, device and mobile terminal
CN109167914A (en) A kind of image processing method and mobile terminal
CN108320263A (en) A kind of method, device and mobile terminal of image procossing
CN110417999A (en) Screen luminance adjustment method, mobile terminal and computer readable storage medium
CN108513067A (en) A kind of filming control method and mobile terminal

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
GR01 Patent grant
GR01 Patent grant