CN109284694A - Image processing method and device, electronic equipment, computer readable storage medium - Google Patents
Image processing method and device, electronic equipment, computer readable storage medium Download PDFInfo
- Publication number
- CN109284694A CN109284694A CN201811014149.XA CN201811014149A CN109284694A CN 109284694 A CN109284694 A CN 109284694A CN 201811014149 A CN201811014149 A CN 201811014149A CN 109284694 A CN109284694 A CN 109284694A
- Authority
- CN
- China
- Prior art keywords
- image
- target
- portrait
- feature information
- detection
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/64—Three-dimensional objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
This application involves a kind of image processing methods and device, electronic equipment, computer readable storage medium.The described method includes: obtaining the first image and corresponding second image comprising target portrait, wherein, second image includes the corresponding depth information of the first image, detect target portrait corresponding fisrt feature information in the first image, and detection target portrait corresponding second feature information in the second image, the target gender that target portrait is determined according to fisrt feature information and second feature information is handled the first image according to target gender.Since sex-screening can be carried out according to the first image and the second image including depth information, image is handled according to gender, the accuracy of image procossing can be improved.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of image processing method, device, electronic equipment, meter
Calculation machine readable storage medium storing program for executing.
Background technique
With the development of computer technology, image procossing mode is more and more abundant.Electronic equipment can provide more for image
Kind paster material keeps picture material more abundant so that paster material is added in image;Electronic equipment can also detect
There are portraits in image, carry out U.S. face processing etc. to portrait.However, in traditional technology electronic equipment to the processing of image often all
Be it is identical, there is a problem of that image procossing accuracy is low.
Summary of the invention
The embodiment of the present application provides a kind of image processing method, device, electronic equipment, computer readable storage medium, can
To improve the accuracy of image procossing.
A kind of image processing method, comprising:
Obtain the first image and corresponding second image comprising target portrait, wherein second image includes described
The corresponding depth information of first image;
Detect the target portrait corresponding fisrt feature information in the first image, and the detection target portrait
The corresponding second feature information in second image;
The target gender of the target portrait is determined according to the fisrt feature information and the second feature information;
The first image is handled according to the target gender.
A kind of image processing apparatus, comprising:
Module is obtained, for obtaining the first image and corresponding second image comprising target portrait, wherein described second
Image includes the corresponding depth information of the first image;
Detection module, for detecting the target portrait corresponding fisrt feature information in the first image, and inspection
Survey the target portrait corresponding second feature information in second image;
Determining module, for determining the target portrait according to the fisrt feature information and the second feature information
Target gender;
Processing module, for being handled according to the target gender the first image.
A kind of electronic equipment, including memory and processor store computer program, the calculating in the memory
When machine program is executed by the processor, so that the processor executes following steps:
Obtain the first image and corresponding second image comprising target portrait, wherein second image includes described
The corresponding depth information of first image;
Detect the target portrait corresponding fisrt feature information in the first image, and the detection target portrait
The corresponding second feature information in second image;
The target gender of the target portrait is determined according to the fisrt feature information and the second feature information;
The first image is handled according to the target gender.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
Following steps are realized when row:
Obtain the first image and corresponding second image comprising target portrait, wherein second image includes described
The corresponding depth information of first image;
Detect the target portrait corresponding fisrt feature information in the first image, and the detection target portrait
The corresponding second feature information in second image;
The target gender of the target portrait is determined according to the fisrt feature information and the second feature information;
The first image is handled according to the target gender.
Above-mentioned image processing method, by obtaining the first image comprising target portrait and including the corresponding depth of the first image
The second image of information is spent, target portrait corresponding fisrt feature information and correspondence in the second image in the first image are detected
Second feature information, the target gender of target portrait is determined according to fisrt feature information and second feature information, according to target
Gender handles the first image.Since gender inspection can be carried out according to the first image and the second image including depth information
It surveys, image is handled according to gender, the accuracy of image procossing can be improved.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the applied environment figure of image processing method in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is the flow chart of image processing method in another embodiment;
Fig. 4 is the flow chart being adjusted in one embodiment to image;
Fig. 5 is the flow chart of detection image characteristic information in one embodiment;
Fig. 6 is the structural block diagram of image processing apparatus in one embodiment;
Fig. 7 is the structural schematic diagram of electronic equipment in one embodiment;
Fig. 8 is the schematic diagram of image processing circuit in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and
It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein,
But these elements should not be limited by these terms.These terms are only used to distinguish the first element from the other element.Citing comes
It says, in the case where not departing from scope of the present application, the first image can be known as the second image, and similarly, it can be by second
Image is known as the first image.First image and the second image both image, but it is not same image.
Fig. 1 is the applied environment figure of image processing method in one embodiment.As shown in Figure 1, being equipped on electronic equipment
Camera 102.Specifically, electronic equipment can be shot by camera 102, obtain the shooting of camera 102 includes mesh
Mark the first image and the second image of portrait, wherein the second image includes the corresponding depth information of the first image, detects target person
As the corresponding fisrt feature information in the first image and target portrait corresponding second feature information in the second image is detected,
The target gender that target portrait is determined according to fisrt feature information and second feature information, according to target gender to the first image into
Row processing.It is understood that above-mentioned electronic equipment can be mobile phone, computer, wearable device etc., it is not limited here.
Fig. 2 is the flow chart of image processing method in one embodiment.Image processing method in the present embodiment, with operation
It is described on electronic equipment in Fig. 1.As shown in Fig. 2, image processing method includes step 202 to step 208.Its
In:
Step 202, obtain include target portrait the first image and corresponding second image, wherein the second image includes
The corresponding depth information of first image.
First image and the second image refer to the image comprising target portrait that electronic equipment is acquired by camera.Specifically
Ground, the first image and the second image can be what electronic equipment was generated by the picture of camera real-time capture current scene;?
The image of electronic equipment local can be stored in.First image and the second image photographed scene having the same.Depth information
Refer to the distance between subject information in camera and photographed scene.There are many acquisition methods of depth information, such as
Binocular telemetry, Structure light method, time-of-flight method etc..It is understood that the first image refers to two dimensional image, that is, do not include deep
Spend the flat image of information;Second image refers to that 3-D image corresponding with the first image, the second image include in the first image
Distribution situation, that is, depth information of the subject in photographed scene.Target portrait can be one or more.Specifically, mesh
Mark portrait can be the portrait that portrait area and the ratio of image area in image are more than area threshold, be also possible to people in image
Portrait of the image distance from camera in pre-determined distance can also be when, there are when multiple portraits, area is maximum default in image
Quantity portrait etc. is without being limited thereto, and area threshold, pre-determined distance and preset data can be according to practical applications as mentioned herein
Demand setting, it is not limited here.
Electronic equipment can carry out portrait detection to the first image, include target portrait in the first image when detecting
When, available the first image comprising target portrait of electronic equipment and the second figure comprising the corresponding depth information of the first image
Picture.
Step 204, target portrait corresponding fisrt feature information in the first image, and detection target portrait are detected the
Corresponding second feature information in two images.
The feature letter of image refers to color characteristic, textural characteristics, shape feature, spatial relation characteristics of image etc..Electronics
The corresponding characteristic information of equipment detection image feature can pass through HOG (Histogram of Oriented Gradient, side
To histogram of gradients) characteristics algorithm, LBP (Local Binary Pattern, local binary patterns) characteristics algorithm, Haar-
Like characteristics algorithm etc. is detected, and can also be detected etc. by the neural network of exportable image feature information.First
Characteristic information refers to two-dimensional characteristic information such as color, texture, shape etc.;Second feature information refers to three-dimensional characteristic information such as
Spatial relationship, Object Depth etc..Specifically, electronic equipment can detecte the dermatoglyph of target portrait, skin in the first image
The corresponding characteristic informations of features such as the colour of skin, eyes, eyebrow, shape of face, ear, clothes color, movement shape are fisrt feature letter
Breath.Electronic equipment detects target portrait corresponding second feature information in the second image, and specifically, electronic equipment is according to second
The depth information that image includes is detected, to obtain the eyes of target portrait and the depth relationship of face, Adam's apple and neck
The corresponding characteristic information of features such as depth relationship, nose length as second feature information.
Step 206, the target gender of target portrait is determined according to fisrt feature information and second feature information.
Electronic equipment can analyze fisrt feature information and second feature information, determine target based on the analysis results
The corresponding target gender of portrait.Specifically, electronic equipment can establish two disaggregated models, in the training process of two disaggregated models
In, the first training image of detection the first instruction corresponding with the second training image of the depth information comprising the first training image
Practice characteristic information and the second training characteristics information, and after the gender of training image is marked, by the first training characteristics information
With the second training characteristics information input into model, the prediction gender exported, according to prediction gender and true gender to mould
The parameter of type is adjusted, and two disaggregated model adjusted is exported according to fisrt feature information and second feature information
Corresponding target gender.Electronic equipment can also prestore the corresponding first pre-stored characteristics information of different sexes and the second pre-stored characteristics
Information, to fisrt feature information be matched with the first pre-stored characteristics information, second feature information and the second pre-stored characteristics
Information is matched, according to the highest first pre-stored characteristics information of matching degree and the corresponding gender conduct of the second pre-stored characteristics information
The target gender of target portrait.
Step 208, the first image is handled according to target gender.
After electronic equipment obtains the target gender of target portrait, the first image can be handled according to target gender,
Specific processing mode is without limitation.Specifically, electronic equipment can according to target gender to the first image carry out U.S. face beautification,
Color enhancement, AR (Augmented Reality, reality enhancing) processing, addition paster material etc. are without being limited thereto.For example, working as mesh
When mark gender is female, corresponding processing, which can be, adds more lovely, romantic paster material such as face text, cartoon image etc.,
When target gender is male, corresponding processing can be addition movement class such as basketball, football, and weapon exercises such as daggers and swords etc. meet male
Paster material.Specifically, electronic equipment prestores the corresponding processing mode of different sexes, when the target gender for determining target portrait
Afterwards, corresponding target processing mode is obtained according to target gender, the first image is handled according to target processing mode.
Embodiment provided by the present application, by obtain comprising target portrait the first image and comprising the first image it is corresponding
Second image of depth information, detect target portrait in the first image corresponding fisrt feature information and in the second image it is right
The second feature information answered determines the target gender of target portrait according to fisrt feature information and second feature information, according to mesh
Mark gender handles the first image, and the accuracy of image procossing can be improved.
As shown in figure 3, in one embodiment, the image processing method provided includes step 302 to step 310.Wherein:
Step 302, by the first image and and the second image be input to sex-screening model, wherein sex-screening model packet
Containing the first detection model and the second detection model.
Step 304, target portrait corresponding fisrt feature information in the first image is detected according to the first detection model.
Step 306, target portrait corresponding second feature information in the second image is detected according to the second detection model.
Electronic equipment can train the sex-screening model of exportable target gender.Specifically, Caffe can be used
(Convolutional Architecture for Fast Feature Embedding, convolutional neural networks frame) frame
Training neural network model.During model training, the two dimensional image of portrait gender and corresponding will can largely be marked
3-D image is input in neural network model, is detected, is obtained to 3-D image and two dimensional image by neural network model
The prediction gender that must be exported obtains loss function according to prediction gender and true gender, according to loss function to neural network mould
The parameter of type is adjusted, and the sex-screening model after training is allowed accurately to export the target gender of target portrait.Property
Other detection model may include the first detection model and the second detection model, wherein the first detection model is used for two dimensional image
It is detected, the second detection model is for detecting 3-D image according to depth information.
After the first detection model and the second detection model can be respectively trained in electronic equipment, then by the first detection model and
Two detection models are in parallel, and the sex-screening model formed handles two dimensional image and 3-D image.Specifically,
Available second image of electronic equipment and the first image comprising the corresponding depth information of the second image, and by the first image and
Second image is input in sex-screening model, so that the first detection model can examine the target portrait in the first image
It surveys, obtains the corresponding fisrt feature information of target portrait, the second detection model is according to the depth information of the second image to the second figure
Target portrait as in is detected, and the corresponding second feature information of target portrait is obtained.
Step 308, the target gender of target portrait is determined according to fisrt feature information and second feature information.
Electronic equipment can be handled fisrt feature information and second feature information by gender detection model, be obtained
The target gender of target portrait.It specifically, include full articulamentum and classifier in sex-screening model, electronic equipment can pass through
The full articulamentum of sex-screening model handles fisrt feature information and second feature information, and output target portrait is corresponding not
The other confidence level of the same sex, classifier can determine the target gender of target portrait according to the confidence level of different sexes.Confidence level is
Feeling the pulse with the finger-tip mark portrait is the credibility of the gender.
In one embodiment, electronic equipment can also carry out target detection to the first image, according to object detection results
Sex-screening result is adjusted.Specifically, electronic equipment can prestore a variety of subject images, by the first image with prestore
Subject image matched, obtain the corresponding target object of matched subject image as object detection results.Electronic equipment
The model of exportable target object can also be trained, and the first image is input in the model, obtains the target object of output
As object detection results.Electronic equipment is adjusted sex-screening result according to object detection results, and specifically, electronics is set
The standby confidence level that the corresponding different sexes of target portrait can be adjusted according to object detection results, thus according to difference adjusted
The confidence level of gender determines target gender.Specific adjustment rule can be set according to actual needs, it is not limited here.Example
Such as, it is female that gender is improved when electronic equipment can include at least one in doll, skirt, hair band etc. in object detection results
Confidence level;It can include raising property when basketball etc. experiences at least one in articles, sneakers, belt etc. with object detection results
It Wei not male's confidence level etc..
Step 310, the first image is handled according to target gender.
By the way that the first image and the second image are input to sex-screening model, target person is detected according to the first detection model
As the corresponding fisrt feature information in the first image, it is corresponding in the second image that target portrait is detected according to the second detection model
Second feature information, to determine the target gender of target portrait according to fisrt feature information and the second characteristic information, according to
Target gender handles the first image, and the accuracy of sex-screening can be improved, to improve the accuracy of image procossing.
As shown in figure 4, in one embodiment, the first image and the second image are inputted in the image processing method provided
Process to sex-screening model includes step 402 to step 406.Wherein:
Step 402, the corresponding first object resolution ratio of gender detection model and the second target resolution are obtained.
Resolution ratio refers to the pixel number that image is included.Resolution ratio is higher, image is more clear.Electronic equipment is in training property
When other detection model, the corresponding resolution ratio of training image of input can be set, then electronic equipment is by corresponding point of two dimensional image
Resolution is as first object resolution ratio, and the corresponding resolution ratio of 3-D image is as the second target resolution.First object resolution ratio
It can be set according to actual needs with the second target resolution.It is understood that first object resolution ratio and the second target point
Resolution can be identical, be also possible to different.For example, first object resolution ratio and the second target resolution can be
224*224, is also possible to that first object resolution ratio is 224*224, the second target resolution is that 250*250 etc. is without being limited thereto.
Step 404, the first image is adjusted according to first object resolution ratio, and according to the second target resolution to
Two images are adjusted.
Electronic equipment can be according to first object resolution ratio and the second target resolution respectively to the first image and the second figure
As being adjusted.Specifically, the resolution ratio of electronic equipment adjustment the first image and the second image can be the first image and the
The resolution ratio of two images increases or reduces, the first image so as to improve detection and the corresponding fisrt feature of the second image are believed
The accuracy and detection efficiency of breath and second feature information.
Step 406, the first image adjusted and the second image adjusted are input to sex-screening model.
Electronic equipment can be according to first object resolution ratio and the second target resolution respectively to the first image and the second figure
As that the first image adjusted and the second image can be input to sex-screening model, so as to detect after being adjusted
The corresponding target gender of target portrait in first image handles the first image according to target gender, image can be improved
The accuracy of processing.
In one embodiment, target portrait is detected in the image processing method provided corresponding first in the first image
Characteristic information, comprising: convert corresponding gray level image for the first image, detect target portrait in gray level image corresponding first
Characteristic information.
Image is made of multiple pixels.Gray level image refers to the monochrome image being made of a channel.Electronics is set
The standby image that can convert the image with multiple color channels to single color channel.Specifically, electronic equipment can obtain
The color-values for taking corresponding each channel of each pixel in the first image, convert gray scale for the color-values in each channel
Value specifically can be converted using mean value method, integer method etc., be obtained according to the gray value of pixel each after conversion
To the corresponding gray level image of the first image.For example, when the first image is RGB (Red, Green, Blue, RGB) image, electricity
Each of sub- available first image of equipment pixel tri- channel values of corresponding RGB, then the rgb value of pixel is turned
Gray value is turned to, the gray level image being made of each pixel and its gray value is obtained, so that electronic equipment can be to grayscale image
As being detected, target portrait corresponding fisrt feature information in gray level image is obtained.
In one embodiment, target portrait is detected in the image processing method provided corresponding first in the first image
Characteristic information, and the process of detection target portrait corresponding second feature information in the second image, comprising:
Step 502, target portrait corresponding first portrait area and correspondence in the second image in the first image are obtained
The second portrait area.
First portrait area refers to the region in the first image where target portrait.Specifically, the first portrait area can be with
There is one or more.Electronic equipment can carry out portrait detection to the first image, obtain target portrait present in the first image
And corresponding first portrait area of target portrait, and according to the first portrait Region Matching into the second image corresponding second people
As region.Specifically, the corresponding pixel position in the first portrait zone boundary in available first image of electronic equipment, according to
Corresponding second portrait area in second image of pixel position acquisition on boundary;Electronic equipment can also be by the first image
One portrait area is mapped in the second image, obtains corresponding second portrait area in the second image.
Step 504, the corresponding fisrt feature information of the first portrait area of detection, and the second portrait area of detection corresponding the
Two characteristic informations.
The corresponding two dimensional character information of the corresponding fisrt feature information, that is, target portrait of first portrait area.Second portrait area
The corresponding second feature information in the domain, that is, corresponding three-dimensional feature information of target portrait.Electronic equipment can obtain target portrait pair
After the first portrait area and the second portrait area answered, the corresponding fisrt feature information of the first portrait area of detection and detection second
The corresponding second feature information of portrait area, to determine the mesh of target portrait according to fisrt feature information and second feature information
Gender is marked, the first image is handled according to target gender, the accuracy of image procossing can be improved.
In one embodiment, the mistake that the first image is handled according to target gender in the image processing method provided
Journey, comprising: obtain the corresponding target tupe of target gender;According to target tupe to the first portrait area at
Reason.
Target tupe is determined according to target gender, to the processing mode of image.Target tupe can have
It is a variety of, it does not limit herein.When there are multiple target portraits, electronic equipment can be according to the corresponding different mesh of different target portrait
It marks gender and obtains corresponding target tupe, so that the first portrait area corresponding to target portrait is handled.For example, electric
Sub- equipment can prestore gender when being female, and corresponding target tupe be the more fair and tender filter of addition, background blurring, add
Blush, addition lipstick etc., when gender is male, corresponding target tupe is uniform, sharp to carry out mill skin, the adjustment colour of skin to skin
Change face mask, filter of the dark system of addition etc..Electronic equipment can prestore the corresponding target tupe of different sexes, when true
After the target gender of portrait that sets the goal, corresponding target tupe is obtained according to target gender, the first portrait area is carried out
Processing.Electronic equipment can also prestore Different treatments and corresponding target tupe according to different sexes, wherein processing
Mode may include that U.S. face processing mode, body beautification processing mode, colors countenance mode etc. are without being limited thereto.Electronic equipment can basis
Target gender obtains corresponding processing mode, obtains corresponding target tupe according to processing mode, also can receive by with
The processing mode of family triggering obtains corresponding target tupe further according to processing mode and target gender.For example, electronic equipment
Corresponding processing mode can be obtained as U.S. face processing mode, corresponding target is handled according to U.S. face when target gender is female
Tupe such as add blush, increase eyelash length, to skin carry out whitening, addition lipstick to the first portrait area at
Reason;The electronic equipment processing mode such as body beautification processing mode that also available user inputs obtains corresponding according to target gender
When target tupe such as target gender is male, corresponding body beautification processing mode can be even skin tone, increase brightness, elongate leg
Portion etc..Electronic equipment obtains corresponding target tupe according to target gender, handles the first portrait area, Ke Yiti
The accuracy of hi-vision processing.
In one embodiment, the first portrait area is carried out according to target tupe in the image processing method provided
The process of processing can also include: to obtain the corresponding depth information of the second portrait area, according to the corresponding depth of the second portrait area
Degree information and target tupe handle the first portrait area.
Specifically, the corresponding depth information of the second portrait area in available second image of electronic equipment, according to target
Tupe combines the corresponding depth information of the second portrait area to determine specific processing position, at the first portrait area
Reason.For example, electronic equipment can be according to the corresponding depth information of the second portrait area when target tupe is to elongate leg
Specific leg position is determined, so as to carry out elongation processing to leg position;When target tupe is addition lipstick,
Electronic equipment can determine Hp position according to the corresponding depth information of the second portrait area, so as to carry out to Hp position
Lipstick processing etc. is added, the accuracy of image procossing can be improved.
In one embodiment, the image processing method provided further include: to the first image carry out portrait detection, obtain to
A few candidate portrait;The corresponding depth information of candidate portrait is obtained according to the second image, depth information is less than depth threshold
Candidate portrait as target portrait.
Depth threshold can be set according to actual needs, it is not limited here.For example, depth threshold can be 1 meter, 2 meters,
3 meters etc. without being limited thereto.Electronic equipment can carry out portrait detection to the first image, obtain at least one candidate that detection obtains
Picture, and the corresponding depth information of each candidate portrait is obtained according to the second image.Specifically, the available each time of electronic equipment
It chooses as the corresponding candidate region in the first image, which is matched in the second image and obtains the candidate region pair
The depth information answered, so that the corresponding candidate portrait in the candidate region that depth information is less than depth threshold is as target portrait.
Wherein, the corresponding depth information in candidate region can be the average value of the depth information of each pixel in candidate region, can also
To be that the depth information median of each pixel, the depth information mode that can also be each pixel etc. are without being limited thereto.Example
Such as, when be respectively 0.5 meter according to the second image detection to depth information, 0.8 meter, 1.2 meters, 1.5 meters of candidate region when, if deep
Spending threshold value is 1 meter, then 0.5 meter of candidate portrait corresponding with 0.8 meter of candidate region can be determined as target person by electronic equipment
Picture.In one embodiment, electronic equipment directly can also carry out portrait detection according to the depth information of the second image, obtain deep
It spends information and is less than the portrait of depth threshold as target portrait.
It should be understood that although each step in the flow chart of Fig. 2-5 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-5
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
Fig. 6 is the structural block diagram of the image processing apparatus of one embodiment.As shown in fig. 6, image processing apparatus 600 includes
Obtain module 602, detection module 604, determining module 606 and processing module 608.Wherein:
Module 602 is obtained, for obtaining the first image and corresponding second image comprising target portrait, wherein second
Image includes the corresponding depth information of the first image.
Detection module 604, for detecting target portrait corresponding fisrt feature information in the first image, and detection target
Portrait corresponding second feature information in the second image.
Determining module 606, for determining the target gender of target portrait according to fisrt feature information and second feature information.
Processing module 608, for being handled according to target gender the first image.
In one embodiment, detection module 604 can be also used for for the first image and the second image being input to gender inspection
Survey model, wherein sex-screening model includes the first detection model and the second detection model, detects mesh according to the first detection model
Mark portrait corresponding fisrt feature information in the first image;Target portrait is detected in the second image according to the second detection model
Corresponding second feature information.
In one embodiment, obtaining module 602 can be also used for obtaining the corresponding first object point of gender detection model
Resolution and the second target resolution;The first image is adjusted according to first object resolution ratio, and is differentiated according to the second target
Rate is adjusted the second image;First image adjusted and the second image adjusted are input to sex-screening model.
In one embodiment, detection module 604 can be also used for converting the first image to corresponding gray level image, inspection
Target portrait is surveyed in the corresponding fisrt feature information of gray level image.
In one embodiment, detection module 604 can be also used for obtaining target portrait corresponding the in the first image
One portrait area and corresponding second portrait area in the second image;
Detect the corresponding fisrt feature information of the first portrait area, and the corresponding second feature letter of the second portrait area of detection
Breath.
In one embodiment, processing module 608 can be also used for obtaining the corresponding target tupe of target gender;Root
The first portrait area is handled according to target tupe.
In one embodiment, obtaining module 608 can be also used for obtaining after acquisition carries out portrait detection to the first image
At least one first portrait area;Obtain at least one first portrait area in the second image it is corresponding at least one second
Depth information in second image is less than the corresponding portrait of the second portrait area of depth threshold as target person by portrait area
Picture.
The division of modules is only used for for example, in other embodiments, can will scheme in above-mentioned image processing apparatus
As processing unit is divided into different modules as required, to complete all or part of function of above-mentioned image processing apparatus.
Fig. 7 is the schematic diagram of internal structure of electronic equipment in one embodiment.As shown in fig. 7, the electronic equipment includes logical
Cross the processor and memory of system bus connection.Wherein, which supports entire electricity for providing calculating and control ability
The operation of sub- equipment.Memory may include non-volatile memory medium and built-in storage.Non-volatile memory medium is stored with behaviour
Make system and computer program.The computer program can be performed by processor, to be mentioned for realizing following each embodiment
A kind of image processing method supplied.Built-in storage provides high speed for the operating system computer program in non-volatile memory medium
The running environment of caching.The electronic equipment can be mobile phone, tablet computer or personal digital assistant or wearable device etc..
Realizing for the modules in image processing apparatus provided in the embodiment of the present application can be the shape of computer program
Formula.The computer program can be run in terminal or server.The program module that the computer program is constituted is storable in terminal
Or on the memory of server.When the computer program is executed by processor, method described in the embodiment of the present application is realized
Step.
The embodiment of the present application also provides a kind of electronic equipment.It include image processing circuit in above-mentioned electronic equipment, at image
Reason circuit can use hardware and or software component realization, it may include define ISP (Image Signal Processing, figure
As signal processing) the various processing units of pipeline.Fig. 8 is the schematic diagram of image processing circuit in one embodiment.Such as Fig. 8 institute
Show, for purposes of illustration only, only showing the various aspects of image processing techniques relevant to the embodiment of the present application.
As shown in figure 8, image processing circuit includes ISP processor 840 and control logic device 850.Imaging device 810 captures
Image data handled first by ISP processor 840, ISP processor 840 to image data analyzed with capture can be used for really
The image statistics of fixed and/or imaging device 810 one or more control parameters.Imaging device 810 may include having one
The camera of a or multiple lens 812 and imaging sensor 814.Imaging sensor 814 may include colour filter array (such as
Bayer filter), imaging sensor 814 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 814 and wavelength
Information, and the one group of raw image data that can be handled by ISP processor 840 is provided.Sensor 820 (such as gyroscope) can be based on biography
The parameter (such as stabilization parameter) of the image procossing of acquisition is supplied to ISP processor 840 by 820 interface type of sensor.Sensor 820
Interface can use SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface,
The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can also be sent to sensor 820 by imaging sensor 814, sensor 820 can be based on biography
Raw image data is supplied to ISP processor 840 to 820 interface type of sensor or sensor 820 deposits raw image data
It stores up in video memory 830.
ISP processor 840 handles raw image data pixel by pixel in various formats.For example, each image pixel can
Bit depth with 8,10,12 or 14 bits, ISP processor 840 can carry out raw image data at one or more images
Reason operation, statistical information of the collection about image data.Wherein, image processing operations can be by identical or different bit depth precision
It carries out.
ISP processor 840 can also receive image data from video memory 830.For example, 820 interface of sensor will be original
Image data is sent to video memory 830, and the raw image data in video memory 830 is available to ISP processor 840
It is for processing.Video memory 830 can be independent special in a part, storage equipment or electronic equipment of memory device
It with memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 814 interface of imaging sensor or from 820 interface of sensor or from video memory 830
When raw image data, ISP processor 840 can carry out one or more image processing operations, such as time-domain filtering.Treated schemes
As data can be transmitted to video memory 830, to carry out other processing before shown.ISP processor 840 is from image
Memory 830 receives processing data, and carries out in original domain and in RGB and YCbCr color space to the processing data
Image real time transfer.Treated that image data may be output to display 880 for ISP processor 840, for user's viewing and/or
It is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processor
840 output also can be transmitted to video memory 830, and display 880 can read image data from video memory 830.?
In one embodiment, video memory 830 can be configured to realize one or more frame buffers.In addition, ISP processor 840
Output can be transmitted to encoder/decoder 860, so as to encoding/decoding image data.The image data of coding can be saved,
And it is decompressed before being shown in 880 equipment of display.Encoder/decoder 860 can be real by CPU or GPU or coprocessor
It is existing.
The statistical data that ISP processor 840 determines, which can be transmitted, gives control logic device Unit 850.For example, statistical data can wrap
Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 812 shadow correction of lens
814 statistical information of device.Control logic device 850 may include the processor and/or micro-control for executing one or more routines (such as firmware)
Device processed, one or more routines can statistical data based on the received, determine the control parameter and ISP processor of imaging device 810
840 control parameter.For example, the control parameter of imaging device 810 may include 820 control parameter of sensor (such as gain, exposure
The time of integration, stabilization parameter of control etc.), camera flash control parameter, 812 control parameter of lens (such as focus or zoom
With focal length) or these parameters combination.ISP control parameter may include for automatic white balance and color adjustment (for example, in RGB
During processing) 812 shadow correction parameter of gain level and color correction matrix and lens.
Electronic equipment according to above-mentioned image processing techniques the embodiment of the present application may be implemented described in image processing method
Method.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer
The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors
When, so that the step of processor executes image processing method.
A kind of computer program product comprising instruction, when run on a computer, so that computer executes image
Processing method.
It may include non-to any reference of memory, storage, database or other media used in the embodiment of the present application
Volatibility and/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM in a variety of forms may be used
, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM),
Enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application
Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of image processing method characterized by comprising
Obtain the first image and corresponding second image comprising target portrait, wherein second image includes described first
The corresponding depth information of image;
The target portrait corresponding fisrt feature information in the first image, and the detection target portrait are detected in institute
State corresponding second feature information in the second image;
The target gender of the target portrait is determined according to the fisrt feature information and the second feature information;
The first image is handled according to the target gender.
2. the method according to claim 1, wherein the method also includes:
The first image and the second image are input to sex-screening model, wherein the sex-screening model includes first
Detection model and the second detection model;
Detection target portrait corresponding fisrt feature information in the first image, and the detection target portrait
The corresponding second feature information in second image, comprising:
Target portrait corresponding fisrt feature information in the first image is detected according to first detection model;
Target portrait corresponding second feature information in second image is detected according to second detection model.
3. according to the method described in claim 2, it is characterized in that, described by the first image and the second being input to property of image
Other detection model, comprising:
Obtain the corresponding first object resolution ratio of the sex-screening model and the second target resolution;
The first image is adjusted according to the first object resolution ratio, and according to second target resolution to institute
The second image is stated to be adjusted;
First image adjusted and the second image adjusted are input to the sex-screening model.
4. the method according to claim 1, wherein the detection target portrait is in the first image
Corresponding fisrt feature information, comprising:
Corresponding gray level image is converted by the first image, detects the target portrait in the corresponding institute of the gray level image
State fisrt feature information.
5. the method according to claim 1, wherein the detection target portrait is in the first image
Corresponding fisrt feature information, and detection target portrait corresponding second feature information in second image, comprising:
Obtain the target portrait corresponding first portrait area and correspondence in second image in the first image
The second portrait area;
Detect the corresponding fisrt feature information of first portrait area, and the corresponding institute of detection second portrait area
State second feature information.
6. according to the method described in claim 5, it is characterized in that, it is described according to the target gender to the first image into
Row processing, comprising:
Obtain the corresponding target tupe of the target gender;
First portrait area is handled according to the target tupe.
7. the method according to claim 1, wherein the method also includes:
Portrait detection is carried out to the first image, obtains at least one candidate portrait;
The corresponding depth information of the candidate portrait is obtained according to second image, the depth information is less than depth threshold
Candidate portrait as target portrait.
8. a kind of image processing apparatus characterized by comprising
Module is obtained, for obtaining the first image and corresponding second image comprising target portrait, wherein second image
Include the corresponding depth information of the first image;
Detection module, for detecting the target portrait corresponding fisrt feature information in the first image, and detection institute
State target portrait corresponding second feature information in second image;
Determining module, for determining the target of the target portrait according to the fisrt feature information and the second feature information
Gender;
Processing module, for being handled according to the target gender the first image.
9. a kind of electronic equipment, including memory and processor, computer program, the computer are stored in the memory
When program is executed by the processor, so that the processor executes the image procossing as described in any one of claims 1 to 7
The step of method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method as described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811014149.XA CN109284694A (en) | 2018-08-31 | 2018-08-31 | Image processing method and device, electronic equipment, computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811014149.XA CN109284694A (en) | 2018-08-31 | 2018-08-31 | Image processing method and device, electronic equipment, computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109284694A true CN109284694A (en) | 2019-01-29 |
Family
ID=65183934
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811014149.XA Pending CN109284694A (en) | 2018-08-31 | 2018-08-31 | Image processing method and device, electronic equipment, computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109284694A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368763A (en) * | 2020-03-09 | 2020-07-03 | 北京奇艺世纪科技有限公司 | Image processing method and device based on head portrait and computer readable storage medium |
CN116012949A (en) * | 2023-02-06 | 2023-04-25 | 南京智蓝芯联信息科技有限公司 | People flow statistics and identification method and system under complex scene |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101226591A (en) * | 2008-01-31 | 2008-07-23 | 上海交通大学 | Personal identification method based on mobile phone pick-up head combining with human face recognition technique |
US8041082B1 (en) * | 2007-11-02 | 2011-10-18 | Google Inc. | Inferring the gender of a face in an image |
CN102262440A (en) * | 2010-06-11 | 2011-11-30 | 微软公司 | Multi-modal gender recognition |
CN102542252A (en) * | 2011-11-18 | 2012-07-04 | 江西财经大学 | Intelligent advertisement delivery system |
CN102682294A (en) * | 2012-05-17 | 2012-09-19 | 南京理工大学常熟研究院有限公司 | Gender identification method based on face shape and generalized self-organizing mapping |
CN103413270A (en) * | 2013-08-15 | 2013-11-27 | 北京小米科技有限责任公司 | Method and device for image processing and terminal device |
CN105069400A (en) * | 2015-07-16 | 2015-11-18 | 北京工业大学 | Face image gender recognition system based on stack type sparse self-coding |
CN106339719A (en) * | 2016-08-22 | 2017-01-18 | 微梦创科网络科技(中国)有限公司 | Image identification method and image identification device |
CN106446821A (en) * | 2016-09-20 | 2017-02-22 | 北京金山安全软件有限公司 | Method and device for identifying gender of user and electronic equipment |
CN106529502A (en) * | 2016-08-01 | 2017-03-22 | 深圳奥比中光科技有限公司 | Lip language identification method and apparatus |
CN106991654A (en) * | 2017-03-09 | 2017-07-28 | 广东欧珀移动通信有限公司 | Human body beautification method and apparatus and electronic installation based on depth |
CN106997457A (en) * | 2017-03-09 | 2017-08-01 | 广东欧珀移动通信有限公司 | Human limbs recognition methods, human limbs identifying device and electronic installation |
CN107742274A (en) * | 2017-10-31 | 2018-02-27 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and electronic equipment |
CN107818305A (en) * | 2017-10-31 | 2018-03-20 | 广东欧珀移动通信有限公司 | Image processing method, device, electronic equipment and computer-readable recording medium |
CN107945107A (en) * | 2017-11-30 | 2018-04-20 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and electronic equipment |
CN107995428A (en) * | 2017-12-21 | 2018-05-04 | 广东欧珀移动通信有限公司 | Image processing method, device and storage medium and mobile terminal |
-
2018
- 2018-08-31 CN CN201811014149.XA patent/CN109284694A/en active Pending
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8041082B1 (en) * | 2007-11-02 | 2011-10-18 | Google Inc. | Inferring the gender of a face in an image |
CN101226591A (en) * | 2008-01-31 | 2008-07-23 | 上海交通大学 | Personal identification method based on mobile phone pick-up head combining with human face recognition technique |
CN102262440A (en) * | 2010-06-11 | 2011-11-30 | 微软公司 | Multi-modal gender recognition |
CN102542252A (en) * | 2011-11-18 | 2012-07-04 | 江西财经大学 | Intelligent advertisement delivery system |
CN102682294A (en) * | 2012-05-17 | 2012-09-19 | 南京理工大学常熟研究院有限公司 | Gender identification method based on face shape and generalized self-organizing mapping |
CN103413270A (en) * | 2013-08-15 | 2013-11-27 | 北京小米科技有限责任公司 | Method and device for image processing and terminal device |
CN105069400A (en) * | 2015-07-16 | 2015-11-18 | 北京工业大学 | Face image gender recognition system based on stack type sparse self-coding |
CN106529502A (en) * | 2016-08-01 | 2017-03-22 | 深圳奥比中光科技有限公司 | Lip language identification method and apparatus |
CN106339719A (en) * | 2016-08-22 | 2017-01-18 | 微梦创科网络科技(中国)有限公司 | Image identification method and image identification device |
CN106446821A (en) * | 2016-09-20 | 2017-02-22 | 北京金山安全软件有限公司 | Method and device for identifying gender of user and electronic equipment |
CN106991654A (en) * | 2017-03-09 | 2017-07-28 | 广东欧珀移动通信有限公司 | Human body beautification method and apparatus and electronic installation based on depth |
CN106997457A (en) * | 2017-03-09 | 2017-08-01 | 广东欧珀移动通信有限公司 | Human limbs recognition methods, human limbs identifying device and electronic installation |
CN107742274A (en) * | 2017-10-31 | 2018-02-27 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and electronic equipment |
CN107818305A (en) * | 2017-10-31 | 2018-03-20 | 广东欧珀移动通信有限公司 | Image processing method, device, electronic equipment and computer-readable recording medium |
CN107945107A (en) * | 2017-11-30 | 2018-04-20 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and electronic equipment |
CN107995428A (en) * | 2017-12-21 | 2018-05-04 | 广东欧珀移动通信有限公司 | Image processing method, device and storage medium and mobile terminal |
Non-Patent Citations (4)
Title |
---|
XIAOLONG WANG 等: "Gender classification of depth images based on shape and texture analysis", 《 2013 IEEE GLOBAL CONFERENCE ON SIGNAL AND INFORMATION PROCESSING》 * |
孙宁 等: "基于局部二元模式算子的人脸性别分类方法", 《华中科技大学学报(自然科学版)》 * |
武勃 等: "人脸的性别分类", 《计算机研究与发展》 * |
苗雪兰: "图像模式识别系统及技术", 《面向对象的计算机图形理论与应用技术》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368763A (en) * | 2020-03-09 | 2020-07-03 | 北京奇艺世纪科技有限公司 | Image processing method and device based on head portrait and computer readable storage medium |
CN116012949A (en) * | 2023-02-06 | 2023-04-25 | 南京智蓝芯联信息科技有限公司 | People flow statistics and identification method and system under complex scene |
CN116012949B (en) * | 2023-02-06 | 2023-11-17 | 南京智蓝芯联信息科技有限公司 | People flow statistics and identification method and system under complex scene |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107730445B (en) | Image processing method, image processing apparatus, storage medium, and electronic device | |
CN108537749B (en) | Image processing method, image processing device, mobile terminal and computer readable storage medium | |
CN108537155B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN107730446B (en) | Image processing method, image processing device, computer equipment and computer readable storage medium | |
CN109767467A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN108900769A (en) | Image processing method, device, mobile terminal and computer readable storage medium | |
CN108055452A (en) | Image processing method, device and equipment | |
CN107808137A (en) | Image processing method, device, electronic equipment and computer-readable recording medium | |
CN109191403A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN111028137B (en) | Image processing method, apparatus, electronic device, and computer-readable storage medium | |
CN110502986A (en) | Identify character positions method, apparatus, computer equipment and storage medium in image | |
CN107509031A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN110334635A (en) | Main body method for tracing, device, electronic equipment and computer readable storage medium | |
CN107993209B (en) | Image processing method, image processing device, computer-readable storage medium and electronic equipment | |
CN108024054A (en) | Image processing method, device and equipment | |
CN108734676A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN109360254B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN108875619A (en) | Method for processing video frequency and device, electronic equipment, computer readable storage medium | |
CN107493432A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN109246354A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN108846807A (en) | Light efficiency processing method, device, terminal and computer readable storage medium | |
CN107911625A (en) | Light measuring method, device, readable storage medium storing program for executing and computer equipment | |
CN107945106B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN108616700A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN109327626A (en) | Image-pickup method, device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190129 |
|
RJ01 | Rejection of invention patent application after publication |