CN102110428A - Method and device for converting color space from CMYK to RGB - Google Patents

Method and device for converting color space from CMYK to RGB Download PDF

Info

Publication number
CN102110428A
CN102110428A CN200910243865XA CN200910243865A CN102110428A CN 102110428 A CN102110428 A CN 102110428A CN 200910243865X A CN200910243865X A CN 200910243865XA CN 200910243865 A CN200910243865 A CN 200910243865A CN 102110428 A CN102110428 A CN 102110428A
Authority
CN
China
Prior art keywords
layer
node
output
hidden
input
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
CN200910243865XA
Other languages
Chinese (zh)
Other versions
CN102110428B (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.)
China Digital Video Beijing Ltd
Original Assignee
China Digital Video Beijing 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 China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN200910243865.XA priority Critical patent/CN102110428B/en
Publication of CN102110428A publication Critical patent/CN102110428A/en
Application granted granted Critical
Publication of CN102110428B publication Critical patent/CN102110428B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The present invention provides a method and a device for converting a color space from CMYK (Cyan, Magenta, Yellow, Black) to RGB (Red, Green, Blue), wherein the method concretely comprises: an establishing step, in which a BP neural network conversion model is established, C, M, Y, K in the CMYK color space are taken as input variables of the conversion model, R, G, B in the RGB color space are taken as output variables of the conversion model, and parameters of the model comprise network weights and network thresholds; a obtaining step, in which N CMYK color values and corresponding RGB color values are separately taken as inputs and expected outputs of training samples to obtain the training samples; and a training step, in which, aiming at the training samples, a BP algorithm is adopted to train the conversion model so as to obtain corrected model parameters, thereby determining the conversion model. The method and the device in the present invention are used for reducing conversion errors of the color space from the CMYK to the RGB.

Description

A kind of CMYK is to the conversion method and the device of rgb color space
Technical field
The present invention relates to technical field of image processing, particularly relate to conversion method and the device of a kind of CMYK to rgb color space.
Background technology
In using increasingly extensive visualization of spatial information in recent years, the colour of spatial information is expressed with application has become one of main target of spatial information analysis, processing and application.Because color can most accurately be expressed objective object, people's vision reflects the diversity of the fastest visualization of spatial information mode and need come the color of reproduction space information by multiple colour generation equipment and material color, thereby cause realizing on space and different colour generation equipment and the material and satisfying the demand that color is expressed, make a color transformed technical barrier that becomes visualization of spatial information by color transformed the description in multicolour.
Color transformed being meant set up between the different color space mapping relations one to one, makes the color data that provides can satisfy the color space that practical application is supported.The color transformed of broad sense is exactly colour space transformation, and what be about to also that a certain color space represents color transformedly represents in another kind of color space, as common RGB (red Red, green Green, blue Blue), CMYK (blue or green Cyan, fuchsin Magenta, yellow Yellow, black Black), L *a *b *The mutual conversion in color spaces such as (illuminance Luminosity, a, b represent three-dimensional two axles of color respectively).
In the color of spatial information was expressed at present, rgb color space and cmyk color space were the basic color spaces that spatial information shows and prints.Wherein, the rgb color pattern is most basic color mode, if the image that on computer screen, shows, just must be with the performance of RGB pattern, because the physical arrangement of display is followed RGB.And the cmyk color pattern is also referred to as the printing color pattern, so long as the image of seeing on printed matter shows with the CMYK pattern.
In image processing field, often there is the conversion demand from CMYK to the rgb color space.For example, consider that AI is that the planar design personnel use, need to print that the file of the * .AI type of storing in AI (Adobe Illustrator) software all shows with the CMYK pattern.Like this, when the designer uses the file of * .AI type on computer screen, just need be converted into the RGB pattern.
The rgb color pattern is a kind of color standard of industry member, be to obtain color miscellaneous by variation and their stacks each other to R, G, three Color Channels of blue B, RGB promptly is a color of representing three passages of red, green, blue, this standard almost comprised human eyesight can perception all colours.
The cmyk color pattern is a kind of color standard of setting at press specially, be by obtaining versicolor to C, M, four change color of Y, K and their stacks each other, CMYK represents green grass or young crops, fuchsin, Huang, black four kinds of ink colors that printing is special-purpose, in printing, be by control green grass or young crops, fuchsin, Huang, the black phase double exposure of four color inks on paper brushed and produced color, its chromatic number is less than the RGB look.
The Lab pattern is a kind of color mode of being announced in 1976 by International Commission on Illumination (CIE), is the color mode that comprises visible all colors of human eye in theory that the CIE tissue is determined.
Because the color that the Lab pattern can show is greater than RGB and two kinds of color modes of CMYK, therefore, existing C MYK is to the conversion method of rgb color space, often with the LAB pattern as a kind of inner color mode, also be, the execution sequence of existing conversion method is CMYK → Lab at first, is only Lab → RGB then.Yet Lab is a device independent color space, and CMYK, RGB are device dependent color spaces, so, above-mentioned transformational relation nonlinearity height, transformed error is often not ideal enough.
In a word, need the urgent technical matters that solves of those skilled in the art to be exactly: how can solve CMYK to the big problem of the transformed error of rgb color space.
Summary of the invention
Technical matters to be solved by this invention provides conversion method and the device of a kind of CMYK to rgb color space, in order to reduce transformed error.
In order to address the above problem, the invention discloses the conversion method of a kind of CMYK to rgb color space, comprising:
Establishment step: set up BP neural network transformation model, with the C in the CMYK space, M, Y, K input variable as this transformation model, R in the rgb space, G, B are as the output variable of this transformation model, and the parameter of described model comprises network weight and network threshold;
Obtaining step: with N CMYK color value and corresponding RGB color value is the input and the desired output of training sample, obtains training sample;
Training step: at described training sample, adopt the BP algorithm to train this transformation model, the model parameter that obtains revising, thus determine this transformation model.
Preferably, the structure of described transformation model comprises input layer, hidden layer and output layer, and the input layer number is 4, and output layer node number is 3, and the number of hidden nodes is
Figure G200910243865XD00031
Wherein, 1<a<30.
Preferably, the transport function of described hidden layer and output layer be Sigmoid type: f (x)=1/[1+e^ (bx)], b>0.
Preferably, described training step comprises:
Initialization operation: preset number of samples K=0, the default local error upper limit and the global error upper limit, network weight and network threshold are carried out initialization, wherein, described network weight comprises the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, described network threshold comprises hidden node threshold value and output layer node threshold value;
Input operation: import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
First calculating operation: the output valve of calculating each node of hidden layer;
Second calculating operation: the output valve of calculating each node of output layer;
The 3rd calculating operation: at current sample,, adopt square type error function, calculate the error of current sample based on the output valve of desired output and each node of output layer;
First decision operation: whether the error of judging current sample is less than the local error upper limit, if then carry out second decision operation; Otherwise, carry out first and revise operation;
Second decision operation: judge whether K>N-1 sets up, if then carry out the 4th calculating operation; Otherwise, carry out first and revise operation;
The 4th calculating operation: at all N sample,, adopt square type error function, calculate global error based on the output valve of desired output and each node of output layer;
The 3rd decision operation: whether judge global error less than the global error upper limit, if then algorithm finishes; Otherwise, carry out first and revise operation;
First revises operation: calculate the calibration corrections of the connection weights between output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value are revised;
Second revises operation: the calibration corrections that calculates the connection weights between hidden node and the input layer, and according to described calibration corrections, connection weights between hidden layer and the input layer and hidden node threshold value are revised, and made K=K+1, return input operation.
Preferably, described training step comprises:
Initialization operation: preset frequency of training T, K=0, set current frequency of training t=0, network weight and network threshold are carried out initialization, wherein, described network weight comprises the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, and described network threshold comprises hidden node threshold value and output layer node threshold value;
Input operation: import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
First calculating operation: the output valve of calculating each node of hidden layer;
Second calculating operation: the output valve of calculating each node of output layer;
First revises operation: calculate the calibration corrections of the connection weights between output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value are revised;
Second revises operation: calculate the calibration corrections of the connection weights between hidden node and the input layer, and according to described calibration corrections, connection weights between hidden layer and the input layer and hidden node threshold value are revised;
First decision operation: judge whether K>N-1 sets up, if then carry out second decision operation; Otherwise, K=K+1, and return input operation;
Second decision operation: judge whether t>T-2 sets up, if then algorithm finishes; Otherwise, upgrade frequency of training t=t+1, and return input operation.
Preferably, when b=1, described obtaining step comprises:
Obtain N CMYK color value and corresponding RGB color value, and with its input and desired output raw data as training sample;
Normalized is carried out in described input and desired output raw data, make its value between [0,1].
The invention also discloses the conversion equipment of a kind of CMYK, comprising to rgb color space:
Set up module, be used to set up BP neural network transformation model, with the C in the CMYK space, M, Y, the K input variable as this transformation model, the R in the rgb space, G, B are as the output variable of this transformation model, and the parameter of described model comprises network weight and network threshold;
Acquisition module, being used for N CMYK color value and corresponding RGB color value is the input and the desired output of training sample, obtains training sample;
Training module is used at described training sample, adopts the BP algorithm to train this transformation model, the model parameter that obtains revising, thus determine this transformation model.
Preferably, the structure of described transformation model comprises input layer, hidden layer and output layer.
Preferably, described training module comprises:
The initialization submodule, be used to preset number of samples K=0, the default local error upper limit and the global error upper limit, network weight and network threshold are carried out initialization, wherein, described network weight comprises the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, and described network threshold comprises hidden node threshold value and output layer node threshold value;
The input submodule is used to import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
First calculating sub module is used to calculate the output valve of each node of hidden layer;
Second calculating sub module is used to calculate the output valve of each node of output layer;
The 3rd calculating sub module is used at current sample, based on the output valve of desired output and each node of output layer, adopts square type error function, calculates the error of current sample;
First judges submodule, and whether the error that is used to judge current sample is less than the local error upper limit, if then trigger second and judge submodule; Otherwise, trigger first and revise submodule;
Second judges submodule, is used to judge whether K>N-1 sets up, if then trigger the 4th calculating sub module; Otherwise, trigger first and revise submodule;
The 4th calculating sub module is used at all N sample, based on the output valve of desired output and each node of output layer, adopts square type error function, calculates global error;
The 3rd judges submodule, whether is used to judge global error less than the global error upper limit, if then finish training; Otherwise, trigger first and revise submodule;
First revises submodule, is used to calculate the calibration corrections of the connection weights between output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value is revised;
Second revises submodule, be used to calculate the calibration corrections of the connection weights between hidden node and the input layer, and, connection weights between hidden layer and the input layer and hidden node threshold value are revised, and trigger the input submodule according to described calibration corrections.
Preferably, the transport function of described hidden layer and output layer be Sigmoid type: f (x)=1/[1+e^ (x)];
Described acquisition module comprises:
Color value obtains submodule, is used to obtain N CMYK color value and corresponding RGB color value, and with its input and desired output raw data as training sample;
The normalization submodule is used for normalized is carried out in described input and desired output raw data, makes its value between [0,1].
Compared with prior art, the present invention has the following advantages:
The present invention utilizes neural network not understanding the characteristics of finishing Nonlinear Modeling under the prerequisite that concerns between variable that input or output, with CMYK abstract to the conversion of rgb color space be a neural net model establishing problem, particularly, at first, with the C in the CMYK space, M, Y, K as input variable, R in the rgb space, G, B set up BP neural network transformation model as output variable, and the parameter of described model comprises network weight and network threshold; Then,, adopt the BP algorithm to train this transformation model at the training sample that reality obtains, the model parameter that obtains revising, thus determine this transformation model; Because the training process of this transformation model, it is the process that described model parameter is constantly revised, the error that this process can be performed until transformation model output reduces to the acceptable degree, and therefore, the present invention can reduce the transformed error of CMYK to rgb color space.
Description of drawings
Fig. 1 is the process flow diagram of a kind of CMYK of the present invention to the conversion method embodiment of rgb color space;
Fig. 2 is a kind of BP neural network structure of the present invention figure;
Fig. 3 is a BP network transport function commonly used;
Fig. 4 is a kind of sigmoid examples of functions of the present invention;
Fig. 5 is the process flow diagram that a kind of error of the present invention is adjusted scheme.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
Because the different table color method has different colour gamuts and precision in the space information system, usually can cause this transformation relation can not be with simple explicit the expression, thereby cause color transformed relation very complicated.
The rgb color pattern uses the RGB model to distribute one 0~255 intensity level in the scope as R, G, the B component of each pixel in the image.For example: pure red R value is 255, and the G value is 0, and the B value is 0; The R of grey, G, three values of B equate (except 0 and 255); R, G, the B of white are 255; The R of black, G, B are 0.The RGB image only uses three kinds of colors, and they are mixed according to different ratios, reappears 16777216 kinds of colors on screen.
And in the image of cmyk color pattern, each pixel all is by C, M, Y and K look synthetic according to different ratios.Every kind of printing-ink of each pixel can be assigned with a percent value, the printing ink colors percent value that the color assignment of the brightest (Gao Guang) is lower, the higher percent value of color assignment of dark (shadow).For example, Ming Liang redness may comprise 2% cyan, 93% fuchsin, 90% yellow and 0% black.In the CMYK image, when the value of all 4 kinds of components all is 0%, will produce pure white.
One of core idea of the present invention is, since comprise four channel C, M, Y, K in the image of cmyk color pattern, comprise three passage R, G, B in the image of rgb color pattern, if with the relation between described two kinds of patterns abstract be a mathematical model, so, CMYK just can be reduced to a mathematics modeling problem to the conversion of rgb color space.
The traditional mathematics modeling method, comprise modelling by mechanism, multivariate statistical method, kalman filter method, based on homing method of model etc., these methods can be described out some simple linear systems, still, some complicated linear systems and nonlinear system are difficult to accurate description.And the cmyk color pattern is a typical nonlinear problem to the conversion of rgb color pattern.
The inventor herein has noticed this point, creatively utilizes neural network to input or output the characteristics of finishing Nonlinear Modeling under the prerequisite that concerns between variable not understanding, and sets up the transformation model of CMYK to rgb color space.
With reference to Fig. 1, show the process flow diagram of a kind of CMYK of the present invention to the conversion method embodiment of rgb color space, specifically can comprise:
Establishment step 101, set up BP neural network transformation model, can be with the C in the CMYK space, M, Y, K input variable as this transformation model, with the R in the rgb space, G, the B output variable as this transformation model, the parameter of described model can comprise network weight and network threshold;
BP (Back Propagation) network is a kind of Multi-layered Feedforward Networks by the training of error Back-Propagation algorithm, is one of present most widely used neural network model.
As shown in Figure 2, the BP neural network can comprise with lower unit:
1. processing unit (neuron) (representing with circle among the figure), the i.e. element of neural network.The processing unit of input layer just changes input value over to adjacent connection weight, and the processing unit of hidden layer and output layer calculates output valve with their input value summation and according to transfer function;
2. connect weight (among the figure as V, W).It connects the processing unit in the neural network, and its value changes with the connection degree of each processing unit;
3. the layer.Neural network generally has input layer x, hidden layer y and output layer o;
4. threshold value.Its value can be constant or variable value, and it can make network can more freely obtain the funtcional relationship that will describe;
5. transport function f (x).It is with the processing unit of data conversion for exporting of input, is generally nonlinear function.
Therefore, determined that the network number of plies, every node layer number, transport function, initial weight coefficient etc. have also just determined the BP network.Certain governing principle is arranged when determining these options, but more be by experience.
Specific to the embodiment of the invention, then the structure of described transformation model can comprise input layer, hidden layer and output layer, and the input layer number is 4, and output layer node number is 3.
For Multi-layered Feedforward Networks, determining of the number of hidden nodes is key of success.If quantity is very little, then network can obtain in order to the information of dealing with problems very little; If quantity is too many, not only increase the training time, and (Overfitting) problem of what is called " transition coincide " too much also may appear in hidden node, i.e. test error increase causes generalization ability to descend, and therefore, the choose reasonable the number of hidden nodes is extremely important.
About the selection more complicated of hidden layer number and node number thereof, rule is: correctly reflecting on the basis of input/output relation, should select less the number of hidden nodes for use, so that network structure is simple as far as possible.Therefore, the embodiment of the invention is preferentially selected single hidden layer structure for use, and selects the number of hidden nodes according to following experimental formula:
Wherein, 1<a<30.
The transport function of BP network has multiple.As shown in Figure 3, the desirable arbitrary value of the input value of Log-sigmoid type function, output valve is between 0 and 1; The desirable arbitrary value of input value of tan-sigmod type transport function, output valve is between-1 to+1; The desirable arbitrary value of the input of linear transfer function purelin and output valve.
In a preferred embodiment of the present invention, adopt sigmoid type function f (x)=1/[1+e^ (bx)] (b>0) as the transport function of hidden layer and output layer.With reference to figure 4, show the sigmoid examples of functions of b=1, it is a good threshold function table, has continuously, smooth, strictly monotone is about (0,0.5) centrosymmetric characteristics.
Obtaining step 102, be the input and the desired output of training sample, obtain training sample with N CMYK color value and corresponding RGB color value;
For example,, be in the transport function of hidden layer and output layer for the forecast model of single hidden layer: f (x)=1/[1+e^ (x)] time, its output valve is between 0 and 1, and at this moment, described obtaining step can comprise following substep:
Substep A1, obtain N CMYK color value and corresponding RGB color value, and with its input and desired output raw data as training sample;
Substep A2, normalized is carried out in described input and desired output raw data, make its value between [0,1].
Training step 103, at described training sample, adopt the BP algorithm to train this transformation model, the model parameter that obtains revising, thereby determine this transformation model.
The BP basic idea is that training process is made up of the forward-propagating of signal and two processes of backpropagation of error.
1) forward-propagating: input sample-input layer-each hidden layer (processing)-output layer;
2) error back propagation: output error (certain form)-hidden layer (successively)-input layer;
Its fundamental purpose is by with the output error anti-pass, error is shared to all unit of each layer, thereby obtain the error signal of each layer unit, and then revise the weights (its process is the process that weights are adjusted) of each unit.
Therefore, information forward-propagating that goes round and begins again and error back propagation process are the processes that each layer weights are constantly adjusted, and also are the processes of neural network learning training, the error that this process is performed until network output reduces to the acceptable degree, till the perhaps predefined frequency of training.
Correspondingly, the embodiment of the invention can comprise following two kinds of training programs:
One, error is adjusted scheme
Typical B P algorithm adopts the gradient descent method, and its basic thought is that at weight vector space execution error function gradient decline strategy, dynamically one group of weight vector of iterative search makes the network error function reach minimum value, thereby finishes information extraction and memory process.
For making those skilled in the art understand the present invention better, below this programme is described by concrete example.
The training sample obtaining step of supposing this example is by the AI software of Adobe, to obtain N=625 CMYK color value and corresponding RGB color value, as training sample;
Transformation model is three layers of BP network of a single hidden layer:
The input layer number is 4, establishes Y i 1Output for input layer i (i=0,1,2,3);
The number of hidden nodes n 1=18, the characteristic of each node be Sigmoid type: f (x)=1/[1+e^ (x)], Y j 2For middle layer node j (j=0,1,2 ..., 16,17) output;
Output layer node number is 3, the characteristic of each node be Sigmoid type: f (x)=1/[1+e^ (x)], Y k 3Be the output of output layer node k (k=0,1,2), T kBe the corresponding desired output of output layer node k (k=0,1,2);
W IjBe the connection weights between node i and the node j, W JkBe the connection weights between node j and the node k, θ jBe the threshold value of middle layer node j, θ kThreshold value for output layer node k;
Adopt square type error function
Figure G200910243865XD00111
With reference to Fig. 5, show the realization flow figure of this programme, specifically can comprise:
Initialization operation 501, preset number of samples p=0, the default local error upper limit and the global error upper limit, network weight and network threshold are carried out initialization, wherein, described network weight can comprise the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, described network threshold can comprise hidden node threshold value and output layer node threshold value;
For example, give little random number, W to network weight and threshold value Ij(t) ∈ [1,1], W Jk(t) ∈ [1,1], θ j(t) ∈ [1,1], θ k(t) ∈ [1,1];
Input operation 502, p training sample of input, as current training sample, wherein, p ∈ 1,2 ..., N};
The output valve of first calculating operation 503, each node of calculating hidden layer Y j 2 = f ( Σ i = 1 N W ij Y i 1 - θ j ) = f ( Σ i = 1 N W ij X k - θ j ) ;
The output valve of second calculating operation 504, each node of calculating output layer
Figure G200910243865XD00113
The 3rd calculating operation 505, at current sample, based on the output valve of desired output and each node of output layer, adopt square type error function, calculate the error of current sample
Figure G200910243865XD00114
First decision operation 506, judge current sample error whether less than the local error upper limit, if then carry out second decision operation 507; Otherwise, carry out first and revise operation 510;
Second decision operation 507, judge whether K>N-1 sets up, if then carry out the 4th calculating operation 508; Otherwise, carry out first and revise operation 510;
The 4th calculating operation 508, at all N sample, based on the output valve of desired output and each node of output layer, adopt square type error function, calculate global error
Figure G200910243865XD00115
The 3rd decision operation 509, whether judge global error, if then algorithm finishes less than the global error upper limit; Otherwise, carry out first and revise operation 510;
First revises the connection weights correction between operation 510, calculating output layer node and the hidden node:
Figure G200910243865XD00121
And according to calibration corrections δ kRevise connection weight value matrix W between output layer and hidden layer JkWith threshold vector θ k
For example, node K and hidden layer j be connected weights W JkWith being modified to of the threshold value of node K:
Figure G200910243865XD00122
θ k(t+1)=θ k(t)+β δ k
Second revises the connection weights correction between operation 511, calculating hidden node and the input layer: And according to described calibration corrections δ jRevise the connection weight value matrix W between hidden layer and input layer JiWith threshold vector θ j, and make K=K+1, return input operation 502.
For example, hidden layer j and input layer i's is connected weights W JiThreshold vector θ with node j jModified value be:
Figure G200910243865XD00124
θ j(t+1)=θ j(t)+α δ j
Two, frequency of training is adjusted scheme
Frequency of training is an important parameter of neural network.Frequency of training too much can cause the mistake of network to fit, and causes the result to produce deviation; Frequency of training is crossed and is made network be difficult to convergence at least, does not reach training requirement.The basic thought of this programme is, finishes learning process by predefined frequency of training.
In specific implementation, the implementation procedure of this programme can comprise:
Initialization operation, preset frequency of training T, K=0, set current frequency of training t=0, network weight and network threshold are carried out initialization, wherein, described network weight can comprise the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, and described network threshold can comprise hidden node threshold value and output layer node threshold value;
Input operation: import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
The output valve of first calculating operation, each node of calculating hidden layer;
The output valve of second calculating operation, each node of calculating output layer;
First revises the calibration corrections of the connection weights between operation, calculating output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value is revised;
Second revises the calibration corrections of the connection weights between operation, calculating hidden node and the input layer, and according to described calibration corrections, connection weights between hidden layer and the input layer and hidden node threshold value is revised;
First decision operation, judge whether K>N-1 sets up, if then carry out second decision operation; Otherwise, K=K+1, and return input operation;
Second decision operation, judge whether t>T-2 sets up, if then algorithm finishes; Otherwise, upgrade frequency of training t=t+1, and return input operation.
The implementation procedure that is appreciated that above-mentioned two kinds of schemes is just as example, and those skilled in the art can also adopt other interpretational criterias as required, as adopting square error (MSE, Mean SquareError); Perhaps, adopt other training rule, as utilizing the improvement BP algorithm of momentum method, self-adaptation to adjust learning rate, momentum-adaptive learning speed adjustment algorithm, L-M (Levenberg-Marquardt) learning rules etc., the present invention is not limited concrete interpretational criteria and training rule.
In addition, above-mentioned two kinds of schemes can also be combined, weights and threshold value are adjusted, the present invention is not limited this.
The invention also discloses the conversion equipment embodiment of a kind of CMYK, specifically can comprise to rgb color space:
Set up module, be used to set up BP neural network transformation model, can be with the C in the CMYK space, M, Y, K input variable as this transformation model, with the R in the rgb space, G, the B output variable as this transformation model, the parameter of described model can comprise network weight and network threshold;
For the embodiment of the invention, the structure of described transformation model can comprise input layer, hidden layer and output layer;
Acquisition module, being used for N CMYK color value and corresponding RGB color value is the input and the desired output of training sample, obtains training sample;
The transport function of described hidden layer and output layer be Sigmoid type: f (x)=1/[1+e^ (x)] time, described acquisition module can comprise:
Color value obtains submodule, is used to obtain N CMYK color value and corresponding RGB color value, and with its input and desired output raw data as training sample;
The normalization submodule is used for normalized is carried out in described input and desired output raw data, makes its value between [0,1].
Training module is used at described training sample, adopts the BP algorithm to train this transformation model, the model parameter that obtains revising, thus determine this transformation model.
In a preferred embodiment of the present invention, described training module can comprise following submodule:
The initialization submodule, be used to preset number of samples K=0, the default local error upper limit and the global error upper limit, network weight and network threshold are carried out initialization, wherein, described network weight can comprise the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, and described network threshold can comprise hidden node threshold value and output layer node threshold value;
The input submodule is used to import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
First calculating sub module is used to calculate the output valve of each node of hidden layer;
Second calculating sub module is used to calculate the output valve of each node of output layer;
The 3rd calculating sub module is used at current sample, based on the output valve of desired output and each node of output layer, adopts square type error function, calculates the error of current sample;
First judges submodule, and whether the error that is used to judge current sample is less than the local error upper limit, if then trigger second and judge submodule; Otherwise, trigger first and revise submodule;
Second judges submodule, is used to judge whether K>N-1 sets up, if then trigger the 4th calculating sub module; Otherwise, trigger first and revise submodule;
The 4th calculating sub module is used at all N sample, based on the output valve of desired output and each node of output layer, adopts square type error function, calculates global error;
The 3rd judges submodule, whether is used to judge global error less than the global error upper limit, if then finish training; Otherwise, trigger first and revise submodule;
First revises submodule, is used to calculate the calibration corrections of the connection weights between output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value is revised;
Second revises submodule, be used to calculate the calibration corrections of the connection weights between hidden node and the input layer, and, connection weights between hidden layer and the input layer and hidden node threshold value are revised, and trigger the input submodule according to described calibration corrections.
For device embodiment, because it is similar substantially to method embodiment shown in Figure 1, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
More than to conversion method and the device of a kind of CMYK provided by the present invention to rgb color space, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a CMYK is characterized in that to the conversion method of rgb color space, comprising:
Establishment step: set up BP neural network transformation model, with the C in the CMYK space, M, Y, K input variable as this transformation model, R in the rgb space, G, B are as the output variable of this transformation model, and the parameter of described model comprises network weight and network threshold;
Obtaining step: with N CMYK color value and corresponding RGB color value is the input and the desired output of training sample, obtains training sample;
Training step: at described training sample, adopt the BP algorithm to train this transformation model, the model parameter that obtains revising, thus determine this transformation model.
2. the method for claim 1 is characterized in that, the structure of described transformation model comprises input layer, hidden layer and output layer, and the input layer number is 4, and output layer node number is 3, and the number of hidden nodes is
Figure F200910243865XC00011
Wherein, 1<a<30.
3. method as claimed in claim 2 is characterized in that, the transport function of described hidden layer and output layer be Sigmoid type: f (x)=1/[1+e^ (bx)], b>0.
4. method as claimed in claim 2 is characterized in that, described training step comprises:
Initialization operation: preset number of samples K=0, the default local error upper limit and the global error upper limit, network weight and network threshold are carried out initialization, wherein, described network weight comprises the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, described network threshold comprises hidden node threshold value and output layer node threshold value;
Input operation: import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
First calculating operation: the output valve of calculating each node of hidden layer;
Second calculating operation: the output valve of calculating each node of output layer;
The 3rd calculating operation: at current sample,, adopt square type error function, calculate the error of current sample based on the output valve of desired output and each node of output layer;
First decision operation: whether the error of judging current sample is less than the local error upper limit, if then carry out second decision operation; Otherwise, carry out first and revise operation;
Second decision operation: judge whether K>N-1 sets up, if then carry out the 4th calculating operation; Otherwise, carry out first and revise operation;
The 4th calculating operation: at all N sample,, adopt square type error function, calculate global error based on the output valve of desired output and each node of output layer;
The 3rd decision operation: whether judge global error less than the global error upper limit, if then algorithm finishes; Otherwise, carry out first and revise operation;
First revises operation: calculate the calibration corrections of the connection weights between output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value are revised;
Second revises operation: the calibration corrections that calculates the connection weights between hidden node and the input layer, and according to described calibration corrections, connection weights between hidden layer and the input layer and hidden node threshold value are revised, and made K=K+1, return input operation.
5. method as claimed in claim 2 is characterized in that, described training step comprises:
Initialization operation: preset frequency of training T, K=0, set current frequency of training t=0, network weight and network threshold are carried out initialization, wherein, described network weight comprises the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, and described network threshold comprises hidden node threshold value and output layer node threshold value;
Input operation: import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
First calculating operation: the output valve of calculating each node of hidden layer;
Second calculating operation: the output valve of calculating each node of output layer;
First revises operation: calculate the calibration corrections of the connection weights between output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value are revised;
Second revises operation: calculate the calibration corrections of the connection weights between hidden node and the input layer, and according to described calibration corrections, connection weights between hidden layer and the input layer and hidden node threshold value are revised;
First decision operation: judge whether K>N-1 sets up, if then carry out second decision operation; Otherwise, K=K+1, and return input operation;
Second decision operation: judge whether t>T-2 sets up, if then algorithm finishes; Otherwise, upgrade frequency of training t=t+1, and return input operation.
6. method as claimed in claim 3 is characterized in that, when b=1, described obtaining step comprises:
Obtain N CMYK color value and corresponding RGB color value, and with its input and desired output raw data as training sample;
Normalized is carried out in described input and desired output raw data, make its value between [0,1].
7. a CMYK is characterized in that to the conversion equipment of rgb color space, comprising:
Set up module, be used to set up BP neural network transformation model, with the C in the CMYK space, M, Y, the K input variable as this transformation model, the R in the rgb space, G, B are as the output variable of this transformation model, and the parameter of described model comprises network weight and network threshold;
Acquisition module, being used for N CMYK color value and corresponding RGB color value is the input and the desired output of training sample, obtains training sample;
Training module is used at described training sample, adopts the BP algorithm to train this transformation model, the model parameter that obtains revising, thus determine this transformation model.
8. device as claimed in claim 7 is characterized in that, the structure of described transformation model comprises input layer, hidden layer and output layer.
9. device as claimed in claim 8 is characterized in that, described training module comprises:
The initialization submodule, be used to preset number of samples K=0, the default local error upper limit and the global error upper limit, network weight and network threshold are carried out initialization, wherein, described network weight comprises the connection weights between output layer node and the hidden node, and the connection weights between hidden node and the input layer, and described network threshold comprises hidden node threshold value and output layer node threshold value;
The input submodule is used to import K training sample, as current training sample, wherein, K ∈ 1,2 ..., N};
First calculating sub module is used to calculate the output valve of each node of hidden layer;
Second calculating sub module is used to calculate the output valve of each node of output layer;
The 3rd calculating sub module is used at current sample, based on the output valve of desired output and each node of output layer, adopts square type error function, calculates the error of current sample;
First judges submodule, and whether the error that is used to judge current sample is less than the local error upper limit, if then trigger second and judge submodule; Otherwise, trigger first and revise submodule;
Second judges submodule, is used to judge whether K>N-1 sets up, if then trigger the 4th calculating sub module; Otherwise, trigger first and revise submodule;
The 4th calculating sub module is used at all N sample, based on the output valve of desired output and each node of output layer, adopts square type error function, calculates global error;
The 3rd judges submodule, whether is used to judge global error less than the global error upper limit, if then finish training; Otherwise, trigger first and revise submodule;
First revises submodule, is used to calculate the calibration corrections of the connection weights between output layer node and the hidden node, and according to described calibration corrections, connection weights between output layer and the hidden layer and output layer threshold value is revised;
Second revises submodule, be used to calculate the calibration corrections of the connection weights between hidden node and the input layer, and, connection weights between hidden layer and the input layer and hidden node threshold value are revised, and trigger the input submodule according to described calibration corrections.
10. device as claimed in claim 8 is characterized in that, the transport function of described hidden layer and output layer be Sigmoid type: f (x)=1/[1+e^ (x)];
Described acquisition module comprises:
Color value obtains submodule, is used to obtain N CMYK color value and corresponding RGB color value, and with its input and desired output raw data as training sample;
The normalization submodule is used for normalized is carried out in described input and desired output raw data, makes its value between [0,1].
CN200910243865.XA 2009-12-23 2009-12-23 Method and device for converting color space from CMYK to RGB Expired - Fee Related CN102110428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910243865.XA CN102110428B (en) 2009-12-23 2009-12-23 Method and device for converting color space from CMYK to RGB

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910243865.XA CN102110428B (en) 2009-12-23 2009-12-23 Method and device for converting color space from CMYK to RGB

Publications (2)

Publication Number Publication Date
CN102110428A true CN102110428A (en) 2011-06-29
CN102110428B CN102110428B (en) 2015-05-27

Family

ID=44174564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910243865.XA Expired - Fee Related CN102110428B (en) 2009-12-23 2009-12-23 Method and device for converting color space from CMYK to RGB

Country Status (1)

Country Link
CN (1) CN102110428B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622418A (en) * 2012-02-21 2012-08-01 北京联合大学 Prediction device and equipment based on BP (Back Propagation) nerve network
CN103383743A (en) * 2013-07-16 2013-11-06 南京信息工程大学 Chrominance space transformation method
CN111064860A (en) * 2018-10-17 2020-04-24 北京地平线机器人技术研发有限公司 Image correction method, image correction device and electronic equipment
CN111355937A (en) * 2020-03-11 2020-06-30 北京迈格威科技有限公司 Image processing method and device and electronic equipment
CN112270397A (en) * 2020-10-26 2021-01-26 西安工程大学 Color space conversion method based on deep neural network
CN113409206A (en) * 2021-06-11 2021-09-17 西安工程大学 High-precision digital printing color space conversion method
CN113706415A (en) * 2021-08-27 2021-11-26 北京瑞莱智慧科技有限公司 Training data generation method, countermeasure sample generation method, image color correction method and device
CN114285955A (en) * 2021-12-28 2022-04-05 浙江大学 Color gamut mapping method based on dynamic deviation map neural network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100585635C (en) * 2008-04-17 2010-01-27 上海交通大学 Visualization method for Munsell colour model computer
CN101442602B (en) * 2008-12-31 2010-12-08 陕西科技大学 Color space transition method based on fuzzy theory

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622418A (en) * 2012-02-21 2012-08-01 北京联合大学 Prediction device and equipment based on BP (Back Propagation) nerve network
CN103383743A (en) * 2013-07-16 2013-11-06 南京信息工程大学 Chrominance space transformation method
CN103383743B (en) * 2013-07-16 2016-07-06 南京信息工程大学 A kind of chrominance space transformation method
CN111064860A (en) * 2018-10-17 2020-04-24 北京地平线机器人技术研发有限公司 Image correction method, image correction device and electronic equipment
CN111355937A (en) * 2020-03-11 2020-06-30 北京迈格威科技有限公司 Image processing method and device and electronic equipment
CN111355937B (en) * 2020-03-11 2021-11-16 北京迈格威科技有限公司 Image processing method and device and electronic equipment
CN112270397A (en) * 2020-10-26 2021-01-26 西安工程大学 Color space conversion method based on deep neural network
CN112270397B (en) * 2020-10-26 2024-02-20 西安工程大学 Color space conversion method based on deep neural network
CN113409206A (en) * 2021-06-11 2021-09-17 西安工程大学 High-precision digital printing color space conversion method
CN113706415A (en) * 2021-08-27 2021-11-26 北京瑞莱智慧科技有限公司 Training data generation method, countermeasure sample generation method, image color correction method and device
CN114285955A (en) * 2021-12-28 2022-04-05 浙江大学 Color gamut mapping method based on dynamic deviation map neural network

Also Published As

Publication number Publication date
CN102110428B (en) 2015-05-27

Similar Documents

Publication Publication Date Title
CN102110428A (en) Method and device for converting color space from CMYK to RGB
CN103931169B (en) A kind of general Color Gamut Mapping and color management method
US20170161864A1 (en) Printer cartridge and memory device containing a compressed color table
EP3135025B1 (en) Color halftone processing
US9936102B2 (en) Color mapping modeling printing device perturbations
US10291822B2 (en) Color mapping generation including application of a halftone operation on continuous tone color data
CN102111626A (en) Conversion method and device from red-green-blue (RGB) color space to cyan-magenta-yellow-black (CMYK) color space
US10694076B2 (en) Color calibration
CN102173221A (en) Print control apparatus, print data generating apparatus and print system
CN109804615B (en) Method, apparatus and storage medium for controlling printing of halftone
CN101277369A (en) Image forming apparatus and control method thereof
WO2019059946A1 (en) Lookup table smoothing
EP3213499A1 (en) Post-processing halftone images
US11057543B2 (en) Updating a lookup table for an imaging system
CN100457467C (en) Color saturation adjustment
US10897556B2 (en) Generating an area coverage vector
US10868919B2 (en) Printer calibration adjusting NPac vector based on measurement data
US11477346B2 (en) Color calibration in a printing system
US10728423B2 (en) Colorant vector calibration
US11025798B2 (en) Associating a color with a neugebauer primary
Tongkai et al. When Artificial Intelligence Meets Printing The Evidence of Black Generation
CN108573507A (en) Colouring information display device and colouring information display methods

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150527

Termination date: 20161223

CF01 Termination of patent right due to non-payment of annual fee