CN107564047A - Image processing method and device, electronic equipment and computer-readable recording medium - Google Patents

Image processing method and device, electronic equipment and computer-readable recording medium Download PDF

Info

Publication number
CN107564047A
CN107564047A CN201710817254.6A CN201710817254A CN107564047A CN 107564047 A CN107564047 A CN 107564047A CN 201710817254 A CN201710817254 A CN 201710817254A CN 107564047 A CN107564047 A CN 107564047A
Authority
CN
China
Prior art keywords
pixel
gray value
value
sub
adjusted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710817254.6A
Other languages
Chinese (zh)
Other versions
CN107564047B (en
Inventor
杨松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710817254.6A priority Critical patent/CN107564047B/en
Publication of CN107564047A publication Critical patent/CN107564047A/en
Application granted granted Critical
Publication of CN107564047B publication Critical patent/CN107564047B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The disclosure is directed to image processing method, this method includes:Determine that the pixel that colourity is minimum in image is reference pixel;Determine the average gray value of the reference pixel;Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.In accordance with an embodiment of the present disclosure, because the adjusted value of determination can represent corresponding son as the skew of the plain color degree under the influence of ambient light by gray value, therefore the grey decision-making of the sub-pixel of pixel in image is adjusted by adjusted value, sub-pixel can be caused to be lighted according to the grey decision-making after adjustment, the skew of colourity can be eliminated to a certain extent, and then realizes the elimination to whole image chroma skew.

Description

Image processing method and device, electronic equipment and computer-readable recording medium
Technical field
This disclosure relates to technical field of image processing, more particularly to image processing method and device, electronic equipment and calculating Machine readable storage medium storing program for executing.
Background technology
During shooting image, due to the influence of the factors such as ambient light, obtained image can be caused certain journey to be present The colour cast of degree, such as the image shot under sunshine, can be partially yellow or partially red to a certain extent.
The image that above mentioned problem causes shooting to obtain has differences with real image, influences shooting experience.
The content of the invention
The disclosure provides image processing method and device, electronic equipment and computer-readable recording medium, to solve correlation Deficiency in technology.
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of image processing method, including:
Determine that the pixel that colourity is minimum in image is reference pixel;
Determine the average gray value of the reference pixel;
Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
Alternatively, the pixel for determining that colourity is minimum in image includes for reference pixel:
For the pixel in described image, the first gray value, the blue subpixels of red sub-pixel in the pixel are determined The second gray value and green sub-pixels the 3rd gray value;
Calculate the first absolute value of the difference of first gray value and second gray value, first gray value with Second absolute value of the difference of the 3rd gray value, the 3rd of second gray value and the difference of the 3rd gray value are exhausted To value, the first absolute value, the second absolute value and the 3rd absolute value sum are calculated;
In the pixel for determining described image, described and minimum pixel is the reference pixel.
Alternatively, it is described be directed to described image in pixel, determine red sub-pixel in the pixel the first gray value, Second gray value of blue subpixels and the 3rd gray value of green sub-pixels include:
Detect the human face region in described image;
Position the face key point in the human face region;
Human eye area is determined according to the face key point;
For the pixel in the human eye area, determine that the first gray value of red sub-pixel in the pixel, blueness are sub The second gray value and green sub-pixels of pixel.
Alternatively, the gray value and the average gray value according to the reference pixel sub-pixel determines adjusted value Including:
According to the gray value of the reference pixel sub-pixel and the average gray value difference determine the adjusted value.
Alternatively, it is described that bag is adjusted to the gray value of the sub-pixel of pixel in described image according to the adjusted value Include:
Calculate the gray value of the sub-pixel of the pixel and the difference of the adjusted value;
Using the difference as the gray value after the sub-pixel adjustment of the pixel.
Alternatively, the gray value and the average gray value according to the reference pixel sub-pixel determines adjusted value Including:
According to the gray value of red sub-pixel in the reference pixel and the average gray value, the first adjusted value is determined, According to the gray value of the reference pixel Green sub-pixel and the average gray value, the second adjusted value is determined, according to described The gray value of blue subpixels and the average gray value, determine the 3rd adjusted value in reference pixel;
It is described the gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value including:
The gray value of the red sub-pixel of the pixel is adjusted according to first adjusted value, according to described second Adjusted value is adjusted to the gray value of the green sub-pixels of the pixel, the indigo plant according to the 3rd adjusted value to the pixel The gray value of sub-pixels is adjusted.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of image processing apparatus, including:
Pixel determining module, it is configured to determine that the pixel that colourity is minimum in image is reference pixel;
Average determining module, it is configured to determine that the average gray value of the reference pixel;
Adjusted value determining module, it is configured as the gray value according to the reference pixel sub-pixel and the average gray Value determines adjusted value;
Adjusting module, it is configured as adjusting the gray value of the sub-pixel of pixel in described image according to the adjusted value It is whole.
Alternatively, the pixel determining module includes:
Gray value determination sub-module, the pixel being directed in described image is configured as, determines red sub- picture in the pixel The first gray value, the second gray value of blue subpixels and the 3rd gray value of green sub-pixels of element;
Calculating sub module, be configured as calculating first gray value with the difference of second gray value first are absolute Value, first gray value and the second absolute value of the difference of the 3rd gray value, second gray value and the described 3rd 3rd absolute value of the difference of gray value, calculate the first absolute value, the second absolute value and the 3rd absolute value sum;
Pixel determination sub-module, is configured to determine that in the pixel of described image, and described and minimum pixel is the ginseng Examine pixel.
Alternatively, the pixel determining module also includes:
Face datection submodule, it is configured as detecting the human face region in described image;
Key point determination sub-module, it is configured as positioning the face key point in the human face region;
Human eye determination sub-module, it is configured as determining human eye area according to the face key point;
Wherein, gray value determination sub-module is configured as the pixel being directed in the human eye area, determines in the pixel First gray value of red sub-pixel, the second gray value of blue subpixels and green sub-pixels.
Alternatively, the adjusted value determining module is configured as the gray value according to the reference pixel sub-pixel and institute State average gray value difference determine the adjusted value.
Alternatively, the adjusting module is configured as calculating the gray value of the sub-pixel of the pixel and the adjusted value Difference;And using the difference as the gray value after the sub-pixel adjustment of the pixel.
Alternatively, the adjusted value determining module is configured as the gray value according to red sub-pixel in the reference pixel With the average gray value, the first adjusted value is determined, according to the gray value of the reference pixel Green sub-pixel and described flat Equal gray value, the second adjusted value is determined, according to the gray value of blue subpixels in the reference pixel and the average gray value, Determine the 3rd adjusted value;
The adjusting module is configured as the gray value to the red sub-pixel of the pixel according to first adjusted value It is adjusted, the gray value of the green sub-pixels of the pixel is adjusted according to second adjusted value, according to described Three adjusted values are adjusted to the gray value of the blue subpixels of the pixel.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of electronic equipment, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Determine that the pixel that colourity is minimum in image is reference pixel;
Determine the average gray value of the reference pixel;
Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
According to the fourth aspect of the embodiment of the present disclosure, there is provided a kind of computer-readable recording medium, be stored thereon with calculating Machine program, the program realize following steps when being executed by processor:
Determine that the pixel that colourity is minimum in image is reference pixel;
Determine the average gray value of the reference pixel;
Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
The technical scheme provided by this disclosed embodiment can include the following benefits:
It can be seen from above-described embodiment, because the adjusted value of determination can represent corresponding son as in environment by gray value The skew of plain color degree under the influence of light, therefore the grey decision-making of the sub-pixel of pixel in image is adjusted by adjusted value, can To cause sub-pixel to be lighted according to the grey decision-making after adjustment, the skew of colourity, and then realization pair can be eliminated to a certain extent The elimination of whole image chroma skew.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is a kind of schematic flow diagram of image processing method according to an exemplary embodiment.
Fig. 2 is a kind of schematic flow diagram of determination reference pixel according to an exemplary embodiment.
Fig. 3 is another schematic flow diagram for determining reference pixel according to an exemplary embodiment.
Fig. 4 is a kind of schematic diagram of face key point according to an exemplary embodiment.
Fig. 5 is a kind of schematic diagram of human eye area according to an exemplary embodiment.
Fig. 6 is the comparison schematic diagram of the image before and after treatment according to an exemplary embodiment.
Fig. 7 is another schematic flow diagram for determining reference pixel according to an exemplary embodiment.
Fig. 8 is another schematic flow diagram for determining reference pixel according to an exemplary embodiment.
Fig. 9 is another schematic flow diagram for determining adjusted value according to an exemplary embodiment.
Figure 10 is a kind of schematic block diagram of image processing apparatus according to an exemplary embodiment.
Figure 11 is a kind of schematic block diagram of pixel determining module according to an exemplary embodiment.
Figure 12 is the schematic block diagram of another pixel determining module according to an exemplary embodiment.
Figure 13 is a kind of schematic block diagram of device for image procossing according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of schematic flow diagram of image processing method according to an exemplary embodiment.The present embodiment institute The method shown can apply to camera, video camera, can also be applied to mobile phone, tablet personal computer etc. and possess image collecting function Electronic equipment.
As shown in figure 1, described image processing method comprises the following steps:
In step sl, determine that the pixel that colourity is minimum in image is reference pixel.
In one embodiment, the ideally minimum pixel of colourity, its color are grey, white or black, but Under actual conditions, under the influence of ambient light, the pixel in image can more or less have some colors, and include in pixel red Sub-pixels, green sub-pixels, blue subpixels, and in the case of the area identical of three sub-pixels, the color of pixel is main Depending on the gray value of every sub-pixel, gray value shows that more greatly the light that the sub-pixel is sent is more, therefore, can pass through calculating The difference of every two sub-pixels gray value, to determine the colourity of pixel.
For example, the gray value of red sub-pixel is R, the gray value of green sub-pixels is G, and the gray value of blue subpixels is B, then difference sum D=| R-G |+| R-B |+| G-B |, then by all pixels of image, pixel minimum D is as reference Pixel.
In step s 2, the average gray value of the reference pixel is determined.
In one embodiment, the average gray value of reference pixel can be equal to each sub-pixel gray value in reference pixel The average of sum, RrefFor the gray value of red sub-pixel, GrefFor the gray value of green sub-pixels, BrefFor blue subpixels Gray value, then the average gray value C of reference pixelref=(Rref+Gref+Bref)/3。
In step s3, adjustment is determined according to the gray value of the reference pixel sub-pixel and the average gray value Value.
Due to the pixel that colourity is larger, when it is influenceed by ambient light, the skew of caused colourity is larger, and colourity is smaller Pixel, when it is influenceed by ambient light, caused velocity shifts are smaller.Such as green pixel, if in red In ambient light, then its color in the picture then can be partially yellow, and for black picture element, if in red ambient, that The change of its nearly imperceptible colourity of color in the picture, it appears that be substantially still black.
Therefore, in one embodiment, it is determined that the minimum reference pixel of colourity average gray value, closer to actual feelings The gray value of (namely when removing the influence of ambient light) reference pixel under condition, and then the gray value of its sub-pixel and the average ash The difference of angle value, namely above-mentioned adjusted value, it can be used to indicate that the gray value of sub-pixel in practical situations both and image neutron picture The difference of the gray value of element.And the difference of gray value, it is further related to the chroma offset of pixel, such as determine pixel in image The gray value of middle red sub-pixel is big relative to the gray value of the red sub-pixel under actual conditions, then the pixel is being schemed It is partially red as in.Therefore according to above-mentioned adjusted value, it may be determined that the sub-pixel of respective color in image, produced under the influence of ambient light Raw chroma offset.
Wherein, adjusted value can be the gray value of the pixel in image, with the gray value of respective pixel under actual conditions Difference or ratio.
In step s 4, the gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.Its In, pixel both includes reference pixel in image, also including other pixels beyond reference pixel.
In one embodiment, because the adjusted value of determination can represent corresponding son as in ambient light by gray value Under the influence of plain color degree skew, therefore the grey decision-making of the sub-pixel of pixel in image is adjusted by adjusted value, can made Obtain sub-pixel to be lighted according to the grey decision-making after adjustment, the skew of colourity can be eliminated to a certain extent, and then realize to whole The elimination of image chroma skew.
Fig. 2 is a kind of schematic flow diagram of determination reference pixel according to an exemplary embodiment.As shown in Fig. 2 On the basis of embodiment illustrated in fig. 1, the pixel for determining that colourity is minimum in image includes for reference pixel:
In step s 11, for the pixel in described image, the first gray scale of red sub-pixel in the pixel is determined 3rd gray value of value, the second gray value of blue subpixels and green sub-pixels;
In step s 12, first gray value and the first absolute value of the difference of second gray value are calculated, it is described First gray value and the second absolute value of the difference of the 3rd gray value, second gray value and the 3rd gray value 3rd absolute value of difference, calculate the first absolute value, the second absolute value and the 3rd absolute value sum;
In step s 13, in the pixel for determining described image, described and minimum pixel is the reference pixel.
In one embodiment, can be according to the difference sum of the gray value between every sub-pixel in pixel, to determine The colourity of the pixel, such as in the case where pixel includes red sub-pixel, green sub-pixels and blue subpixels, for image In each pixel, it may be determined that the first gray value R of red sub-pixel, the second gray value G of green sub-pixels, the sub- picture of blueness 3rd gray value B of element.
And then the first absolute value, the second absolute value and the 3rd absolute value sum D=can be calculated | R-G |+| R-B |+| G-B |, wherein, R, G and B are closer, and D is smaller, represent that the colourity of respective pixel is smaller, namely more tend to black, white or black, because This, can determine the colourity of pixel according to D.Then by all pixels of image, pixel minimum D is as reference pixel.
Fig. 3 is another schematic flow diagram for determining reference pixel according to an exemplary embodiment.Such as Fig. 3 institutes Show, on the basis of embodiment illustrated in fig. 2, the pixel being directed in described image, determine red sub-pixel in the pixel The first gray value, the second gray value of blue subpixels and the 3rd gray value of green sub-pixels include:
In step S111, the human face region in described image is detected.
In one embodiment, when getting image, human face region that can be in first detection image, namely determine face The position of region in the picture, such as can be determined by Adaboost, faster-rcnn scheduling algorithm.
In step S112, the face key point in the human face region is positioned.
Fig. 4 is a kind of schematic diagram of face key point according to an exemplary embodiment.
In one embodiment, after the human face region in detecting image, can be closed with the face in locating human face region Key point, as shown in figure 4, the face key point include facial contour, eye contour, eyebrow outline, lip outline, nose profile, Point on the profiles such as eye contour, wherein it is possible to using AAM (Active Appearance Model, active appearance models), SDM (supervised descent method, supervise descent method) or CNN (Convolutional Neural Network, Convolutional neural networks) scheduling algorithm determines above-mentioned face key point.
In step S113, human eye area is determined according to the face key point.
Fig. 5 is a kind of schematic diagram of human eye area according to an exemplary embodiment.
In one embodiment, it is determined that after face key point, line can be carried out to face key point, it is then determined that with The line that the human eye shape to prestore is consistent, its corresponding region is defined as human eye area, such as shown in Fig. 5.
In step S114, for the pixel in the human eye area, first of red sub-pixel in the pixel is determined Gray value, the second gray value of blue subpixels and green sub-pixels.
In one embodiment, due to it needs to be determined that the minimum pixel of colourity is as reference pixel, namely determination in image In image color closest to black, white or grey pixel, and for the image of face be present, the general feelings of pupil in human eye It is in black under condition, sclera (white of the eye) is then general white, therefore, reference pixel can be determined in human eye area, without pin All pixels in image are all judged, advantageously reduce amount of calculation.
Fig. 6 is the comparison schematic diagram of the image before and after treatment according to an exemplary embodiment.
As shown in fig. 6, the image of before processing is partially yellow because ambient light influences, and the image after handling then can be certain The influence of ambient light is eliminated in degree so that image is presented color in practical situations both, such as personage behind wall by light Yellow is changed into light blue.
Fig. 7 is another schematic flow diagram for determining reference pixel according to an exemplary embodiment.Such as Fig. 7 institutes Show, on the basis of embodiment illustrated in fig. 1, the gray value according to the reference pixel sub-pixel and the average gray Value determines that adjusted value includes:
In step S31, according to the gray value of the reference pixel sub-pixel and the average gray value difference it is true The fixed adjusted value.
In one embodiment, adjusted value can be the gray value of the pixel in image, with respective pixel under actual conditions Gray value difference or ratio, and adjusted value is used as by calculating difference, it is simple relative to ratio calculated, calculating process, and And it is easy to subsequently be adjusted according to adjusted value.Such as the adjustment amount D for red sub-pixel in reference pixelR=Rref-Cref, Correspondingly, the adjustment amount D of reference pixel Green sub-pixelG=Gref-Cref, the adjustment amount D of reference pixel Green sub-pixelB =Bref-Cref
Fig. 8 is another schematic flow diagram for determining reference pixel according to an exemplary embodiment.Such as Fig. 8 institutes Show, on the basis of embodiment illustrated in fig. 1, the gray value according to the adjusted value to the sub-pixel of pixel in described image Be adjusted including:
In step S41, the difference of the gray value and the adjusted value of the sub-pixel of the pixel is calculated;
In step S42, using the difference as the gray value after the sub-pixel adjustment of the pixel.
In one embodiment, in the gray value and the difference of average gray value that adjusted value is reference pixel sub-pixel In the case of, adjust pixel sub-pixel when, can by the gray value for the sub-pixel for calculating pixel and the difference of adjusted value come It is adjusted, is advantageous to simplify calculating process.Such as red sub-pixel in pixel, the gray value R after adjustmentresult= Rsrc-DR, wherein, RsrcFor the grey decision-making before red sub-pixel adjustment in sub-pixel, correspondingly, the adjustment of pixel Green sub-pixel Gray value G afterwardsresult=Gsrc-DG, the gray value B in pixel after blue subpixels adjustmentresult=Bsrc-DB, wherein, GsrcFor Grey decision-making before the adjustment of sub-pixel Green sub-pixel, BsrcGrey decision-making before being adjusted for sub-pixel Green sub-pixel.
Fig. 9 is another schematic flow diagram for determining adjusted value according to an exemplary embodiment.As shown in figure 9, On the basis of embodiment illustrated in fig. 1, the gray value according to the reference pixel sub-pixel and the average gray value Determine that adjusted value includes:
In step s 32, according to the gray value of red sub-pixel in the reference pixel and the average gray value, it is determined that First adjusted value, according to the gray value of the reference pixel Green sub-pixel and the average gray value, determine the second adjustment Value, according to the gray value of blue subpixels in the reference pixel and the average gray value, determines the 3rd adjusted value;
It is described the gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value including:
In step S43, the gray value of the red sub-pixel of the pixel is adjusted according to first adjusted value, The gray value of the green sub-pixels of the pixel is adjusted according to second adjusted value, according to the 3rd adjusted value pair The gray value of the blue subpixels of the pixel is adjusted.
In one embodiment, because the sub-pixel of different colours is affected by ambient light, the skew of colourity is not Together, namely adjusted value has differences.Therefore for the sub-pixel of different colours in reference pixel, adjusted value can be calculated respectively, In the sub-pixel in adjusting pixel, to be adjusted according to adjusted value corresponding to respective color sub-pixel, adjusted to improve The whole degree of accuracy.
Corresponding with the embodiment of foregoing image processing method, the disclosure additionally provides the implementation of image processing apparatus Example.
Figure 10 is a kind of schematic block diagram of image processing apparatus according to an exemplary embodiment.Reference picture 10, should Device includes:
Pixel determining module 1, it is configured to determine that the pixel that colourity is minimum in image is reference pixel;
Average determining module 2, it is configured to determine that the average gray value of the reference pixel;
Adjusted value determining module 3, it is configured as the gray value according to the reference pixel sub-pixel and the average ash Angle value determines adjusted value;
Adjusting module 4, it is configured as carrying out the gray value of the sub-pixel of pixel in described image according to the adjusted value Adjustment.
Figure 11 is a kind of schematic block diagram of pixel determining module according to an exemplary embodiment.As shown in figure 11, On the basis of embodiment illustrated in fig. 10, the pixel determining module 1 includes:
Gray value determination sub-module 11, the pixel being directed in described image is configured as, determines red son in the pixel 3rd gray value of the first gray value of pixel, the second gray value of blue subpixels and green sub-pixels;
Calculating sub module 12, be configured as calculating first gray value with the difference of second gray value first are exhausted To value, the second absolute value of the difference of first gray value and the 3rd gray value, second gray value and described the 3rd absolute value of the difference of three gray values, calculate the first absolute value, the second absolute value and the 3rd absolute value sum;
Pixel determination sub-module 13, is configured to determine that in the pixel of described image, and described and minimum pixel is described Reference pixel.
Figure 12 is the schematic block diagram of another pixel determining module according to an exemplary embodiment.Such as Figure 12 institutes Show, on the basis of embodiment illustrated in fig. 11, the pixel determining module 1 also includes:
Face datection submodule 14, it is configured as detecting the human face region in described image;
Key point determination sub-module 15, it is configured as positioning the face key point in the human face region;
Human eye determination sub-module 16, it is configured as determining human eye area according to the face key point;
Wherein, gray value determination sub-module 11 is configured as the pixel being directed in the human eye area, determines the pixel First gray value of middle red sub-pixel, the second gray value of blue subpixels and green sub-pixels.
Alternatively, the adjusted value determining module is configured as the gray value according to the reference pixel sub-pixel and institute State average gray value difference determine the adjusted value.
Alternatively, the adjusting module is configured as calculating the gray value of the sub-pixel of the pixel and the adjusted value Difference;And using the difference as the gray value after the sub-pixel adjustment of the pixel.
Alternatively, the adjusted value determining module is configured as the gray value according to red sub-pixel in the reference pixel With the average gray value, the first adjusted value is determined, according to the gray value of the reference pixel Green sub-pixel and described flat Equal gray value, the second adjusted value is determined, according to the gray value of blue subpixels in the reference pixel and the average gray value, Determine the 3rd adjusted value;
The adjusting module is configured as the gray value to the red sub-pixel of the pixel according to first adjusted value It is adjusted, the gray value of the green sub-pixels of the pixel is adjusted according to second adjusted value, according to described Three adjusted values are adjusted to the gray value of the blue subpixels of the pixel.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in correlation technique It is described in detail in embodiment, explanation will be not set forth in detail herein.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component The module of explanation can be or may not be physically separate, can be as the part that module is shown or can also It is not physical module, you can with positioned at a place, or can also be distributed on multiple mixed-media network modules mixed-medias.Can be according to reality Need to select some or all of module therein to realize the purpose of disclosure scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
The disclosure also proposes a kind of electronic equipment, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Determine that the pixel that colourity is minimum in image is reference pixel;
Determine the average gray value of the reference pixel;
Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
The disclosure also proposes a kind of computer-readable recording medium, is stored thereon with computer program, and the program is processed Device realizes following steps when performing:
Determine that the pixel that colourity is minimum in image is reference pixel;
Determine the average gray value of the reference pixel;
Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
Figure 13 is a kind of schematic block diagram of device 1300 for image procossing according to an exemplary embodiment.Example Such as, device 1300 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, and flat board is set It is standby, Medical Devices, body-building equipment, personal digital assistant etc..
Reference picture 13, device 1300 can include following one or more assemblies:Processing component 1302, memory 1304, Power supply module 1306, multimedia groupware 1308, audio-frequency assembly 1310, the interface 1312 of input/output (I/O), sensor cluster 1314, and communication component 1316.
The integrated operation of the usual control device 1300 of processing component 1302, such as communicated with display, call, data, The operation that camera operation and record operation are associated.Processing component 1302 can include one or more processors 1320 to perform Instruction, to complete all or part of step of above-mentioned method.In addition, processing component 1302 can include one or more moulds Block, the interaction being easy between processing component 1302 and other assemblies.For example, processing component 1302 can include multi-media module, To facilitate the interaction between multimedia groupware 1308 and processing component 1302.
Memory 1304 is configured as storing various types of data to support the operation in device 1300.These data Example includes being used for the instruction of any application program or method operated on device 1300, contact data, telephone book data, Message, picture, video etc..Memory 1304 can by any kind of volatibility or non-volatile memory device or they Combination is realized, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), it is erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash memory Reservoir, disk or CD.
Power supply module 1306 provides electric power for the various assemblies of device 1300.Power supply module 1306 can include power management System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 1300.
Multimedia groupware 1308 is included in the screen of one output interface of offer between described device 1300 and user. In some embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, Screen may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch and passed Sensor is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or slip be dynamic The border of work, but also detect the duration and pressure related to the touch or slide.In certain embodiments, it is more Media component 1308 includes a front camera and/or rear camera.When device 1300 is in operator scheme, mould is such as shot When formula or video mode, front camera and/or rear camera can receive outside multi-medium data.Each preposition shooting Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio-frequency assembly 1310 is configured as output and/or input audio signal.For example, audio-frequency assembly 1310 includes a wheat Gram wind (MIC), when device 1300 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone quilt It is configured to receive external audio signal.The audio signal received can be further stored in memory 1304 or via communication Component 1316 is sent.In certain embodiments, audio-frequency assembly 1310 also includes a loudspeaker, for exports audio signal.
I/O interfaces 1312 provide interface, above-mentioned peripheral interface module between processing component 1302 and peripheral interface module Can be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and Locking press button.
Sensor cluster 1314 includes one or more sensors, and the state for providing various aspects for device 1300 is commented Estimate.For example, sensor cluster 1314 can detect opening/closed mode of device 1300, the relative positioning of component, such as institute The display and keypad that component is device 1300 are stated, sensor cluster 1314 can be with detection means 1300 or device 1,300 1 The position of individual component changes, the existence or non-existence that user contacts with device 1300, the orientation of device 1300 or acceleration/deceleration and dress Put 1300 temperature change.Sensor cluster 1314 can include proximity transducer, be configured in no any physics The presence of object nearby is detected during contact.Sensor cluster 1314 can also include optical sensor, as CMOS or ccd image are sensed Device, for being used in imaging applications.In certain embodiments, the sensor cluster 1314 can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 1316 is configured to facilitate the communication of wired or wireless way between device 1300 and other equipment.Dress The wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof can be accessed by putting 1300.It is exemplary at one In embodiment, communication component 1316 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, the communication component 1316 also includes near-field communication (NFC) module, to promote short distance Communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 1300 can be by one or more application specific integrated circuits (ASIC), numeral Signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 1304 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 1320 of device 1300.Example Such as, the non-transitorycomputer readable storage medium can be ROM, it is random access memory (RAM), CD-ROM, tape, soft Disk and optical data storage devices etc..
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice disclosure disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledges in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (14)

  1. A kind of 1. image processing method, it is characterised in that including:
    Determine that the pixel that colourity is minimum in image is reference pixel;
    Determine the average gray value of the reference pixel;
    Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
    The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
  2. 2. according to the method for claim 1, it is characterised in that the pixel for determining that colourity is minimum in image is reference image Element includes:
    For the pixel in described image, determine red sub-pixel in the pixel the first gray value, the of blue subpixels 3rd gray value of two gray values and green sub-pixels;
    Calculate the first absolute value of the difference of first gray value and second gray value, first gray value with it is described Second absolute value of the difference of the 3rd gray value, the 3rd of second gray value and the difference of the 3rd gray value are absolute Value, calculate the first absolute value, the second absolute value and the 3rd absolute value sum;
    In the pixel for determining described image, described and minimum pixel is the reference pixel.
  3. 3. according to the method for claim 2, it is characterised in that the pixel being directed in described image, determine the picture 3rd gray value bag of the first gray value of red sub-pixel, the second gray value of blue subpixels and green sub-pixels in element Include:
    Detect the human face region in described image;
    Position the face key point in the human face region;
    Human eye area is determined according to the face key point;
    For the pixel in the human eye area, the first gray value, the blue subpixels of red sub-pixel in the pixel are determined The second gray value and green sub-pixels.
  4. 4. according to the method for claim 1, it is characterised in that the gray value according to the reference pixel sub-pixel Determine that adjusted value includes with the average gray value:
    According to the gray value of the reference pixel sub-pixel and the average gray value difference determine the adjusted value.
  5. 5. according to the method for claim 4, it is characterised in that it is described according to the adjusted value to pixel in described image The gray value of sub-pixel be adjusted including:
    Calculate the gray value of the sub-pixel of the pixel and the difference of the adjusted value;
    Using the difference as the gray value after the sub-pixel adjustment of the pixel.
  6. 6. method according to any one of claim 1 to 5, it is characterised in that described according to the reference pixel neutron The gray value of pixel and the average gray value determine that adjusted value includes:
    According to the gray value of red sub-pixel in the reference pixel and the average gray value, the first adjusted value is determined, according to The gray value and the average gray value of the reference pixel Green sub-pixel, determine the second adjusted value, according to the reference The gray value of blue subpixels and the average gray value, determine the 3rd adjusted value in pixel;
    It is described the gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value including:
    The gray value of the red sub-pixel of the pixel is adjusted according to first adjusted value, according to the described second adjustment Value is adjusted to the gray value of the green sub-pixels of the pixel, blueness according to the 3rd adjusted value to the pixel The gray value of pixel is adjusted.
  7. A kind of 7. image processing apparatus, it is characterised in that including:
    Pixel determining module, it is configured to determine that the pixel that colourity is minimum in image is reference pixel;
    Average determining module, it is configured to determine that the average gray value of the reference pixel;
    Adjusted value determining module, it is configured as true according to the gray value of the reference pixel sub-pixel and the average gray value Determine adjusted value;
    Adjusting module, it is configured as being adjusted the gray value of the sub-pixel of pixel in described image according to the adjusted value.
  8. 8. device according to claim 7, it is characterised in that the pixel determining module includes:
    Gray value determination sub-module, the pixel being directed in described image is configured as, determines red sub-pixel in the pixel 3rd gray value of the first gray value, the second gray value of blue subpixels and green sub-pixels;
    Calculating sub module, it is configured as calculating the first absolute value of the difference of first gray value and second gray value, First gray value and the second absolute value of the difference of the 3rd gray value, second gray value and the 3rd gray scale 3rd absolute value of the difference of value, calculate the first absolute value, the second absolute value and the 3rd absolute value sum;
    Pixel determination sub-module, is configured to determine that in the pixel of described image, and described and minimum pixel is the reference image Element.
  9. 9. device according to claim 8, it is characterised in that the pixel determining module also includes:
    Face datection submodule, it is configured as detecting the human face region in described image;
    Key point determination sub-module, it is configured as positioning the face key point in the human face region;
    Human eye determination sub-module, it is configured as determining human eye area according to the face key point;
    Wherein, gray value determination sub-module is configured as the pixel being directed in the human eye area, determines red in the pixel First gray value of sub-pixel, the second gray value of blue subpixels and green sub-pixels.
  10. 10. device according to claim 7, it is characterised in that the adjusted value determining module is configured as according to The gray value of reference pixel sub-pixel and the average gray value difference determine the adjusted value.
  11. 11. device according to claim 10, it is characterised in that the adjusting module is configured as calculating the pixel The difference of the gray value of sub-pixel and the adjusted value;And using the difference as the ash after the sub-pixel adjustment of the pixel Angle value.
  12. 12. the device according to any one of claim 7 to 11, it is characterised in that the adjusted value determining module by with It is set to according to the gray value of red sub-pixel in the reference pixel and the average gray value, determines the first adjusted value, according to The gray value and the average gray value of the reference pixel Green sub-pixel, determine the second adjusted value, according to the reference The gray value of blue subpixels and the average gray value, determine the 3rd adjusted value in pixel;
    The adjusting module is configured as carrying out the gray value of the red sub-pixel of the pixel according to first adjusted value Adjustment, is adjusted according to second adjusted value to the gray value of the green sub-pixels of the pixel, is adjusted according to the described 3rd Whole value is adjusted to the gray value of the blue subpixels of the pixel.
  13. 13. a kind of electronic equipment, it is characterised in that including:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    Determine that the pixel that colourity is minimum in image is reference pixel;
    Determine the average gray value of the reference pixel;
    Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
    The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
  14. 14. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor Following steps are realized during execution:
    Determine that the pixel that colourity is minimum in image is reference pixel;
    Determine the average gray value of the reference pixel;
    Adjusted value is determined according to the gray value of the reference pixel sub-pixel and the average gray value;
    The gray value of the sub-pixel of pixel in described image is adjusted according to the adjusted value.
CN201710817254.6A 2017-09-12 2017-09-12 Image processing method and device, electronic equipment and computer readable storage medium Active CN107564047B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710817254.6A CN107564047B (en) 2017-09-12 2017-09-12 Image processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710817254.6A CN107564047B (en) 2017-09-12 2017-09-12 Image processing method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107564047A true CN107564047A (en) 2018-01-09
CN107564047B CN107564047B (en) 2020-10-20

Family

ID=60979675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710817254.6A Active CN107564047B (en) 2017-09-12 2017-09-12 Image processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107564047B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886921A (en) * 2019-01-16 2019-06-14 新而锐电子科技(上海)有限公司 Crack size measure, device and electronic equipment based on digital picture
CN110349530A (en) * 2019-06-12 2019-10-18 北海惠科光电技术有限公司 Processing method, display panel and the computer readable storage medium on text boundary
WO2023231546A1 (en) * 2022-06-02 2023-12-07 海信视像科技股份有限公司 Image display apparatus

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050007463A1 (en) * 2003-07-07 2005-01-13 Yi-Shen Xia Rapid white balance method for color digital images
CN102893292A (en) * 2010-04-30 2013-01-23 诺基亚公司 Method, apparatus and computer program product for compensating eye color defects
CN102938843A (en) * 2012-11-22 2013-02-20 华为技术有限公司 Image processing method, image processing device and imaging device
CN103139572A (en) * 2011-11-24 2013-06-05 比亚迪股份有限公司 Sensitization device and method and device for white balance of sensitization device
CN103227928A (en) * 2013-03-29 2013-07-31 华为技术有限公司 White balance adjusting method and device
CN104036467A (en) * 2014-06-18 2014-09-10 北京航空航天大学 Image color cast correction method based on channel gain coefficient weighting
CN104424626A (en) * 2013-09-09 2015-03-18 联发科技(新加坡)私人有限公司 Method and associated apparatus for correcting color artifact of image
CN105933687A (en) * 2016-07-04 2016-09-07 凌云光技术集团有限责任公司 Automatic white balance processing method and device for images
CN106131441A (en) * 2016-09-06 2016-11-16 北京小米移动软件有限公司 Photographic method and device, electronic equipment
CN107135384A (en) * 2017-05-19 2017-09-05 中国科学院深圳先进技术研究院 White balance adjusting method, device, image processing terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050007463A1 (en) * 2003-07-07 2005-01-13 Yi-Shen Xia Rapid white balance method for color digital images
CN102893292A (en) * 2010-04-30 2013-01-23 诺基亚公司 Method, apparatus and computer program product for compensating eye color defects
CN103139572A (en) * 2011-11-24 2013-06-05 比亚迪股份有限公司 Sensitization device and method and device for white balance of sensitization device
CN102938843A (en) * 2012-11-22 2013-02-20 华为技术有限公司 Image processing method, image processing device and imaging device
CN103227928A (en) * 2013-03-29 2013-07-31 华为技术有限公司 White balance adjusting method and device
CN104424626A (en) * 2013-09-09 2015-03-18 联发科技(新加坡)私人有限公司 Method and associated apparatus for correcting color artifact of image
CN104036467A (en) * 2014-06-18 2014-09-10 北京航空航天大学 Image color cast correction method based on channel gain coefficient weighting
CN105933687A (en) * 2016-07-04 2016-09-07 凌云光技术集团有限责任公司 Automatic white balance processing method and device for images
CN106131441A (en) * 2016-09-06 2016-11-16 北京小米移动软件有限公司 Photographic method and device, electronic equipment
CN107135384A (en) * 2017-05-19 2017-09-05 中国科学院深圳先进技术研究院 White balance adjusting method, device, image processing terminal and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886921A (en) * 2019-01-16 2019-06-14 新而锐电子科技(上海)有限公司 Crack size measure, device and electronic equipment based on digital picture
CN110349530A (en) * 2019-06-12 2019-10-18 北海惠科光电技术有限公司 Processing method, display panel and the computer readable storage medium on text boundary
CN110349530B (en) * 2019-06-12 2021-07-23 北海惠科光电技术有限公司 Character boundary processing method, display panel and computer readable storage medium
US11538393B2 (en) 2019-06-12 2022-12-27 Beihai Hkc Optoelectronics Technology Co., Ltd. Text boundary processing method, display panel, and computer-readable storage medium
WO2023231546A1 (en) * 2022-06-02 2023-12-07 海信视像科技股份有限公司 Image display apparatus

Also Published As

Publication number Publication date
CN107564047B (en) 2020-10-20

Similar Documents

Publication Publication Date Title
EP2977959B1 (en) Method and device for adjusting skin color
CN104517268B (en) Adjust the method and device of brightness of image
CN104077585B (en) Method for correcting image, device and terminal
CN104182967B (en) image processing method, device and terminal
CN105760884B (en) The recognition methods of picture type and device
CN105512605A (en) Face image processing method and device
CN107730448B (en) Beautifying method and device based on image processing
CN107155060A (en) Image processing method and device
CN106454336A (en) Method and device for detecting whether camera of terminal is covered or not, and terminal
CN104077563B (en) Face identification method and device
CN107231505A (en) Image processing method and device
CN107798314A (en) Skin color detection method and device
CN104464674B (en) Liquid crystal display method of adjustment and device
CN107832746A (en) Expression recognition method and device
CN107564047A (en) Image processing method and device, electronic equipment and computer-readable recording medium
CN105957037A (en) Image enhancing method and image enhancing device
CN106251369A (en) Image processing method and device
CN107958223A (en) Face identification method and device, mobile equipment, computer-readable recording medium
CN107967459A (en) convolution processing method, device and storage medium
CN107230428A (en) Display methods, device and the terminal of curve screens
CN105825490A (en) Gaussian blur method and device of image
CN104599266B (en) The detection method in fog region, device and terminal in image
CN107845094A (en) Pictograph detection method, device and computer-readable recording medium
CN106557294A (en) Color adjustment method and device
CN107507128A (en) Image processing method and 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
GR01 Patent grant
GR01 Patent grant