CN109766832A - A kind of image pre-processing method, device, system, equipment and storage medium - Google Patents

A kind of image pre-processing method, device, system, equipment and storage medium Download PDF

Info

Publication number
CN109766832A
CN109766832A CN201910021020.XA CN201910021020A CN109766832A CN 109766832 A CN109766832 A CN 109766832A CN 201910021020 A CN201910021020 A CN 201910021020A CN 109766832 A CN109766832 A CN 109766832A
Authority
CN
China
Prior art keywords
value
image
component
brightness
facial image
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
CN201910021020.XA
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.)
Shenzhen Sanbao Innovation And Intelligence Co Ltd
Original Assignee
Shenzhen Sanbao Innovation And Intelligence Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Sanbao Innovation And Intelligence Co Ltd filed Critical Shenzhen Sanbao Innovation And Intelligence Co Ltd
Priority to CN201910021020.XA priority Critical patent/CN109766832A/en
Publication of CN109766832A publication Critical patent/CN109766832A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

The present invention relates to technical field of image processing, a kind of image pre-processing method, device, system, equipment and storage medium are disclosed.Described method includes following steps: obtaining facial image, and the facial image is converted to gray level image;The luminance component of the facial image is calculated according to the gray level image, obtains luminance component histogram;Cutting processing is carried out to the luminance component histogram, obtains the maximum brightness component value and minimum measurement component value of the luminance component histogram;Facial image to be identified after calculating enhancing contrast according to the gray value of the maximum brightness component value and minimum measurement component value and the gray level image;Export the facial image to be identified.Image pre-processing method of the invention improves the contrast and brightness of image, and operand is small, can be improved system for the accuracy rate of recognition of face, reduces the leakage discrimination of facial image to be identified.

Description

A kind of image pre-processing method, device, system, equipment and storage medium
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of image pre-processing method, device, system, set Standby and storage medium.
Background technique
Face recognition technology generally comprises four component parts, is man face image acquiring, facial image pretreatment, people respectively Face image feature extraction and matching and identification.
Wherein, facial image pretreatment refers to the part that face is determined from the image data of acquisition, and carries out gray scale school Just, the image preprocessings such as noise filtering, so that subsequent facial image characteristic extraction procedure can be more accurate and efficient. In the prior art, facial image pretreatment unit is normally based on the processing mode of RGB color, common image preprocessing Device is that RGB color domain is converted into HSI color space to be adjusted, again HSI color space conversion at RGB after being disposed Color space is exported, but this method is limited for the treatment effect of image, and operand is big, therefore its device processing speed Slowly, the contrast, resolution ratio and luminance shortage of image, causes in systems for the ineffective of recognition of face, it is still necessary to complete It is kind.
As it can be seen that pretreatment and not perfect, processing effect of the facial image preconditioning technique in the prior art to facial image Fruit is slow, reinforcing effect is insufficient, leads to the ineffective of later period recognition of face.
Summary of the invention
Based on this, it is necessary to provide a kind of image pre-processing method, device, system, equipment and storage medium, rich image Preconditioning technique.
In embodiments of the present invention, a kind of image pre-processing method is provided, described method includes following steps:
Facial image is obtained, and the facial image is converted into gray level image;
The luminance component of the facial image is calculated according to the gray level image, obtains luminance component histogram;
Cutting processing is carried out to the luminance component histogram, obtains the maximum brightness component of the luminance component histogram Value and minimum measurement component value;
It is calculated and is increased according to the gray value of the maximum brightness component value and minimum measurement component value and the gray level image Facial image to be identified after strong contrast;
Export the facial image to be identified.
In embodiments of the present invention, the present invention provides a kind of image preprocess apparatus, described device includes:
Image collection module is converted to gray level image for obtaining facial image, and by the facial image;
Luminance component histogram generation module, for calculating the brightness point of the facial image according to the gray level image Amount obtains luminance component histogram;
Luminance component extreme value computing module obtains described bright for carrying out cutting processing to the luminance component histogram Spend the maximum brightness component value and minimum measurement component value of histogram of component;
Brightness enhances computing module, for according to the maximum brightness component value and minimum measurement component value and the ash The gray value for spending image calculates the facial image to be identified after enhancing contrast;
Output module, for exporting the facial image to be identified.
In embodiments of the present invention, the present invention provides a kind of image preprocessing system, the system comprises:
Image collecting device, for acquiring facial image;
Image preprocess apparatus, for above-mentioned image pre-processing method, to obtain the facial image to be identified;
Face identification device for identifying to the facial image to be identified, and exports recognition result.
In embodiments of the present invention, a kind of computer equipment, including memory and processor are also provided, in the memory It is stored with computer program, when the computer program is executed by the processor, so that the processor executes above-mentioned image The step of preprocess method.
In embodiments of the present invention, a kind of storage medium is also provided, computer program, institute are stored on the storage medium When stating computer program and being executed by processor, so that the step of processor executes above-mentioned image pre-processing method.
A kind of image pre-processing method, device, system, equipment and storage medium of the invention, it is pre- by being carried out to image Processing substantially improves the contrast and brightness of image to obtain the facial image to be identified of contrast enhancing, even if scheming in acquisition It is influenced when picture by factors such as imaging device, environmental conditions, can enhance and improve the quality to recognition of face image.This Outside, technology employed in the pretreatment for recognition of face is counted the Y-component histogram calculation of gray level image, cutting Calculation and the calculating of final result, operand is small, can be improved the accuracy rate for recognition of face, reduces people to be identified The leakage discrimination of face image.
Detailed description of the invention
Fig. 1 is the applied environment figure of the image pre-processing method provided in one embodiment;
Fig. 2 is a kind of flow chart of image pre-processing method in the embodiment of the present invention;
Fig. 3 is to cut luminance component histogram in the embodiment of the present invention to obtain maximum brightness component value and minimum brightness component The flow chart of value;
Fig. 4 is the flow chart that maximum brightness component value and minimum brightness component value are obtained in the embodiment of the present invention;
Fig. 5 is the flow chart that facial image to be identified is calculated in the embodiment of the present invention;
Fig. 6 is a kind of structural block diagram of image preprocess apparatus in the embodiment of the present invention;
Fig. 7 is the structural block diagram of luminance component extreme value computing module in the embodiment of the present invention;
Fig. 8 is the calculation flow chart of extreme value computing unit in the embodiment of the present invention;
Fig. 9 is the calculation flow chart that brightness enhances computing module in the embodiment of the present invention;
Figure 10 is a kind of structural block diagram of the image preprocessing system provided in the embodiment of the present invention;
Figure 11 is a kind of structural block diagram of the computer equipment provided in the embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein, But unless stated otherwise, these elements should not be limited by these terms.These terms are only used to by first element and another yuan Part is distinguished.For example, in the case where not departing from scope of the present application, the first xx unit can be known as the 2nd xx unit, And similarly, the 2nd xx unit can be known as the first xx unit.
Fig. 1 is a kind of applied environment figure of the image pre-processing method provided in one embodiment, as shown in Figure 1, at this In application environment, including man face image acquiring equipment 110 and face recognition device 120.
Man face image acquiring equipment 110 refers to by the equipment of image taking imaging function, such as video camera, mobile phone, photograph Machine etc..The camera lens that different facial images can be transferred through image capture device collects, for example, still image, dynamic image, Different position, different expressions etc. can be acquired well.When user is in the coverage for acquiring equipment, Acquisition equipment can search for automatically and shoot the facial image of user.
Face recognition device 120 includes image preprocess apparatus 121 of the invention, face recognition features' extraction element 122, facial image matching and identification device 123.Wherein, the principle of face recognition features' extraction element 122 mainly passes through pair Face carries out feature modeling, and the method that face characteristic extracts includes Knowledge based engineering characterizing method and based on algebraic characteristic or statistics The characterizing method of study;The principle of facial image matching and identification device 123 is mainly the characteristic of the facial image extracted Scan for matching with the feature templates stored in database, by set a threshold value, when similarity be more than this threshold value, then The result output that matching is obtained, and then face characteristic to be identified is compared with obtained skin detection, root Judge according to identity information of the similarity degree to face.
In the application environment of image pre-processing method provided in an embodiment of the present invention, man face image acquiring equipment 110 is adopted After collecting facial image, facial image is sent to image preprocess apparatus 121 and is pre-processed, pretreatment obtained to be identified Facial image is sent to face recognition features' extraction element 122, facial image matching and identification device 123 and carries out at identification Reason, obtains recognition result.
Embodiment one
As shown in Fig. 2, can specifically include following for a kind of flow chart of image pre-processing method in the embodiment of the present invention Step:
Step S201 obtains facial image, and facial image is converted to gray level image;
Step S202 calculates the luminance component of facial image according to gray level image, obtains luminance component histogram;
Step S203 carries out cutting processing to luminance component histogram, obtains the maximum brightness point of luminance component histogram Magnitude and minimum measurement component value;
Step S204 is calculated according to the gray value of maximum brightness component value and minimum measurement component value and gray level image and is increased Facial image to be identified after strong contrast;
Step S205 exports facial image to be identified.
Further include that data are stored and arranged during image preprocessing in inventive embodiments, is schemed by caching As the data generated in preprocessing process, and parameter needed for storing image preprocessing improves figure to improve the speed of operation As the efficiency of processing.
It in embodiments of the present invention, is usually by three in RGB image by the principle that facial image is converted to gray level image Channel components calculate in gray level image according to a certain percentage, specifically can be by call common image processing program into Row conversion, such as software MATLAB, OpenCV etc., further do not enumerate and limit in the embodiment of the present invention.
In addition, luminance component refers to since the color of scenery each point and brightness are different, on the black-and-white photograph taken the photograph or convert Different degrees of grey is presented in each point on the black white image of generation, this grey is divided into several grades, referred to as " tonal gradation ", model It encloses generally from 0 to 255, white is 255, and black 0, value is luminance component.Figure brightness histogram is for inspecting picture A kind of quantification tool of brightness, wherein brightness histogram horizontal axis represents brightness, and more higher by right end brightness, the longitudinal axis represents pixel number Amount, more top end pixel quantity are more.Pass through the distribution feelings using each pixel intensity in luminance component histogram table diagram picture Condition avoids the interference of ambient light and screen intensity, can more objectively understand the light and shade situation of picture, preferably inspect Blooming and low light owe the case where exposing.
Further, cutting processing refers to by cutting according to a certain percentage to brightness histogram, to remove The part of unnecessary identification.Specifically, as shown in figure 3, obtaining maximum to cut luminance component histogram in the embodiment of the present invention The flow chart of luma component values and minimum brightness component value, in embodiments of the present invention, step S203 is i.e. to luminance component histogram Figure carries out cutting processing, obtains the maximum brightness component value and minimum measurement component value of luminance component histogram, specifically includes:
Step S301 obtains the resolution ratio of facial image;
Step S302 cuts position to the both ends of luminance component histogram according to resolution ratio and preset bilateral cutting sizes values It sets and is calculated, obtain and cut reference value;
Step S303 cuts luminance component histogram according to reference value is cut, obtains the most light of luminance component histogram Spend component value and minimum measurement component value.
In embodiments of the present invention, according to resolution ratio and preset bilateral cutting sizes values to the two of luminance component histogram End cuts position and is calculated, and obtains and cuts reference value, and formula may be expressed as:
NUM=A*B;
Wherein NUM is to cut reference value, and A is the resolution ratio of facial image, and B is preset bilateral cutting sizes values.
For example, in one embodiment, the resolution ratio of gray level image is 1280*720, if setting both sides cut sizes values all It is 2%, then NUM=A*B=1280*720*2%=18432.In addition, the cutting sizes values on both sides identical can be also possible to It is different, the present invention only with it is identical as an example, and be not limited
As shown in figure 4, to obtain the flow chart of maximum brightness component value and minimum brightness component value in the embodiment of the present invention, In embodiments of the present invention, step S203 is the maximum brightness component value and minimum measurement component for obtaining luminance component histogram Value, specifically includes:
Step S401, by luma component values from luminance component histogram 0 add up backward, accumulated value be greater than cut ginseng When examining value, luma component values at this time are recorded, and are denoted as minimum brightness component value;
Step S402, by luma component values from luminance component histogram 255 add up forward, accumulated value be greater than cut When reference value, luma component values at this time are recorded, and are denoted as maximum brightness component value.
It in conjunction with above example, is superimposed since luminance component histogram left end, the picture for being 0,1,2,3 ... by all brightness The brightness value of element is overlapped, and when last accumulated value is equal to 18432, which is recorded as minimum brightness point Magnitude;It is superimposed since luminance component histogram right end, by the brightness value for the pixel that all brightness are 255,254,253,252 ... It is overlapped, when last accumulated value is equal to 18432, which is recorded as maximum brightness component value.
Further, as shown in figure 5, to calculate the flow chart of facial image to be identified in the embodiment of the present invention, in this hair In bright embodiment, step S204 is the gray value meter according to maximum brightness component value and minimum measurement component value and gray level image Facial image to be identified after calculating enhancing contrast, and facial image to be identified is exported, it specifically includes:
Step S501 converts the brightness value of gray level image, obtains transformed luminance value;Wherein
Step S502, if the brightness value in gray level image is less than or equal to minimum brightness component value, by transformed luminance value It is set as minimum brightness component value;
Step S503, if the brightness value in gray level image is greater than or equal to maximum brightness component value, by transformed luminance value It is set as maximum brightness component value;
Step S504, if the brightness value in gray level image is greater than minimum brightness component value and is less than maximum brightness component value, The transformed luminance value, meter are then calculated according to brightness value, minimum brightness component value and the maximum brightness component value in gray level image Calculating formula may be expressed as:
Y1=((Y-Ymin))/(Ymax-Ymin))*255;
Wherein, Y1For transformed luminance value, Y is the brightness value of gray level image, YmaxMaximum brightness component value, YminIt is minimum bright Spend component value;
Step S506 generates facial image to be identified according to transformed luminance value.
In addition, in embodiments of the present invention, the mode that facial image to be identified is exported to face recognition device can be Using serial mode, using the combination of one or more of gigabit net mode or USB mode.
In embodiments of the present invention, the corresponding brightness value of pixel each in gray level image is converted, finally obtains and turns The image of enhancing contrast after changing, in addition, generating band identification facial image can be gray level image, it can also be by gray level image Carry out conversion and form color image, principle with above-mentioned facial image be converted to gray level image process on the contrary, the present invention not into The illustration of one step.
A kind of image pre-processing method of the invention, by being pre-processed to image, with obtain contrast enhancing to It identifies facial image, the contrast and brightness of image is substantially improved, even if when acquiring image by imaging device, environmental condition Etc. factors influence, can enhance and improve the quality to recognition of face image.In addition, for institute in the pretreatment of recognition of face The technology of use, i.e., for the Y-component histogram calculation of gray level image, cutting calculating and the calculating of final result, operation It measures small, can be improved the accuracy rate for recognition of face, reduce the leakage discrimination of facial image to be identified.
Embodiment two
As shown in fig. 6, for a kind of structural block diagram of image preprocess apparatus in the embodiment of the present invention, in one embodiment In, image preprocess apparatus can specifically include:
Image collection module 601 is converted to gray level image for obtaining facial image, and by facial image;
Luminance component histogram generation module 602 is obtained for calculating the luminance component of facial image according to gray level image Luminance component histogram;
Luminance component extreme value computing module 603 obtains luminance component for carrying out cutting processing to luminance component histogram The maximum brightness component value of histogram and minimum measurement component value;
Brightness enhances computing module 604, for according to maximum brightness component value and minimum measurement component value and grayscale image The gray value of picture calculates the facial image to be identified after enhancing contrast;
Output module 605 is identified for exporting facial image to be identified to face recognition device.
In inventive embodiments, image preprocess apparatus further includes memory module 606, memory module include synchronous dynamic with Machine memory and read-only memory, data of the synchronous DRAM for being generated in cache image preprocessing process, only It reads memory and improves the efficiency of image procossing for parameter needed for storing image preprocessing to improve the speed of operation.
It in embodiments of the present invention, is usually by three in RGB image by the principle that facial image is converted to gray level image Channel components calculate in gray level image according to a certain percentage, specifically can be by call common image processing program into Row conversion, such as software MATLAB, OpenCV etc., further do not enumerate and limit in the embodiment of the present invention.
In addition, luminance component refers to since the color of scenery each point and brightness are different, on the black-and-white photograph taken the photograph or convert Different degrees of grey is presented in each point on the black white image of generation, this grey is divided into several grades, referred to as " tonal gradation ", model It encloses generally from 0 to 255, white is 255, and black 0, value is luminance component.Figure brightness histogram is for inspecting picture A kind of quantification tool of brightness, wherein brightness histogram horizontal axis represents brightness, and more higher by right end brightness, the longitudinal axis represents pixel number Amount, more top end pixel quantity are more.Pass through the distribution feelings using each pixel intensity in luminance component histogram table diagram picture Condition avoids the interference of ambient light and screen intensity, can more objectively understand the light and shade situation of picture, preferably inspect Blooming and low light owe the case where exposing.
Further, cutting processing refers to by cutting according to a certain percentage to brightness histogram, to remove The part of unnecessary identification.
As shown in fig. 7, implementing for the structural block diagram of luminance component extreme value computing module in the embodiment of the present invention in the present invention In example, luminance component extreme value computing module 603 includes:
Resolution ratio acquiring unit 701, for obtaining the resolution ratio of facial image;
Computing unit 702 is cut, is used for according to resolution ratio and preset bilateral cutting sizes values to luminance component histogram Both ends cut position calculated, obtain cut reference value;
Extreme value computing unit 703 cuts luminance component histogram according to reference value is cut, obtains luminance component histogram Maximum brightness component value and minimum measurement component value.
In embodiments of the present invention, according to resolution ratio and preset bilateral cutting sizes values to the two of luminance component histogram End cuts position and is calculated, and obtains and cuts reference value, and formula may be expressed as:
NUM=A*B;
Wherein NUM is to cut reference value, and A is the resolution ratio of facial image, and B is preset bilateral cutting sizes values.
As shown in figure 8, for acquisition maximum brightness component value in image pre-processing method a kind of in the embodiment of the present invention and most The flow chart of small luma component values, in embodiments of the present invention, extreme value computing unit 703 calculate maximum brightness component value and minimum When luma component values, specifically include:
Step S801, by luma component values from luminance component histogram 0 add up backward, accumulated value be greater than cut ginseng When examining value, luma component values at this time are recorded, and are denoted as minimum brightness component value;
Step S802, by luma component values from luminance component histogram 255 add up forward, accumulated value be greater than cut When reference value, luma component values at this time are recorded, and are denoted as maximum brightness component value.
As shown in figure 9, to calculate the stream of facial image to be identified in image pre-processing method a kind of in the embodiment of the present invention Cheng Tu, in embodiments of the present invention, brightness enhancing computing module 604 are calculated and are exported the face figure to be identified after enhancing contrast Picture specifically includes:
Step S901 converts the brightness value of gray level image, obtains transformed luminance value;Wherein
Step S902, if the brightness value in gray level image is less than or equal to minimum brightness component value, by transformed luminance value It is set as minimum brightness component value;
Step S903, if the brightness value in gray level image is greater than or equal to maximum brightness component value, by transformed luminance value It is set as maximum brightness component value;
Step S904, if the brightness value in gray level image is greater than minimum brightness component value and is less than maximum brightness component value, The transformed luminance value, meter are then calculated according to brightness value, minimum brightness component value and the maximum brightness component value in gray level image Calculating formula may be expressed as:
Y1=((Y-Ymin))/(Ymax-Ymin)) * 255;
Wherein, Y1 is transformed luminance value, and Y is the brightness value of gray level image, and Ymax maximum brightness component value, Ymin is minimum Luma component values;
Step S905 generates facial image to be identified according to transformed luminance value.
In embodiments of the present invention, the corresponding brightness value of pixel each in gray level image is converted, finally obtains and turns The image of enhancing contrast after changing, in addition, generating band identification facial image can be gray level image, it can also be by gray level image Carry out conversion and form color image, principle with above-mentioned facial image be converted to gray level image process on the contrary, the present invention not into The illustration of one step.
In addition, output module 605 include serial ports output module, kilomega network output module, one in USB output module or The multiple combination of person is attached interaction, and serial ports output module is used for using after serial mode output recognition of face pretreatment Image information;Kilomega network output module is used for using the image information after the output recognition of face pretreatment of gigabit net mode;USB Output module is used to export the image information after recognition of face pretreatment using USB mode.
A kind of image preprocess apparatus of the invention, by being pre-processed to image, with obtain contrast enhancing to It identifies facial image, the contrast and brightness of image is substantially improved, even if when acquiring image by imaging device, environmental condition Etc. factors influence, can enhance and improve the quality to recognition of face image.In addition, for institute in the pretreatment of recognition of face The technology of use, i.e., for the Y-component histogram calculation of gray level image, cutting calculating and the calculating of final result, operation It measures small, can be improved the accuracy rate for recognition of face, reduce the leakage discrimination of facial image to be identified.
Embodiment three
As shown in Figure 10, in one embodiment it is proposed that a kind of image preprocessing system, comprising:
Image collecting device 1001, for acquiring facial image;
Image preprocess apparatus 1002, it is described wait know to obtain for executing the image pre-processing method of above-described embodiment Other facial image;
Face identification device 1003 for identifying to facial image to be identified, and exports recognition result.
Image preprocessing system in the embodiment of the present invention by acquiring facial image, and pre-processes image, with Obtain contrast enhancing facial image to be identified, substantially improve the contrast and brightness of image, though when acquiring image by It is influenced to factors such as imaging device, environmental conditions, can enhance and improve the quality to recognition of face image.In addition, for Technology employed in the pretreatment of recognition of face, i.e., for the Y-component histogram calculation of gray level image, cut calculate and The calculating of final result, operand is small, can be improved system for the accuracy rate of recognition of face, reduces face figure to be identified The leakage discrimination of picture.
Example IV
It as shown in figure 11, is a kind of structural block diagram of computer equipment provided in an embodiment of the present invention, the embodiment of the present invention A kind of computer equipment provided, including memory 1101, processor 1102, communication module 1103 and user interface 1104.
Operating system 1105 is stored in memory 1101, for handling various basic system services and for executing hardware The program of inter-related task;It is stored with application software 1106, also for realizing the image pre-processing method in the embodiment of the present invention Each step.
In embodiments of the present invention, memory 1101 can be high-speed random access memory, such as DRAM, SRAM, Perhaps other random access solid states storage equipment or nonvolatile memory, such as one or more are hard by DDR, RAM, SDRAM Disk storage device, optical disc memory apparatus, memory device etc..
In embodiments of the present invention, processor 1102 can send and receive data by communication module 1103 to realize network Communication or local communication.
User interface 1104 may include one or more input equipments 1107, such as keyboard, mouse, touch screen displays, User interface 1104 can also include one or more output equipment 1108, such as display, loudspeaker etc..
Embodiment five
In addition, the embodiment of the invention also provides a kind of computer readable storage medium, on computer readable storage medium It is stored with computer program, when computer program is executed by processor, so that processor executes above-mentioned image pre-processing method Step.
Although should be understood that various embodiments of the present invention flow chart in each step according to arrow instruction successively It has been shown that, but these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, There is no stringent sequences to limit for the execution of these steps, these steps can execute in other order.Moreover, each embodiment In at least part step may include that perhaps these sub-steps of multiple stages or stage are not necessarily multiple sub-steps Completion is executed in synchronization, but can be executed at different times, the execution in these sub-steps or stage sequence is not yet Necessarily successively carry out, but can be at least part of the sub-step or stage of other steps or other steps in turn Or it alternately executes.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (9)

1. a kind of image pre-processing method, which is characterized in that described method includes following steps:
Facial image is obtained, and the facial image is converted into gray level image;
The luminance component of the facial image is calculated according to the gray level image, obtains luminance component histogram;
Cutting processing is carried out to the luminance component histogram, obtain the luminance component histogram maximum brightness component value and Minimum measurement component value;
Enhancing pair is calculated according to the gray value of the maximum brightness component value and minimum measurement component value and the gray level image Than the facial image to be identified after degree;
Export the facial image to be identified.
2. image pre-processing method as described in claim 1, which is characterized in that described to be carried out to the luminance component histogram Cutting processing obtains the maximum brightness component value and minimum measurement component value of the luminance component histogram, comprising:
Obtain the resolution ratio of the facial image;
According to the both ends of the resolution ratio and preset bilateral cutting sizes values to the luminance component histogram cut position into Row calculates, and obtains and cuts reference value;
The luminance component histogram is cut according to the cutting reference value, obtains the maximum brightness of the luminance component histogram Component value and minimum measurement component value.
3. image pre-processing method as claimed in claim 2, which is characterized in that described according to the resolution ratio and preset double Sideline judge cuts sizes values and calculates the both ends cutting position of the luminance component histogram, obtains and cuts reference value, formula can It indicates are as follows:
NUM=A*B;
Wherein NUM is to cut reference value, and A is the resolution ratio of the facial image, and B is the preset bilateral cutting sizes values.
4. image pre-processing method as claimed in claim 2, which is characterized in that described to cut institute according to the cutting reference value Luminance component histogram is stated, obtains the maximum brightness component value and minimum measurement component value of the luminance component histogram, specifically Are as follows:
By the luma component values from the luminance component histogram 0 add up backward, accumulated value greater than the cutting join When examining value, luma component values at this time are recorded, and are denoted as the minimum brightness component value;
By the luma component values from luminance component histogram 255 add up forward, accumulated value greater than the cutting refer to When value, luma component values at this time are recorded, and are denoted as the maximum brightness component value.
5. image pre-processing method as described in claim 1, which is characterized in that it is described according to the maximum brightness component value and The gray value of minimum measurement component value and the gray level image calculates the facial image to be identified after enhancing contrast, specifically Are as follows:
The brightness value of the gray level image is converted, transformed luminance value is obtained;Wherein
If the brightness value in the gray level image is less than or equal to the minimum brightness component value, the transformed luminance value is set For the minimum brightness component value;
If the brightness value in the gray level image is greater than or equal to the maximum brightness component value, the transformed luminance value is set For the maximum brightness component value;
If the brightness value in the gray level image is greater than the minimum brightness component value and is less than the maximum brightness component value, The conversion is calculated according to brightness value, the minimum brightness component value and the maximum brightness component value in the gray level image Brightness value, calculation formula may be expressed as:
Y1=((Y-Ymin))/(Ymax-Ymin))*255;
Wherein, Y1For the transformed luminance value, Y is the brightness value of the gray level image, YmaxFor the maximum brightness component value, YminFor the minimum brightness component value;
Facial image to be identified is generated according to the transformed luminance value.
6. a kind of image preprocess apparatus, which is characterized in that described device includes:
Image collection module is converted to gray level image for obtaining facial image, and by the facial image;
Luminance component histogram generation module is obtained for calculating the luminance component of the facial image according to the gray level image Obtain luminance component histogram;
Luminance component extreme value computing module obtains the brightness point for carrying out cutting processing to the luminance component histogram Measure the maximum brightness component value and minimum measurement component value of histogram;
Brightness enhances computing module, for according to the maximum brightness component value and minimum measurement component value and the grayscale image The gray value of picture calculates the facial image to be identified after enhancing contrast;
Output module, for exporting the facial image to be identified.
7. a kind of image preprocessing system, which is characterized in that the system comprises:
Image collecting device, for acquiring facial image;
Image preprocess apparatus requires 1~5 described in any item image pre-processing methods for perform claim, described in obtaining Facial image to be identified;
Face identification device for identifying to the facial image to be identified, and exports recognition result.
8. a kind of computer equipment, which is characterized in that including memory and processor, computer journey is stored in the memory Sequence, when the computer program is executed by the processor, so that the processor perform claim requires any one of 1 to 5 power Benefit requires the step of described image preprocess method.
9. a kind of storage medium, which is characterized in that be stored with computer program, the computer program quilt on the storage medium When processor executes, so that the processor perform claim requires any one of 1 to 5 claim described image preprocess method The step of.
CN201910021020.XA 2019-01-09 2019-01-09 A kind of image pre-processing method, device, system, equipment and storage medium Pending CN109766832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910021020.XA CN109766832A (en) 2019-01-09 2019-01-09 A kind of image pre-processing method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910021020.XA CN109766832A (en) 2019-01-09 2019-01-09 A kind of image pre-processing method, device, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109766832A true CN109766832A (en) 2019-05-17

Family

ID=66453644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910021020.XA Pending CN109766832A (en) 2019-01-09 2019-01-09 A kind of image pre-processing method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109766832A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069475A (en) * 2020-09-14 2020-12-11 杭州熙菱信息技术有限公司 Identity safety management system
CN113255463A (en) * 2021-04-30 2021-08-13 深圳数联天下智能科技有限公司 Blackhead display method and related device
CN113255463B (en) * 2021-04-30 2024-08-13 深圳数联天下智能科技有限公司 Method and related device for displaying blackheads

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030133600A1 (en) * 2002-01-11 2003-07-17 Yea-Shuan Huang Image preprocessing method capable of increasing the accuracy of face detection
CN101430759A (en) * 2008-12-04 2009-05-13 上海大学 Optimized recognition pretreatment method for human face
CN106056064A (en) * 2016-05-26 2016-10-26 汉王科技股份有限公司 Face recognition method and face recognition device
CN107358578A (en) * 2017-05-23 2017-11-17 深圳市深网视界科技有限公司 A kind of negative and positive face treating method and apparatus
CN107451969A (en) * 2017-07-27 2017-12-08 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium
CN108319940A (en) * 2018-04-12 2018-07-24 Oppo广东移动通信有限公司 Face recognition processing method, device, equipment and storage medium
CN108875545A (en) * 2018-04-12 2018-11-23 北京旷视科技有限公司 Determine the method, apparatus, system and storage medium of the light condition of facial image

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030133600A1 (en) * 2002-01-11 2003-07-17 Yea-Shuan Huang Image preprocessing method capable of increasing the accuracy of face detection
CN101430759A (en) * 2008-12-04 2009-05-13 上海大学 Optimized recognition pretreatment method for human face
CN106056064A (en) * 2016-05-26 2016-10-26 汉王科技股份有限公司 Face recognition method and face recognition device
CN107358578A (en) * 2017-05-23 2017-11-17 深圳市深网视界科技有限公司 A kind of negative and positive face treating method and apparatus
CN107451969A (en) * 2017-07-27 2017-12-08 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium
CN108319940A (en) * 2018-04-12 2018-07-24 Oppo广东移动通信有限公司 Face recognition processing method, device, equipment and storage medium
CN108875545A (en) * 2018-04-12 2018-11-23 北京旷视科技有限公司 Determine the method, apparatus, system and storage medium of the light condition of facial image

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069475A (en) * 2020-09-14 2020-12-11 杭州熙菱信息技术有限公司 Identity safety management system
CN112069475B (en) * 2020-09-14 2023-10-24 杭州领信数科信息技术有限公司 Identity security management system
CN113255463A (en) * 2021-04-30 2021-08-13 深圳数联天下智能科技有限公司 Blackhead display method and related device
CN113255463B (en) * 2021-04-30 2024-08-13 深圳数联天下智能科技有限公司 Method and related device for displaying blackheads

Similar Documents

Publication Publication Date Title
US11457138B2 (en) Method and device for image processing, method for training object detection model
Fernandes et al. Predicting heart rate variations of deepfake videos using neural ode
Li et al. Detail-enhanced multi-scale exposure fusion
WO2021022983A1 (en) Image processing method and apparatus, electronic device and computer-readable storage medium
WO2017198040A1 (en) Facial image processing apparatus, facial image processing method, and non-transitory computer-readable storage medium
CN105049718A (en) Image processing method and terminal
US11334973B2 (en) Image colorizing method and device
CN108647625A (en) A kind of expression recognition method and device
CN111401246B (en) Smoke concentration detection method, device, equipment and storage medium
CN112804464B (en) HDR image generation method and device, electronic equipment and readable storage medium
CN111967319B (en) Living body detection method, device, equipment and storage medium based on infrared and visible light
CN114022732B (en) Ultra-dim light object detection method based on RAW image
CN107743200A (en) Method, apparatus, computer-readable recording medium and the electronic equipment taken pictures
CN108564558A (en) Wide dynamic images processing method, device, equipment and storage medium
Artusi et al. Efficient evaluation of image quality via deep-learning approximation of perceptual metrics
Al-Dhabi et al. Deepfake video detection by combining convolutional neural network (cnn) and recurrent neural network (rnn)
CN111753782A (en) False face detection method and device based on double-current network and electronic equipment
JP2021189527A (en) Information processing device, information processing method, and program
US20230177639A1 (en) Temporal video enhancement
CN117496019B (en) Image animation processing method and system for driving static image
Le et al. Facial detection in low light environments using OpenCV
CN109766832A (en) A kind of image pre-processing method, device, system, equipment and storage medium
Parekh et al. A survey of image enhancement and object detection methods
CN112488165A (en) Infrared pedestrian identification method and system based on deep learning model
Deng et al. Selective kernel and motion-emphasized loss based attention-guided network for HDR imaging of dynamic scenes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190517