Specific embodiment
Further illustrate the technical solution of the application below with reference to the accompanying drawings and specific embodiments.It is understood that
It is that specific embodiment described herein is used only for explaining the application, rather than the restriction to the application.It further needs exist for illustrating
, part relevant to the application is illustrated only for ease of description, in attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail
The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these
Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation
The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with
Corresponding to method, function, regulation, subroutine, subprogram etc..
CCM (Color Correction Matrix, color correction matrix) is to carry out color correction to image, restores figure
As color, image style is adjusted, the important means of picture quality is improved.In traditional technology, mainly for the figure under different scenes
As using different CCM matrixes, the image effect after color correction is easy to cause for the switching of image different scenes is mutated, and is made
Image Adjusting effect not can guarantee that style is consistent, in particular for the stage for carrying out preview to image using video camera, in reality
In, user experience can be largely effected on.Based on considerations above, the scheme of following color of image correction is now provided.
Fig. 1 is the flow diagram of image color correction method provided by the embodiments of the present application, and this method can be by image
Color correction device executes, and wherein the device can be implemented by software and/or hardware, and can generally integrate in the terminal.Such as Fig. 1
It is shown, this method comprises:
Step 101 obtains original image to be processed.
Illustratively, the mobile terminal in the embodiment of the present application may include that mobile phone, tablet computer and video camera etc. have bat
According to the mobile device of function.
In the embodiment of the present application, when the camera for detecting mobile terminal in the open state, i.e., ought detect shifting
When the camera of dynamic terminal be in shooting preview state or shooting image, the raw image of camera acquisition is obtained, at this point, can be by
The raw image of camera acquisition is as original image to be processed.Optionally, camera acquires raw image, and white based on presetting
Balance Treatment algorithm carries out white balance processing to raw image, then can be using white balance treated raw image as original to be processed
Beginning image.Optionally, can also obtain other terminal devices transmission raw image or pending color correction image, and by its
As original image to be processed.It is of course also possible to which acquisition needs to carry out face directly from the image library stored in mobile terminal
The image of color correction, as original image to be processed.It should be noted that the embodiment of the present application is to original image to be processed
Source or acquisition modes, without limitation.
Optionally, when detecting that color of image correction event is triggered, original image to be processed is obtained.It is understood that
, in order to carry out color correction to image on suitable opportunity, the trigger condition of color of image correction event can be preset.
Illustratively, it in order to meet user to the visual demand of acquisition image, can be triggered when detecting that camera is in the open state
Color of image corrects event.Optionally, when contrast of the user to certain image in mobile terminal is dissatisfied, use can be being detected
When the dynamic opening color of image of householder corrects permission, triggering color of image corrects event.Optionally, it is answered to correct color of image
For more valuable Time window, brought extra power consumption is corrected to save color of image, color of image can be corrected
Time window and application scenarios are analyzed or are investigated, and reasonably default scene is arranged, and are in default in detection mobile terminal
When scene, triggering color of image corrects event.It should be noted that the embodiment of the present application is triggered to color of image correction event
Specific manifestation form without limitation.
The original image is input in color of image calibration model trained in advance by step 102.
In the embodiment of the present application, color of image calibration model can be understood as after inputting original image to be processed, fastly
Speed determines the learning model of target image corresponding with the original image to be processed, wherein original image to be processed with this
Corresponding target image is that the image after color of image correction is carried out to original image.Color of image calibration model can be to adopting
The sample original image of collection and the color of image correction image that sample original image is adjusted to best effects, are trained generation
Learning model.It is understood that passing through the figure for being adjusted to best effects to sample original image and by sample original image
Corresponding relationship as color correction image, and between the two is learnt, and color of image calibration model can be generated.Color of image school
Positive model is end-to-end learning model, that is, inputs and output is the learning model of image.
Step 103, the output image for determining described image color correction model, and using the output image as with it is described
The corresponding target image of original image.
Illustratively, after original image to be processed being input to color of image calibration model, color of image calibration model
The original image to be processed is analyzed, and color correction is carried out to the original image based on the analysis results, is obtained pair
Original image carries out the target image after color correction, and exports.It is understood that original image to be processed is inputted figure
As after color correction model, color of image calibration model is after analyzing, direct output image, then can using the output image as with
The corresponding target image of original image.I.e. the output image of color of image calibration model is color of image calibration model to be processed
Original image carry out color correction after image, i.e., target image corresponding with original image.
The image color correction method provided in the embodiment of the present application obtains original image to be processed;It will be described original
Image is input in color of image calibration model trained in advance;Determine the output image of described image color correction model, and
Using the output image as target image corresponding with the original image.It, not only can be with by using above-mentioned technical proposal
Simply and rapidly to original image carry out color correction, but also can targetedly to the different original images of input into
The corresponding color correction of row, can effectively improve the quality of image, further enhances the contrast of image, make image closer to very
Real color.
In some embodiments, using the output image as target image corresponding with the original image after,
Further include: Gamma correction is carried out to the target image, and exports the target image after Gamma correction.Illustratively, to original
Beginning image obtains target image after carrying out color correction, in order to further increase the contrast of target image, can be further to mesh
Logo image carries out Gamma correction, and exports the target image after Gamma correction.The advantages of this arrangement are as follows can be to target
Dark area in image carries out the improvement of color, can further increase the contrast of image, improve the quality of image.
Fig. 2 is the flow diagram of image color correction method provided by the embodiments of the present application, as shown in Fig. 2, this method
Include:
Step 201 acquires first sample original image by camera.
Optionally, first sample original image is acquired by camera, comprising: the first standard color card is acquired by camera
First sample original image under different illumination;Wherein, first standard color card is colored colour atla;Or pass through camera
Acquire first sample original image of at least two photographed scenes under different illumination.
Illustratively, the first standard color card is colored colour atla, such as the first standard color card can be for 24 different face
The standard color card of the solid block of color of color then acquires image of first standard color card under different illumination by camera, as first
Sample original image.Illustratively, raw image of first standard color card under different-colour is acquired by camera, and be based on
Default white balance Processing Algorithm carries out white balance processing to raw image, then can be using white balance treated raw image as first
Sample original image.
It is again illustrative, image of at least two photographed scenes under different illumination is acquired by camera, and will acquisition
Image as first sample original image.Optionally, at least two photographed scenes preferably include the reference object of different colours,
So that photographed scene is rich in color.It is understood that different photographed scenes contain the different colours of different reference objects,
Then acquiring image of at least two photographed scenes under different illumination by camera can make as first sample original image
The first sample original image that must be shot can not only simulate figure of the first standard color card of camera acquisition under different illumination
Picture can also include more scene informations.
Step 202 carries out color correction to the first sample original image, obtains and the first sample original image
Corresponding first sample target image.
In the embodiment of the present application, color is carried out to first sample original image using conventional images color calibration method
Correction, obtains first sample target image corresponding with first sample original image.Optionally, first sample original image is defeated
Enter into ISP (Image Signal Processor, image-signal processor) tool, manually to first sample original image into
Row color correction is adjusted, and will be adjusted to the best image of color correction effect as corresponding with first sample original image first
Sample object image.Wherein, when carrying out color correction adjusting to first sample original image, if be adjusted to color correction effect
Best image can be confirmed by the first visual sense of human eye, can also be commented by image quality measure standard
Estimate, until obtaining the best image of color correction effect.
Optionally, color correction is being carried out to the first sample original image, obtained and the first sample original graph
Before corresponding first sample target image, further includes: acquired by camera corresponding with the first sample original image
Sample RGB image;Color correction is carried out to the first sample original image, is obtained and the first sample original image pair
The first sample target image answered, comprising: using the sample RGB image as reference picture, to the first sample original image
Color correction is carried out, first sample target image corresponding with the first sample original image is obtained.The benefit being arranged in this way
It is, can effectively controls correction scale when carrying out color correction to first sample original image, it can be simply and rapidly complete
The color correction of pairs of first sample original image, and preferable color correction effect can be reached.
Illustratively, first sample original image (raw of first standard color card under different illumination is acquired by camera
Image carried out white balance treated image to raw image) when, the first standard color card can be acquired by camera in difference
Sample RGB image under illumination, wherein first sample original image and sample RGB image correspond, i.e., first sample is original
Image and sample RGB image are image of the first standard color card of acquisition under same illumination.It is again illustrative, pass through camera shooting
(raw image carried out raw image to first sample original image of head at least two photographed scenes of acquisition under different illumination
White balance treated image) when, camera can be passed through and acquire sample RGB figure of at least two photographed scenes under different illumination
Picture, wherein first sample original image and sample RGB image correspond, i.e. first sample original image and sample RGB image
It is image of the same photographed scene of acquisition under same illumination.
When carrying out color correction to first sample original image, with sample RGB corresponding with first sample original image
Image is reference picture, it can be achieved that the preferable color correction effect of first sample original image.Illustratively, by first sample
Original image is input in ISP tool, using sample RGB image as reference picture, is carried out manually to first sample original image
Color correction, until when the image and sample RGB image difference after color correction are not very big, it is believed that first sample is original
Image adjustment is to the preferable image of color correction effect.
Step 203, using the first sample original image and the first sample target image as the first training sample
Collection.
Using first sample original image and first sample target image corresponding with first sample original image as image
The training sample set of color correction model, i.e. the first training sample set.
Step 204 is trained the first default machine learning model using first training sample set, obtains image
Color correction model.
Illustratively, the first default machine learning model is trained using the first training sample set, generates image face
Color calibration model.Wherein, the first default machine learning model may include convolutional neural networks model or long memory network in short-term
The machine learning models such as model can also include model-naive Bayesian.It should be noted that the embodiment of the present application is pre- to first
If machine learning model is without limitation.
Step 205 obtains original image to be processed.
The original image is input in color of image calibration model trained in advance by step 206.
Step 207, the output image for determining described image color correction model, and using the output image as with it is described
The corresponding target image of original image.
Wherein, before obtaining original image to be processed, color of image calibration model is obtained.It should be noted that can
To be above-mentioned first training sample set of acquisition for mobile terminal, using the first training sample set to the first default machine learning model into
Row training, directly generates color of image calibration model.It can also be that mobile terminal calls directly the training of other mobile terminals and generates
Color of image calibration model, for example, using first training sample set of acquisition for mobile terminal and generating image before factory
Color correction model, then by the color of image calibration model store to in other mobile terminals, it is straight for other mobile terminals
Connect use.Alternatively, server obtains a large amount of first sample original image and carries out color correction to first sample original image
First sample target image afterwards, obtains the first training sample set.Server to based on the first default machine learning model to the
One training sample set is trained, and obtains color of image calibration model.When mobile terminal needs to carry out color of image timing, from
Server calls trained color of image calibration model.
Image color correction method provided by the embodiments of the present application obtains original image to be processed, and will be described original
Image is input in color of image calibration model trained in advance, then determines the output figure of described image color correction model
Picture, and using the output image as target image corresponding with the original image, wherein color of image calibration model is base
It is instructed in first sample original image and to the first sample target image after first sample original image progress color correction
Practice generation.By using above-mentioned technical proposal, the first of the first standard color card acquired under different illumination can be efficiently used
The first sample original image of at least two photographed scenes acquired under sample original image, or different illumination, and to first
Sample original image carries out the first sample target image after color correction, carries out the training study of color of image calibration model,
It can effectively improve the accuracy of color of image calibration model, while can be accurately and rapidly right using color of image calibration model
Original image to be processed carries out color correction, can effectively improve picture quality.
Fig. 3 is the flow diagram of image color correction method provided by the embodiments of the present application, as shown in figure 3, this method
Include:
Step 301 acquires first sample original image of first standard color card under different illumination by camera;Its
In, first standard color card is colored colour atla;Or at least two photographed scenes are acquired under different illumination by camera
First sample original image.
Step 302 carries out color correction to the first sample original image, obtains and the first sample original image
Corresponding first sample target image.
Step 303, using the first sample original image and the first sample target image as the first training sample
Collection.
Step 304 is trained the first default machine learning model using first training sample set, obtains image
Color correction model.
Step 305 obtains original image to be processed.
Illustratively, original image to be processed includes the raw image of camera acquisition.Alternatively, original graph to be processed
As including needing to carry out the image of color correction, but in order to reach better color correction effect, need to the original image
White balance processing is carried out in advance.
The original image is input in advance trained white balance coefficients matrix and determines in model by step 306.
In the embodiment of the present application, white balance coefficients matrix determines that model can be understood as inputting original graph to be processed
As after, the learning model of white balance coefficients matrix corresponding with the original image to be processed is quickly determined.White balance coefficients square
Battle array determines that model can be and is trained life to the second sample original image of acquisition and corresponding sample white balance coefficients matrix
At learning model, wherein sample white balance coefficients matrix includes the white balance that sample original image is adjusted to best effects
Handle matrix when image.It is understood that by the second sample original image and corresponding sample white balance coefficients square
Battle array, and corresponding relationship between the two are learnt, and white balance coefficients matrix can be generated and determine model.
Step 307 determines the output of model as a result, the determining and original image pair according to the white balance coefficients matrix
The white balance coefficients matrix answered.
Illustratively, original image to be processed is input to after white balance coefficients matrix determines model, white balance coefficients
Matrix determines that model analyzes the original image, and determination is corresponding with original image to be processed white based on the analysis results
Coefficient of balance matrix.
Step 308 carries out white balance processing to the original image according to the white balance coefficients matrix.
Illustratively, white balance processing is carried out to original image to be processed based on white balance coefficients matrix, for example, can incite somebody to action
The product of original image and white balance coefficients matrix, which is used as, carries out white balance treated image to original image.
Optionally, white balance processing is carried out to the original image according to the white balance coefficients matrix, comprising: obtain institute
State the first RGB component value of each pixel in original image;For all pixels point in the original image, by each pixel
Point the first RGB component value and the white balance coefficients matrix in corresponding position white balance coefficients product, as with it is original
Second RGB component value of the pixel of the corresponding target image of pixel described in image.The advantages of this arrangement are as follows can be directed to
Each pixel determines an independent white balance coefficients in original image to be processed, and based on white balance coefficients matrix to original
Each pixel carries out white balance processing in beginning image, when can solve based on global white balance algorithm progress white balance processing,
It is easy to cause the misalignment of pure color object larger, mixes the technical issues of can not accurately detecting white block under colour temperature,
The quality that image can be effectively improved increases the saturation degree of image.
Illustratively, the first RGB component value of each pixel in original image is obtained, and is owned in original image
Pixel, by the first RGB component value of each pixel multiplied by the white balance system with corresponding position in white balance coefficients matrix
Number, and using the result after product as the second RGB component of target image pixel corresponding with pixel described in original image
Result after product is used as the second RGB component value to original image progress white balance treated pixel by value.Example
Property, obtain the first RGB component of first pixel (pixel of the first row first row in original image) in original image
Value, then by the first RGB component of the white balance coefficients of the first row first row in white balance coefficients matrix and first pixel
The product of value, as first pixel carried out in white balance treated image to original image, (treated for white balance
The pixel of the first row first row in image) the second RGB component value.And so on, it is based on white balance coefficients matrix, to original
Each pixel does similar processing operation in image, to obtain carrying out white balance treated image to original image.
Step 309, will be through in white balance treated original image is input to trained in advance color of image calibration model.
In the embodiment of the present application, will through white balance, treated that original image is input in color of image calibration model,
Analyze color of image calibration model to the image, to carry out color correction.
Step 310, the output image for determining described image color correction model, and using the output image as with it is described
The corresponding target image of original image.
Step 311 carries out Gamma correction to the target image, and exports the target image after Gamma correction.
Image color correction method provided by the embodiments of the present application obtains original image to be processed, and original image is defeated
Enter to white balance coefficients matrix trained in advance and determine in model, and determines the output knot of model according to white balance coefficients matrix
Fruit determines white balance coefficients matrix corresponding with original image, is then carried out according to white balance coefficients matrix to original image white
Balance Treatment by through in white balance treated original image is input to trained in advance color of image calibration model, and determines
The output image of color of image calibration model, using output image as target image corresponding with original image.By using upper
Technical solution is stated, can determine that model carries out white balance processing to original image using white balance coefficients matrix, and utilize image
Color correction model carries out color correction to through white balance treated image, and the contrast of original image not only can be improved,
The saturation degree of image can also be improved, picture quality can be effectively improved.
In some embodiments, model is determined the original image is input in advance trained white balance coefficients matrix
In before, further includes: obtain white balance coefficients matrix determine model;Wherein, the white balance coefficients matrix determines model by such as
Under type obtains: acquiring second sample original image of second standard color card under different-colour by camera;Wherein, described
Second standard color card is white colour atla;White balance processing is carried out to the second sample original image, is obtained and second sample
The corresponding second sample object image of this original image;According to the second sample original image and the second sample object figure
Picture, determination change the second sample original image for the corresponding sample white balance coefficients square of the second sample object image
Battle array;The second sample original image is marked according to the sample white balance coefficients matrix, obtains the second training sample
Collection;The second default machine learning model is trained using second training sample set, it is true to obtain white balance coefficients matrix
Cover half type.
In the embodiment of the present application, the second standard color card is white colour atla, acquires the second standard color card by camera and exists
Image under different-colour, as the second sample original image.Illustratively, standard color card is acquired not homochromy by camera
Raw image under temperature, as the second sample original image.Different-colour can be realized by artificial light sources, illustratively, in reality
It tests under room environmental, different colour temperature environment is built by different types of light source.For example, can be built using candle as light source
The colour temperature environment of 2000k can build the colour temperature environment of 1950-2250k using high-pressure sodium lamp as light source, be done using tengsten lamp
The colour temperature environment that 2700k can be built for light source can build the colour temperature environment of 3000k using halogen lamp as light source, utilize
Warm colour fluorescent lamp can build the colour temperature environment etc. of 4000k-4600k as light source.One can be provided by different types of light source
The serial continuous shooting environmental of color temperature value.The second standard color card is shot under different-colour using camera, obtains every color temperature
Under colour atla image, to obtain second sample original image of second standard color card under different-colour.
Illustratively, white balance processing is carried out to the second sample original image using existing white balancing treatment method, obtained
To the second sample object image corresponding with the second sample original image.Optionally, the second sample original image is input to ISP
In tool, manually to the second sample original image carry out white balance adjusting, will be adjusted to the best image of white balance effect as
The second sample object image corresponding with the second sample original image.Wherein, white balance tune is carried out to the second sample original image
When section, if being adjusted to the best image of white balance effect can be confirmed by the second visual sense of human eye, can also be led to
It crosses image quality measure standard to be assessed, until obtaining the best image of white balance effect.
In the embodiment of the present application, according to the second sample original image and the second sample corresponding with the second sample original image
This target image, determine by the second sample original image variation be the second sample object image when, corresponding sample white balance system
Matrix number, that is, when determining that carrying out white balance to the second sample original image handles to obtain the second sample object image, at white balance
The white balance coefficients matrix used during reason.
Optionally, it according to the second sample original image and the second sample object image, determines described second
The variation of sample original image is the corresponding sample white balance coefficients matrix of the second sample object image, comprising: described in acquisition
Each pixel in the third RGB component value of each pixel and the second sample object image in second sample original image
The 4th RGB component value;For all pixels point, by the corresponding 4th RGB component value of each pixel and third RGB component value
Ratio, as the corresponding white balance coefficients of pixel described in sample white balance coefficients matrix.The advantages of this arrangement are as follows
It is corresponding when can accurately determine out the original image progress white balance processing under different-colour environment to the second standard color card
White balance coefficients matrix.
Illustratively, the third RGB component value and the second sample of each pixel in the second sample original image are obtained respectively
The 4th RGB component value of each pixel calculates separately the 4th of corresponding pixel points for each pixel in this target image
The ratio of RGB component value and third RGB component value, and using the ratio as the white balance coefficients matrix of the pixel.It is exemplary
, obtain first pixel (pixel of the first row first row in the second sample original image) in the second sample original image
Third RGB component value and the second sample object image in first pixel (the first row first in first sample target image
The pixel of column) the 4th RGB component value, and by the ratio of the 4th RGB component value and the third RGB component value, as white
The white balance coefficients of the first row first row in coefficient of balance matrix.In the manner described above, and so on, white balance system is determined respectively
The white balance coefficients of each element in matrix number.
Illustratively, according to obtained each sample white balance coefficients matrix respectively to corresponding second sample original image
The the second sample original image for being marked, and corresponding sample white balance coefficients matrix being marked, as white balance coefficients square
Battle array determines the training sample set of model, i.e. the second training sample set.Illustratively, default to second using the second training sample set
Machine learning model is trained, and is generated white balance coefficients matrix and is determined model.Wherein, the second default machine learning model can be with
Including convolutional neural networks model or the long machine learning models such as memory network model in short-term.The embodiment of the present application is default to second
Machine learning model is without limitation, wherein and the second default machine learning model can be identical with the first default machine learning model,
It can also be different.
Wherein, it before obtaining original image to be processed, obtains white balance coefficients matrix and determines model.It needs to illustrate
It is that can be above-mentioned second training sample set of acquisition for mobile terminal, using the second training sample set to the second default machine learning
Model is trained, and is directly generated white balance coefficients matrix and is determined model.It can also be that mobile terminal calls directly other movements
The white balance coefficients matrix that terminal training generates determines model, for example, being instructed before factory using an acquisition for mobile terminal second
Practice sample set and generate white balance coefficients matrix and determine model, then by the white balance coefficients matrix determine model storage arrive and its
In his mobile terminal, directly used for other mobile terminals.Alternatively, server obtain a large amount of second sample original image and with
The corresponding white balance coefficients matrix of second sample original image, and it is original to the second sample according to corresponding white balance coefficients matrix
Image is marked, and obtains the second training sample set.Server trains sample to second to based on the second default machine learning model
This collection is trained, and is obtained white balance coefficients matrix and is determined model.When mobile terminal needs to carry out the processing of image white balance, from
Trained white balance coefficients matrix determines model to server calls.
Fig. 4 is a kind of structural schematic diagram of color of image means for correcting provided by the embodiments of the present application, which can be by soft
Part and/or hardware realization, are typically integrated in mobile terminal, can be by executing image color correction method come to original to be processed
Beginning image carries out color correction.As shown in figure 4, the device includes:
Original image obtains module 401, for obtaining original image to be processed;
First original image input module 402, for the original image to be input to color of image school trained in advance
In positive model;
Target image determining module 403, for determining the output image of described image color correction model, and will be described defeated
Image is as target image corresponding with the original image out.
The color of image means for correcting provided in the embodiment of the present application, obtains original image to be processed;It will be described original
Image is input in color of image calibration model trained in advance;Determine the output image of described image color correction model, and
Using the output image as target image corresponding with the original image.It, not only can be with by using above-mentioned technical proposal
Simply and rapidly to original image carry out color correction, but also can targetedly to the different original images of input into
The corresponding color correction of row, can effectively improve the quality of image, makes image closer to realistic colour.
Optionally, described device further include:
Color correction model obtains module, for obtaining described image color before obtaining original image to be processed
Calibration model;
Wherein, described image color correction model is obtained by such as under type:
First sample original image is acquired by camera;
Color correction is carried out to the first sample original image, obtains corresponding with the first sample original image the
One sample target image;
Using the first sample original image and the first sample target image as the first training sample set;
The first default machine learning model is trained using first training sample set, obtains color of image correction
Model.
Optionally, color correction is being carried out to the first sample original image, obtained and the first sample original graph
Before corresponding first sample target image, further includes:
Sample RGB image corresponding with the first sample original image is acquired by camera;
Color correction is carried out to the first sample original image, obtains corresponding with the first sample original image the
One sample target image, comprising:
Using the sample RGB image as reference picture, to the first sample original image carry out color correction, obtain with
The corresponding first sample target image of the first sample original image.
Optionally, first sample original image is acquired by camera, comprising:
First sample original image of first standard color card under different illumination is acquired by camera;Wherein, described
One standard color card is colored colour atla;Or
First sample original image of at least two photographed scenes under different illumination is acquired by camera.
Optionally, described device further include:
Second original image input module, for the original image to be input to color of image correction trained in advance
Before in model, the original image is input to white balance coefficients matrix trained in advance and is determined in model;
White balance coefficients matrix deciding module, for determining the output of model according to the white balance coefficients matrix as a result,
Determine white balance coefficients matrix corresponding with the original image;
White balance processing module, for being carried out at white balance according to the white balance coefficients matrix to the original image
Reason;
The first original image input module, is used for:
It will be through in white balance treated original image is input to trained in advance color of image calibration model.
Optionally, described device further include:
Coefficient matrix determines that model obtains module, for the original image to be input to white balance system trained in advance
Before matrix number determines in model, obtains white balance coefficients matrix and determine model;
Wherein, the white balance coefficients matrix determines that model is obtained by such as under type:
Second sample original image of second standard color card under different-colour is acquired by camera;Wherein, described
Two standard color cards are white colour atla;
White balance processing is carried out to the second sample original image, is obtained corresponding with the second sample original image
Second sample object image;
According to the second sample original image and the second sample object image, determination is original by second sample
Image change is the corresponding sample white balance coefficients matrix of the second sample object image;
The second sample original image is marked according to the sample white balance coefficients matrix, obtains the second training
Sample set;
The second default machine learning model is trained using second training sample set, obtains white balance coefficients square
Battle array determines model.
Optionally, described device further include:
Gamma correction module, for using the output image as target image corresponding with the original image it
Afterwards, Gamma correction is carried out to the target image, and exports the target image after Gamma correction.
The embodiment of the present application also provides a kind of storage medium comprising computer executable instructions, and the computer is executable
Instruction is used to execute image color correction method when being executed by computer processor, this method comprises:
Obtain original image to be processed;
The original image is input in color of image calibration model trained in advance;
Determine the output image of described image color correction model, and using the output image as with the original image
Corresponding target image.
Storage medium --- any various types of memory devices or storage equipment.Term " storage medium " is intended to wrap
It includes: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as
DRAM, DDRRAM, SRAM, EDORAM, Lan Basi (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (example
Such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include other types
Memory or combinations thereof.In addition, storage medium can be located at program in the first computer system being wherein performed, or
It can be located in different second computer systems, second computer system is connected to the first meter by network (such as internet)
Calculation machine system.Second computer system can provide program instruction to the first computer for executing.Term " storage medium " can
To include two or more that may reside in different location (such as in the different computer systems by network connection)
Storage medium.Storage medium can store the program instruction that can be performed by one or more processors and (such as be implemented as counting
Calculation machine program).
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present application
The color of image correct operation that executable instruction is not limited to the described above, can also be performed provided by the application any embodiment
Relevant operation in image color correction method.
The embodiment of the present application provides a kind of mobile terminal, and figure provided by the embodiments of the present application can be integrated in the mobile terminal
As color correction device.Fig. 5 is a kind of structural schematic diagram of mobile terminal provided by the embodiments of the present application.Mobile terminal 500 can
To include: memory 501, processor 502 and storage are on a memory and can be at the computer program of processor operation, the place
Reason device 502 realizes the image color correction method as described in the embodiment of the present application when executing the computer program.
Mobile terminal provided by the embodiments of the present application not only simply and rapidly can carry out color correction to original image,
But also corresponding color correction targetedly can be carried out to the different original images of input, it can effectively improve image
Quality makes image closer to realistic colour.
Fig. 6 is the structural schematic diagram of another mobile terminal provided by the embodiments of the present application, which may include:
Shell (not shown), memory 601, central processing unit (central processing unit, CPU) 602 (are also known as located
Manage device, hereinafter referred to as CPU), circuit board (not shown) and power circuit (not shown).The circuit board is placed in institute
State the space interior that shell surrounds;The CPU602 and the memory 601 are arranged on the circuit board;The power supply electricity
Road, for each circuit or the device power supply for the mobile terminal;The memory 601, for storing executable program generation
Code;The CPU602 is run and the executable journey by reading the executable program code stored in the memory 601
The corresponding computer program of sequence code, to perform the steps of
Obtain original image to be processed;
The original image is input in color of image calibration model trained in advance;
Determine the output image of described image color correction model, and using the output image as with the original image
Corresponding target image.
The mobile terminal further include: Peripheral Interface 603, RF (Radio Frequency, radio frequency) circuit 605, audio-frequency electric
Road 606, loudspeaker 611, power management chip 608, input/output (I/O) subsystem 609, other input/control devicess 610,
Touch screen 612, other input/control devicess 610 and outside port 604, these components pass through one or more communication bus
Or signal wire 607 communicates.
It should be understood that illustrating the example that mobile terminal 600 is only mobile terminal, and mobile terminal 600
It can have than shown in the drawings more or less component, can combine two or more components, or can be with
It is configured with different components.Various parts shown in the drawings can include one or more signal processings and/or dedicated
It is realized in the combination of hardware, software or hardware and software including integrated circuit.
Just the mobile terminal provided in this embodiment for color of image correction is described in detail below, and the movement is whole
End takes the mobile phone as an example.
Memory 601, the memory 601 can be accessed by CPU602, Peripheral Interface 603 etc., and the memory 601 can
It can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory,
Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU602 and deposited by Peripheral Interface 603, the Peripheral Interface 603
Reservoir 601.
I/O subsystem 609, the I/O subsystem 609 can be by the input/output peripherals in equipment, such as touch screen 612
With other input/control devicess 610, it is connected to Peripheral Interface 603.I/O subsystem 609 may include 6091 He of display controller
For controlling one or more input controllers 6092 of other input/control devicess 610.Wherein, one or more input controls
Device 6092 processed receives electric signal from other input/control devicess 610 or sends electric signal to other input/control devicess 610,
Other input/control devicess 610 may include physical button (push button, rocker buttons etc.), dial, slide switch, behaviour
Vertical pole clicks idler wheel.It is worth noting that input controller 6092 can with it is following any one connect: keyboard, infrared port,
The indicating equipment of USB interface and such as mouse.
Touch screen 612, the touch screen 612 are the input interface and output interface between customer mobile terminal and user,
Visual output is shown to user, visual output may include figure, text, icon, video etc..
Display controller 6091 in I/O subsystem 609 receives electric signal from touch screen 612 or sends out to touch screen 612
Electric signals.Touch screen 612 detects the contact on touch screen, and the contact that display controller 6091 will test is converted to and is shown
The interaction of user interface object on touch screen 612, i.e. realization human-computer interaction, the user interface being shown on touch screen 612
Object can be the icon of running game, the icon for being networked to corresponding network etc..It is worth noting that equipment can also include light
Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuit 605 is mainly used for establishing the communication of mobile phone Yu wireless network (i.e. network side), realizes mobile phone and wireless network
The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuit 605 receives and sends RF letter
Number, RF signal is also referred to as electromagnetic signal, and RF circuit 605 converts electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications
Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuit 605 may include for executing
The known circuit of these functions comprising but it is not limited to antenna system, RF transceiver, one or more amplifiers, tuner, one
A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould
Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 606 is mainly used for receiving audio data from Peripheral Interface 603, which is converted to telecommunications
Number, and the electric signal is sent to loudspeaker 611.
Loudspeaker 611 is reduced to sound for mobile phone to be passed through RF circuit 605 from the received voice signal of wireless network
And the sound is played to user.
Power management chip 608, the hardware for being connected by CPU602, I/O subsystem and Peripheral Interface are powered
And power management.
It is any that the application can be performed in color of image means for correcting, storage medium and the mobile terminal provided in above-described embodiment
Image color correction method provided by embodiment has and executes the corresponding functional module of this method and beneficial effect.Not upper
The technical detail of detailed description in embodiment is stated, reference can be made to image color correction method provided by the application any embodiment.
Note that above are only the preferred embodiment and institute's application technology principle of the application.It will be appreciated by those skilled in the art that
The application is not limited to specific embodiment described here, be able to carry out for a person skilled in the art it is various it is apparent variation,
The protection scope readjusted and substituted without departing from the application.Therefore, although being carried out by above embodiments to the application
It is described in further detail, but the application is not limited only to above embodiments, in the case where not departing from the application design, also
It may include more other equivalent embodiments, and scope of the present application is determined by the scope of the appended claims.