CN101123080A - A real time processing method and real time processing circuit for color domain mapping - Google Patents

A real time processing method and real time processing circuit for color domain mapping Download PDF

Info

Publication number
CN101123080A
CN101123080A CNA200710121830XA CN200710121830A CN101123080A CN 101123080 A CN101123080 A CN 101123080A CN A200710121830X A CNA200710121830X A CN A200710121830XA CN 200710121830 A CN200710121830 A CN 200710121830A CN 101123080 A CN101123080 A CN 101123080A
Authority
CN
China
Prior art keywords
color data
points
type
lattice
corrected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA200710121830XA
Other languages
Chinese (zh)
Other versions
CN100573651C (en
Inventor
张明勇
王延伟
毕勇
贾中达
王斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Phoebus Vision Optoelectronic Co ltd
Academy of Opto Electronics of CAS
Original Assignee
Beijing Phoebus Vision Optoelectronic Co ltd
Academy of Opto Electronics of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Phoebus Vision Optoelectronic Co ltd, Academy of Opto Electronics of CAS filed Critical Beijing Phoebus Vision Optoelectronic Co ltd
Priority to CNB200710121830XA priority Critical patent/CN100573651C/en
Publication of CN101123080A publication Critical patent/CN101123080A/en
Application granted granted Critical
Publication of CN100573651C publication Critical patent/CN100573651C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)

Abstract

The invention relates to a color domain mapping real-time processing method and a real-time processing circuit, wherein the processing method comprises: (1) separately storing the representing color data to four groups of searching table memories; (2) inputting to-be-rectified original color data, selecting four grid points in the original color space in accordance with the original color data, and decoding for acquiring the memory addresses of the four grid points; (3) finding the representing rectified color data of the four grid points in accordance with the memory addresses; and (4) carrying out interpolation calculations by using the algorithm of tetrahedron interpolating in accordance with the representing rectified color data of the four grid points and the input to-be-rectified original color data, so as to acquire the final rectified color data. The processing circuit comprises an address decoder, four groups of searching table memories and an interpolation circuit. In comparison with prior art, the invention combines the color mapping searching table with the tetrahedron interpolation algorithm, saves hardware resource, increases work efficiency, and thus effectively increases calculation speed.

Description

Color gamut mapping real-time processing method and real-time processing circuit
Technical Field
The present invention belongs to the field of color signal processing, and in particular, the present invention relates to a color gamut mapping processing method and a color gamut mapping processing circuit.
Background
Currently, the types of display devices on the market are various, and various gamut mapping methods are studied in order to realize color matching between display devices having different gamuts and color characteristics. In hardware processing, color gamut mapping can be realized by a method of combining a color mapping lookup table with three-dimensional interpolation, and the method mainly comprises three steps: packing, decimation and interpolation. Packing refers to three-dimensional grid discrete sampling of an original color space; the original data corresponding to the sampled grid points are referred to as representative original color data, the corrected color data corresponding to these original data (different types of display devices have different corrected color data) are referred to as representative corrected color data, and the mapping table between the representative original color data and the representative corrected color data is the color mapping lookup table. Since color data is typically composed of three components (e.g., RGB components), the color mapping look-up table is often a three-dimensional look-up table. A typical uniform packing method, i.e. equally spaced discrete samples in the three component directions of the color, is shown in fig. 1. After packing, the entire original color gamut space is divided into a plurality of cubes composed of sampling points (grid points), and for the convenience of description and understanding in the following, the smallest cube composed of adjacent grid points is referred to as a cube unit (minimum sampling cube unit). Figure 3 gives an example of a color mapping look-up table. Decimation, which refers to the selection of a number of sampled grid points around an interpolation point (i.e. the position in the original color space of the input original color data to be corrected), the enclosing of which can enclose the interpolation point inside. In the extraction step, different interpolation algorithms are adopted, and the number of extraction grids and the selection mode are different. And (3) interpolation, namely interpolating between corrected color data corresponding to the original color data represented by the sampling grid points obtained in the extraction step according to the geometric relationship between the interpolation points and the sampling grid points obtained in the extraction step and the adopted interpolation algorithm, and calculating output color data. Relevant interpolation algorithms include pyramidal interpolation, trilinear interpolation, tetrahedral interpolation, etc. It is difficult to implement the color mapping look-up table directly on hardware, especially to extract the corrected color data corresponding to several grid points required for interpolation calculation at the same time. Donsil Han in [ J ] IEEE Trans. On Consumer Electronics, may 2004, vol.50, issue 2, page(s): 691 698 "Real-time Color Mapping Method for Digital TV Display Quality Enhancement", and [ J ]. IEEE Trans. On Consumer Electronics, feb.2005, vol.51, issue 1, page(s): 168 174 for "a Cost Effective Color Gamut Mapping Architecture for Digital TV Color Reproduction implementation" introduces a hardware algorithm structure for implementing Color Gamut Mapping by converting a complex three-dimensional lookup table into eight one-dimensional lookup tables and combining with a trilinear interpolation algorithm (trilinear interpolation). The method has the disadvantages that the trilinear interpolation algorithm limits the allowed highest working frequency because iterative interpolation calculation is carried out on eight points, the calculation amount is large, and a large amount of hardware resources are consumed, namely experiments on an FPGA chip SpartanIII xc3s400 of xilinx company show that the highest working frequency of a circuit which is realized by combining eight groups of one-dimensional lookup tables and trilinear interpolation proposed by Dongill Han is close to 60 MHz.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and combines a color mapping lookup table with a tetrahedral interpolation algorithm, thereby providing a color gamut mapping real-time processing method and a color gamut mapping real-time processing circuit which can save hardware resources and improve the highest working frequency.
In order to achieve the above object, the present invention provides a method for real-time processing of color gamut mapping, comprising the steps of:
1) Storing the representative corrected color data into four groups of lookup table memories respectively;
2) Inputting original color data to be corrected, extracting four lattice points in an original color space according to the original color data, and decoding to obtain storage addresses of the four lattice points (namely four representative original color data);
3) Respectively finding representative correction color data of the four grid points according to the storage addresses;
4) And performing interpolation operation by using a tetrahedral interpolation algorithm according to the representative corrected color data of the four lattice points and the input original color data to be corrected to obtain final corrected color data.
In the above technical solution, in the step 1), three-dimensional grid discrete sampling is performed on an original color space, and then representative corrected color data of grid points obtained by sampling are respectively stored in four sets of lookup table memories in a certain sorting manner.
In the foregoing technical solution, in step 2), the four lattice points extracted in the original color gamut space belong to the same cube unit, and the interpolation point corresponding to the original color data is located inside a tetrahedron formed by the four lattice points.
In the above technical solution, in the step 3), the four sets of lookup table memories synchronously output the four representative corrected color data to the interpolation circuit according to the storage addresses obtained in the step 2); in the step 4), the interpolation circuit performs interpolation operation by using a tetrahedral interpolation algorithm according to the original color data to be corrected and the received four representative corrected color data to obtain final corrected color data.
In the above technical solution, in the step 2), after the address decoder extracts the four grid points, the address decoder outputs position information of the four grid points (i.e. four representative original color data) to the interpolation circuit, and in the step 4), the interpolation circuit calculates interpolation weights according to the position information of the four grid points.
In the above technical solution, in the step 1), the method for storing the sampled representative corrected color data of the grid points into the four sets of lookup table memories respectively is as follows: storing representative corrected color data for the first type of grid points in a first set of memories; storing the representative corrected color data for the second type of grid points in a second set of memories; storing representative corrected color data for the third type of grid points in a third set of memory; storing the representative corrected color data of the fourth type of lattice points into a fourth group of memories; the first, second, third and fourth types of lattice points are defined as follows: taking a cube unit in the original color gamut space, defining one lattice point in the cube unit as a first type lattice point, defining another lattice point on a diagonal line of the first type lattice point as a second type lattice point, defining three lattice points adjacent to the first type lattice point as a third type lattice point, defining three lattice points adjacent to the second type lattice point as a fourth type lattice point, and uniquely defining all the lattice points in the original color gamut space as the first, second, third or fourth type lattice points. This definition makes it necessary for the four grid points obtained in the extraction step to be stored in four sets of memories, respectively, i.e. any two extracted grid points are not located in the same set of memories.
In the above technical solution, in the step 2), the method for extracting four grid points belonging to the same minimum sampling cube unit in the original color gamut space according to the original color data to be corrected is as follows: firstly, finding out a minimum sampling cube unit containing the original color data to be corrected; then, taking the vertex belonging to the first type of lattice point and the vertex belonging to the second type of lattice point on the cubic unit as two common points, taking the two endpoints of any edge which does not take any one of the two vertices as the endpoints as the other two vertices, and dividing the cubic unit into six mutually spliced tetrahedrons; and solving which of the divided tetrahedrons the original color data to be corrected is contained in, wherein four vertexes of the tetrahedron are the four lattice points.
To achieve another object of the present invention, the present invention provides a gamut mapping real-time processing circuit comprising: an address decoder, a lookup table memory and an interpolation circuit;
the look-up table memories are four groups in total, and each group of memories respectively stores representative corrected color data of a type of grid points in the original color gamut space;
the address decoder is used for receiving original color data to be corrected and extracting four lattice points belonging to the same cubic unit in an original color gamut space according to the original color data, and interpolation points corresponding to the original color data are positioned in a tetrahedron formed by the four lattice points; simultaneously, the address decoder decodes to obtain the storage addresses of the representative correction color data of the four grid points in the four groups of lookup table memories;
the interpolation circuit respectively obtains the representative corrected color data of the four grid points from four groups of lookup table memories, and performs interpolation operation by combining the original color data to be corrected and a tetrahedral interpolation algorithm to obtain a final corrected color data number.
In the above technical solution, the lookup table memory further outputs the position information of the four grid points for the interpolation circuit to calculate the interpolation weight.
In the above technical solution, in the lookup table memory, the first group of memories stores representative corrected color data of the first type of lattice points; a second group of memories storing representative corrected color data for a second type of grid point; a third group of memories stores representative corrected color data of a third kind of lattice point; a fourth group of memories stores representative corrected color data of a fourth type of lattice point; the definition of the first, second, third and fourth types of lattice points is as follows: taking a minimum sampling cube unit in the original color gamut space, defining one lattice point in the cube unit as a first type lattice point, defining another lattice point on a diagonal line of the first type lattice point as a second type lattice point, defining three lattice points adjacent to the first type lattice point as a third type lattice point, defining three lattice points adjacent to the second type lattice point as a fourth type lattice point, and uniquely defining all the lattice points in the original color gamut space as the first, second, third or fourth type lattice points.
In the above technical solution, each set of lookup table memories includes three memories for respectively storing three color components of the color data.
In the above technical solution, each group of the lookup table memories may be formed by a single memory, and different data bits of the memory respectively store three color components of the color data.
In the foregoing technical solution, the gamut mapping real-time processing circuit further includes a synchronizer, and the synchronizer provides synchronization signals for the address decoder, the lookup table memory, and the interpolation circuit.
Compared with the prior art, the invention can achieve the following technical effects:
the method converts the complex three-dimensional lookup table into four groups of one-dimensional lookup tables, provides an address decoding method, enables the extraction of four representative correction color data according to the input color data to be possible, and further provides a basis for real-time processing of an interpolation algorithm needing to extract four grid points, such as tetrahedral interpolation. The color gamut mapping circuit realized by the scheme can be realized in a logic IC or ASIC chip in most applications, thereby simplifying the single board design and reducing the cost; if the representative corrected color data is too large to be placed inside the logic IC or ASIC chip, a memory chip may be configured outside the logic IC or ASIC as a data memory of the lookup table; the invention also provides a color gamut mapping real-time processing circuit realized according to the scheme, which has the advantages of simple structure, less occupied hardware resources and high calculation speed.
Drawings
FIG. 1 is a schematic illustration of uniform packing;
FIG. 2 is a schematic diagram of tetrahedral interpolation;
FIG. 3 is a schematic diagram of a color mapping table;
FIG. 4 is a flow chart of one embodiment of the present invention;
FIG. 5 is a diagram illustrating the storage of representative corrected color data into four sets of look-up table memories, respectively, according to one embodiment of the present invention;
FIG. 6 is a schematic diagram of a first type of grid point and a second type of grid point in one embodiment of the present invention;
FIG. 7 is a diagram illustrating the definition of a first type of grid point, a second type of grid point, and the position relationship therebetween according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating the definition of a third type of grid point, in accordance with an embodiment of the present invention;
FIG. 9 is a diagram illustrating a fourth type of grid point defined in accordance with an embodiment of the present invention;
FIG. 10A is a diagram illustrating the distribution of groups of grid points on an even page according to an embodiment of the present invention;
FIG. 10B is a diagram illustrating the distribution of groups of grid points on an odd page according to an embodiment of the present invention;
FIG. 11 is a flow diagram of an address decoding method of one embodiment of the invention;
FIG. 12 is a schematic diagram of establishing a coordinate system within a minimal sampling cube cell in accordance with an embodiment of the present invention;
FIG. 13 is a schematic illustration of the tetrahedron subdivision of the minimum sampling cube element, in accordance with an embodiment of the present invention;
fig. 14 is a schematic circuit configuration diagram of an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and examples.
Example 1
Fig. 4 is a flow chart of the method of the present invention, which includes the following steps:
1) Storing the representative corrected color data into four groups of lookup table memories respectively;
2) Inputting original color data to be corrected, extracting four lattice points in an original color space according to the original color data, and decoding to obtain storage addresses of the four lattice points (namely four representative original color data);
3) Respectively finding representative correction color data of the four grid points according to the storage addresses;
4) And carrying out interpolation operation by using a tetrahedral interpolation algorithm according to the representative corrected color data of the four lattice points and the input original color data to be corrected to obtain final corrected color data.
Among the four steps, the step of storing the representative color data into four groups of lookup table memories is a precondition, and the following 3 steps are specific real-time processing steps of color data mapping.
The lookup table memory related in the embodiment can be realized in a logic IC chip such as FPGA, CPLD and the like, or in an ASIC (application specific integrated circuit); this can also be achieved by means of a peripheral memory, such as an EEPROM, when the representative correction color data is too large.
In step 1), the representative raw color data is a sampled data set obtained by three-dimensionally and discretely sampling a raw device color space, and is usually obtained through a packing step. A common packing method is uniform packing. Fig. 1 is a schematic diagram of uniform packing of an original color space. The original color data (referred to as representative original color data) corresponding to the sampling grid points may be a set of the following data: color data set with low significant bits LSBs (least significant bits) all being zero and high significant bits MSBs (most significant bits) being any value; since the data set cannot include the boundary color data in the original color space, the representative original data should also include a next set of color data sets, i.e., a color data set in which at least one color component takes a maximum value and the least significant bits LSB of the remaining color components are all zero. If the RGB color signal represented by 24-bit binary is capable of taking the upper 3 bits as MSB and the lower 5 bits as LSB, respectively, any color component will be sampled at 0, 32, 64, 96, 128, 160, 192, 224, 255, respectively, that is, 9 sampling gray levels will be obtained in each sampling direction, resulting in 729 sampling grid points. The representative original color data and the corresponding corrected color data (referred to as representative corrected color data) form a color lookup table, as shown in fig. 3.
Fig. 5 is a schematic diagram illustrating the representative corrected color data stored in four sets of look-up table memories, respectively, in this embodiment. In this example, storing the representative corrected color data in the four sets of look-up table memories respectively means storing the representative corrected color data corresponding to the 729 sampling points in the four sets of memories respectively. Each group of memories can be set to be three, and each group of memories stores a certain path of color data in the RGB color data; each set of memories may also be configured as one by merging each set of RGB color data into one, for example, three RGB color data respectively represented by 8-bit binary into one color data represented by 24-bit binary.
Fig. 6 shows the positioning of a first type of grid point 11 in a three-dimensional sampling grid, where representative corrected color data corresponding to the original color data represented by such grid point is stored in a first set of memories. Fig. 6 also shows the partial and second type grid points 22 and further illustrates in fig. 7 the positional relationship between the two types of grid points, i.e. both always at the ends of one of the body diagonals of the cubic cell. Fig. 6 also shows the positional relationship of the cells of the third grid point type 33 and the fourth grid point type 44 on the same cube, that is, they are adjacent to the first grid point type 11 and the second grid point type 22, respectively (refer to fig. 8 and 9).
The representative corrected color data are respectively stored into four groups of lookup table memories and are sorted according to the following method:
(1) The three-dimensional sampling grid is decomposed into a plurality of layers along a certain color component direction, each layer is called a page, the most significant bit of a sampling grid point on the page on the color component is used for marking the page sequence number, and when the color component obtains the maximum value, the value of adding 1 to the most significant bit is used for marking the page sequence number; dividing each page into rows and columns according to the other two color components, marking the row and column serial numbers respectively by the most significant bit of the two color components, and marking the row or/and column serial numbers by the value of adding 1 to the most significant bit when the color component to be inspected obtains the maximum value; sequentially accessing all sampling grid points row by row and column by page, when the accessed grid points belong to the first type grid points 11 or the second type grid points 22, arranging the grid points into a one-dimensional sequence according to the accessed sequence until all the grid points are accessed and arranged completely, and then storing corrected color data corresponding to the grid points into a corresponding memory according to the same arrangement sequence;
(2) For the third type lattice points 33, the sampling directions parallel to which the connecting lines with the adjacent first type lattice points 11 are divided into three subclasses; sorting the three subclasses of lattice points according to the method for arranging the first class of lattice points and the second class of lattice points, connecting the sorted three subclasses of lattice points into a one-dimensional sequence, and finally storing corrected color data corresponding to the one-dimensional sequence of lattice points into a third group of memories 3 according to the same arrangement sequence;
(3) For the fourth type lattice points 44, the sampling directions parallel to the connecting lines of the adjacent second type lattice points 22 are divided into three subclasses; and then sorting the three subclass lattice points according to the method for arranging the first class lattice points and the second class lattice points, connecting the sorted three subclass lattice points into a one-dimensional sequence, and finally storing the corrected color data corresponding to the one-dimensional sequence lattice points into a fourth group of memories according to the same arrangement sequence.
The classification is to make the four grid points obtained in the extraction step necessarily stored in four sets of memories, respectively, i.e. any two extracted grid points are not located in the same set of memories. The classification manner in this embodiment is not exclusive.
For convenience of understanding, a specific implementation manner of storing the representative corrected color data into the four sets of look-up table memories, respectively, in the present embodiment is further described below.
In this embodiment, the three-dimensional sampling grid is decomposed into 9 layers along a certain color component direction (for example, B component direction), each layer is called a page, and the most significant bit MSB (in this example, 3 bits binary representation) of the sampling grid point on the page on the color component B marks the page number, for example, the first page is marked as 0, the second page is marked as 1, the eighth page is marked as 7, the sampling grid point on the ninth page obtains the maximum value on the color component B, and the most significant bit thereof is the same as that of the eighth page, so the value of adding 1 to the most significant bit thereof is used to mark the page number at this time, that is, 8 is used to mark the page number; each page is divided into rows and columns according to the other two color components (for example, the R component is divided into rows and the G component is divided into columns), and the most significant bit of the two color components marks the row and column serial numbers respectively, and similarly, when the color component to be examined has the maximum value, the row and/or column serial number is marked by the value of adding 1 to the most significant bit, and fig. 10A and 10B respectively explain the row and column marking method of the sampling grid on the even page and the odd page, and mark a grid classification situation on the graph; sequentially accessing all sampling grid points row by row and column by page, when the accessed grid points belong to the first type grid points 11 or the second type grid points 22, arranging the grid points into a one-dimensional sequence according to the accessed sequence until all the grid points are accessed and arranged, and then storing the corrected color data corresponding to the grid points into a corresponding memory according to the same arrangement sequence; for the third type of lattice points 33, the three types of lattice points are classified into three subclasses according to which sampling direction the connecting line between the third type of lattice point 33 and the adjacent first type of lattice point 11 is parallel to, as shown in fig. 8, 3 groups of connecting lines between the first type of lattice point 11 and the adjacent third type of lattice point 33 in the figure are respectively parallel to a certain sampling direction (color component direction); then sorting the three subclasses of lattice points according to the method for arranging the first class of lattice points and the second class of lattice points, and then connecting the sorted three subclasses of lattice points into a one-dimensional sequence, wherein the connecting method comprises the steps of firstly sorting the first subclass of lattice points, then arranging the second subclass, then arranging the third subclass, and finally storing the corrected color data corresponding to the lattice points of the one-dimensional sequence into a third group of memory 3 according to the same arrangement sequence; for the fourth type grid point 44, the grid points are divided into three subclasses according to which sampling direction the connecting line of the fourth type grid point and the adjacent second type grid point 22 is parallel to; and then sorting the three small grid points according to the method for arranging the first type grid points and the second type grid points, connecting the sorted three small grid points into a one-dimensional sequence, and finally storing the corrected color data corresponding to the one-dimensional sequence grid points into a fourth group of memories according to the same arrangement sequence.
In the step 2), the address decoder calculates four addresses for accessing the four groups of lookup table memories according to the input color data. The address decoding method is related to the above-described method of storing the representative corrected color data into the memory. FIG. 11 is a flow chart of the address decoding algorithm of the present invention. The first three steps in the figure are all for uniquely determining four sampling grid points in the input color data field, thereby obtaining corresponding four corrected color data, and completing the extraction step.
The address decoder respectively accesses four sampling grid points corresponding to four correction color data obtained by four groups of memories after the same input color data is subjected to address decoding, and the four sampling grid points belong to certain four vertexes on the same minimum cube unit in the sampling grid, and two sampling grid points corresponding to two correction color data obtained from the third group of memories and the fourth group of memories belong to adjacent position relations, so that the cube unit can be split into six mutually spliced tetrahedrons. The decoding method of the address decoder further comprises the following steps:
(1) Addressing a minimum cube unit where input color data are located in a sampling grid by using a high-significant bit MSB of the input color data, and setting a vertex belonging to a second type of grid point at a first quadrant by using a vertex belonging to a first type of grid point on the minimum cube unit as an origin to establish a coordinate system inside the minimum cube unit;
(2) The color data has three color components and can be used as a color vector, so that the color vector of the vertex belonging to the first type lattice point on the cubic unit containing the input color vector is subtracted from the color vector of the input color data, and the absolute value of the obtained vector difference is obtained to obtain the coordinates of the color vector in the internal coordinate system of the cubic unit, which is expressed by (r, g, b);
(3) Assuming that the sampling intervals in the three directions are Δ R, Δ G, Δ B, the tetrahedron subdivision method subdivides the cubic unit into six tetrahedrons, and determines which tetrahedron the input color data is included in according to the comparison operation among the coordinate values (R, G, B), such as:
if it isAnd is
Figure A20071012183000132
The input color data belongs to a certain tetrahedron and is marked as I;
if it is
Figure A20071012183000133
And is
Figure A20071012183000134
The input color data belongs to another tetrahedron, and is marked as II;
if it is
Figure A20071012183000135
And is
Figure A20071012183000136
The input color data belongs to another tetrahedron,marking as III;
if it is
Figure A20071012183000137
And isThe input color data belongs to another tetrahedron, and is marked as V;
if it is
Figure A20071012183000141
And is
Figure A20071012183000142
The input color data belongs to another tetrahedron and is marked as VI;
in other cases, the input color data belongs to another tetrahedron, and is marked as VII;
(4) The method for positioning the tetrahedron can determine the four extracted grid points, and then, by inverting the grouping and sorting method in the memory, the addresses of the four grid points after grouping and sorting can be obtained, so that the storage addresses of the four extracted correction color data in the data memory are calculated, and address decoding is completed; and simultaneously, sending the four original color data corresponding to the four grid points to an interpolation circuit unit for interpolation calculation.
It should be noted that the sorting method and the decoding method in this embodiment are not unique. Any sort and decode method is within the scope of the present invention as long as the addresses of the representative corrected color data of the four extracted grid points can be smoothly calculated from the input original color data.
In this embodiment, addressing the minimum cube cell where the input color data is located in the sampling grid by using the MSB of the input color data means that the color data 0 obtained after retaining the MSB of the input color data and making all its lsb zero must be one of the eight vertices of the minimum sampling cube cell containing the input color data that is closest to the origin (i.e. the point where the pure black color is located, which may belong to any one of the four types of grid points), and the color data P obtained by adding the three color components of the obtained color data 0 to the corresponding sampling intervals respectively represents the volume diagonal vertex of the grid point where the color data 0 is located, so that the minimum sampling cube cell can be uniquely determined. For the above embodiment with the sampling lattice number of 729, if the input color data is (R, G, B) = (19, 72, 38), the MSB combined data of the color is (0, 2, 1), the MSB combined data of the body to the sampling lattice point is (0 +1, 2+1, 1+ 1), i.e., (1, 3, 2), and their corresponding original color data are (0, 64, 32) and (32, 96, 64), where (32, 96, 64) may also be obtained by (0, 64, 32) + (32, 32, 32) (32 is a sampling interval in three sampling directions). If the input color data is (R, G, B) = (190, 253, 237), the MSB combined data of the color is (5, 7), and the MSB combined data of the volume diagonal grid point is (6, 8), but in this example, because the MSB is represented by a three-bit binary and the maximum value thereof is less than 8, the MSB combined data of the volume diagonal grid point should be (6, 7), but the original color data corresponding to the volume diagonal grid point should be (192, 255).
FIG. 12 illustrates the method of constructing a coordinate system inside a minimal sampling cube. By constructing the coordinate system in the way described, the tetrahedron subdivision can be unified and the method of which tetrahedron the input color is contained in can be located. According to the method for constructing a coordinate system inside a cubic unit, the distribution of the first type of lattice should be located first. The lattice point classification method in fig. 10A and 10B has assumed that the lattice points whose row number, column number, and page number are even numbers belong to the first type of lattice points. Thus, the total number of sample points belonging to the first type of lattice points in the entire sampling grid of the embodiment is 25 × 5= 125. In the circuit design, the lattice point belongs to the first type of lattice point as long as the last bits of the three MSB data on the lattice point are all zero. The judgment of which kind of lattice the examined lattice belongs to can be easily realized on the circuit according to a similar method. The last bit combination of the MSB of any input color data has eight combinations, of which only one corresponds to the first type of lattice point, i.e., when the combination is (0, 0); when the MSB last bit is not all 0, the MSB data with the last bit not 0 is added with 1, so that the sampling points belonging to the first type of lattice points can be always found in the unit cube. And subtracting the color vector of the found sampling point belonging to the first type of lattice point from the input color data (vector) to obtain the coordinate. If the input color is (R, G, B) = (19, 72, 38), the MSB combination data of the color is (0, 2, 1), and it is obvious that the MSB combination belonging to the first kind of lattice point in the cube cell containing the input data should be (0, 2, 1) + (0, 1) = (0, 2), and the color data represented by the same is (0, 64, 64), so the coordinate obtained is (R, G, B) = | (19, 72, 38) - (0, 64, 64) | = (19, 8, 26). According to the method for positioning tetrahedrons, b is more than r and more than g, so that the input color point belongs to the VII-type tetrahedron. The positions of four vertexes of the tetrahedron can be determined according to a tetrahedron subdivision method, and the addresses of the grid points after being sorted are solved according to the method for grouping and sorting various grid points, namely the addresses of four representative correction color data in four groups of memories are read. In addition, the position information of the four vertices of the extracted tetrahedron corresponds to four original color data, and the four original color data solved in the decoding process are sent to an interpolation operation unit for interpolation operation. Due to the time sequence processing, a synchronous design should be adopted in the circuit design, but it is not necessary that the four original color data and the four corrected color data read out from the four sets of memories by the address decoder synchronously reach the interpolation arithmetic unit, and the former can reach one or a plurality of clock cycles before, so as to save time for calculating the interpolation weight.
Fig. 13 illustrates the method for tetrahedrally subdividing the minimal sampling cube. As shown in the figures, it can be interpreted as follows: two vertexes of the cubic unit respectively belonging to the first type lattice point or/and the second type lattice point are found and taken as two common vertexes of all tetrahedrons to be split, two ends of one edge of 12 edges which does not take the two vertexes as end points are selected as the remaining two vertexes of a certain tetrahedron to be split, and the cube is split into six mutually spliced tetrahedrons.
In said step 4), the output color data is obtained by interpolating for four sets of representative color correction data found in the four sets of look-up table memories according to the address decoder. The interpolation algorithm for extracting four points from the spatial discrete data is typically a tetrahedral interpolation algorithm. FIG. 2 is a schematic view of tetrahedral interpolation. In the figure, four sampling grid points a, B, C, D in some original space are mapped to four points a ', B ', C ', D ' in the target space, and the interpolation point P included in the tetrahedron ABCD is mapped to a point P ' in the tetrahedron a ' B ' C ' D '. Assuming that the values (which may be scalar or vector) represented by each point in the graph are denoted by Vi (i = a, B, C, D, P, a ', B ', C ', D ', P '), the tetrahedral interpolation algorithm may be represented as:
V P′ =α×V A′ +β×V B′ +γ×V C′ +κ×V D′
in the formula, alpha, beta, gamma and kappa are interpolation weights of four points A ', B', C 'and D', respectively, and the calculation method is the volume ratio of four small tetrahedrons BCDP, ACDP, ABDP, ABCP and tetrahedral ABCD.
Fig. 14 provides a schematic diagram of a circuit structure for implementing the present invention, which includes an address decoder, a lookup table memory, and an interpolation circuit (i.e., an interpolation arithmetic unit), and also includes a synchronizer for providing synchronization signals for the address decoder, the lookup table memory, and the interpolation circuit.
The color gamut mapping real-time processing method and the color gamut mapping real-time processing circuit are suitable for various color real-time correction systems, such as color gamut mapping of laser full-color display, color gamut matching of mobile phone display and LCD display and the like, and are also suitable for the mapping field of other two three-dimensional data spaces. The color gamut mapping circuit realized by the scheme can be realized in a logic IC or ASIC chip in most applications, thereby simplifying the single board design and reducing the cost; if the representative corrected color data is too large to be placed inside the logic IC or ASIC chip, a memory chip may be provided outside the logic IC or ASIC as a data memory of the look-up table. To increase processing speed, multiple stages of flow can be used in a particular design to meet the needs of high rate real-time data processing. Experiments on FPGA chip SpartanIII xc3s400 of xilinx show that the maximum allowable operating frequency of the circuit constructed by the method can reach 80 HZ.
In the present embodiment, although RGB color data is used, it is understood that the present invention may be applied to color gamut mapping of other three-dimensional color data or other three-dimensional data mapping.
It should also be noted that the sampling of the present invention is not necessarily uniform sampling, but may also be non-uniform sampling, and when non-uniform sampling is employed, the minimum sampling volume unit is not a cubic unit, but a common rectangular unit.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limited. Although the present invention has been described in detail with reference to the embodiments, it should be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (13)

1. A color gamut mapping real-time processing method comprises the following steps:
1) Storing the representative corrected color data into four groups of lookup table memories respectively;
2) Inputting original color data to be corrected, extracting four lattice points in an original color space according to the original color data, and decoding to obtain storage addresses of the four lattice points;
3) Respectively finding representative correction color data of the four grid points according to the storage addresses;
4) And performing interpolation operation by using a tetrahedral interpolation algorithm according to the representative corrected color data of the four lattice points and the input original color data to be corrected to obtain final corrected color data.
2. The method for real-time processing of color gamut mapping according to claim 1, wherein in step 1), three-dimensional grid discrete sampling is performed on an original color space, and then representative corrected color data of sampled grid points are respectively stored in four sets of look-up table memories in a certain sorting manner.
3. The method for real-time processing of color gamut mapping according to claim 2, wherein in step 2), the four grid points extracted from the original color gamut space belong to the same minimum sampling cube unit, and the interpolation point corresponding to the original color data is located inside a tetrahedron formed by the four grid points.
4. The method for real-time processing of color gamut mapping according to claim 3, wherein in the step 3), the four sets of lookup table memories synchronously output the four representative corrected color data to the interpolation circuit according to the storage addresses obtained in the step 2); in the step 4), the interpolation circuit performs interpolation operation by using a tetrahedral interpolation algorithm according to the original color data to be corrected and the received four representative corrected color data to obtain final corrected color data.
5. The method for real-time processing of color gamut mapping according to claim 4, wherein in step 2), the address decoder outputs the position information of the four grid points to the interpolation circuit after extracting the four grid points, and in step 4), the interpolation circuit calculates the interpolation weights according to the position information of the four grid points.
6. The method for real-time processing of color gamut mapping according to claim 1, wherein in step 1), the method for storing the sampled representative corrected color data of the grid points into four sets of look-up table memories respectively comprises the following steps: storing representative corrected color data for the first type of grid points in a first set of memories; storing representative corrected color data for the second type of grid points in a second set of memory; storing representative corrected color data of the third type of lattice points into a third group of memories; storing the representative corrected color data of the fourth type of lattice points into a fourth group of memories; the first, second, third and fourth types of lattice points are defined as follows: and taking a minimum sampling cube unit in the original color gamut space, defining one lattice point in the cube unit as a first type lattice point, defining another lattice point positioned on a diagonal line of the first type lattice point body as a second type lattice point, defining three lattice points adjacent to the first type lattice point as a third type lattice point, defining three lattice points adjacent to the second type lattice point as a fourth type lattice point, and uniquely defining all the lattice points in the original color gamut space as the first, second, third or fourth type lattice points.
7. The method for real-time processing of color gamut mapping according to claim 3, wherein the method for extracting four grid points belonging to the same minimum sampling cube unit in the original color gamut space according to the original color data to be corrected is as follows: firstly, finding a minimum sampling cube unit containing the original color data to be corrected; then, taking the vertex belonging to the first type of lattice point and the vertex belonging to the second type of lattice point on the cubic unit as two common points, taking the two endpoints of any one edge which does not take any one of the two vertices as the endpoints as the other two vertices, and dividing the cubic unit into six mutually spliced tetrahedrons; and then solving which of the divided tetrahedrons the original color data to be corrected is contained in, wherein four vertexes of the tetrahedron are the four lattice points.
8. A gamut mapping real-time processing circuit comprising: an address decoder, a lookup table memory and an interpolation circuit;
the look-up table memories have four groups, and each group of memories respectively stores representative corrected color data of a type of lattice point in the original color gamut space;
the address decoder is used for receiving original color data to be corrected and extracting four lattice points belonging to the same minimum sampling cube unit in an original color gamut space according to the original color data, and interpolation points corresponding to the original color data are positioned in a tetrahedron formed by the four lattice points; simultaneously decoding by the address decoder to obtain storage addresses of the representative corrected color data of the four grid points in the four groups of lookup table storages;
the interpolation circuit respectively obtains the representative corrected color data of the four grid points from four groups of lookup table memories, and performs interpolation operation by combining the original color data to be corrected and a tetrahedral interpolation algorithm to obtain a final corrected color data number.
9. The gamut mapping real-time processing circuit according to claim 8, the look-up table memory further outputting position information of the four grid points for the interpolation circuit to calculate interpolation weights.
10. The gamut-mapping real-time processing circuit of claim 8, wherein a first of the four sets of look-up table memories stores representative corrected color data for a first type of grid point; a second group of memories stores representative corrected color data of a second type of lattice point; a third group of memories stores representative corrected color data of a third kind of lattice point; the fourth group of memories stores representative corrected color data of the fourth type of lattice points; the first, second, third and fourth types of lattice points are defined as follows: taking a minimum sampling cube unit in the original color gamut space, defining one lattice point in the cube unit as a first type lattice point, defining another lattice point positioned on a diagonal line of the first type lattice point body as a second type lattice point, defining three lattice points adjacent to the first type lattice point as a third type lattice point, defining three lattice points adjacent to the second type lattice point as a fourth type lattice point, and uniquely defining all the lattice points in the original color gamut space as the first, second, third or fourth type lattice points.
11. The gamut-mapped real-time processing circuit of claim 8, wherein each set of look-up table memories comprises three memories storing three color components of color data, respectively.
12. The gamut-mapped real-time processing circuit of claim 8, wherein each set of look-up table memories may be formed by a single memory having three color components of color data stored in different data bits.
13. The gamut mapping real-time processing circuit according to claim 8, further comprising a synchronizer providing synchronization signals for the address decoder, the look-up table memory and the interpolation circuit.
CNB200710121830XA 2007-09-14 2007-09-14 A kind of color domain mapping real-time and real-time treatment circuit Expired - Fee Related CN100573651C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200710121830XA CN100573651C (en) 2007-09-14 2007-09-14 A kind of color domain mapping real-time and real-time treatment circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200710121830XA CN100573651C (en) 2007-09-14 2007-09-14 A kind of color domain mapping real-time and real-time treatment circuit

Publications (2)

Publication Number Publication Date
CN101123080A true CN101123080A (en) 2008-02-13
CN100573651C CN100573651C (en) 2009-12-23

Family

ID=39085388

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200710121830XA Expired - Fee Related CN100573651C (en) 2007-09-14 2007-09-14 A kind of color domain mapping real-time and real-time treatment circuit

Country Status (1)

Country Link
CN (1) CN100573651C (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209331A (en) * 2013-03-07 2013-07-17 上海电机学院 System and method for strengthening image color saturation
CN104795049A (en) * 2015-04-20 2015-07-22 合肥工业大学 Implementing method of monitor color gamut mapping
CN105049671A (en) * 2014-04-15 2015-11-11 佳能株式会社 Color processing apparatus and color processing method
CN106408540A (en) * 2016-09-27 2017-02-15 新奥特(北京)视频技术有限公司 Extrapolation processing method and device based on 3D LUT table
CN104836995B (en) * 2014-02-06 2017-07-07 富士通株式会社 Information processor, color interpolation method and table generating method
CN108389234A (en) * 2018-02-05 2018-08-10 深圳市恒晨电器有限公司 A kind of heterochromatic detection algorithm of tablet LCD, storage device and mobile terminal
CN105049671B (en) * 2014-04-15 2018-08-31 佳能株式会社 Color processing apparatus and color processing method
CN108701351A (en) * 2016-10-17 2018-10-23 华为技术有限公司 A kind of image shows Enhancement Method and device
CN111292235A (en) * 2019-04-25 2020-06-16 展讯通信(上海)有限公司 Tetrahedral interpolation calculation method and device, color gamut conversion method and device, and medium
CN112017105A (en) * 2020-08-13 2020-12-01 深圳市洲明科技股份有限公司 Color correction FPGA implementation device and method, color correction device and storage medium
CN112449168A (en) * 2019-09-03 2021-03-05 深圳Tcl新技术有限公司 Color gamut mapping method and system
CN113470591A (en) * 2020-03-31 2021-10-01 京东方科技集团股份有限公司 Monitor toning method and device, electronic equipment and storage medium
WO2022205127A1 (en) * 2021-03-31 2022-10-06 京东方科技集团股份有限公司 Color correction method, field programmable gate array, chip and display device
WO2024000465A1 (en) * 2022-06-30 2024-01-04 京东方科技集团股份有限公司 Method and apparatus for generating color mapping table, method and apparatus for correcting color mapping table, and medium and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6335800B1 (en) * 1998-12-11 2002-01-01 Xerox Corporation Method of multidimensional interpolation for color transformations
JP3724339B2 (en) * 2000-06-15 2005-12-07 セイコーエプソン株式会社 Image display device and color signal adjustment device used therefor
KR100552708B1 (en) * 2004-04-30 2006-02-20 삼성전자주식회사 Apparatus and method of color transformation from 3 input color signal to muti-color signal
KR100629516B1 (en) * 2004-09-21 2006-09-28 삼성전자주식회사 Apparatus for detecting color gamut boundary and apparatus for mapping using the same and method thereof
JP2006119883A (en) * 2004-10-21 2006-05-11 Canon Inc Tetrahedral interpolation apparatus and method
JP4368880B2 (en) * 2006-01-05 2009-11-18 シャープ株式会社 Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209331A (en) * 2013-03-07 2013-07-17 上海电机学院 System and method for strengthening image color saturation
CN104836995B (en) * 2014-02-06 2017-07-07 富士通株式会社 Information processor, color interpolation method and table generating method
CN105049671B (en) * 2014-04-15 2018-08-31 佳能株式会社 Color processing apparatus and color processing method
CN105049671A (en) * 2014-04-15 2015-11-11 佳能株式会社 Color processing apparatus and color processing method
US9854134B2 (en) 2014-04-15 2017-12-26 Canon Kabushiki Kaisha Color processing apparatus and color processing method
CN104795049A (en) * 2015-04-20 2015-07-22 合肥工业大学 Implementing method of monitor color gamut mapping
CN104795049B (en) * 2015-04-20 2018-05-11 合肥工业大学 A kind of implementation method of display color gamut mapping
CN106408540B (en) * 2016-09-27 2020-11-06 新奥特(北京)视频技术有限公司 Extrapolation processing method and device based on 3D LUT table
CN106408540A (en) * 2016-09-27 2017-02-15 新奥特(北京)视频技术有限公司 Extrapolation processing method and device based on 3D LUT table
CN108701351A (en) * 2016-10-17 2018-10-23 华为技术有限公司 A kind of image shows Enhancement Method and device
CN108701351B (en) * 2016-10-17 2022-03-29 华为技术有限公司 Image display enhancement method and device
CN108389234A (en) * 2018-02-05 2018-08-10 深圳市恒晨电器有限公司 A kind of heterochromatic detection algorithm of tablet LCD, storage device and mobile terminal
CN108389234B (en) * 2018-02-05 2021-10-08 深圳市恒晨电器有限公司 Flat LCD (liquid Crystal display) heterochromatic detection method, storage device and mobile terminal
CN111292235A (en) * 2019-04-25 2020-06-16 展讯通信(上海)有限公司 Tetrahedral interpolation calculation method and device, color gamut conversion method and device, and medium
WO2020216085A1 (en) * 2019-04-25 2020-10-29 展讯通信(上海)有限公司 Tetrahedral interpolation calculation method and apparatus, gamut conversion method and apparatus, and medium
US11861791B2 (en) 2019-04-25 2024-01-02 Spreadtrum Communications (Shanghai) Co., Ltd. Tetrahedral interpolation calculation method and apparatus, gamut conversion method and apparatus, and medium
CN112449168B (en) * 2019-09-03 2021-11-23 深圳Tcl新技术有限公司 Color gamut mapping method and system
CN112449168A (en) * 2019-09-03 2021-03-05 深圳Tcl新技术有限公司 Color gamut mapping method and system
WO2021197213A1 (en) * 2020-03-31 2021-10-07 京东方科技集团股份有限公司 Color modulation method and apparatus for display, electronic device, and storage medium
CN113470591A (en) * 2020-03-31 2021-10-01 京东方科技集团股份有限公司 Monitor toning method and device, electronic equipment and storage medium
CN113470591B (en) * 2020-03-31 2023-11-14 京东方科技集团股份有限公司 Monitor color matching method and device, electronic equipment and storage medium
US11967297B2 (en) 2020-03-31 2024-04-23 Boe Technology Group Co., Ltd. Color modulation method and apparatus for display, electronic device, and storage medium
CN112017105A (en) * 2020-08-13 2020-12-01 深圳市洲明科技股份有限公司 Color correction FPGA implementation device and method, color correction device and storage medium
CN112017105B (en) * 2020-08-13 2024-03-26 深圳市洲明科技股份有限公司 Color correction FPGA implementation device and method, color correction equipment and storage medium
WO2022205127A1 (en) * 2021-03-31 2022-10-06 京东方科技集团股份有限公司 Color correction method, field programmable gate array, chip and display device
GB2611234A (en) * 2021-03-31 2023-03-29 Boe Technology Group Co Ltd Color correction method, field programmable gate array, chip and display device
WO2024000465A1 (en) * 2022-06-30 2024-01-04 京东方科技集团股份有限公司 Method and apparatus for generating color mapping table, method and apparatus for correcting color mapping table, and medium and device

Also Published As

Publication number Publication date
CN100573651C (en) 2009-12-23

Similar Documents

Publication Publication Date Title
CN101123080A (en) A real time processing method and real time processing circuit for color domain mapping
US11284090B2 (en) Encoding images using MIP map compression
CN111009027B (en) Method for realizing color correction by using 3D LUT and display equipment
US9684848B2 (en) System and method for retrieving an image containing image statistical data
KR102137443B1 (en) Methods of and apparatus for encoding and decoding data
US20140354666A1 (en) Vertex parameter data compression
EP1768059A2 (en) Method and apparatus for encoding texture information
CN109658337B (en) FPGA implementation method for real-time electronic despinning of images
CN105354809B (en) A kind of pre-distortion method and device based on output image location of pixels index
CN107103629A (en) The method and apparatus of vertex parameter data is compressed in 3D computer graphics systems
CN109615666A (en) A kind of three-dimensional color space data transfer device and device
US10158858B2 (en) Method and system for index compression for fixed block size texture formats and for non-linear interpolation of index values along an edge in a tile
CN109919837B (en) Interpolation of image data
CN102799657B (en) System and method for realizing real-time data point mapping processing based on three-dimensional checking
CN107748794A (en) A kind of GML data storage method
US20050286775A1 (en) Method and apparatus for storing image data using an MCU buffer
CN103209331A (en) System and method for strengthening image color saturation
JP2008259178A (en) Color conversion apparatus, filter processing apparatus and color conversion method
US9449579B2 (en) Systems and methods for mapping color data
US20080018961A1 (en) N-Dimensional Hedral Interpolation
CN106407301A (en) System and method for realizing real-time mapping of data based on one-dimensional lookup table
JP7059038B2 (en) Image processing equipment, image processing methods, and programs
JP2005149051A (en) Data conversion device and method
US10817493B2 (en) Data interpolation
KR20040077614A (en) Apparatus and method for color gamut mapping of color image

Legal Events

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

Granted publication date: 20091223

Termination date: 20140914

EXPY Termination of patent right or utility model