CN108198127A - 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
CN108198127A
CN108198127A CN201711210052.1A CN201711210052A CN108198127A CN 108198127 A CN108198127 A CN 108198127A CN 201711210052 A CN201711210052 A CN 201711210052A CN 108198127 A CN108198127 A CN 108198127A
Authority
CN
China
Prior art keywords
color development
value
skin
color
area
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
CN201711210052.1A
Other languages
Chinese (zh)
Inventor
黄静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201711210052.1A priority Critical patent/CN108198127A/en
Publication of CN108198127A publication Critical patent/CN108198127A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

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

The present invention provides a kind of image processing method, device and mobile terminals, are related to technical field of image processing.Wherein, the method includes:When getting original image, area of skin color and hair zones in the original image are determined;According to the colour of skin attribute information of the area of skin color, corresponding color development attribute information is obtained;According to the color development attribute information, the hair zones are handled.Present invention determine that the corresponding color development attribute information of colour of skin attribute information with original image personage, and then the hair zones of personage are handled according to the color development attribute information, the matching degree between the hair zones in image and area of skin color can be improved, and then promotes image processing effect.

Description

A kind of image processing method, device and mobile terminal
Technical field
The present invention relates to a kind of technical field of image processing more particularly to image processing method, device and mobile terminals.
Background technology
With the fast development of image processing techniques, people can by mobile terminal to the photo taken pictures or Image downloaded from network etc. carries out various processing, to enhance the interest of image, for example, people can pass through mobile terminal pair Hair color from taking pictures is replaced, so as to change the image makings of oneself.
In general, user can only manually select the color of a certain setting, thus to the carry out color development adjusting in image, and this Kind color development regulative mode is largely determined by the subjective hobby of user, often influences image procossing due to color development is not suitable for Effect.
Invention content
The present invention provides a kind of image processing method, device and mobile terminal, to solve the prior art because color development is not suitable for And the problem of influencing image processing effect.
In order to solve the above-mentioned technical problem, the invention is realized in this way:A kind of method of image procossing, applied to movement Terminal, including:
When getting original image, area of skin color and hair zones in the original image are determined;
According to the colour of skin attribute information of the area of skin color, corresponding color development attribute information is obtained;
According to the color development attribute information, the hair zones are handled.
In a first aspect, the embodiment of the present invention additionally provides a kind of image processing apparatus, which includes:
Determining module, for when getting original image, determining the area of skin color in the original image and hair area Domain;
First acquisition module for the colour of skin attribute information according to the area of skin color, obtains corresponding color development attribute letter Breath;
Processing module, for according to the color development attribute information, handling the hair zones.
Second aspect, the embodiment of the present invention additionally provide a kind of mobile terminal, which includes processor, memory And the computer program that can be run on the memory and on the processor is stored in, the computer program is by the place The step of reason device realizes image processing method of the present invention when performing.
The third aspect, the embodiment of the present invention additionally provide a kind of computer readable storage medium, the computer-readable storage Computer program is stored on medium, the step of image processing method of the present invention is realized when computer program is executed by processor Suddenly.
In embodiments of the present invention, it determines to believe with the corresponding color development attribute of the colour of skin attribute information of original image personage Breath, and then is handled the hair zones of personage according to the color development attribute information, can improve hair zones in image with Matching degree between area of skin color, and then promote image processing effect.
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 Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is 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 attached drawings Obtain other attached 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 charts of image processing method in the embodiment of the present invention two;
Fig. 3 shows a kind of structure diagram of image processing apparatus in the embodiment of the present invention three;
Fig. 4 shows the structure diagram of another image processing apparatus in the embodiment of the present invention three;
Fig. 5 shows a kind of structure diagram of acquisition submodule in the embodiment of the present invention three;
Fig. 6 shows a kind of structure diagram of processing submodule in the embodiment of the present invention three;
Fig. 7 shows a kind of hardware architecture diagram of mobile terminal in each embodiment of the present invention.
Specific 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, shall fall within the protection scope of the present invention.
Embodiment one
With reference to Fig. 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, when getting original image, area of skin color and hair zones in original image are determined.
In embodiments of the present invention, mobile terminal can receive the original image of other equipment transmission, such as user from net When original image is downloaded on network, mobile terminal can receive the original image of application server transmission.Alternatively, mobile terminal can With when receiving camera applications enabled instruction, the shooting picture that camera is acquired is as original image, the embodiment of the present invention The mode of acquisition for mobile terminal original image is not especially limited.
When acquisition for mobile terminal is to original image, can the original image be determined by preset region segmentation model In area of skin color and hair zones.Wherein, which can be based on face recognition technology, pass through deep learning Method trains to obtain.
It should be noted that area of skin color can include the area of skin color of face part, neck part can also be included certainly Grade area of skin color, and the embodiment of the present invention is not especially limited this.
Step 102, according to the colour of skin attribute information of area of skin color, corresponding color development attribute information is obtained.
In embodiments of the present invention, colour of skin attribute information can be the average skin tone value of area of skin color, and mobile terminal can be with The average skin tone value of area of skin color is determined first, then using the average skin tone value of area of skin color as input parameter, by prior The color development Matching Model that training obtains, obtains the corresponding color development attribute information of average skin tone value, which can be Target color development value.Wherein, which can be according to the color development designer of profession, and a variety of colour of skin personages are sent out The result of color design is trained to obtain, therefore, the color development attribute information determined by the color development Matching Model, with image personage The matching degree of skin is higher.
Step 103, according to color development attribute information, hair zones are handled.
In embodiments of the present invention, mobile terminal can be by target color development value, the gray scale with each pixel of hair zones Value carries out color mixing, obtains the corresponding mixing color development value of each pixel, and then mobile terminal can be by each pixel Original pixel value replaces with mixing color development value, so as to fulfill the replacement of color development.
In embodiments of the present invention, it determines to believe with the corresponding color development attribute of the colour of skin attribute information of original image personage Breath, and then is handled the hair zones of personage according to the color development attribute information, can improve hair zones in image with Matching degree between area of skin color, and then promote image processing effect.
Embodiment two
With reference to Fig. 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, pass through the color development Matching Model after being trained.
In embodiments of the present invention, the realization method of this step can include:Obtain the sample image of predetermined number;It obtains Each corresponding sample mean skin tone value of sample image and the corresponding sample object color development value of each sample mean skin tone value; Build color development Matching Model;Using the sample mean skin tone value and the sample object color development value as input parameter, mould is matched to color development Type is trained, the color development Matching Model after being trained.
Wherein, mobile terminal can receive the sample image of predetermined number, and multiple sample image is included largely not With the face picture of the colour of skin, mobile terminal can determine the corresponding sample mean colour of skin of area of skin color in each sample image Value, then professional color development designer can be to character designs' color development of each colour of skin, and then design result is input to movement Terminal, it is then mobile whole so as to which mobile terminal can get the corresponding sample object color development value of each sample mean skin tone value End can build color development Matching Model, and the model parameter in the color development Matching Model is undetermined, and mobile terminal can be with the sample later This be averaged skin tone value and the sample object color development value are input parameter, and the color development Matching Model for treating rational method is instructed Practice, so as to the color development Matching Model after being trained, in color development Matching Model after training, model parameter has passed through instruction It gets, and then mobile terminal can determine the color development to match with certain colour of skin by the color development Matching Model after training.
For example, mobile terminal can obtain 10000 sample images, and obtain the corresponding sample mean of each sample image Skin tone value and the corresponding sample object color development value of each sample mean skin tone value, can build color development Matching Model later, and Using the sample mean skin tone value and the sample object color development value as input parameter, color development Matching Model is trained, is instructed Color development Matching Model after white silk.
Step 202, when getting original image, recognition of face is carried out to original image.
It in embodiments of the present invention, can be first to original image into pedestrian when acquisition for mobile terminal is to original image Face identifies, when identifying face from the original image, the step of mobile terminal can continue to execute subsequent adjustment color development, when From the original image it is unidentified go out face when, it is believed that the main body in original image is not personage, carries out color development adjusting It has little significance, at this point, mobile terminal can be used to indicate carrying there is no personage in the original image with end operation or display Show information, to prompt user provider that the image as personage carries out color development adjusting, so as to improve the efficiency of image procossing.
For example, the shooting picture that mobile terminal acquires after being started using camera applications is original image image, and to original Beginning image image carries out recognition of face.
Step 203, when identifying face in original image, the area of skin color in original image and hair area are determined Domain.
In embodiments of the present invention, when mobile terminal identifies face in original image, it may be determined that the original graph Main body as in is personage, and then mobile terminal can be by preset region segmentation model, to personage in the original image Area of skin color and hair zones are split, so that it is determined that going out the area of skin color and hair zones in the original image.
It should be noted that compared to other color spaces such as RGB, area of skin color is carried out under YCrCb color spaces The accuracy rate of identification is higher, therefore, in practical applications, if the color space of original image is except YCrCb color space Color space, then mobile terminal can be first to original image progress color space conversion, thus by the color of original image Space is converted to YCrCb color spaces, then carries out the identification of area of skin color again.In addition, if the color space of original image is YCrCb color spaces, then mobile terminal can directly carry out the identification of area of skin color, without carry out color space conversion.
For example, when mobile terminal identifies face in original image image, it may be determined that in original image image Area of skin color A and hair zones B.
Step 204, by the color development Matching Model after training, the corresponding target color development value of average skin tone value is obtained.
In embodiments of the present invention, the realization method of this step can include:Determine the average skin tone value of the area of skin color; Obtain the corresponding target color development value of average skin tone value.
Wherein, mobile terminal can determine and the average skin tone value of area of skin color, then being averaged with area of skin color first Skin tone value, by the color development Matching Model after training, determines the target to match with the skin tone value that is averaged as input parameter Color development value that is to say the color development that can determine that the colour of skin with original image personage matches, so as to obtain the average skin tone value Corresponding target color development value.
For example, mobile terminal can be using the average skin tone value A-ave of area of skin color A as input parameter, after training Color development Matching Model, determine the target color development value B-fsz to match with the skin tone value A-ave that is averaged.
Step 205, Gaussian Blur calculating is carried out to the transparency figure layer of hair zones, obtains the corresponding emergence of hair zones Region.
In embodiments of the present invention, mobile terminal can correspond to the transparency figure layer namely alpha channels of hair zones Figure layer carry out Gaussian Blur calculating, so as to obtain the corresponding emergence region of hair zones, the emergence region is relative to head Region is sent out, edge is more smooth soft.
For example, mobile terminal can carry out Gaussian Blur meter to the corresponding transparency figure layer of the alpha channels of hair zones B It calculates, obtains the corresponding emergence region B-b of hair zones B.
Step 206, target color development value is subjected to color mixing with the gray value of pixel each in emergence region respectively, obtained Into emergence region, each pixel is corresponding mixes color development value.
In embodiments of the present invention, mobile terminal can carry out densitometer to each pixel in emergence region first It calculates, obtains the gray value of each pixel, it then can be by the target color development value ash with pixel each in emergence region respectively Angle value carries out color mixing, and so as to obtain, each pixel in emergence region is corresponding to mix color development value.Wherein, with 8 colors For channel, for any pixel point in emergence region, mobile terminal can be determined by following formula (1) and formula (2) The corresponding mixing color development value of the pixel.
F (a, b)=2ab+a2(1-2b), a < 0.5 (1)
Wherein, f (a, b) is the corresponding mixing color development value of pixel, and a is the gray value of pixel and 255 ratio, b are Target color development value and 255 ratio.
It should be noted that above-mentioned formula (1) and formula (2) they are only a kind of example provided in an embodiment of the present invention, it is above-mentioned Formula (1) and formula (2), which are not formed the present invention, to be limited.
For example, mobile terminal can by above-mentioned formula (1) and formula (2), by target color development value B-fsz respectively with emergence The gray value of each pixel carries out color mixing in the B-b of region, obtains the corresponding mixing of each pixel in the B-b of emergence region Color development value B-hh.
Step 207, for any pixel point in emergence region, the original pixel value of the pixel is replaced with into the pixel The corresponding mixing color development value of point.
In embodiments of the present invention, for any pixel point in emergence region, mobile terminal can be by the pixel Original pixel value replaces with the corresponding mixing color development value of the pixel, so as to realize that the color development of image personage is adjusted, and adjusts Color development and the matching degree of image personage's colour of skin after section is higher, simultaneously as the color development after adjusting is selected based on the image personage colour of skin It takes, so as to which the color development after adjusting and the degree harmonious in colour of image entirety are higher.
In addition, since the corresponding emergence region of hair zones can be calculated by carrying out Gaussian Blur to the hair zones It arrives, therefore, compared to hair zones, edge is more smooth soft, and coarse details is less, therefore, mobile whole in emergence region End handles the pixel in emergence region, and the edge that can make new color development region is more natural.
Certainly, in practical applications, mobile terminal can also directly perform following step after step 204, including:It will Target color development value carries out color mixing with the gray value of pixel each in hair zones respectively, obtains each picture in hair zones The corresponding mixing color development value of vegetarian refreshments;For any pixel point in hair zones, the original pixel value of the pixel is replaced with The corresponding mixing color development value of the pixel.Namely mobile terminal can directly carry out hair zones color development mixing, the present invention is real Example is applied to be not especially limited mobile terminal processing hair zones or emergence region.
For example, for any pixel point in the B-b of emergence region, mobile terminal replaces the original pixel value of the pixel For the corresponding mixing color development value B-hh of the pixel, so as to which the color development of the pixel be adjusted.
In embodiments of the present invention, mobile terminal can establish color development matching based on the colour of skin and matched color development first Model may then pass through the color development Matching Model, determine the color development value that the colour of skin with original image personage matches, Jin Erke With according to the color development value, to personage's hair zones, corresponding emergence region is handled, so as to improve the color development after adjusting The degree harmonious in colour between matching degree and raising color development and image between image personage.
Embodiment three
With reference to Fig. 3, a kind of structure diagram of image processing apparatus 300 of the embodiment of the present invention three is shown, it specifically can be with Including:
Determining module 301, for when getting original image, determining the area of skin color and hair in the original image Region;
First acquisition module 302 for the colour of skin attribute information according to the area of skin color, obtains corresponding color development attribute Information;
Processing module 303, for according to the color development attribute information, handling the hair zones.
Optionally, with reference to Fig. 4, first acquisition module 302 includes:
Determination sub-module 3021, for determining the average skin tone value of the area of skin color;
Acquisition submodule 3022, for obtaining the corresponding target color development value of the average skin tone value;
Correspondingly, the processing module 303 includes:
Submodule 3031 is handled, for according to the target color development value, handling the hair zones.
Optionally, with reference to Fig. 4, described image processing unit 300 further includes:
Second acquisition module 304, for obtaining the sample image of predetermined number;
Third acquisition module 305, for obtaining the corresponding sample mean skin tone value of each sample image and each sample The corresponding sample object color development value of average skin tone value;
Module 306 is built, for building color development Matching Model;
Training module 307, it is right for using the sample mean skin tone value and the sample object color development value as input parameter Color development Matching Model is trained, the color development Matching Model after being trained;
Correspondingly, with reference to Fig. 5, the acquisition submodule 3022 includes:
Determination unit 30221, for by the color development Matching Model after the training, determining flat with the area of skin color The target color development value that equal skin tone value matches.
Optionally, with reference to Fig. 4, the processing module 303 further includes:
Fuzzy submodule 3032, for carrying out Gaussian Blur calculating to the transparency figure layer of the hair zones, obtains institute State the corresponding emergence region of hair zones.
Optionally, with reference to Fig. 6, the processing submodule 3031 includes:
Mixed cell 30311, for by the target color development value ash with each pixel in the emergence region respectively Angle value carries out color mixing, obtains the corresponding mixing color development value of each pixel in the emergence region;
Replacement unit 30312, for for any pixel point in the emergence region, by the original image of the pixel Plain value replaces with the corresponding mixing color development value of the pixel.
In embodiments of the present invention, mobile terminal can obtain the colour of skin with original image personage by the first acquisition module The corresponding color development attribute information of attribute information, and then can be according to the color development attribute information, by processing module to personage's Hair zones are handled, so as to improve the matching degree between color development and image personage after adjusting and improve color development Degree harmonious in colour between image.
Example IV
A kind of hardware architecture diagram of Fig. 7 mobile terminals of each embodiment to realize the present invention,
The mobile terminal 700 includes but not limited to:It is radio frequency unit 701, network module 702, audio output unit 703, defeated Enter unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor The components such as 710 and power supply 711.It will be understood by those skilled in the art that the mobile terminal structure shown in Fig. 7 is not formed Restriction to mobile terminal, mobile terminal can include than illustrate more or fewer components either combine certain 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 710, for when getting original image, determine the area of skin color in the original image and Hair zones;According to the colour of skin attribute information of the area of skin color, corresponding color development attribute information is obtained;According to the color development category Property information, handles the hair zones.
In embodiments of the present invention, mobile terminal can determine corresponding with the colour of skin attribute information of original image personage Color development attribute information, and then the hair zones of personage can be handled according to the color development attribute information, so as to improve Matching degree between color development and image personage after adjusting and improve degree harmonious in colour between color development and image.
It should be understood that the embodiment of the present invention in, radio frequency unit 701 can be used for receive and send messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, handled to processor 710;In addition, by uplink Data are sent to base station.In general, radio frequency unit 701 includes but not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 701 can also by radio communication system and network and other set Standby communication.
Mobile terminal has provided wireless broadband internet to the user by network module 702 and has accessed, and such as user is helped to receive It sends e-mails, browse webpage and access streaming video etc..
It is that audio output unit 703 can receive radio frequency unit 701 or network module 702 or in memory 709 The audio data of storage is converted into audio signal and exports as sound.Moreover, audio output unit 703 can also be provided and be moved The relevant audio output of specific function that dynamic terminal 700 performs is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 703 includes loud speaker, buzzer and receiver etc..
Input unit 704 is used to receive audio or video signal.Input unit 704 can include graphics processor (Graphics Processing Unit, GPU) 7041 and microphone 7042, graphics processor 7041 is in video acquisition mode Or the static images or the image data of video obtained in image capture mode by image capture apparatus (such as camera) carry out Reason.Treated, and picture frame may be displayed on display unit 706.Through graphics processor 7041, treated that picture frame can be deposited Storage is sent in memory 709 (or other storage mediums) or via radio frequency unit 701 or network module 702.Mike Wind 7042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The form output of mobile communication base station can be sent to via radio frequency unit 701 by being converted in the case of telephone calling model.
Mobile terminal 700 further includes at least one sensor 705, 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 7061, and proximity sensor can close when mobile terminal 700 is moved in one's ear Display panel 7061 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, can be used to identify mobile terminal posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);It passes Sensor 705 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 706 is used to show by information input by user or be supplied to the information of user.Display unit 706 can wrap Display panel 7061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used Display panel 7061 is configured in forms such as (Organic Light-Emitting Diode, OLED).
User input unit 707 can be used for receiving the number inputted or character information and generation and the use of mobile terminal The key signals input that family is set and function control is related.Specifically, user input unit 707 include touch panel 7071 and Other input equipments 7072.Touch panel 7071, also referred to as touch screen collect user on it or neighbouring touch operation (for example user uses any suitable objects such as finger, stylus or attachment on touch panel 7071 or in touch panel 7071 Neighbouring operation).Touch panel 7071 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 710, receiving area It manages the order that device 710 is sent and is performed.It is furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes touch panel 7071.In addition to touch panel 7071, user input unit 707 can also include other input equipments 7072.Specifically, other input equipments 7072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operating lever, details are not described herein.
Further, touch panel 7071 can be covered on display panel 7061, when touch panel 7071 is detected at it On or near touch operation after, send to processor 710 with determine touch event type, be followed by subsequent processing device 710 according to touch The type for touching event provides corresponding visual output on display panel 7061.Although in the figure 7, touch panel 7071 and display Panel 7061 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 touch panel 7071 and display panel 7061 and realize the function that outputs and inputs of mobile terminal, it is specific this Place does not limit.
Interface unit 708 is the interface that external device (ED) is connect with mobile terminal 700.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 708 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and One or more elements that the input received is transferred in mobile terminal 700 can be used in 700 He of mobile terminal Data are transmitted between external device (ED).
Memory 709 can be used for storage software program and various data.Memory 709 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 Audio data, phone directory etc.) etc..In addition, memory 709 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 710 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part is stored in storage by running or performing the software program being stored in memory 709 and/or module and call Data in device 709 perform the various functions of mobile terminal and processing data, so as to carry out integral monitoring to mobile terminal.Place Reason device 710 may include one or more processing units;Preferably, processor 710 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 710.
Mobile terminal 700 can also include the power supply 711 (such as battery) powered to all parts, it is preferred that power supply 711 Can be logically contiguous by power-supply management system and processor 710, so as to realize management charging by power-supply management system, put The functions such as electricity and power managed.
In addition, mobile terminal 700 includes some unshowned function modules, details are not described herein.
Embodiment five
Preferably, the embodiment of the present invention also provides a kind of mobile terminal, and including processor 710, memory 709 is stored in On memory 709 and the computer program that can be run on the processor 710, the computer program are performed by processor 710 Each process of the above-mentioned image processing method embodiments of Shi Shixian, and identical technique effect can be reached, it is repeated to avoid, here It repeats no more.
Embodiment six
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage 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, repeated to avoid, which is not described herein again.Wherein, the computer readable storage 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 elements, and And it further includes other elements that are not explicitly listed or further includes intrinsic for this process, method, article or device institute Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this Also there are other identical elements in the process of 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 of the present invention 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), used including some instructions 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 specific embodiment is only schematical rather than restricted, those of ordinary skill in the art Under the enlightenment of the present invention, present inventive concept and scope of the claimed protection are not being departed from, can also made very much Form is belonged within the protection of the present invention.

Claims (12)

1. a kind of image processing method, applied to mobile terminal, which is characterized in that the method includes:
When getting original image, area of skin color and hair zones in the original image are determined;
According to the colour of skin attribute information of the area of skin color, corresponding color development attribute information is obtained;
According to the color development attribute information, the hair zones are handled.
2. according to the method described in claim 1, it is characterized in that, the colour of skin attribute information according to the area of skin color, The step of obtaining corresponding color development attribute information, including:
Determine the average skin tone value of the area of skin color;
Obtain the corresponding target color development value of the average skin tone value;
Correspondingly, it is described according to the color development attribute information, the step of processing the hair zones, including:
According to the target color development value, the hair zones are handled.
3. according to the method described in claim 2, it is characterized in that, described when getting original image, determine described original Before the step of area of skin color and hair zones in image, further include:
Obtain the sample image of predetermined number;
Obtain the corresponding sample mean skin tone value of each sample image and the corresponding sample object of each sample mean skin tone value Color development value;
Build color development Matching Model;
Using the sample mean skin tone value and the sample object color development value as input parameter, color development Matching Model is instructed Practice, the color development Matching Model after being trained;
Correspondingly, described the step of obtaining the average skin tone value corresponding target color development value, including:
By the color development Matching Model after the training, the corresponding target color development value of the average skin tone value is obtained.
4. according to the method described in claim 2, it is characterized in that, described according to the target color development value, to the hair area Before the step of domain is handled, further include:
Gaussian Blur calculating is carried out to the transparency figure layer of the hair zones, obtains the corresponding emergence area of the hair zones Domain.
5. according to the method described in claim 4, it is characterized in that, described according to the target color development value, to the hair area The step of domain is handled, including:
The target color development value is subjected to color mixing with the gray value of each pixel in the emergence region respectively, obtains institute State the corresponding mixing color development value of each pixel in emergence region;
For any pixel point in the emergence region, the original pixel value of the pixel is replaced with into the pixel pair The mixing color development value answered.
6. a kind of image processing apparatus, which is characterized in that described image processing unit includes:
Determining module, for when getting original image, determining the area of skin color and hair zones in the original image;
First acquisition module for the colour of skin attribute information according to the area of skin color, obtains corresponding color development attribute information;
Processing module, for according to the color development attribute information, handling the hair zones.
7. image processing apparatus according to claim 6, which is characterized in that first acquisition module includes:
Determination sub-module, for determining the average skin tone value of the area of skin color;
Acquisition submodule, for obtaining the corresponding target color development value of the average skin tone value;
Correspondingly, the processing module includes:
Submodule is handled, for according to the target color development value, handling the hair zones.
8. image processing apparatus according to claim 7, which is characterized in that described image processing unit further includes:
Second acquisition module, for obtaining the sample image of predetermined number;
Third acquisition module, for obtaining the corresponding sample mean skin tone value of each sample image and each sample mean skin The corresponding sample object color development value of color value;
Module is built, for building color development Matching Model;
Training module, for using the sample mean skin tone value and the sample object color development value as input parameter, to color development It is trained with model, the color development Matching Model after being trained;
Correspondingly, the acquisition submodule includes:
Determination unit, for by the color development Matching Model after the training, determining the average skin tone value with the area of skin color The target color development value to match.
9. image processing apparatus according to claim 7, which is characterized in that the processing module further includes:
Fuzzy submodule, for carrying out Gaussian Blur calculating to the transparency figure layer of the hair zones, obtains the hair area The corresponding emergence region in domain.
10. image processing apparatus according to claim 9, which is characterized in that the processing submodule includes:
Mixed cell, for the target color development value to be carried out face with the gray value of each pixel in the emergence region respectively The mixture of colours obtains the corresponding mixing color development value of each pixel in the emergence region;
Replacement unit, for for any pixel point in the emergence region, the original pixel value of the pixel to be replaced For the corresponding mixing color development value of the pixel.
11. a kind of mobile terminal, which is characterized 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 described in image processing method the step of.
12. a kind of computer readable storage medium, which is characterized in that computer journey is stored on the computer readable storage medium Sequence, the image processing method as described in any one of claim 1 to 5 is realized when the computer program is executed by processor Step.
CN201711210052.1A 2017-11-27 2017-11-27 A kind of image processing method, device and mobile terminal Pending CN108198127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711210052.1A CN108198127A (en) 2017-11-27 2017-11-27 A kind of image processing method, device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711210052.1A CN108198127A (en) 2017-11-27 2017-11-27 A kind of image processing method, device and mobile terminal

Publications (1)

Publication Number Publication Date
CN108198127A true CN108198127A (en) 2018-06-22

Family

ID=62573245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711210052.1A Pending CN108198127A (en) 2017-11-27 2017-11-27 A kind of image processing method, device and mobile terminal

Country Status (1)

Country Link
CN (1) CN108198127A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109784301A (en) * 2019-01-28 2019-05-21 广州酷狗计算机科技有限公司 Image processing method, device, computer equipment and storage medium
CN109902569A (en) * 2019-01-23 2019-06-18 上海思立微电子科技有限公司 Conversion method, device and the fingerprint identification method of fingerprint image
CN109934895A (en) * 2019-03-18 2019-06-25 北京海益同展信息科技有限公司 Image local feature moving method and device
CN111260581A (en) * 2020-01-17 2020-06-09 北京达佳互联信息技术有限公司 Image processing method, device and storage medium
CN113763228A (en) * 2020-06-01 2021-12-07 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
WO2022160701A1 (en) * 2021-01-29 2022-08-04 北京市商汤科技开发有限公司 Special effect generation method and apparatus, device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694110A (en) * 2004-05-07 2005-11-09 日本先锋公司 Hairstyle suggesting system, hairstyle suggesting method, and computer program product
JP2013008319A (en) * 2011-06-27 2013-01-10 Kao Corp Hair color presentation method
CN105139437A (en) * 2015-06-29 2015-12-09 天脉聚源(北京)科技有限公司 Skin color matching-filtering method and device of virtual football player
CN106919738A (en) * 2017-01-19 2017-07-04 深圳市赛亿科技开发有限公司 A kind of hair style matching process
CN107256555A (en) * 2017-05-25 2017-10-17 腾讯科技(上海)有限公司 A kind of image processing method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694110A (en) * 2004-05-07 2005-11-09 日本先锋公司 Hairstyle suggesting system, hairstyle suggesting method, and computer program product
JP2013008319A (en) * 2011-06-27 2013-01-10 Kao Corp Hair color presentation method
CN105139437A (en) * 2015-06-29 2015-12-09 天脉聚源(北京)科技有限公司 Skin color matching-filtering method and device of virtual football player
CN106919738A (en) * 2017-01-19 2017-07-04 深圳市赛亿科技开发有限公司 A kind of hair style matching process
CN107256555A (en) * 2017-05-25 2017-10-17 腾讯科技(上海)有限公司 A kind of image processing method, device and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902569A (en) * 2019-01-23 2019-06-18 上海思立微电子科技有限公司 Conversion method, device and the fingerprint identification method of fingerprint image
CN109784301A (en) * 2019-01-28 2019-05-21 广州酷狗计算机科技有限公司 Image processing method, device, computer equipment and storage medium
CN109934895A (en) * 2019-03-18 2019-06-25 北京海益同展信息科技有限公司 Image local feature moving method and device
CN111260581A (en) * 2020-01-17 2020-06-09 北京达佳互联信息技术有限公司 Image processing method, device and storage medium
CN111260581B (en) * 2020-01-17 2023-09-26 北京达佳互联信息技术有限公司 Image processing method, device and storage medium
CN113763228A (en) * 2020-06-01 2021-12-07 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113763228B (en) * 2020-06-01 2024-03-19 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium
WO2022160701A1 (en) * 2021-01-29 2022-08-04 北京市商汤科技开发有限公司 Special effect generation method and apparatus, device, and storage medium

Similar Documents

Publication Publication Date Title
CN108198127A (en) A kind of image processing method, device and mobile terminal
CN108184050B (en) Photographing method and mobile terminal
CN107835364A (en) One kind is taken pictures householder method and mobile terminal
CN107093418A (en) A kind of screen display method, computer equipment and storage medium
CN107835367A (en) A kind of image processing method, device and mobile terminal
CN108230283A (en) A kind of textures material recommends method and electronic equipment
CN107895352A (en) A kind of image processing method and mobile terminal
CN109819167B (en) Image processing method and device and mobile terminal
CN108920119A (en) A kind of sharing method and mobile terminal
CN110298304A (en) A kind of skin detecting method and terminal
CN108427873A (en) A kind of biological feather recognition method and mobile terminal
CN108668024A (en) A kind of method of speech processing and terminal
CN109474787A (en) A kind of photographic method, terminal device and storage medium
CN108462826A (en) A kind of method and mobile terminal of auxiliary photo-taking
CN108008991A (en) A kind of image processing method, terminal and computer-readable recording medium
CN109167914A (en) A kind of image processing method and mobile terminal
CN110533651A (en) A kind of image processing method and device
CN108196740A (en) A kind of icon display method, device and mobile terminal
CN109981904A (en) A kind of method for controlling volume and terminal device
CN109448069A (en) A kind of template generation method and mobile terminal
CN109671034A (en) A kind of image processing method and terminal device
CN109104578A (en) A kind of image processing method and mobile terminal
CN108958623A (en) A kind of application program launching method and terminal device
CN108600544A (en) A kind of Single-hand control method and terminal
CN109639981A (en) A kind of image capturing 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180622