A Field Programmable Gate Array, comprising:
- a plurality of read-only memories configured to store color data of respective reference point coordinates;
- a plurality of registers;
- a coordinate conversion circuit configured to convert original color data into original color coordinates in an original color space;
- a coordinate mapping circuit configured to map the original color coordinates to a sampling point space;
- wherein, a quantitative ratio is determined according to quantization bits of the original color space and a number of sampling points of the sampling point space, coordinate mapping is performed on the original color coordinates according to the quantitative ratio, and a quantization operation is performed on a coordinate mapping result based on a preset quantitative level to obtain a quantization operation result;
- and a right shift operation is performed on the quantization operation result based on the quantitative level, and a right shift operation result is taken as mapped coordinates of a mapped point;
- a reference point determination circuit configured to determine a sampling cube where the mapped point is located, take eight vertexes of the sampling cube as reference points, and determine reference point coordinates of the reference points;
- wherein, the sampling point space is a three-dimensional Cartesian coordinate system comprising a first direction, a second direction and a third direction corresponding to axes thereof;
- according to the number of sampling points, a plurality of sampling points are respectively arranged along the first direction, the second direction and the third direction in the sampling point space and are arranged at equal intervals, every eight adjacent sampling points are taken as vertexes to form a sampling cube, and all the sampling cubes form the sampling point space;
- an address determination circuit configured to perform an index calculation according to the reference point coordinates and the number of sampling points to determine reference point addresses;
- a color data reading circuit configured to simultaneously read the color data of the reference point coordinates from the read-only memories corresponding to the reference point addresses;
- and
- an interpolation correction circuit configured to correct all color components corresponding to the color data of the reference point coordinates through an interpolation algorithm;
- wherein, when any one of the color components is corrected, a trilinear interpolation operation is performed based on the first direction, the second direction and the third direction according to corresponding color component data in the color data of the reference point coordinates;
- and results of interpolation operations performed along the first direction, the second direction and the third direction are respectively stored in the respective registers.