CN107911625A - Light measuring method, device, readable storage medium storing program for executing and computer equipment - Google Patents

Light measuring method, device, readable storage medium storing program for executing and computer equipment Download PDF

Info

Publication number
CN107911625A
CN107911625A CN201711240797.2A CN201711240797A CN107911625A CN 107911625 A CN107911625 A CN 107911625A CN 201711240797 A CN201711240797 A CN 201711240797A CN 107911625 A CN107911625 A CN 107911625A
Authority
CN
China
Prior art keywords
light
human face
face region
area
skin
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
CN201711240797.2A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711240797.2A priority Critical patent/CN107911625A/en
Publication of CN107911625A publication Critical patent/CN107911625A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a kind of light measuring method, device, readable storage medium storing program for executing and computer equipment.Light measuring method includes:Into preview mode of taking pictures, the human face region in the preview window is identified;Face Detection is carried out to human face region, obtains the area of skin color of human face region;Using area of skin color as light statistical regions are surveyed, carry out surveying light processing to obtain photometry result to surveying light statistical regions.Light measuring method can eliminate the influence that light is surveyed to human face region of the non-area of skin color such as hair, eyes, ornaments, substantially improve the survey light effect of human face region, improve the precision to human face region photometry result.

Description

Light measuring method, device, readable storage medium storing program for executing and computer equipment
Technical field
This application involves field of computer technology, more particularly to light measuring method, device, readable storage medium storing program for executing and computer Equipment.
Background technology
The continuous development of Internet technology, the popularization of mobile terminal, provide the user great convenience, for example, due to The portability of intelligent terminal, user are taken pictures using mobile phone replacement camera.
During taking pictures, the shadow of the hair of people, eyes, the ornaments worn can be subject to based on the survey light based on face Ring, it is bad that it surveys light effect.
The content of the invention
The embodiment of the present application provides a kind of light measuring method, device, readable storage medium storing program for executing and computer equipment, can improve people The survey light effect in face region, improves the precision to human face region photometry result.
A kind of light measuring method, including:
Into preview mode of taking pictures, the human face region in the preview window is identified;
Face Detection is carried out to the human face region, obtains the area of skin color of the human face region;
Using the area of skin color as light statistical regions are surveyed, the survey light statistical regions are carried out surveying light processing to obtain survey Light result.
A kind of light measurer, including:
Face recognition module, for when preview mode is taken pictures in entrance, identifying the human face region in the preview window;
Skin tone detection module, for carrying out Face Detection to the human face region, obtains the colour of skin area of the human face region Domain;
Optical module is surveyed, for using the area of skin color as light statistical regions are surveyed, being surveyed to the survey light statistical regions Light processing is to obtain photometry result.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processor The step of above-mentioned light measuring method is realized during row.
A kind of computer equipment, including memory and processor, store computer-readable instruction in the memory, institute Instruction is stated when being performed by the processor so that the above-mentioned light measuring method of the processor execution.
Above-mentioned light measuring method, device, readable storage medium storing program for executing and computer equipment, by carrying out colour of skin inspection to human face region Survey, obtain the area of skin color of human face region;And using the area of skin color of acquisition as survey light statistical regions, to survey light statistical regions into Row survey light processing to obtain photometry result, its is with strong points, can eliminate the non-area of skin color such as hair, eyes, ornaments to people The influence of face area metering, substantially improves the survey light effect of human face region, improves to the accurate of human face region photometry result Degree.
Brief description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of application, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the block diagram of one embodiment Computer equipment;
Fig. 2 is the flow chart of the light measuring method in an embodiment;
Fig. 3 is to carry out Face Detection to the human face region in an embodiment, obtains the area of skin color of the human face region Flow chart;
Fig. 4 is the flow chart for establishing complexion model in an embodiment based on pre-set color space;
Fig. 5 is to obtain the area of skin color of the human face region and non-area of skin color according to the gray level image in an embodiment Flow chart;
Fig. 6 is the flow chart of light measuring method in another embodiment;
Fig. 7 is that the survey light statistical regions are carried out surveying light processing to obtain the flow chart of photometry result in an embodiment;
Fig. 8 is the internal structure block diagram of light measurer in an embodiment;
Fig. 9 is the schematic diagram of image procossing in one embodiment.
Embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the object, technical solution and advantage of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the application, and It is not used in restriction the application.
The application provides a kind of light measuring method, which is applied to computer equipment.Computer equipment can be bag Include mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sells mobile terminal), vehicle-mounted computer, any mobile terminal device such as Wearable.
As shown in Figure 1, the computer equipment includes the processor, memory, display screen and defeated by system bus connection Enter device.Wherein, memory may include non-volatile memory medium and processor.The non-volatile memory medium of computer equipment Operating system and computer program are stored with, which provides when being executed by processor to realize in the embodiment of the present application A kind of light measuring method.The processor is used to provide calculating and control ability, supports the operation of whole computer equipment.Computer Built-in storage in equipment provides environment for the operation of the computer program in non-volatile memory medium.Computer equipment is shown Display screen can be liquid crystal display or electric ink display screen etc., and input unit can be the touch layer covered on display screen, Can also be the button, trace ball or the Trackpad that are set on computer equipment shell or external keyboard, Trackpad or Mouse etc..The computer equipment can be mobile phone, tablet computer or personal digital assistant or Wearable etc..This area skill Art personnel are appreciated that the structure shown in Fig. 1, only with the block diagram of the relevant part-structure of application scheme, not structure The restriction for the computer equipment that paired application scheme is applied thereon, specific computer equipment can include than institute in figure Show more or fewer components, either combine some components or arranged with different components.
It should be noted that a kind of light measuring method provided in an embodiment of the present invention is taken pictures on a computing device Realized under scene.Just start the imaging device of computer equipment when user wants to take pictures, which can be preposition Camera, rear camera, dual camera etc..
As shown in Fig. 2, in one embodiment, there is provided a kind of light measuring method, comprises the following steps:
Step 202:Into preview mode of taking pictures, the human face region in the preview window is identified.
Start the imaging device of computer equipment, into preview mode of taking pictures, pass through default face recognition algorithms, identification It whether there is human face region in the preview window.It is for instance possible to use the method based on geometric properties, Local Features Analysis method (Local Face Analysis), eigenface method (Eigenface or PCA), the method based on elastic model, neutral net Method (Neural Networks) or the method for other recognizable faces identify the human face region in the preview window.
Step 204:Face Detection is carried out to the human face region, obtains the area of skin color of the human face region.
One deep neural network model of generation or fitting one complexion model of generation are trained by a large amount of labeled data.Its In, computer equipment can build deep neural network model beforehand through the deep neural network model of machine learning structure When, substantial amounts of sample image can be obtained, the picture of a large amount of area of skin color is included in sample image, can be according to the skin of facial image Region and non-skin region are marked, and will be divided into the image of skin area and non-skin region as training image, and will Input of the training image of mark as deep neural network model, is trained by machine learning, obtains depth nerve net Network model.
Correspondingly, corresponding complexion model can also be established, complexion model refers to (parsing) of algebraically or looks into The forms such as table represent that the color of which pixel belongs to the colour of skin, or symbolize the similarity degree of a certain pixel and the colour of skin.
By default deep neural network model or complexion model, Face Detection is carried out to human face region, obtains face The area of skin color in region and non-area of skin color.Wherein, non-area of skin color can be understood as hair, eyes, the mouth in the preview window Lip, tooth, the ornaments region worn and the background area in addition to human face region.Area of skin color can be understood as the preview window In the human face region unless region of area of skin color.
Step 206:Using the area of skin color as light statistical regions are surveyed, the survey light knot for surveying light statistical regions is obtained Fruit.
Using the area of skin color of acquisition as survey light statistical regions, according to default light measuring method only to survey light statistical regions into Pedestrian's face surveys light processing, to obtain the photometry result for surveying light statistical regions.Wherein, which is used for as exposure-processed Reference parameter.
Above-mentioned light measuring method, by carrying out Face Detection to human face region, obtains the area of skin color of human face region;And it will obtain The area of skin color taken survey light processing to obtain photometry result as light statistical regions are surveyed, to surveying light statistical regions, it is directed to Property it is strong, can eliminate the non-area of skin color such as hair, eyes, ornaments to human face region survey light influence, substantially improve face The survey light effect in region, improves the precision to human face region photometry result.
As shown in figure 3, in one embodiment, Face Detection is carried out to the human face region, obtains the human face region Area of skin color, including:
Step 302:Complexion model is established based on pre-set color space.
The colour of skin is important face characteristic, although others colour of skin of not agnate, all ages and classes, dissimilarity seems not Together, but this difference is concentrated mainly in brightness.Removing in the chrominance space of brightness, the skin distribution of different people has cluster Property.
Further, as shown in figure 4, in one embodiment, complexion model is established based on pre-set color space, specific bag Include:
Step 3021:YCgCr is selected as the pre-set color space.
There are many color spaces at present, wherein the color space applied to skin detection also has many, such as normalize RGB face The color space such as the colour space, YCbCr, YCgCr, YUV, YIQ, HIS/GIHS, CIE-Lab and CIE-Luv.
In order to the area of skin color of human face region be split from complicated background, it is necessary to using being suitable for the different colours of skin With the reliable complexion model of different illumination.One color component for being preferably used for partitioning into skin, it should make skin and non-skin Skin region Relatively centralized in the color component histogram, each occupies different distributions, lap between the two It is more few better.
Wherein, YCbCr color spaces have and the visual perception uniformity of people, and colour of skin Clustering Effect is good and brightness with The characteristics of colourity is separate.Since the Cb components in YCbCr space are the difference of blue component B and brightness Y, and the B in the colour of skin Component proportion compares small.But in YCgCr spaces Cg using green component G and brightness Y difference, while it more added with Express to effect the feature of the colour of skin.Preferably clustered since the colour of skin has in YCgCr color spaces ratio in YCbCr color spaces Property, so selection YCgCr is as the pre-set color space.
Step 3023:Colour of skin sample is simulated in the normal distribution in the pre-set color space based on two-dimensional Gaussian function to build Found the complexion model.
In YCgCr color spaces, the colour of skin sample for meeting normal distribution meets Gaussian Profile in feature space, therefore, Complexion model can be established based on two-dimensional Gaussian function.Gauss model forms continuous data by calculating the probable value of pixel Information simultaneously obtains a skin color probability map, and the confirmation of the colour of skin is completed according to numerical values recited.In order to determine the parameter in function, adopt Collect a large amount of colour of skin samples and carry out counting statistics characteristic value.Wherein, statistical characteristics is respectively average and the association side of chrominance C g, Cr Difference.
Step 304:It is based on the complexion model that the human face region is empty from the first color space conversion to the second color Between.
Complexion model based on foundation, input the preview window include the view data of human face region, by human face region from First color space conversion is the second color space.Wherein, the first color space is RGB color, and the second color space is YCgCr color spaces.
Step 306:The similarity of each pixel of human face region is obtained in second color space.
In YCgCr color spaces, the similarity of each pixel is obtained using two-dimensional Gaussian function, that is, represents that the point belongs to The possibility size of skin color.
Step 308:The gray level image of the human face region is obtained according to the similarity.
By the complexion model of foundation, the size of the possibility of complexion model is belonged to according to color image pixel, table represents The size of gray value, is changed into gray-scale map by coloured image.
Step 310:The area of skin color of the human face region and non-area of skin color are obtained according to the gray level image.
Further, as shown in figure 5, obtaining the area of skin color of the human face region and the non-colour of skin according to the gray level image Region, including:
Step 3101:Median filter process is carried out to the gray level image.
Specifically, processing can be filtered gray level image using the median filter of 5*5, is made an uproar with reducing image high frequency The influence of sound, so makes area of skin color in image keep coherent profile.
Step 3103:Binary conversion treatment is carried out to the gray level image after the median filter process, with described in acquisition The area of skin color of human face region and non-area of skin color.
After filtered processing, skin color segmentation is carried out using binaryzation, to each pixel of human face region, is represented with 0 (black) Non- area of skin color, 1 (white) represent area of skin color.Image binaryzation, refers to by selected threshold value, and the colour of skin is carried out to facial image Segmentation, that is, find out the line of demarcation of area of skin color and non-area of skin color.It can be appreciated that:, should by obtaining a similarity value Similarity value meets that to all the points in similarity graph picture what it is more than the similarity value is skin area, less than the similarity value Be non-skin area.
As shown in fig. 6, in one embodiment, before identifying the human face region in the preview window, further include:
Step 602:Judge that the view data of described the preview window whether there is colour shift;
Influenced by extraneous light environment, especially light source colour, the view data that the preview window collection comes often is sent out Raw colour shift.Since body surface is there are mirror-reflection or interface reflection, object usually produces bloom, in the figure of the preview window As in data, bloom part corresponds to high-brightness region (close to maximum brightness).If exceed highest brightness value in view data 95% number of pixels is fully big, and the respective average value of R, G of these pixels, B component successively between ratio it is larger partially From in 1 when, then it is assumed that there are colour shift in view data.
When the view data of the preview window is there are during colour shift, then execution acts 604:Light benefit is carried out to view data Repay.
Specifically, tri- components of view data R, G, B respective average value avgR, avgG, avgB are obtained;According to acquisition Average value avgR, avgG, avgB calculate the average gray value avgGray of view data;For each pixel in view data P, adjusts tri- components of R, G, B of each pixel P so that tri- respective average values of component of the RGB of view data are all after adjustment Average gray value avgGray is leveled off to, to realize that the light to view data compensates.
In the present embodiment, by carrying out light compensation deals to the view data in the preview window, disappear to a certain extent Except the influence of the objective environments such as light source colour, meanwhile, the image after light compensation deals is examined than raw video picture Effect is surveyed to become apparent.
As shown in fig. 7, in one embodiment, the survey light statistical regions are carried out surveying light processing to obtain survey light knot Fruit, including:
Step 702:The survey light statistical regions are subjected to image block areas division.
After survey light statistical regions are obtained, above-mentioned survey light statistical regions can be divided into the image of predetermined quantity respectively Block.Wherein, predetermined quantity can be 64 × 48 (pixels).
It should be noted that predetermined quantity according to system performance and/or can realize demand etc. voluntarily in specific implementation Setting, the present embodiment are not construed as limiting the size of above-mentioned predetermined quantity.
Step 704:Obtain the brightness value of each described image block.
Obtain the brightness value of each image block in the predetermined quantity for surveying the division of light statistical regions.
Step 706:The effective image block for surveying light statistical regions is obtained according to the brightness value of described image block.
Obtain according to the brightness value of each image block of acquisition and default first threshold, second threshold and survey light Statistical Area The effective image block in domain.Wherein, first threshold, second threshold are used to represent the size of brightness value, and first threshold is more than second Threshold value.The range of luminance values of effective image block is between second threshold and first threshold.
Delete brightness in the image block for surveying light statistical regions and be less than second threshold higher than the image block of first threshold and brightness Image block, obtain effective image block.Survey the incandescent blocks of light statistical regions that is, can delete (brightness is higher than the in image block The image block of one threshold value) and very dark piece (image block of the brightness less than second threshold in image block), survey light statistical regions to obtain Image effective image block in the block.
It should be noted that first threshold, second threshold according to system performance and/or can realize need in specific implementation Sets itself, the present embodiment such as ask to be not construed as limiting to above-mentioned first threshold, the size of second threshold.
Step 708:The survey for surveying light statistical regions is obtained according to the brightness value of default weight and the effective image block Light result.
The luminance weighted average value for surveying light statistical regions is calculated according to the brightness value of default weight and effective image block, will be counted The luminance weighted average value obtained is calculated as the photometry result for surveying light statistical regions.
Wherein, the default weight of survey light statistical regions according to system performance and/or can realize demand in specific implementation Deng sets itself, the present embodiment is not construed as limiting the default weight size for surveying light statistical regions, but under normal circumstances, surveys light statistics The weight of central area is more than the weight of peripheral portion in the effective image block in region.
In one embodiment, the survey light Statistical Area is obtained according to the brightness value of default weight and the effective image block After the photometry result in domain, further include:
Step 710:According to the photometry result, the exposure time for surveying light statistical regions is controlled, to the survey light system Meter region is exposed compensation.
Specifically, according to the object brightness for surveying light statistical regions and the difference for the photometry result for surveying light statistical regions, and Exposure time set in advance, calculates the exposure time reached needed for the object brightness for surveying light statistical regions, is obtained according to calculating Exposure time to survey light statistical regions be exposed compensation.
Further, if the object brightness for surveying light statistical regions is 10 times of the photometry result for surveying light statistical regions, and in advance The exposure time first set is 1/100s, then reaches exposure time=10 × 1/ needed for the object brightness for surveying light statistical regions 100=1/10s.
Exposure compensating provided in this embodiment can realize that the brightness of light statistical regions is surveyed in adjustment, and then can lift backlight Etc. the portrait effect in scene to be captured under scene, make the image of shooting that gratifying visual effect be presented.
As shown in figure 8, the embodiment of the present application also provides a kind of light measurer, including:
Face recognition module 810, for when preview mode is taken pictures in entrance, identifying the human face region in the preview window;
Skin tone detection module 820, for carrying out Face Detection to the human face region, obtains the colour of skin of the human face region Region;
Optical module 830 is surveyed, for using the area of skin color as light statistical regions are surveyed, being carried out to the survey light statistical regions Light processing is surveyed to obtain photometry result.
Above-mentioned light measurer, by carrying out Face Detection to human face region, obtains the area of skin color of human face region;And it will obtain The area of skin color taken survey light processing to obtain photometry result as light statistical regions are surveyed, to surveying light statistical regions, it is directed to Property it is strong, can eliminate the non-area of skin color such as hair, eyes, ornaments to human face region survey light influence, substantially improve face The survey light effect in region, improves the precision to human face region photometry result.
In one embodiment, skin tone detection module, including:
Model foundation unit, for establishing complexion model based on pre-set color space;
Converting unit, for based on the complexion model by the human face region from the first color space conversion to the second face The colour space;
Similarity acquiring unit, for obtaining the similar of each pixel of human face region in second color space Degree;
Gray shade unit, for obtaining the gray level image of the human face region according to the similarity;
Recognition unit, for obtaining the area of skin color of the human face region and non-area of skin color according to the gray level image.
In one embodiment, light measurer further includes:Light compensating module, for judging the figure of described the preview window As data are there are during colour shift, light compensation is carried out to described image data.
In one embodiment, surveying optical module includes:
Division unit, for the survey light statistical regions to be carried out image block areas division;
Luminance obtaining unit, for obtaining the brightness value of each described image block;
Effective image unit, for obtaining the effective image for surveying light statistical regions according to the brightness value of described image block Block;
Light acquiring unit is surveyed, for obtaining the survey light statistics according to the brightness value of default weight and the effective image block The photometry result in region.
In one embodiment, optical module is surveyed to further include:
Exposing unit, for the exposure time according to the photometry result control survey light statistical regions, to the survey Light statistical regions are exposed compensation.
The embodiment of the present application also provides a kind of computer-readable recording medium, is stored thereon with computer program, the meter Calculation machine program realizes following steps when being executed by processor:
Into preview mode of taking pictures, the human face region in the preview window is identified;
Face Detection is carried out to the human face region, obtains the area of skin color of the human face region;
Using the area of skin color as light statistical regions are surveyed, the survey light statistical regions are carried out surveying light processing to obtain survey Light result.
Above computer readable storage medium storing program for executing Computer program (instruction) when executed, by being carried out to human face region Face Detection, obtains the area of skin color of human face region;And using the area of skin color of acquisition as light statistical regions are surveyed, to surveying light statistics Region survey light processing to obtain photometry result, its is with strong points, can eliminate the non-area of skin color such as hair, eyes, ornaments To human face region survey light influence, substantially improve the survey light effect of human face region, improve to human face region photometry result Precision.
The embodiment of the present application also provides a kind of computer equipment.Above computer equipment includes light measuring circuit, surveys photoelectricity Road can utilize hardware and or software component to realize, it may include define ISP (Image Signal Processing, image letter Number processing) pipeline various processing units.Fig. 9 is the schematic diagram of image procossing in one embodiment.As shown in figure 9, for ease of Illustrate, the various aspects with the relevant image processing techniques of the embodiment of the present application are only shown.
As shown in figure 9, image processing circuit includes ISP processors 940 and control logic device 950.Imaging device 910 is caught View data handled first by ISP processors 940, ISP processors 940 view data is analyzed with catch can be used for it is true The image statistics of fixed and/or imaging device 910 one or more control parameters.Imaging device 910 may include there is one The camera of a or multiple lens 912 and imaging sensor 914.Imaging sensor 914 may include colour filter array (such as Bayer filters), imaging sensor 914 can obtain the luminous intensity caught with each imaging pixel of imaging sensor 914 and wavelength Information, and the one group of raw image data that can be handled by ISP processors 940 is provided.Sensor 920 (such as gyroscope) can be based on passing The parameter (such as stabilization parameter) of the image procossing of collection is supplied to ISP processors 940 by 920 interface type of sensor.Sensor 920 Interface can utilize 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 be also sent to sensor 920 by imaging sensor 914, sensor 920 can be based on passing 920 interface type of sensor is supplied to ISP processors 940, or sensor 920 to deposit raw image data raw image data Store up in video memory 930.
ISP processors 940 handle 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 processors 940 can carry out raw image data at one or more images Reason operation, statistical information of the collection on view data.Wherein, image processing operations can be by identical or different bit depth precision Carry out.
ISP processors 940 can also receive view data from video memory 930.For example, 920 interface of sensor will be original View data is sent to video memory 930, and the raw image data in video memory 930 is available to ISP processors 940 It is for processing.Video memory 930 can be independent special in the part of storage arrangement, storage device or electronic equipment With memory, and it may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 914 interface of imaging sensor or from 920 interface of sensor or from video memory 930 During raw image data, ISP processors 940 can carry out one or more image processing operations, such as time-domain filtering.Figure after processing As data can be transmitted to video memory 930, to carry out other processing before shown.ISP processors 940 can also be from Video memory 930 receives processing data, and the processing data are carried out in original domain and in RGB and YCbCr color spaces Image real time transfer.View data after processing may be output to display 980, so that user watches and/or by graphics engine Or GPU (Graphics Processing Unit, graphics processor) is further handled.In addition, the output of ISP processors 940 Also it can be transmitted to video memory 930, and display 980 can read view data from video memory 930.In one embodiment In, video memory 930 can be configured as realizing one or more frame buffers.In addition, the output of ISP processors 940 can be sent out Encoder/decoder 970 is given, so as to encoding/decoding image data.The view data of coding can be saved, and be shown in Decompressed before in 980 equipment of display.
The step of processing view data of ISP processors 940, includes:To view data carry out VFE (Video Front End, Video front) handle and CPP (Camera Post Processing, camera post processing) processing.At the VFE of view data Reason may include correct view data contrast or brightness, modification record in a digital manner illumination conditions data, to picture number According to compensate processing (such as white balance, automatic growth control, γ correction etc.), to view data be filtered processing etc..To figure As the CPP processing of data may include to zoom in and out image, preview frame and record frame are provided to each path.Wherein, CPP can make Preview frame and record frame are handled with different codecs.View data after the processing of ISP processors 940 can be transmitted to U.S. face Module 960, to carry out U.S. face processing to image before shown.U.S. face module 960 can wrap the face processing of view data U.S. Include:Whitening, nti-freckle, mill skin, thin face, anti-acne, increase eyes etc..Wherein, U.S. face module 960 can be CPU in mobile terminal (Central Processing Unit, central processing unit), GPU or coprocessor etc..Data after the U.S. processing of face module 960 It can be transmitted to encoder/decoder 970, so as to encoding/decoding image data.The view data of coding can be saved, and aobvious Decompressed before being shown in 980 equipment of display.Wherein, U.S. face module 960 may be additionally located at encoder/decoder 970 and display Between device 980, i.e., U.S. face module carries out the image being imaged U.S. face processing.Above-mentioned encoder/decoder 970 can be mobile whole CPU, GPU or coprocessor etc. in end.
The definite statistics of ISP processors 940, which can be transmitted, gives control logic device Unit 950.For example, statistics can wrap Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 912 shadow correction of lens 914 statistical information of device.Control logic device 950 may include the processor and/or micro-control for performing one or more routines (such as firmware) Device processed, one or more routines according to the statistics of reception, can determine control parameter and the ISP processing of imaging device 910 The control parameter of device 940.For example, the control parameter of imaging device 910 may include 920 control parameter of sensor (such as gain, expose The time of integration of photocontrol), camera flash control parameter, 912 control parameter of lens (such as focus on or zoom focal length) or The combination of these parameters.ISP control parameters may include to be used for automatic white balance and color adjustment (for example, during RGB processing) Gain level and color correction matrix, and 912 shadow correction parameter of lens.
It can be realized such as the light measuring method in above-mentioned any embodiment with photometry in Fig. 9.With photometry in Fig. 9 When stating the light measuring method in any embodiment in realization, by carrying out Face Detection to human face region, human face region is obtained Area of skin color;And using the area of skin color of acquisition as light statistical regions are surveyed, carry out surveying light processing to obtain to surveying light statistical regions Photometry result, its is with strong points, can eliminate the influence that light is surveyed to human face region of the non-area of skin color such as hair, eyes, ornaments, The survey light effect of human face region is substantially improved, improves the precision to human face region photometry result.
The embodiment of the present application also provides a kind of computer program product for including instruction, when run on a computer, So that computer performs following steps:
Into preview mode of taking pictures, the human face region in the preview window is identified;
Face Detection is carried out to the human face region, obtains the area of skin color of the human face region;
Using the area of skin color as light statistical regions are surveyed, the survey light statistical regions are carried out surveying light processing to obtain survey Light result.
Computer program product comprising instruction, when run on a computer, by carrying out the colour of skin to human face region Detection, obtains the area of skin color of human face region;And using the area of skin color of acquisition as light statistical regions are surveyed, to surveying light statistical regions Light processing survey to obtain photometry result, its is with strong points, can eliminate pair of the non-area of skin color such as hair, eyes, ornaments Human face region surveys the influence of light, substantially improves the survey light effect of human face region, improves the essence to human face region photometry result Accuracy.
Any reference to memory, storage, database or other media used in this application may include non-volatile And/or volatile memory.Suitable nonvolatile memory may include read-only storage (ROM), programming ROM (PROM), Electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include arbitrary access Memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as It is static 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).
Embodiment described above only expresses the several embodiments of the application, its description is more specific and detailed, but simultaneously Therefore the limitation to the application the scope of the claims cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, on the premise of the application design is not departed from, various modifications and improvements can be made, these belong to the guarantor of the application Protect scope.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (10)

  1. A kind of 1. light measuring method, it is characterised in that including:
    Into preview mode of taking pictures, the human face region in the preview window is identified;
    Face Detection is carried out to the human face region, obtains the area of skin color of the human face region;
    Using the area of skin color as light statistical regions are surveyed, the survey light statistical regions are carried out surveying light processing to obtain survey light knot Fruit.
  2. 2. light measuring method according to claim 1, it is characterised in that it is described that Face Detection is carried out to the human face region, The area of skin color of the human face region is obtained, including:
    Complexion model is established based on pre-set color space;
    According to the complexion model by the human face region from the first color space conversion to the second color space;
    The similarity of each pixel of human face region is obtained in second color space;
    The gray level image of the human face region is obtained according to the similarity;
    The area of skin color of the human face region and non-area of skin color are obtained according to the gray level image.
  3. 3. light measuring method according to claim 2, it is characterised in that described that colour of skin mould is established based on pre-set color space Type, including:
    YCgCr color spaces are selected as the pre-set color space;
    Colour of skin sample is simulated in the normal distribution of the YCgCr color spaces based on two-dimensional Gaussian function to establish the colour of skin mould Type.
  4. 4. light measuring method according to claim 2, it is characterised in that described that the face is obtained according to the gray level image The area of skin color in region and non-area of skin color, including:
    Median filter process is carried out to the gray level image;
    Binary conversion treatment is carried out to the gray level image after the median filter process, to obtain the colour of skin of the human face region Region and non-area of skin color.
  5. 5. light measuring method according to claim 1, it is characterised in that before the human face region in described identification the preview window, Further include:
    Judge that the view data of described the preview window whether there is colour shift;
    If so, light compensation then is carried out to described image data.
  6. 6. light measuring method according to claim 1, it is characterised in that described to the survey light statistical regions survey at light Manage to obtain photometry result, including:
    The survey light statistical regions are subjected to image block areas division;
    Obtain the brightness value of each described image block;
    The effective image block for surveying light statistical regions is obtained according to the brightness value of described image block;
    The photometry result for surveying light statistical regions is obtained according to the brightness value of default weight and the effective image block.
  7. 7. the light measuring method according to claim 1 or 6, it is characterised in that further include:
    According to the photometry result, the exposure time for surveying light statistical regions is controlled, the survey light statistical regions are exposed Light compensates.
  8. A kind of 8. light measurer, it is characterised in that including:
    Face recognition module, for when preview mode is taken pictures in entrance, identifying the human face region in the preview window;
    Skin tone detection module, for carrying out Face Detection to the human face region, obtains the area of skin color of the human face region;
    Optical module is surveyed, for using the area of skin color as light statistical regions are surveyed, to the survey light statistical regions survey at light Manage to obtain photometry result.
  9. 9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program quilt The step of light measuring method as any one of claim 1 to 7 is realized when processor performs.
  10. 10. a kind of computer equipment, including memory and processor, computer-readable instruction is stored in the memory, institute Instruction is stated when being performed by the processor so that survey light side of the processor execution as any one of claim 1 to 7 Method.
CN201711240797.2A 2017-11-30 2017-11-30 Light measuring method, device, readable storage medium storing program for executing and computer equipment Pending CN107911625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711240797.2A CN107911625A (en) 2017-11-30 2017-11-30 Light measuring method, device, readable storage medium storing program for executing and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711240797.2A CN107911625A (en) 2017-11-30 2017-11-30 Light measuring method, device, readable storage medium storing program for executing and computer equipment

Publications (1)

Publication Number Publication Date
CN107911625A true CN107911625A (en) 2018-04-13

Family

ID=61848267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711240797.2A Pending CN107911625A (en) 2017-11-30 2017-11-30 Light measuring method, device, readable storage medium storing program for executing and computer equipment

Country Status (1)

Country Link
CN (1) CN107911625A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108986019A (en) * 2018-07-13 2018-12-11 北京小米智能科技有限公司 Method for regulating skin color and device, electronic equipment, machine readable storage medium
CN109068060A (en) * 2018-09-05 2018-12-21 Oppo广东移动通信有限公司 Image processing method and device, terminal device, computer readable storage medium
CN109146893A (en) * 2018-08-01 2019-01-04 厦门美图之家科技有限公司 Glossy region segmentation method, device and mobile terminal
CN109461186A (en) * 2018-10-15 2019-03-12 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN109934783A (en) * 2019-03-04 2019-06-25 天翼爱音乐文化科技有限公司 Image processing method, device, computer equipment and storage medium
CN110602411A (en) * 2019-08-07 2019-12-20 深圳市华付信息技术有限公司 Method for improving quality of face image in backlight environment
CN111263074A (en) * 2020-03-13 2020-06-09 深圳市雄帝科技股份有限公司 Method, system and equipment for automatically adjusting brightness of camera and storage medium thereof
CN111343387A (en) * 2019-03-06 2020-06-26 杭州海康慧影科技有限公司 Automatic exposure method and device for camera equipment
CN111815651A (en) * 2020-07-08 2020-10-23 深圳市梦网视讯有限公司 Method, system and equipment for segmenting face and body skin color area
CN112801997A (en) * 2021-02-05 2021-05-14 北京字节跳动网络技术有限公司 Image enhancement quality evaluation method and device, electronic equipment and storage medium
WO2022270000A1 (en) * 2021-06-25 2022-12-29 ソニーグループ株式会社 Control device, control method, and program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101543051A (en) * 2006-11-21 2009-09-23 索尼爱立信移动通讯有限公司 System and method for camera metering based on flesh tone detection
CN102017608A (en) * 2006-03-17 2011-04-13 高通股份有限公司 Systems, methods, and apparatus for exposure control
CN102023456A (en) * 2009-09-22 2011-04-20 广达电脑股份有限公司 Light metering weight regulating method and device thereof
CN103729624A (en) * 2013-12-25 2014-04-16 厦门美图移动科技有限公司 Photometry method and system based on skin color recognition
CN106534714A (en) * 2017-01-03 2017-03-22 南京地平线机器人技术有限公司 Exposure control method, device and electronic equipment
CN106934377A (en) * 2017-03-14 2017-07-07 深圳大图科创技术开发有限公司 A kind of improved face detection system
CN107172353A (en) * 2017-06-16 2017-09-15 广东欧珀移动通信有限公司 Automatic explosion method, device and computer equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102017608A (en) * 2006-03-17 2011-04-13 高通股份有限公司 Systems, methods, and apparatus for exposure control
CN101543051A (en) * 2006-11-21 2009-09-23 索尼爱立信移动通讯有限公司 System and method for camera metering based on flesh tone detection
CN102023456A (en) * 2009-09-22 2011-04-20 广达电脑股份有限公司 Light metering weight regulating method and device thereof
CN103729624A (en) * 2013-12-25 2014-04-16 厦门美图移动科技有限公司 Photometry method and system based on skin color recognition
CN106534714A (en) * 2017-01-03 2017-03-22 南京地平线机器人技术有限公司 Exposure control method, device and electronic equipment
CN106934377A (en) * 2017-03-14 2017-07-07 深圳大图科创技术开发有限公司 A kind of improved face detection system
CN107172353A (en) * 2017-06-16 2017-09-15 广东欧珀移动通信有限公司 Automatic explosion method, device and computer equipment

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108986019A (en) * 2018-07-13 2018-12-11 北京小米智能科技有限公司 Method for regulating skin color and device, electronic equipment, machine readable storage medium
CN109146893B (en) * 2018-08-01 2020-10-09 厦门美图之家科技有限公司 Oil light area segmentation method and device and mobile terminal
CN109146893A (en) * 2018-08-01 2019-01-04 厦门美图之家科技有限公司 Glossy region segmentation method, device and mobile terminal
CN109068060A (en) * 2018-09-05 2018-12-21 Oppo广东移动通信有限公司 Image processing method and device, terminal device, computer readable storage medium
CN109461186A (en) * 2018-10-15 2019-03-12 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN109934783A (en) * 2019-03-04 2019-06-25 天翼爱音乐文化科技有限公司 Image processing method, device, computer equipment and storage medium
CN109934783B (en) * 2019-03-04 2021-05-07 天翼爱音乐文化科技有限公司 Image processing method, image processing device, computer equipment and storage medium
CN111343387A (en) * 2019-03-06 2020-06-26 杭州海康慧影科技有限公司 Automatic exposure method and device for camera equipment
CN111343387B (en) * 2019-03-06 2022-01-21 杭州海康慧影科技有限公司 Automatic exposure method and device for camera equipment
CN110602411A (en) * 2019-08-07 2019-12-20 深圳市华付信息技术有限公司 Method for improving quality of face image in backlight environment
CN111263074A (en) * 2020-03-13 2020-06-09 深圳市雄帝科技股份有限公司 Method, system and equipment for automatically adjusting brightness of camera and storage medium thereof
CN111815651A (en) * 2020-07-08 2020-10-23 深圳市梦网视讯有限公司 Method, system and equipment for segmenting face and body skin color area
CN111815651B (en) * 2020-07-08 2024-01-30 深圳市梦网视讯有限公司 Method, system and equipment for segmenting human face and body skin color region
CN112801997A (en) * 2021-02-05 2021-05-14 北京字节跳动网络技术有限公司 Image enhancement quality evaluation method and device, electronic equipment and storage medium
CN112801997B (en) * 2021-02-05 2023-06-06 抖音视界有限公司 Image enhancement quality evaluation method, device, electronic equipment and storage medium
WO2022270000A1 (en) * 2021-06-25 2022-12-29 ソニーグループ株式会社 Control device, control method, and program

Similar Documents

Publication Publication Date Title
CN107911625A (en) Light measuring method, device, readable storage medium storing program for executing and computer equipment
CN107800966B (en) Method, apparatus, computer readable storage medium and the electronic equipment of image procossing
CN108805103B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN108197546B (en) Illumination processing method and device in face recognition, computer equipment and storage medium
CN107451969B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN107808136A (en) Image processing method, device, readable storage medium storing program for executing and computer equipment
CN107798652A (en) Image processing method, device, readable storage medium storing program for executing and electronic equipment
CN107862657A (en) Image processing method, device, computer equipment and computer-readable recording medium
CN107886484A (en) U.S. face method, apparatus, computer-readable recording medium and electronic equipment
CN107945107A (en) Image processing method, device, computer-readable recording medium and electronic equipment
CN107862663A (en) Image processing method, device, readable storage medium storing program for executing and computer equipment
CN107993209B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment
CN107730446A (en) Image processing method, device, computer equipment and computer-readable recording medium
CN108009999A (en) Image processing method, device, computer-readable recording medium and electronic equipment
CN107730444A (en) Image processing method, device, readable storage medium storing program for executing and computer equipment
CN107493432A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN107800965B (en) Image processing method, device, computer readable storage medium and computer equipment
CN107509031A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN109089041A (en) Recognition methods, device, electronic equipment and the storage medium of photographed scene
CN108616700B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN107862653A (en) Method for displaying image, device, storage medium and electronic equipment
CN109242794B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN107368806A (en) Image correction method, device, computer-readable recording medium and computer equipment
CN107862658A (en) Image processing method, device, computer-readable recording medium and electronic equipment
CN107395991A (en) Image combining method, device, computer-readable recording medium and computer equipment

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

RJ01 Rejection of invention patent application after publication