CN117579757A - Color profile generation method and device for color gamut conversion - Google Patents

Color profile generation method and device for color gamut conversion Download PDF

Info

Publication number
CN117579757A
CN117579757A CN202311433437.XA CN202311433437A CN117579757A CN 117579757 A CN117579757 A CN 117579757A CN 202311433437 A CN202311433437 A CN 202311433437A CN 117579757 A CN117579757 A CN 117579757A
Authority
CN
China
Prior art keywords
parameter
matrix
file
target
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311433437.XA
Other languages
Chinese (zh)
Inventor
詹俊炎
杨怡昕
荣山雨
李楚璇
周谷越
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Qimeng Toy Industry Co ltd
Tsinghua University
Original Assignee
Guangdong Qimeng Toy Industry Co ltd
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Qimeng Toy Industry Co ltd, Tsinghua University filed Critical Guangdong Qimeng Toy Industry Co ltd
Priority to CN202311433437.XA priority Critical patent/CN117579757A/en
Publication of CN117579757A publication Critical patent/CN117579757A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6002Corrections within particular colour systems
    • H04N1/6008Corrections within particular colour systems with primary colour signals, e.g. RGB or CMY(K)
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6058Reduction of colour to a range of reproducible colours, e.g. to ink- reproducible colour gamut
    • H04N1/6063Reduction of colour to a range of reproducible colours, e.g. to ink- reproducible colour gamut dependent on the contents of the image to be reproduced
    • H04N1/6066Reduction of colour to a range of reproducible colours, e.g. to ink- reproducible colour gamut dependent on the contents of the image to be reproduced dependent on the gamut of the image to be reproduced

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a color profile generation method and device for color gamut conversion, comprising the following steps: obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file; converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter; obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file; and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file. According to the invention, the target matrix is used for updating the adjustment parameters of the original color configuration file, the color configuration file which can be loaded into a conventional color management tool is developed, other software settings except the used color management tool are prevented from being changed, the manual adjustment workload is reduced, and the effect of accurately and rapidly performing color gamut conversion is realized.

Description

Color profile generation method and device for color gamut conversion
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for generating a color configuration file for color gamut conversion.
Background
Color gamut conversion is the conversion of colors from one color gamut space to another and ensures that the colors do not change during the conversion process. However, in general, it is not possible to lossless to perform color gamut conversion between color gamut spaces. This is because gamut conversion is the result of a given task, and the size ranges of different color spaces are different, so it is difficult to perform perfect gamut conversion directly between different tasks using originally configured software. Because of the complexity of color matching of different color gamut spaces, in the corresponding scene/material, the human designer manually adjusts the color gamut to realize the conversion which meets the requirements, however, the manual adjustment has high time complexity and low efficiency, and because of the difference of human eyes on color perception, the conversion accuracy of the color is low, so how to accurately and rapidly perform the color gamut conversion is an important problem to be solved in the industry at present.
Disclosure of Invention
The invention provides a color configuration file generation method and device for color gamut conversion, which are used for solving the defects of high complexity and low efficiency of color gamut conversion time in the prior art and realizing accurate and rapid color gamut conversion.
The invention provides a color configuration file generation method for color gamut conversion, which comprises the following steps:
Obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file;
converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter;
obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file;
and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
According to the color profile generation method for color gamut conversion provided by the invention, the target intermediate parameters comprise target parameters and target conversion files, and a target matrix is obtained based on the target intermediate parameters and a conversion matrix of a pre-stored original color profile, and the method specifically comprises the following steps:
generating a first parameter, a second parameter, and a third parameter based on the target parameter;
responding to an input instruction, and performing difference evaluation on an adjustment parameter obtained according to the input instruction and an adjustment parameter of a target conversion file to obtain a fourth parameter; the input instruction at least comprises a pre-constructed image data pair;
obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter;
Wherein the difference evaluation includes performing a difference evaluation using a difference evaluation method including at least making a difference.
According to the color profile generation method for color gamut conversion provided by the invention, the target intermediate parameters comprise target parameters, and a target matrix is obtained based on the target intermediate parameters and a pre-stored conversion matrix of an original color profile, and the method specifically comprises the following steps:
generating a first parameter, a second parameter, and a third parameter based on the target parameter;
responding to an input instruction, and taking an adjustment parameter obtained according to the input instruction as a fourth parameter; the input instruction at least comprises a pre-constructed image data pair;
and obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter.
According to the color configuration file generation method for color gamut conversion provided by the invention, a target matrix is obtained based on a first parameter, a second parameter, a third parameter and a fourth parameter, and the method specifically comprises the following steps:
performing interpolation operation in a blank matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter to obtain a difference evaluation matrix, and obtaining a target matrix according to the difference evaluation matrix; wherein the blank matrix is a matrix of a first preset size.
According to the color configuration file generation method for color gamut conversion provided by the invention, a target matrix is obtained based on a first parameter, a second parameter, a third parameter and a fourth parameter, and the method specifically comprises the following steps:
fitting a curved surface based on the first parameter, the second parameter, the third parameter, and the fourth parameter;
extracting values on preset grid points of the curved surface to obtain a difference evaluation matrix;
and obtaining a target matrix according to the difference evaluation matrix.
According to the color configuration file generation method for color gamut conversion provided by the invention, a target matrix is obtained based on a first parameter, a second parameter, a third parameter and a fourth parameter, and the method specifically comprises the following steps:
generating a target matrix by utilizing a pre-constructed matrix generation neural network according to the first parameter, the second parameter, the third parameter, the fourth parameter and a conversion matrix of the original color configuration file;
the matrix generation neural network is obtained by training the conversion matrix of the original color configuration file serving as an initial value by using an fitness function based on the neural network; the fitness function comprises the inverse of the sum of the root mean square error of the adjustment parameters of the mass target conversion files and the adjustment parameters obtained according to the input instruction.
According to the color profile generation method for color gamut conversion provided by the invention, the difference evaluation method is utilized to carry out the difference evaluation, and then the method further comprises the following steps:
and deleting the pixels with obvious abnormality of the fourth parameter based on a preset rule.
The invention also provides a color configuration file generation method for color gamut conversion, which comprises the following steps:
the acquisition unit is used for acquiring the file to be converted; wherein the file to be converted at least comprises one pixel of an image file;
the conversion unit is used for converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter;
the matrix unit is used for obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file;
and the generating unit is used for updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the color profile generation method for color gamut conversion as described in any of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a color profile generation method for color gamut conversion as described in any of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a color profile generation method for color gamut conversion as described in any of the above.
The invention provides a color configuration file generation method and device for color gamut conversion, which are implemented by acquiring a file to be converted; wherein the file to be converted at least comprises one pixel of an image file; converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter; obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file; and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file. According to the invention, the target matrix is used for updating the adjustment parameters of the original color configuration file, the color configuration file which can be loaded into a conventional color management tool is developed, other software settings except the used color management tool are prevented from being changed, the manual adjustment workload is reduced, and the effect of accurately and rapidly performing color gamut conversion is realized.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a color profile generation method for color gamut conversion according to the present invention;
FIG. 2 is a second flowchart of a color profile generating method for color gamut conversion according to the present invention;
FIG. 3 is a third flow chart of a color profile generation method for color gamut conversion according to the present invention;
fig. 4 is a schematic structural diagram of a color profile generating apparatus for color gamut conversion provided by the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Reference numerals:
410: an acquisition unit; 420: a conversion unit; 430: a matrix unit; 440: a generating unit;
510: a processor; 520: a communication interface; 530: a memory; 540: a communication bus.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The color profile generation method for color gamut conversion according to the present invention is described below with reference to fig. 1 to 3, and fig. 1 is one of the flow charts of the color profile generation method for color gamut conversion provided by the present invention, as shown in fig. 1, and includes the following steps:
step 110; obtaining a file to be converted; wherein the file to be converted comprises at least one pixel of the image file.
The obtained file to be converted is a color file, for example, after modeling and rendering of a product, the color file before packaging design can be a real data sample pair of a user. In the prior art, as shown in fig. 2, after modeling and rendering the product, outputting RGB format file RGB. Psd, converting the RGB format file into CMYK format by using a conventional color management tool such as PS software and using an icc color configuration file from RGB to CMYK, manually adjusting the color curves of each channel to make the CMYK format file approximate to a true value (or to achieve good visual effect) as much as possible, and then importing the CMYK file after manual adjustment into AI software for packaging design.
In the corresponding scene/material, as the evaluation standards of the color gamut conversion results under different tasks are different, in general, when a human is designing, the color conversion results can be individually adjusted according to the requirements of different tasks and application scenes, so how to generate a method to automatically convert the material sample pair made by a human designer into the mapping relation of two color spaces, and effectively learn the experience of adjusting the colors of the human under a certain task is a key problem of the invention.
The color configuration file generation method for color gamut conversion provided by the invention can directly generate the color configuration file for converting the file to be converted into the target format file, and the file to be converted is directly converted by utilizing the color configuration file, so that the manual adjustment workload is reduced, and the effect of accurately and rapidly performing color gamut conversion is realized.
In some embodiments, the file to be converted may be an RGB file. In other embodiments, the file to be converted may be a LAB file.
In some embodiments, step 110 may also acquire the input instructions simultaneously. The invention does not limit the time for acquiring the input instruction, and the input instruction is acquired before the difference evaluation is carried out by utilizing the adjustment parameters obtained according to the input instruction and the adjustment parameters of the target conversion file. The obtained input instruction at least comprises the image data pairs which are constructed in advance, the number of the image data pairs is not limited, and the input instruction can be determined according to actual requirements. In some embodiments, the input instructions comprise a user data set comprising a preset number of image data pairs. The image data pair may also be referred to as a user data pair, and specifically, the image data pair is a file to be converted-conversion completed file data pair based on a manual priori experience, that is, the image data pair is a file to be converted-conversion completed file data pair completed by manual adjustment. The file to be converted may include an RGB format image file, or may include an LAB format image file. The conversion completion file may include an image file in CMYK file format. In some embodiments, the preset number may be 130. The invention is illustrated by converting RGB or LAB format into CMYK format, but not representing the limitation of the invention, and the conversion of any two color spaces can be performed by using the technical scheme of the invention.
Step 120: converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter;
after the file to be converted is obtained, if the file to be converted is an RGB file, firstly, a pre-stored ICC file from RGB to LAB is used as a first original color configuration file, and the RGB file to be converted is converted into the LAB file to obtain the LAB file to be converted. In some embodiments, the first raw color profile may use srgb_v4_icc_reference.icc to convert the RGB file to be converted to a LAB file. It should be noted that the first original color profile may be any ICC profile from RGB space to LAB space, and the present invention is not limited herein. And then, converting the pre-stored LAB into a CMYK ICC file, marking the ICC file as a second original color configuration file, and converting the LAB file to be converted into the CMYK file. In some embodiments, the second raw color profile may use japan color2001coated. Icc to convert the LAB file to be converted to a CMYK file, denoted as the target conversion file. It should be noted that the second original color profile may be any LAB space to CMYK space ICC profile, and the present invention is not limited herein. In other embodiments, the file to be converted may be converted into a CMYK format file by a matlab built-in function applycfam, according to rules for icc conversion between LAB and CMYK.
If the to-be-converted file is an LAB file, converting the to-be-converted LAB file into a CMYK file by using a pre-stored LAB-to-CMYK ICC file, namely an original color profile. In some embodiments, the original color profile may use japan color2001coated. Icc to convert LAB files to CMYK files, noted as target conversion files. In other embodiments, a japan 2010 covered. Icc or an isocovered. Icc may also be employed. It should be noted that the original color profile may be any LAB space to CMYK space ICC profile, and the invention is not limited herein.
Firstly, processing a pixel of a file to be converted, and if the file to be converted comprises more than one pixel, traversing each pixel in the file to be converted. It will be appreciated that in most cases, the file to be converted includes more than one pixel, at which time each pixel in the file to be converted is extracted in turn for processing. In the process of converting LAB into CMYK, there is an intermediate product, namely, LAB data is processed through an afferent function and a series of operations, and an integer greater than zero, wherein the upper limit of the integer is determined by the size range of the previous three dimensions of the CLUT matrix of the corresponding ICC, and the size range is recorded as a target parameter. In some embodiments, this integer may be an integer from 0 to 32. Setting this integer as a global variable, it can be applied in the function. And adding a preset decimal to the target parameter, and then rounding upwards to obtain the color corresponding to the coordinates in the color lookup table CLUT. In some embodiments, the preset fraction may be 0.5.
Specifically, in the file to be converted, the LAB value of the original color of a certain pixel is three numbers in a preset range. That is, the LAB value includes three values, L, a, B, which share the same predetermined range. In some embodiments, the LAB value is in the Uint8 format, where the preset range is-127-128. And obtaining target parameters through calibration and nearby rounding. In one embodiment, the target parameters are obtained by scaling and rounding to approximately 0-32. In an actual implementation, the library function applycut in matlab may be used, the integer being an intermediate variable in the function implementation, which is derived from a global variable. In other embodiments, after the LAB value is scaled and rounded nearby, the fractional part of the LAB value is also processed, and the fractional part is used as a weight to assign a value to other parts in the same cube, thereby obtaining the target parameter, and it should be noted that the points falling in one cube should contribute to all 8 vertices of the cube. The cube refers to a numerical cube abstracted from a four-dimensional matrix
In some embodiments, the target intermediate parameters include target parameters and target conversion files. In other embodiments, the target intermediate parameter comprises a target parameter. In still other embodiments, the target intermediate parameter comprises a target conversion file.
It should be understood that, if the file to be converted includes more than one pixel, the target parameter included in the target intermediate parameter corresponds to each pixel, and in the subsequent processing, the target intermediate parameter corresponding to each pixel in the sequence is processed.
Step 130: obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file;
specifically, the method for obtaining the target matrix based on the target intermediate parameters and the conversion matrix of the pre-stored original color configuration file comprises the following steps:
the method comprises the following steps:
the target intermediate parameters comprise target parameters and target conversion files.
As shown in fig. 3, in response to an input instruction including an adjusted CMYK file, CMYK values are acquired from the adjusted CMYK file. The adjusted CMYK file corresponds to the file to be converted, and each CMYK value corresponds to each LAB value. Specifically, the input instruction includes a pre-constructed image data pair, that is, a file to be converted-converted completion file data pair, each pixel of the conversion completion file and each pixel of the target conversion file in the file to be converted-converted completion file data pair of the input instruction are traversed, CMYK values of pixels on corresponding bits are subjected to differential evaluation, specifically, for one pixel of the file to be processed, CMYK values in the image data pair of the input instruction corresponding to the pixel of the target conversion file are found by using a pixel-point-level correspondence relationship between the RGB file and the CMYK file, and the CMYK values obtained according to the input instruction and the CMYK values of the target conversion file are subjected to differential evaluation by using a differential evaluation method. It should be understood that in the process of performing the difference evaluation, attention is required to the correspondence relationship with the pixel level of the RGB file. In some embodiments, the difference evaluation method includes directly performing a difference, specifically, subtracting CMYK values of the target conversion file from CMYK values obtained according to the input instruction to obtain a difference, where the difference is a difference evaluation result. In some embodiments, the result of the variance assessment further includes a vector.
And generating a first parameter, a second parameter and a third parameter according to the target parameter. Specifically, the target parameter is rounded up after being added with a preset decimal, that is, the color corresponds to the coordinate in the color lookup table CLUT, and the first parameter, the second parameter and the third parameter are all obtained by the coordinate. That is, for one pixel of the file to be converted, the a value, the B value, and the L value of the LAB value are each calibrated and rounded up to obtain the target parameter, the target parameter includes three values, the three values are rounded up to obtain the first parameter, the second parameter, and the third parameter after each adding a preset fraction, and the first, second, and three-dimensional coordinates of the CLUT are denoted as a ', B ', and L ', and the result of the difference evaluation is denoted as the fourth parameter, and since the target of the difference evaluation is the CMYK value, the result of the difference evaluation includes four values, denoted as i1, i2, i3, and i 4. The 4 coordinates when taking the four values of the fourth parameter as the fourth dimension of CLUT to take 1, 2, 3, and 4, namely, the difference matrix can be expressed as: [ A ', B', L ', i1], [ A', B ', L', i2], [ A ', B', L ', i3], [ A', B ', L', i4]. And combining the coordinates obtained in the steps according to the corresponding relation of each pixel, so that each pixel point can have a corresponding point in the CULT space. Interpolation is performed in the blank matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter. The blank matrix is a matrix of a first preset size. In some embodiments, the preset fraction may be 0.5.
In a specific operation, interpolation may use, for example, an average interpolation method, where the values falling on each point are added, and the average residual matrix obtained by dividing the number of values falling on this point is used as the difference evaluation matrix. Or interpolated by other interpolation methods, such as linear, nearest, pchip, cubic, spline, makima, etc., the invention is not limited herein; the data N (=4) in each grid cube is subjected to dimensional interpolation and then extrapolated to the value on the grid point, the effect is not good, the scale can be enlarged, the adjacent cubes are covered, the effect is optimized by using a quadratic interpolation method, and a difference evaluation matrix is obtained.
And adding the difference evaluation matrix with a color lookup table (CLUT) of the original color configuration file to obtain a target matrix. Specifically, the difference evaluation matrix is composed of CMYK values, and cannot be directly added with CLUTs of the original color configuration file, in the actual operation process, the difference evaluation matrix is converted through an inverse function of the output function to obtain a format-matched conversion difference evaluation matrix, and then the conversion difference evaluation matrix is added with the CLUTs to obtain the target matrix. The output function is the output function of the original color profile.
The output function or the inverse of the output function does not change the size of the matrix, so the size of the variance-assessing matrix needs to be the same as the size of the CLUT of the original color profile, that is, the size of the blank matrix is the same as the size of the CLUT of the original color profile. In actual operation, the CLUT of the color profile most commonly has a size of [33, 33,4], and in some embodiments, the first pre-sized matrix may be a [33, 33,4] matrix. In other embodiments, the first predetermined size matrix may be a [37, 37, 37,4] matrix; for example, CLUTs such as uncoated_fogra47l_vigc_300.Icc, uncoated_fogra47l_vigc_260.Icc, and coated_fogra39l_vigc_300.Icc are matrices of the size [37, 37, 37,4 ]. In still other embodiments, the first pre-sized matrix may be a [25, 25, 25,4] matrix; CLUTs such as snap2007.Icc are matrices of size [37, 37, 37,4 ].
The second method is as follows:
the target intermediate parameters include target parameters.
In response to the input instruction, the input instruction includes an adjusted CMYK file, and CMYK values are acquired from the adjusted CMYK file. The adjusted CMYK file corresponds to the file to be converted, and each CMYK value corresponds to each LAB value. Specifically, the input instruction includes a pre-constructed image data pair, namely a file to be converted-conversion completion file data pair, each pixel of the conversion completion file and each pixel of the target conversion file in the file to be converted-conversion completion file data pair of the input instruction are traversed, the CMYK values of the pixels on the corresponding bits are subjected to difference evaluation, specifically, for one pixel of the file to be processed, the CMYK values in the image data pair of the input instruction corresponding to the pixel of the target conversion file are found by using the pixel point-level correspondence relationship of the RGB file and the CMYK file,
Note the correspondence to pixel level of RGB file, and generate the first three parameters according to the target parameters. Specifically, the target parameter is rounded up after being added with a preset decimal, that is, the color corresponds to the coordinate in the color lookup table CLUT, and the first parameter, the second parameter and the third parameter are all obtained by the coordinate. That is, for a pixel of the file to be converted, the a value, the B value, and the L value of the LAB value are respectively calibrated and rounded nearby to obtain the target parameter, where the target parameter includes three values, and the three values are respectively rounded up after being added with a preset decimal number to obtain the first parameter, the second parameter, and the third parameter, which are used as the coordinates of the CLUT in the first, second, and three dimensions, and are denoted as a ', B ', and L ', where the preset decimal number may be 0.5 in some embodiments.
And taking the four values of the CMYK values as fourth parameters according to the CMYK values obtained by the input instruction, wherein the four values of the CMYK values are taken as 4 coordinates of 1, 2, 3 and 4 in the fourth dimension of the CLUT, namely [ A ', B', L ', C ], [ A', B ', L', M ], [ A ', B', L ', Y ], [ A', B ', L', K ]. And combining the coordinates obtained in the steps according to the corresponding relation of each pixel, so that each pixel point can have a corresponding point in the CULT space. Interpolation is carried out in a blank matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter, wherein the blank matrix is a matrix with a first preset size.
In a specific operation process, interpolation may be performed by, for example, an average interpolation method, adding the values falling on each point, dividing by the number of the values falling on the point to obtain an average hand tone CMYK value matrix as a difference evaluation matrix, or interpolation may be performed by other interpolation methods, for example, linear, nearest, pchip, cubic, spline, makima, etc., which is not limited in this disclosure; the data N (=4) in each grid cube is subjected to dimensional interpolation and then extrapolated to the value on the grid point, so that the effect is not good, the scale of one point can be enlarged, the adjacent cubes are covered, the effect is optimized by using a quadratic interpolation method, and a difference evaluation matrix is obtained, and the difference evaluation matrix of the method is exactly called a parameter matrix.
And replacing the conversion matrix of the original color configuration file with the parameter matrix to obtain a target matrix. And finally, partially updating the CLUT of the original color configuration file by using a parameter matrix with a first preset size, directly replacing the grid points with values, and keeping the original values of the grid points without values to obtain a target matrix. Further, the parameter matrix is composed of CMYK values, cannot be directly updated corresponding to the CLUT of the original color configuration file, in the actual operation process, the parameter matrix is converted through the inverse function of the output function to obtain a conversion parameter matrix with matched format, then the conversion parameter matrix and the CLUT are partially updated, the grid points with values are directly replaced, and the grid points without values retain the original values to obtain the target matrix. The output function is the output function of the original color profile.
The output function or the inverse of the output function does not change the size of the matrix, so the size of the parameter matrix needs to be the same as the size of the CLUT of the original color profile, that is, the size of the blank matrix is the same as the size of the CLUT of the original color profile. In actual operation, the CLUT of the color profile most commonly has a size of [33, 33,4], and in some embodiments, the first pre-sized matrix may be a [33, 33,4] matrix. In other embodiments, the first predetermined size matrix may be a [37, 37, 37,4] matrix; for example, CLUTs such as uncoated_fogra47l_vigc_300.Icc, uncoated_fogra47l_vigc_260.Icc, and coated_fogra39l_vigc_300.Icc are matrices of the size [37, 37, 37,4 ]. In still other embodiments, the first pre-sized matrix may be a [25, 25, 25,4] matrix; CLUTs such as snap2007.Icc are matrices of size [37, 37, 37,4 ].
And a third method:
the target intermediate parameters include a target conversion file.
As shown in fig. 3, in response to an input instruction including an adjusted CMYK file, CMYK values are acquired from the adjusted CMYK file. The adjusted CMYK file corresponds to the file to be converted, and each CMYK value corresponds to each LAB value. Specifically, the input instruction includes a pre-constructed image data pair, that is, a file to be converted-converted completion file data pair, each pixel of the file to be converted in the input instruction and each pixel of the target conversion file are traversed, CMYK values of pixels on corresponding bits are subjected to differential evaluation, specifically, for one pixel of the file to be processed, CMYK values in the file to be converted in the input instruction corresponding to the pixel of the target conversion file are found by using a pixel point-level correspondence relationship between the RGB file and the CMYK file, and the CMYK values obtained according to the input instruction and the CMYK values of the target conversion file are subjected to differential evaluation by using a differential evaluation method. It should be understood that in the process of performing the difference evaluation, attention is required to the correspondence relationship with the pixel level of the RGB file. In some embodiments, the difference evaluation method includes directly performing a difference, specifically, subtracting CMYK values of the target conversion file from CMYK values obtained according to the input instruction to obtain a difference, where the difference is a difference evaluation result. In some embodiments, the result of the variance assessment further includes a vector.
And generating a first parameter, a second parameter and a third parameter according to the target parameter. Specifically, the target parameter is rounded up after being added with a preset decimal, that is, the color corresponds to the coordinate in the color lookup table CLUT, and the first parameter, the second parameter and the third parameter are all obtained by the coordinate. That is, for one pixel of the file to be converted, the a value, the B value, and the L value of the LAB value are each calibrated and rounded up to obtain the target parameter, the target parameter includes three values, the three values are rounded up to obtain the first parameter, the second parameter, and the third parameter after each adding a preset fraction, and the first, second, and three-dimensional coordinates of the CLUT are denoted as a ', B ', and L ', and the result of the difference evaluation is denoted as the fourth parameter, and since the target of the difference evaluation is the CMYK value, the result of the difference evaluation includes four values, denoted as i1, i2, i3, and i 4. The four values of the fourth parameter are taken as 4 coordinates when the fourth dimension of the CLUT takes 1, 2, 3 and 4, namely [ a ', B', L ', i1], [ a', B ', L', i2], [ a ', B', L ', i3], [ a', B ', L', i4]. And combining the coordinates obtained in the steps according to the corresponding relation of each pixel, so that each pixel point can have a corresponding point in the CULT space.
And combining the first parameter, the second parameter, the third parameter and the fourth parameter to form a coordinate to obtain a basic residual matrix. The base residual matrix is a residual matrix with partial lattice values. The base residual matrix is a matrix of a first preset size. Dividing the basic residual matrix into four matrices with second preset sizes, marking the matrices as sub-basic residual matrices, and respectively performing four-dimensional fitting based on the sub-basic residual matrices.
Fitting an N (=4) dimensional curved surface by using a basic residual matrix to obtain four 4-dimensional fitted curved surfaces, then respectively taking values on preset grid points of the curved surfaces, generating a matrix with values on all grid points to obtain a difference evaluation matrix, and adding the difference evaluation matrix and the CLUT of the original color configuration file to obtain a target matrix. Specifically, the difference evaluation matrix is composed of CMYK values, and cannot be directly added with CLUTs of the original color configuration file, in the actual operation process, the difference evaluation matrix is converted through an inverse function of the output function to obtain a format-matched conversion difference evaluation matrix, and then the conversion difference evaluation matrix is added with the CLUTs to obtain the target matrix. The output function is the output function of the original color profile.
The output function or the inverse function of the output function does not change the size of the matrix, so the size of the variance-evaluating matrix needs to be the same as the size of the CLUT of the original color profile, that is, the extracted preset lattice point on the curved surface needs to correspond to the size of the CLUT of the original color profile, and the size of the basic residual matrix is the same as the size of the CLUT of the original color profile.
In actual operation, the CLUT of the color profile most commonly has a size of [33, 33,4], and in some embodiments, the preset lattice point may be [33, 33,4], with the first preset size matrix being a [33, 33,4] matrix and the second preset size matrix being a [33, 33, 33,1] matrix. In other embodiments, the preset grid points may be [37, 37, 37,4], with the first preset size matrix being a [37, 37, 37,4] matrix and the second preset size matrix being a [37, 37, 37,1] matrix; for example, CLUTs such as uncoated_fogra47l_vigc_300.Icc, uncoated_fogra47l_vigc_260.Icc, and coated_fogra39l_vigc_300.Icc are matrices of the size [37, 37, 37,4 ]. In still other embodiments, the preset lattice point may be [25, 25, 25,4], with the first preset size matrix being a [25, 25, 25,4] matrix and the second preset size matrix being a [25, 25,1] matrix; CLUTs such as snap2007.Icc are matrices of the [25, 25, 25,4] size.
The method four:
the target intermediate parameters include a target conversion file.
The target intermediate parameters include target parameters.
In response to the input instruction, the input instruction includes an adjusted CMYK file, and CMYK values are acquired from the adjusted CMYK file. The adjusted CMYK file corresponds to the file to be converted, and each CMYK value corresponds to each LAB value. Specifically, the input instruction includes a pre-constructed image data pair, that is, a file to be converted-converted completion file data pair, each pixel of the conversion completion file and each pixel of the target conversion file in the file to be converted-converted completion file data pair of the input instruction are traversed, CMYK values of pixels on corresponding bits are subjected to difference evaluation, specifically, for one pixel of the file to be processed, CMYK values in the image data pair of the input instruction corresponding to the pixel of the target conversion file are found by using a pixel-level correspondence relationship between the RGB file and the CMYK file, and the first three parameters are generated according to the target parameters, paying attention to the pixel-level correspondence relationship between the RGB file and the CMYK values. Specifically, the target parameter is rounded up after being added with a preset decimal, that is, the color corresponds to the coordinate in the color lookup table CLUT, and the first parameter, the second parameter and the third parameter are all obtained by the coordinate. That is, for a pixel of the file to be converted, the a value, the B value, and the L value of the LAB value are respectively calibrated and rounded nearby to obtain the target parameter, where the target parameter includes three values, and the three values are respectively rounded up after being added with a preset decimal number to obtain the first parameter, the second parameter, and the third parameter, which are used as the coordinates of the CLUT in the first, second, and three dimensions, and are denoted as a ', B ', and L ', where the preset decimal number may be 0.5 in some embodiments.
And taking the four values of the CMYK values as fourth parameters according to the CMYK values obtained by the input instruction, wherein the four values of the CMYK values are taken as 4 coordinates of 1, 2, 3 and 4 in the fourth dimension of the CLUT, namely [ A ', B', L ', C ], [ A', B ', L', M ], [ A ', B', L ', Y ], [ A', B ', L', K ]. And combining the coordinates obtained in the steps according to the corresponding relation of each pixel, so that each pixel point can have a corresponding point in the CULT space.
And combining the first parameter, the second parameter, the third parameter and the fourth parameter to form a coordinate to obtain a basic parameter matrix. The base parameter matrix is a matrix of a first preset size. Dividing the basic parameter matrix into four matrices with second preset sizes, recording the matrices as sub-basic parameter matrices, and respectively performing four-dimensional fitting based on the sub-basic parameter matrices. In some embodiments, the size of the color shade representation value may be used to perform a four-dimensional fit to the entire three-dimensional space, that is, the surface fit may be understood as a fit to a colored three-dimensional cube.
Fitting an N (=4) dimensional curved surface by using a basic parameter matrix to obtain four 4-dimensional fitted curved surfaces, then respectively taking values on preset grid points of the curved surfaces to generate a parameter matrix with values on all grid points to obtain a difference evaluation matrix, and accurately speaking, the difference evaluation matrix of the method is called a curved surface parameter matrix, and replacing the curved surface parameter matrix with a conversion matrix of the original color configuration file to obtain a target matrix. And finally, partially updating the CLUT of the original color configuration file by using a curved surface parameter matrix with a first preset size, directly replacing the grid points with values, and keeping the original values of the grid points without values to obtain a target matrix. Specifically, the curved surface parameter matrix is composed of CMYK values, cannot be updated directly corresponding to the CLUT of the original color configuration file, in the actual operation process, the curved surface parameter matrix is converted through an inverse function of an output function to obtain a converted curved surface parameter matrix with matched format, then the converted curved surface parameter matrix and the CLUT are partially updated, valued lattice points are directly replaced, and non-valued lattice points are covered through convolution operation according to adjacent valued lattice points to obtain the target matrix. The output function is the output function of the original color profile.
The output function or the inverse function of the output function does not change the size of the matrix, so the size of the surface parameter matrix needs to be the same as the size of the CLUT of the original color profile, that is, the extracted preset lattice point on the surface needs to correspond to the size of the CLUT of the original color profile, and the size of the basic parameter matrix is the same as the size of the CLUT of the original color profile. In actual operation, the CLUT of the color profile most commonly has a size of [33, 33,4], and in some embodiments, the preset lattice point may be [33, 33,4], with the first preset size matrix being a [33, 33,4] matrix and the second preset size matrix being a [33, 33, 33,1] matrix. In other embodiments, the preset grid points may be [37, 37, 37,4], with the first preset size matrix being a [37, 37, 37,4] matrix and the second preset size matrix being a [37, 37, 37,1] matrix; for example, CLUTs such as uncoated_fogra47l_vigc_300.Icc, uncoated_fogra47l_vigc_260.Icc, and coated_fogra39l_vigc_300.Icc are matrices of the size [37, 37, 37,4 ]. In still other embodiments, the preset lattice point may be [25, 25, 25,4], with the first preset size matrix being a [25, 25, 25,4] matrix and the second preset size matrix being a [25, 25,1] matrix; CLUTs such as snap2007.Icc are matrices of the [25, 25, 25,4] size.
And a fifth method:
the target intermediate parameters include target parameters.
As shown in fig. 3, in response to an input instruction including an adjusted CMYK file, CMYK values are acquired from the adjusted CMYK file. The adjusted CMYK file corresponds to the file to be converted, and each CMYK value corresponds to each LAB value. Specifically, the input instruction includes a pre-constructed image data pair, that is, a file to be converted-converted completion file data pair, each pixel of the conversion completion file and each pixel of the target conversion file in the file to be converted-converted completion file data pair of the input instruction are traversed, CMYK values of pixels on corresponding bits are subjected to differential evaluation, specifically, for one pixel of the file to be processed, CMYK values in the image data pair of the input instruction corresponding to the pixel of the target conversion file are found by using a pixel-point-level correspondence relationship between the RGB file and the CMYK file, and the CMYK values obtained according to the input instruction and the CMYK values of the target conversion file are subjected to differential evaluation by using a differential evaluation method. It should be understood that in the process of performing the difference evaluation, attention is required to the correspondence relationship with the pixel level of the RGB file. In some embodiments, the difference evaluation method includes directly performing a difference, specifically, subtracting CMYK values of the target conversion file from CMYK values obtained according to the input instruction to obtain a difference, where the difference is a difference evaluation result. In some embodiments, the result of the variance assessment further includes a vector.
And generating a first parameter, a second parameter and a third parameter according to the target parameter. Specifically, the target parameter is rounded up after being added with a preset decimal, that is, the color corresponds to the coordinate in the color lookup table CLUT, and the first parameter, the second parameter and the third parameter are all obtained by the coordinate. That is, for one pixel of the file to be converted, the a value, the B value, and the L value of the LAB value are each calibrated and rounded up to obtain the target parameter, the target parameter includes three values, the three values are rounded up to obtain the first parameter, the second parameter, and the third parameter after each adding a preset fraction, and the first, second, and three-dimensional coordinates of the CLUT are denoted as a ', B ', and L ', and the result of the difference evaluation is denoted as the fourth parameter, and since the target of the difference evaluation is the CMYK value, the result of the difference evaluation includes four values, denoted as i1, i2, i3, and i 4. The four values of the fourth parameter are taken as 4 coordinates when the fourth dimension of the CLUT takes 1, 2, 3 and 4, namely [ a ', B', L ', i1], [ a', B ', L', i2], [ a ', B', L ', i3], [ a', B ', L', i4]. And combining the coordinates obtained in the steps according to the corresponding relation of each pixel, so that each pixel point can have a corresponding point in the CULT space.
Generating a target matrix by utilizing a pre-constructed matrix generation neural network according to the first parameter, the second parameter, the third parameter, the fourth parameter and the CLUT of the original color configuration file; specifically, according to the first parameter, the second parameter, the third parameter, the fourth parameter and the obtained coordinates on the CLUT of the original color configuration file, generating a neural network acquisition point for the pre-constructed matrix to obtain a new CLUT matrix, and recording the new CLUT matrix as a target matrix.
The pre-constructed matrix generation neural network is obtained by training with an adaptability function by taking the CLUT of an original color configuration file as an initial value based on the neural network; the fitness function comprises the inverse of the sum of the root mean square error of the adjustment parameters of the mass target conversion file samples and the adjustment parameters obtained according to the input instruction.
Specifically, acquiring a large number of file samples to be converted; converting the acquired mass file samples to be converted into target conversion file samples in CMYK format by using an original color configuration file, responding to an input instruction, wherein the input instruction comprises a pre-constructed image data pair, namely a file to be converted-conversion completion file data pair, traversing each pixel of a conversion completion file in the file to be converted-conversion completion file data pair of the input instruction and each pixel of the target conversion file sample, searching CMYK values in the pre-constructed image data pair corresponding to the pixel of the target conversion file sample by using a pixel point-level corresponding relation of an RGB file and a CMYK file for one pixel of the file samples to be processed, namely, the input instruction comprises an adjusted CMYK file, and acquiring the CMYK values from the adjusted CMYK file. The pixels of the adjusted CMYK file correspond to the pixels of the file sample to be converted, and the CMYK value corresponds to each LAB value. In the subsequent processing, each CMYK value in the sequence is processed.
The method comprises the steps of utilizing the inverse of the sum of CMYK values of a target conversion file sample and RMSE of the CMYK values obtained according to an input instruction as an fitness function, utilizing image data pairs of the input instruction, massive file samples to be converted and target conversion file samples corresponding to the files to be converted to form a data set, taking a part of the data set as a test set and the rest of the data set as a training set, training a deep neural network based on the fitness function, generating a neural network acquisition point according to a coordinate pair on a CLUT of an original color configuration file to obtain a new CLUT matrix, and recording the new CLUT matrix as a target matrix. In some embodiments, the ratio of the test set to the training set may be 9:1. In other embodiments, the selection of the test set and the training set is performed using a leave-one method, that is, only one file to be converted in the data set and the target conversion file corresponding to the file to be converted are left as the test set at a time, and the remaining files are left as the training set.
It should be noted that, the time for acquiring the input instruction is not limited, and the input instruction is acquired before the difference evaluation is performed by using the adjustment parameter obtained according to the input instruction and the adjustment parameter of the target conversion file. The acquired input instructions comprise at least a pre-constructed image data pair. The image data pair may also be referred to as a user data pair, and specifically, the image data pair is a file to be converted-conversion completed file data pair based on a manual priori experience, that is, the image data pair is a file to be converted-conversion completed file data pair completed by manual adjustment. The file to be converted may include an RGB format image file, or may include an LAB format image file. The conversion completion file may include an image file in CMYK file format. In some embodiments, the preset number may be 130.
Step 140: and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
And finally, updating CMYK values according to the uncovered area in the LAB space and generating a new icc color configuration file. In some embodiments, the manner of updating includes convolution calculations, that is, areas not covered in LAB space, by which CMYK values are updated according to a target matrix.
As shown in fig. 2, the present invention uses a certain number of RGB color mode files and corresponding manually adjusted CMYK color mode files to modify the color lookup table of the original ICC file by using the correspondence between RGB color mode and CMYK color mode sample pairs. The invention can replace the manual color adjustment of the conventional color management tool such as PS in the prior art, namely the step of manually adjusting the color curves of each channel, inherits the experience of the RGB-CMYK corresponding values determined based on the printing effect in the actual operation process, and obtains the CMYK icc color configuration file which can be loaded into the conventional color management tool such as PS for use, thereby avoiding changing other software settings except Photoshop and reducing the manual adjustment workload. The CMYK pictures generated by the color configuration file provided by the invention are similar to hand tone CMYK, and the brightness and saturation of each picture are well reserved.
Based on the above embodiment, in the method, the target intermediate parameter includes a target parameter and a target conversion file, and the target matrix is obtained based on the target intermediate parameter and a conversion matrix of a pre-stored original color configuration file, which specifically includes:
generating a first parameter, a second parameter, and a third parameter based on the target parameter;
responding to an input instruction, and performing difference evaluation on an adjustment parameter obtained according to the input instruction and an adjustment parameter of a target conversion file to obtain a fourth parameter; the input instruction at least comprises a pre-constructed image data pair;
obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter;
wherein the difference evaluation includes performing a difference evaluation using a difference evaluation method including at least making a difference.
Specifically, the target intermediate parameters include target parameters and target conversion files.
In response to the input instruction, the input instruction includes an adjusted CMYK file, and CMYK values are acquired from the adjusted CMYK file. The adjusted CMYK file corresponds to the file to be converted, and each CMYK value corresponds to each LAB value. Specifically, the input instruction includes a pre-constructed image data pair, that is, a file to be converted-converted completion file data pair, each pixel of the conversion completion file and each pixel of the target conversion file in the file to be converted-converted completion file data pair of the input instruction are traversed, CMYK values of pixels on corresponding bits are subjected to differential evaluation, specifically, for one pixel of the file to be processed, CMYK values in the image data pair of the input instruction corresponding to the pixel of the target conversion file are found by using a pixel-point-level correspondence relationship between the RGB file and the CMYK file, and the CMYK values obtained according to the input instruction and the CMYK values of the target conversion file are subjected to differential evaluation by using a differential evaluation method. It should be understood that in the process of performing the difference evaluation, attention is required to the correspondence relationship with the pixel level of the RGB file. In some embodiments, the difference evaluation method includes directly performing a difference, specifically, subtracting CMYK values of the target conversion file from CMYK values obtained according to the input instruction to obtain a difference, where the difference is a difference evaluation result. In some embodiments, the result of the variance assessment further includes a vector.
And generating a first parameter, a second parameter and a third parameter according to the target parameter. Specifically, the target parameter is rounded up after being added with a preset decimal, that is, the color corresponds to the coordinate in the color lookup table CLUT, and the first parameter, the second parameter and the third parameter are all obtained by the coordinate. That is, for one pixel of the file to be converted, the a value, the B value, and the L value of the LAB value are each calibrated and rounded up to obtain the target parameter, the target parameter includes three values, the three values are rounded up to obtain the first parameter, the second parameter, and the third parameter after each adding a preset fraction, and the first, second, and three-dimensional coordinates of the CLUT are denoted as a ', B ', and L ', and the result of the difference evaluation is denoted as the fourth parameter, and since the target of the difference evaluation is the CMYK value, the result of the difference evaluation includes four values, denoted as i1, i2, i3, and i 4. The four values of the fourth parameter are taken as 4 coordinates when the fourth dimension of the CLUT takes 1, 2, 3 and 4, namely [ a ', B', L ', i1], [ a', B ', L', i2], [ a ', B', L ', i3], [ a', B ', L', i4]. And combining the coordinates obtained in the steps according to the corresponding relation of each pixel, so that each pixel point can have a corresponding point in the CULT space. And obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter.
Based on the above embodiment, in the method, the target intermediate parameter includes a target parameter, and the target matrix is obtained based on the target intermediate parameter and a conversion matrix of a pre-stored original color configuration file, which specifically includes:
generating a first parameter, a second parameter, and a third parameter based on the target parameter;
responding to an input instruction, and taking an adjustment parameter obtained according to the input instruction as a fourth parameter; the input instruction at least comprises a pre-constructed image data pair;
and obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter.
Specifically, in response to an input instruction including an adjusted CMYK file, CMYK values are acquired from the adjusted CMYK file. The adjusted CMYK file corresponds to the file to be converted, and each CMYK value corresponds to each LAB value. Specifically, the input instruction includes a pre-constructed image data pair, that is, a file to be converted-converted completion file data pair, each pixel of the conversion completion file and each pixel of the target conversion file in the file to be converted-converted completion file data pair of the input instruction are traversed, CMYK values of pixels on corresponding bits are subjected to difference evaluation, specifically, for one pixel of the file to be processed, CMYK values in the image data pair of the input instruction corresponding to the pixel of the target conversion file are found by using a pixel-level correspondence relationship between the RGB file and the CMYK file, and the first three parameters are generated according to the target parameters, paying attention to the pixel-level correspondence relationship between the RGB file and the CMYK values. Specifically, the target parameter is rounded up after being added with a preset decimal, that is, the color corresponds to the coordinate in the color lookup table CLUT, and the first parameter, the second parameter and the third parameter are all obtained by the coordinate. That is, for a pixel of the file to be converted, the a value, the B value, and the L value of the LAB value are respectively calibrated and rounded nearby to obtain the target parameter, where the target parameter includes three values, and the three values are respectively rounded up after being added with a preset decimal number to obtain the first parameter, the second parameter, and the third parameter, which are used as the coordinates of the CLUT in the first, second, and three dimensions, and are denoted as a ', B ', and L ', where the preset decimal number may be 0.5 in some embodiments.
And taking the four values of the CMYK values as fourth parameters according to the CMYK values obtained by the input instruction, wherein the four values of the CMYK values are taken as 4 coordinates of 1, 2, 3 and 4 in the fourth dimension of the CLUT, namely [ A ', B', L ', C ], [ A', B ', L', M ], [ A ', B', L ', Y ], [ A', B ', L', K ]. And combining the coordinates obtained in the steps according to the corresponding relation of each pixel, so that each pixel point can have a corresponding point in the CULT space. And obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter.
Based on the above embodiment, in the method, the target matrix is obtained based on the first parameter, the second parameter, the third parameter and the fourth parameter, which specifically includes:
performing interpolation operation in a blank matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter to obtain a difference evaluation matrix, and obtaining a target matrix according to the difference evaluation matrix; wherein the blank matrix is a matrix of a first preset size.
Specifically, interpolation is performed in the blank matrix based on the first parameter, the second parameter, the third parameter, and the fourth parameter. The blank matrix is a matrix of a first preset size. In some embodiments, the preset fraction may be 0.5.
In a specific operation, interpolation may use, for example, an average interpolation method, where the values falling on each point are added, and the average residual matrix obtained by dividing the number of values falling on this point is used as the difference evaluation matrix. Or interpolated by other interpolation methods, such as linear, nearest, pchip, cubic, spline, makima, etc., the invention is not limited herein; the data N (=4) in each grid cube is subjected to dimensional interpolation and then extrapolated to the value on the grid point, so that the effect is not good, the scale of a point can be enlarged, the adjacent cubes are covered, the effect is optimized by using a quadratic interpolation method, and a difference evaluation matrix is obtained.
And adding the difference evaluation matrix and the CLUT of the original color configuration file to obtain a target matrix. Specifically, the difference evaluation matrix is composed of CMYK values, and cannot be directly added with CLUTs of the original color configuration file, in the actual operation process, the difference evaluation matrix is converted through an inverse function of the output function to obtain a format-matched conversion difference evaluation matrix, and then the conversion difference evaluation matrix is added with the CLUTs to obtain the target matrix. The output function is the output function of the original color profile.
The output function or the inverse of the output function does not change the size of the matrix, so the size of the variance-assessing matrix needs to be the same as the size of the CLUT of the original color profile, that is, the size of the blank matrix is the same as the size of the CLUT of the original color profile. In actual operation, the CLUT of the color profile most commonly has a size of [33, 33,4], and in some embodiments, the first pre-sized matrix may be a [33, 33,4] matrix. In other embodiments, the first predetermined size matrix may be a [37, 37, 37,4] matrix; for example, CLUTs such as uncoated_fogra47l_vigc_300.Icc, uncoated_fogra47l_vigc_260.Icc, and coated_fogra39l_vigc_300.Icc are matrices of the size [37, 37, 37,4 ]. In still other embodiments, the first pre-sized matrix may be a [25, 25, 25,4] matrix; CLUTs such as snap2007.Icc are matrices of size [37, 37, 37,4 ].
Based on the above embodiment, in the method, the target matrix is obtained based on the first parameter, the second parameter, the third parameter and the fourth parameter, which specifically includes:
fitting a curved surface based on the first parameter, the second parameter, the third parameter, and the fourth parameter;
Extracting values on preset grid points of the curved surface to obtain a difference evaluation matrix;
and obtaining a target matrix according to the difference evaluation matrix.
Specifically, the coordinates formed by combining the first parameter, the second parameter, the third parameter and the fourth parameter are used for obtaining a basic residual matrix. The base residual matrix is a residual matrix with partial lattice values. The base residual matrix is a matrix of a first preset size. Dividing the basic residual matrix into four matrices with second preset sizes, marking the matrices as sub-basic residual matrices, and respectively performing four-dimensional fitting based on the sub-basic residual matrices. In some embodiments, the size of the color shade representation value may be used to perform a four-dimensional fit to the entire three-dimensional space, that is, the surface fit may be understood as a fit to a colored three-dimensional cube.
Fitting an N (=4) dimensional curved surface by using a basic residual matrix to obtain four 4-dimensional fitted curved surfaces, then respectively taking values on preset grid points of the curved surfaces, generating a matrix with values on all grid points to obtain a difference evaluation matrix, and adding the difference evaluation matrix and the CLUT of the original color configuration file to obtain a target matrix. Specifically, the difference evaluation matrix is composed of CMYK values, and cannot be directly added with CLUTs of the original color configuration file, in the actual operation process, the difference evaluation matrix is converted through an inverse function of the output function to obtain a format-matched conversion difference evaluation matrix, and then the conversion difference evaluation matrix is added with the CLUTs to obtain the target matrix. The output function is the output function of the original color profile.
The output function or the inverse function of the output function does not change the size of the matrix, so the size of the variance-evaluating matrix needs to be the same as the size of the CLUT of the original color profile, that is, the extracted preset lattice point on the curved surface needs to correspond to the size of the CLUT of the original color profile, and the size of the basic residual matrix is the same as the size of the CLUT of the original color profile.
In actual operation, the CLUT of the color profile most commonly has a size of [33, 33,4], and in some embodiments, the preset lattice point may be [33, 33,4], with the first preset size matrix being a [33, 33,4] matrix and the second preset size matrix being a [33, 33, 33,1] matrix. In other embodiments, the preset grid points may be [37, 37, 37,4], with the first preset size matrix being a [37, 37, 37,4] matrix and the second preset size matrix being a [37, 37, 37,1] matrix; for example, CLUTs such as uncoated_fogra47l_vigc_300.Icc, uncoated_fogra47l_vigc_260.Icc, and coated_fogra39l_vigc_300.Icc are matrices of the size [37, 37, 37,4 ]. In still other embodiments, the preset lattice point may be [25, 25, 25,4], with the first preset size matrix being a [25, 25, 25,4] matrix and the second preset size matrix being a [25, 25,1] matrix; CLUTs such as snap2007.Icc are matrices of the [25, 25, 25,4] size.
Based on the above embodiment, in the method, the target matrix is obtained based on the first parameter, the second parameter, the third parameter and the fourth parameter, which specifically includes:
generating a target matrix by utilizing a pre-constructed matrix generation neural network according to the first parameter, the second parameter, the third parameter, the fourth parameter and a conversion matrix of the original color configuration file;
the matrix generation neural network is obtained by training the conversion matrix of the original color configuration file serving as an initial value by using an fitness function based on the neural network; the fitness function comprises the inverse of the sum of the root mean square error of the adjustment parameters of the mass target conversion files and the adjustment parameters obtained according to the input instruction.
Specifically, a pre-constructed matrix generation neural network is utilized to generate a target matrix according to a first parameter, a second parameter, a third parameter, a fourth parameter and the CLUT of an original color configuration file; specifically, according to the first parameter, the second parameter, the third parameter, the fourth parameter and the obtained coordinates on the CLUT of the original color configuration file, generating a neural network acquisition point for the pre-constructed matrix to obtain a new CLUT matrix, and recording the new CLUT matrix as a target matrix.
The pre-constructed matrix generation neural network is obtained by training with an adaptability function by taking the CLUT of an original color configuration file as an initial value based on the neural network; the fitness function comprises the inverse of the sum of the root mean square error of the adjustment parameters of the mass target conversion file samples and the adjustment parameters obtained according to the input instruction.
Specifically, acquiring a large number of file samples to be converted; converting the acquired mass file samples to be converted into target conversion file samples in CMYK format by using an original color configuration file, responding to an input instruction, wherein the input instruction comprises a pre-constructed image data pair, namely a file to be converted-conversion completion file data pair, traversing each pixel of a conversion completion file in the file to be converted-conversion completion file data pair of the input instruction and each pixel of the target conversion file sample, searching CMYK values in the pre-constructed image data pair corresponding to the pixel of the target conversion file sample by using a pixel point-level corresponding relation of an RGB file and a CMYK file for one pixel of the file samples to be processed, namely, the input instruction comprises an adjusted CMYK file, and acquiring the CMYK values from the adjusted CMYK file. The pixels of the adjusted CMYK file correspond to the pixels of the file sample to be converted, and the CMYK value corresponds to each LAB value. In the subsequent processing, each CMYK value in the sequence is processed.
The method comprises the steps of utilizing the inverse of the sum of CMYK values of a target conversion file sample and RMSE of the CMYK values obtained according to an input instruction as an fitness function, forming a data set by utilizing image data pairs, massive file samples to be converted and target conversion file samples corresponding to the files to be converted which are included in the input instruction, taking a part of the data set as a test set and the rest of the data set as a training set, training a deep neural network based on the fitness function, generating a neural network acquisition point according to a coordinate pair on a CLUT of an original color configuration file to obtain a new CLUT matrix, and recording the new CLUT matrix as a target matrix. In some embodiments, the ratio of the test set to the training set may be 9:1. In other embodiments, the selection of the test set and the training set is performed using a leave-one method, that is, only one file to be converted in the data set and the target conversion file corresponding to the file to be converted are left as the test set at a time, and the remaining files are left as the training set.
Based on the above embodiment, in the method, after performing the difference evaluation by using the difference evaluation method, the method further includes:
and deleting the pixels with obvious abnormality of the fourth parameter based on a preset rule.
Specifically, the purpose of this step is to cull outliers in the data. The invention takes the result of the difference evaluation as the fourth parameter, so that the excessive difference evaluation is an abnormal value, and the preset rule is to compare the difference evaluation degree of the fourth parameter of each pixel. In some embodiments, the method of setting up the threshold is adopted, and for the point where the difference is evaluated to be too large, that is, the point where the fourth parameter exceeds the preset threshold, the point can be deleted directly. In other embodiments, the data points are divided into different clusters using the method of Keans clustering. The data points in each cluster are checked for a significantly different characteristic than the other clusters and if so, can be considered outliers.
The invention provides a color configuration file generation method for color gamut conversion, which comprises the steps of obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file; converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter; obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file; and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file. According to the invention, the target matrix is used for updating the adjustment parameters of the original color configuration file, the color configuration file which can be loaded into a conventional color management tool is developed, other software settings except the used color management tool are prevented from being changed, the manual adjustment workload is reduced, and the effect of accurately and rapidly performing color gamut conversion is realized.
The color profile generating apparatus for color gamut conversion provided by the present invention will be described below, and the color profile generating apparatus for color gamut conversion described below and the color profile generating method for color gamut conversion described above may be referred to correspondingly to each other.
Fig. 4 is a schematic structural diagram of a color profile generating apparatus for color gamut conversion according to the present invention, as shown in fig. 4, including an acquisition unit 410, a conversion unit 420, a matrix unit 430, a generating unit 440, wherein,
an obtaining unit 410, configured to obtain a file to be converted; wherein the file to be converted at least comprises one pixel of an image file;
the conversion unit 420 is configured to convert the file to be converted by using a pre-stored original color configuration file to obtain a target intermediate parameter;
a matrix unit 430, configured to obtain a target matrix based on the target intermediate parameter and a pre-stored conversion matrix of the original color configuration file;
and a generating unit 440, configured to update the adjustment parameters of the original color profile based on the target matrix to obtain a target color profile.
The invention provides a color configuration file generating device for color gamut conversion, which is used for obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file; converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter; obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file; and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file. According to the invention, the target matrix is used for updating the adjustment parameters of the original color configuration file, the color configuration file which can be loaded into a conventional color management tool is developed, other software settings except the used color management tool are prevented from being changed, the manual adjustment workload is reduced, and the effect of accurately and rapidly performing color gamut conversion is realized.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a color profile generation method for color gamut conversion, the method comprising: obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file; converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter; obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file; and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the color profile generation method for color gamut conversion provided by the methods described above, the method comprising: obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file; converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter; obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file; and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the color profile generation method for color gamut conversion provided by the methods described above, the method comprising: obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file; converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter; obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file; and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A color profile generation method for color gamut conversion, comprising:
obtaining a file to be converted; wherein the file to be converted at least comprises one pixel of an image file;
converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter;
obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file;
and updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
2. The color profile generation method for color gamut conversion according to claim 1, wherein the target intermediate parameters include a target parameter and a target conversion profile, and the target matrix is obtained based on the target intermediate parameters and a conversion matrix of a pre-stored original color profile, specifically comprising:
Generating a first parameter, a second parameter, and a third parameter based on the target parameter;
responding to an input instruction, and performing difference evaluation on an adjustment parameter obtained according to the input instruction and an adjustment parameter of a target conversion file to obtain a fourth parameter; the input instruction at least comprises a pre-constructed image data pair;
obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter;
wherein the difference evaluation includes performing a difference evaluation using a difference evaluation method including at least making a difference.
3. The color profile generation method for color gamut conversion according to claim 1, wherein the target intermediate parameters include target parameters, and the target matrix is obtained based on the target intermediate parameters and a conversion matrix of a pre-stored original color profile, specifically comprising:
generating a first parameter, a second parameter, and a third parameter based on the target parameter;
responding to an input instruction, and taking an adjustment parameter obtained according to the input instruction as a fourth parameter; the input instruction at least comprises a pre-constructed image data pair;
and obtaining a target matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter.
4. A color profile generating method for color gamut conversion according to claim 2 or 3, wherein the target matrix is obtained based on the first parameter, the second parameter, the third parameter and the fourth parameter, and specifically comprising:
performing interpolation operation in a blank matrix based on the first parameter, the second parameter, the third parameter and the fourth parameter to obtain a difference evaluation matrix, and obtaining a target matrix according to the difference evaluation matrix; wherein the blank matrix is a matrix of a first preset size.
5. A color profile generating method for color gamut conversion according to claim 2 or 3, wherein the target matrix is obtained based on the first parameter, the second parameter, the third parameter and the fourth parameter, and specifically comprising:
fitting a curved surface based on the first parameter, the second parameter, the third parameter, and the fourth parameter;
extracting values on preset grid points of the curved surface to obtain a difference evaluation matrix;
and obtaining a target matrix according to the difference evaluation matrix.
6. A color profile generating method for color gamut conversion according to claim 2 or 3, wherein the target matrix is obtained based on the first parameter, the second parameter, the third parameter and the fourth parameter, and specifically comprising:
Generating a target matrix by utilizing a pre-constructed matrix generation neural network according to the first parameter, the second parameter, the third parameter, the fourth parameter and a conversion matrix of the original color configuration file;
the matrix generation neural network is obtained by training the conversion matrix of the original color configuration file serving as an initial value by using an fitness function based on the neural network; the fitness function comprises the inverse of the sum of the root mean square error of the adjustment parameters of the mass target conversion files and the adjustment parameters obtained according to the input instruction.
7. The color profile generating method for color gamut conversion according to claim 2, further comprising, after performing the difference evaluation using the difference evaluation method:
and deleting the pixels with obvious abnormality of the fourth parameter based on a preset rule.
8. A color profile generation method for color gamut conversion, comprising:
the acquisition unit is used for acquiring the file to be converted; wherein the file to be converted at least comprises one pixel of an image file;
the conversion unit is used for converting the file to be converted by utilizing a pre-stored original color configuration file to obtain a target intermediate parameter;
The matrix unit is used for obtaining a target matrix based on the target intermediate parameters and a conversion matrix of a pre-stored original color configuration file;
and the generating unit is used for updating the adjustment parameters of the original color configuration file based on the target matrix to obtain a target color configuration file.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the color profile generation method for color gamut conversion as claimed in any one of claims 1 to 7 when executing the program.
10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the color profile generation method for color gamut conversion according to any one of claims 1 to 7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the color profile generation method for color gamut conversion as claimed in any of claims 1 to 7.
CN202311433437.XA 2023-10-31 2023-10-31 Color profile generation method and device for color gamut conversion Pending CN117579757A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311433437.XA CN117579757A (en) 2023-10-31 2023-10-31 Color profile generation method and device for color gamut conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311433437.XA CN117579757A (en) 2023-10-31 2023-10-31 Color profile generation method and device for color gamut conversion

Publications (1)

Publication Number Publication Date
CN117579757A true CN117579757A (en) 2024-02-20

Family

ID=89887152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311433437.XA Pending CN117579757A (en) 2023-10-31 2023-10-31 Color profile generation method and device for color gamut conversion

Country Status (1)

Country Link
CN (1) CN117579757A (en)

Similar Documents

Publication Publication Date Title
JP6768343B2 (en) Image processing equipment, image processing methods and programs
US7706034B2 (en) Multi-Dimensional look-up table generation via adaptive node selection based upon color characteristics of an input image
JP2004112694A (en) Color control method, color control apparatus, color conversion definition editing apparatus, image processing apparatus, program, and storage medium
JPH09181930A (en) Method and device for calculating color gamut
JP2001144989A (en) Image processor, image processing method, recording medium and computer program
JP2001128022A (en) Picture processor, picture processing method, recording medium and computer program
CN112069339A (en) Background picture processing and search result display method, device, equipment and medium
JP2002016939A (en) Method and apparatus for processing image as well as recording medium
US11869175B2 (en) Perceptually accurate image rendering
JP2002304621A (en) High-speed interpolation of large color look-up table
JP2008141237A (en) Color processing apparatus and its method
JP2018082312A (en) Image control device, patch chart, image forming method, and program
CN117579757A (en) Color profile generation method and device for color gamut conversion
Le et al. Gamutnet: Restoring wide-gamut colors for camera-captured images
Schaefer et al. A hybrid color quantization algorithm incorporating a human visual perception model
JP2000253270A (en) Color conversion table generator, generating method, storage medium recording color conversion table generating program and color converter
JP4321698B2 (en) Image output method and apparatus, and recording medium
US20210250468A1 (en) Interpolation and smoothening of the gamut boundary
CN114494467A (en) Image color migration method and device, electronic equipment and storage medium
CN109076142B (en) High precision gamut mapping
US20220400187A1 (en) Updating a color profile
CN111667541B (en) Image color quantization method, device, electronic equipment and storage medium
CN107025631A (en) A kind of image processing method, device and the equipment of golf course figure
JP6446898B2 (en) Image processing apparatus, image forming apparatus, image processing method, and program thereof
CN117716384A (en) Color correction model generation method, correction method and device, medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination