WO2020216085A1 - 四面体插值计算方法及装置、色域转换方法及装置、介质 - Google Patents

四面体插值计算方法及装置、色域转换方法及装置、介质 Download PDF

Info

Publication number
WO2020216085A1
WO2020216085A1 PCT/CN2020/084384 CN2020084384W WO2020216085A1 WO 2020216085 A1 WO2020216085 A1 WO 2020216085A1 CN 2020084384 W CN2020084384 W CN 2020084384W WO 2020216085 A1 WO2020216085 A1 WO 2020216085A1
Authority
WO
WIPO (PCT)
Prior art keywords
color gamut
interpolated
point
tetrahedron
vertices
Prior art date
Application number
PCT/CN2020/084384
Other languages
English (en)
French (fr)
Inventor
沈珈立
罗小伟
林福辉
Original Assignee
展讯通信(上海)有限公司
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 展讯通信(上海)有限公司 filed Critical 展讯通信(上海)有限公司
Priority to EP20795272.2A priority Critical patent/EP3961551B1/en
Priority to US17/606,323 priority patent/US11861791B2/en
Publication of WO2020216085A1 publication Critical patent/WO2020216085A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • 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/6016Conversion to subtractive colour signals
    • H04N1/6019Conversion to subtractive colour signals using look-up tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/17Function evaluation by approximation methods, e.g. inter- or extrapolation, smoothing, least mean square method
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/08Volume rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Definitions

  • the invention belongs to the technical field of image processing, and particularly relates to a tetrahedral interpolation calculation method and device, a color gamut conversion method and device, and a medium.
  • multiple interpolation methods can be used. For example, bicubic interpolation, triangular prism interpolation, pyramid interpolation, or tetrahedron interpolation, among which the tetrahedral interpolation method has the highest accuracy, but the amount of calculation is relatively large.
  • each pixel on the image needs to calculate the fourth-order matrix determinant composed of the homogeneous coordinates of the four tetrahedral vertices. Therefore, the time-consuming and power consumption of the equipment for color gamut conversion using tetrahedral interpolation often cannot meet user requirements.
  • the embodiment of the present invention solves the technical problem of relatively high complexity in tetrahedral interpolation calculation.
  • an embodiment of the present invention provides a tetrahedral interpolation calculation method, including: obtaining the coordinates of a point to be interpolated in a sampling space, and the sampling space surrounds the point to be interpolated and a cube formed by eight nearby sampling points.
  • the volume of the four sub-tetrahedrons; according to the tetrahedral interpolation theorem formula, the volume of the tetrahedron, the volume of the four sub-tetrahedrons, and the mapping values of the four vertices of the tetrahedron, the interpolation value of the point to be interpolated is obtained Numerical value.
  • V L 3 /6; where V is the volume of the tetrahedron, and L is the eight neighbors surrounding the point to be interpolated in the sampling space The side length of the cube formed by the sampling points.
  • V 1 is the volume of the first subtetrahedron
  • (r, g, b) is the coordinates of the point to be interpolated in the sampling space
  • S 1 is the three vertices all on one side of the cube
  • the area of the formed triangle, L is the side length of the cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space,
  • V 2 is the volume of the second sub-tetrahedron, and
  • S 2 is the three equal The area of the triangle formed by the vertices on the other side of the
  • D [D A L+(D D -D C )r+(D C -D A )g+(D B -D A )b]/L ;
  • D is the interpolation value of the point to be interpolated
  • D A , D B , D C , D D are the mapping values of the four vertices A, B, C, and D of the tetrahedron surrounding the point to be interpolated
  • (R, g, b) is the coordinates of the point to be interpolated in the sampling space
  • L is the side length of the cube formed by the eight nearby sampling points surrounding the point to be interpolated in the sampling space
  • the sides CD and X The axis is parallel, side CA is parallel to the Y axis, and side BA is parallel to the Z axis.
  • the embodiment of the present invention also discloses a color gamut conversion method, which includes: acquiring the image to be converted and its color gamut information; and selecting the image corresponding to the image to be converted in a preset color gamut conversion database.
  • Color gamut conversion data corresponding to the color gamut information according to the color gamut conversion data corresponding to the color gamut information of the image to be converted, any one of the tetrahedral interpolation calculation methods described above is used to perform color gamut conversion on the image to be converted To obtain the corresponding color gamut conversion image.
  • the color gamut conversion database is obtained in the following manner: performing color gamut measurement and calibration according to the wide color gamut screen characteristics and specific color gamut data to obtain at least one color gamut conversion data;
  • the color gamut conversion data includes the following At least one: sRGB color gamut conversion data, DCI-P3 color gamut conversion data, and AdobeRGB color gamut conversion data
  • the selecting the color gamut conversion data corresponding to the color gamut information of the image to be converted includes: performing address analysis on the color gamut information of the image to be converted; The color gamut conversion data corresponding to the color gamut information of the image.
  • the embodiment of the present invention also discloses a tetrahedral interpolation calculation device, including: a first acquisition unit for acquiring the coordinates of the point to be interpolated in the sampling space, and eight sampling points surrounding the point to be interpolated in the sampling space are formed The side length of the cube of, and the mapping values of the four vertices of the tetrahedron surrounding the point to be interpolated; the four vertices are four of the eight sampling points; the first calculation unit is configured to The coordinates of the point to be interpolated in the sampling space, the side length of the cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space, the volume of the tetrahedron, the point to be interpolated and the The volume of the four sub-tetrahedrons formed by any three vertices in the tetrahedron; the second calculation unit is used to calculate the volume of the four sub-tetrahedrons according to the tetrahedral interpolation theor
  • the first calculation unit is configured to calculate according to the coordinates of the point to be interpolated in the sampling space, and the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space
  • V the volume of the tetrahedron
  • L the sampling space surrounding the point to be interpolated
  • the first calculation unit is configured to calculate according to the coordinates of the point to be interpolated in the sampling space, and the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space Obtain the volume of the four sub-tetrahedrons formed by the point to be interpolated and any three vertices in the tetrahedron, and use the following formula to calculate the volume of the four sub-tetrahedrons formed by the point to be interpolated and any three vertices.
  • V 1 is the volume of the first subtetrahedron
  • S 1 is the area of the triangle formed by three vertices on one side of the cube
  • L is formed by the eight sampling points surrounding the point to be interpolated in the sampling space
  • the side length of the cube, V 2 is the volume of the second sub-tetrahedron, S 2 is the area of the triangle formed by the vertices on the other side of the cube, V 3 is the volume of the third sub-tetrahedron, S 3 Is the area of the triangle formed by three vertices not on one side of the cube
  • the second calculation unit is configured to obtain the calculated value according to the tetrahedral interpolation theorem formula, the volume of the tetrahedron, the volume of the four sub-tetrahedrons, and the mapping values of the four vertices of the tetrahedron.
  • D [D A L+(D D -D C )r+(D C -D A )g+(D B -D A ) b]/L; where D is the interpolation value of the point to be interpolated, D A , D B , D C , and D D are the four vertices A, B, C, and C of the tetrahedron surrounding the point to be interpolated.
  • mapping value of D (r, g, b) is the coordinates of the point to be interpolated in the sampling space
  • L is the side length of the cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space
  • Side CD is parallel to the X axis
  • side CA is parallel to the Y axis
  • side BA is parallel to the Z axis.
  • the embodiment of the present invention also discloses a color gamut conversion device, which includes: a second acquisition unit for acquiring an image to be converted and its color gamut information; a selection unit for selecting and The color gamut conversion data corresponding to the color gamut information of the image to be converted; a conversion unit configured to use the tetrahedral interpolation calculation according to any one of the above according to the color gamut conversion data corresponding to the color gamut information of the image to be converted The device performs color gamut conversion on the image to be converted to obtain the corresponding color gamut converted image.
  • the color gamut conversion database is obtained in the following manner: performing color gamut measurement and calibration according to the wide color gamut screen characteristics and specific color gamut data to obtain at least one color gamut conversion data;
  • the color gamut conversion data includes the following At least one: sRGB color gamut conversion data, DCI-P3 color gamut conversion data, and AdobeRGB color gamut conversion data.
  • the selection unit is configured to: perform address analysis on the color gamut information of the image to be converted; use a three-dimensional lookup table to find the color gamut conversion data corresponding to the color gamut information of the image to be converted.
  • the embodiment of the present invention also discloses a tetrahedral interpolation calculation device, including: a first subtractor, a second subtractor, a third subtractor, a first multiplier, a second multiplier, a third multiplier, and a first adder
  • the first subtractor, the second adder and the third adder wherein: the first subtractor has a positive input terminal connected to the mapping value of the fourth vertex of the tetrahedron, and a negative input terminal connected to the third vertex of the tetrahedron Mapping value, the output terminal is connected to the first input terminal of the first multiplier; the second subtractor, the positive terminal input terminal is connected to the mapping value of the third vertex of the tetrahedron, and the negative terminal input terminal is connected to the tetrahedron
  • the output terminal of the mapping value of the first vertex is connected to the first input terminal of the second multiplier; the positive terminal input terminal of the third subtractor is connected to the mapping value of the second vertex of the t
  • the embodiment of the present invention also discloses a computer-readable storage medium.
  • the computer-readable storage medium is a non-volatile storage medium or a non-transitory storage medium, on which computer instructions are stored, which are executed when the computer instructions are run. Steps of any one of the tetrahedral interpolation calculation methods described above.
  • the embodiment of the present invention also discloses a computer-readable storage medium.
  • the computer-readable storage medium is a non-volatile storage medium or a non-transitory storage medium, on which computer instructions are stored, which are executed when the computer instructions are run. Steps of any one of the aforementioned color gamut conversion methods.
  • An embodiment of the present invention also provides a tetrahedral interpolation calculation device, including a memory and a processor, the memory stores computer instructions that can run on the processor, and the processor executes the computer instructions when the computer instructions are run. Steps of any one of the tetrahedral interpolation calculation methods described above.
  • An embodiment of the present invention also provides a color gamut conversion device, including a memory and a processor, the memory stores computer instructions that can be run on the processor, and the processor executes the foregoing when the computer instructions are executed. Any of the steps of the color gamut conversion method.
  • the side length of the cube formed by eight nearby sampling points in the sampling space surrounding the point to be interpolated the volume of the tetrahedron, the point to be interpolated and any The volume of the four sub-tetrahedrons formed by the three vertices.
  • the fourth-order matrix determinant composed of the homogeneous coordinates of the four tetrahedron vertices for each pixel to calculate the volume of the four sub-tetrahedrons, and obtain the coordinates of the point to be interpolated in the sampling space and the vicinity of the sampling space
  • the eight sampling points surround the side length of the cube formed by the point to be interpolated
  • the volume of the four sub-tetrahedrons formed by the point to be interpolated and any three of the vertices can be obtained, which greatly reduces the calculation amount of the tetrahedral interpolation calculation.
  • the color gamut conversion data corresponding to the color gamut information of the image to be converted is selected; according to the color gamut conversion data corresponding to the color gamut information of the image to be converted, any of the foregoing
  • the tetrahedral interpolation calculation method performs color gamut conversion to obtain the color gamut conversion image of the image to be converted.
  • the color gamut can be adjusted flexibly according to the color gamut of the image to be converted under different color gamuts and different screens.
  • Fig. 1 is a schematic diagram of an existing tetrahedral interpolation module
  • Figure 2 is a flow chart of a tetrahedral interpolation calculation method in an embodiment of the present invention
  • Figure 3 is a schematic diagram of six tetrahedral segmentation modes in an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a tetrahedron structure in an embodiment of the present invention.
  • Figure 5 is a schematic structural diagram of a tetrahedral interpolation calculation device in an embodiment of the present invention.
  • Figure 6 is a flowchart of a color gamut conversion method in an embodiment of the present invention.
  • Fig. 7 is a schematic structural diagram of another tetrahedral interpolation calculation device in an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a color gamut conversion device in an embodiment of the present invention.
  • FIG. 1 a schematic diagram of an existing tetrahedral interpolation module is given.
  • D T is the value of the point T to be interpolated
  • D A , D B , D C , and D D are the mapping values of the four vertices A, B, C, and D (in the tetrahedral interpolation calculation, the mapping of the four vertices The value is obtained through a three-dimensional lookup table)
  • W A , W B , W C , and W D are the weights of the four vertices ABCD
  • W A V TBCD /V ABCD
  • W B V TACD /V ASCD
  • W C V TABD /V ABCD
  • W D V TABC /V ABCD .
  • the volume of the tetrahedron is proportional to the absolute value of the matrix determinant formed by the homogeneous coordinates of the four vertices. Therefore, the following formulas (4), (5), (6), (7), (8) are used to calculate the volume of sub-tetrahedron TABD, sub-tetrahedron TBCD, sub-tetrahedron TABC, and sub-tetrahedron TACD V ABCD , V TABD , V TBCD , V TABC , V TACD :
  • each pixel on the image needs to calculate a fourth-order matrix determinant formed by the homogeneous coordinates of four tetrahedral vertices. Therefore, the time-consuming and power consumption of the equipment for color gamut conversion using tetrahedral interpolation often cannot meet user requirements.
  • the volume and the position of the tetrahedron are calculated according to the coordinates of the point to be interpolated in the sampling space, and the side length of the cube formed by eight nearby sampling points in the sampling space surrounding the point to be interpolated.
  • the fourth-order matrix determinant composed of the homogeneous coordinates of the four tetrahedron vertices for each pixel to calculate the volume of the four sub-tetrahedrons, and obtain the coordinates of the point to be interpolated in the sampling space and the vicinity of the sampling space
  • the eight sampling points surround the side length of the cube formed by the point to be interpolated
  • the volume of the four sub-tetrahedrons formed by the point to be interpolated and any three of the vertices can be obtained, which greatly reduces the calculation amount of the tetrahedral interpolation calculation.
  • the embodiment of the present invention provides a tetrahedral interpolation calculation method. With reference to FIG. 2, a detailed description will be given below through specific steps.
  • Step S201 Obtain the coordinates of the point to be interpolated in the sampling space, the side length of the cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space, and the mapping of the four vertices of the tetrahedron surrounding the point to be interpolated value.
  • the four vertices are four of the eight sampling points near the point to be interpolated.
  • FIG. 3 a schematic diagram of six tetrahedral division modes in an embodiment of the present invention is given.
  • the sampling space is an RGB standard three-dimensional space, and a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space is found.
  • RGB is the three-dimensional coordinate axis
  • the hexahedron is divided into 6 different tetrahedrons, which are tetrahedron 1, tetrahedron 2, tetrahedron 3, tetrahedron 4, tetrahedron 5, and Tetrahedron 6. Because the sides of the cube are equal in length and perpendicular to each other, and 6 tetrahedrons are of equal volume.
  • the volume of a tetrahedron is equal to one-sixth of the volume of a cube.
  • the volume of the four sub-tetrahedrons can be calculated by the volume formula of a triangular pyramid, that is, the base area is multiplied by one third of the height.
  • Step S202 According to the coordinates of the point to be interpolated in the sampling space, the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space, the volume of the tetrahedron and the The volume of four sub-tetrahedrons formed by the point to be interpolated and any three vertices in the tetrahedron.
  • FIG. 4 taking the tetrahedron obtained by the fourth division in FIG. 3 as an example, a schematic diagram of a tetrahedron structure in an embodiment of the present invention is given.
  • the tetrahedron ABCD surrounds the point to be interpolated T.
  • the relative coordinates of each point are obtained as follows:
  • the coordinates of point A are A(0,0,0)
  • the coordinates of point B are B(0,0,L)
  • the coordinate of point C is C(0,L,0)
  • the coordinate of point D is D(L,L,0)
  • the coordinate of point T is T(r,g,b)
  • L is The side length of the cube.
  • V is the volume of the tetrahedron ABCD
  • L is the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space, that is, the side length of the cube in FIG. 4.
  • V 1 is the volume of the first subtetrahedron
  • (r, g, b) is the coordinate of the point T to be interpolated in the sampling space
  • S 1 is formed by three vertices on one side of the cube
  • the area of the triangle L is the side length of the cube formed by the eight sampling points near the point to be interpolated in the sampling space
  • V 2 is the volume of the second sub-tetrahedron
  • S 2 is the three
  • V 3 is the volume of the third subtetrahedron
  • S 3 is the area of the triangle formed by the three vertices not on one side of the cube
  • h 3 is the point to be interpolated
  • V 4 is the volume of the fourth sub tetrahedron
  • S 4 is the area of another triangle formed by three vertices not on one side
  • the sub-tetrahedron TACD is the first sub-tetrahedron
  • the sub-tetrahedron TABC is the second sub-tetrahedron
  • the tetrahedron TABD is the third sub-tetrahedron
  • the tetrahedron TBCD is the fourth sub-tetrahedron
  • S 1 is the triangle
  • S 2 is the area of triangle ABC
  • S 3 is the area of triangle ABD
  • S 4 is the area of triangle BCD
  • Step S203 Obtain the interpolation value of the point to be interpolated according to the tetrahedron interpolation theorem formula, the volume of the tetrahedron, the volume of the four sub-tetrahedrons, and the mapping values of the four vertices of the tetrahedron.
  • D is the interpolation value of the point T to be interpolated
  • D A , D B , D C , and D D are the mappings of the four vertices A, B, C, and D of the tetrahedron surrounding the point T to be interpolated.
  • Value, (r, g, b) is the coordinate of the point T to be interpolated in the sampling space
  • L is the side length of the cube formed by the eight nearby sampling points surrounding the point to be interpolated in the sampling space
  • side CD It is parallel to the X axis
  • side CA is parallel to the Y axis
  • side BA is parallel to the Z axis.
  • the first, second, third, fifth, and sixth tetrahedrons shown in Fig. 3 are based on the vertex position of each tetrahedron, and the value of each vertex is substituted into formula (14) to obtain different division methods.
  • the tetrahedral interpolation calculation method does not need to calculate the four-order matrix determinant formed by the homogeneous coordinates of the four tetrahedral vertices for each pixel to calculate the volume of the four sub-tetrahedrons.
  • the four points formed by the point to be interpolated and any three of the vertices can be obtained.
  • the volume of each tetrahedron greatly reduces the calculation amount of tetrahedron interpolation calculation.
  • the embodiment of the present invention provides a tetrahedral interpolation calculation device, including: a first subtractor 501, a second subtractor 502, a third subtractor 503, a first multiplier 511, a second multiplier 512, The third multiplier 513, the first adder 521, the second adder 522, and the third adder 523, wherein:
  • the positive input terminal Switched_data_0[1] is connected to the mapping value of the fourth vertex of the tetrahedron
  • the negative input terminal Switched_data_1[1] is connected to the mapping value of the third vertex of the tetrahedron
  • the output terminal is connected to the The first input terminal of the first multiplier 511;
  • the positive input terminal Switched_data_0[2] is connected to the mapping value of the third vertex of the tetrahedron
  • the negative input terminal Switched_data_1[2] is connected to the mapping value of the first vertex of the tetrahedron
  • the output terminal is connected to the The first input terminal of the second multiplier 512;
  • the positive input terminal Switched_data_0[3] is connected to the mapping value of the second vertex of the tetrahedron
  • the negative input terminal Switched_data_1[3] is connected to the mapping value of the first vertex of the tetrahedron
  • the output terminal is connected to the The first input terminal of the third multiplier 513;
  • the first multiplier 511, the second input terminal Weighting[0] is connected to the X-axis coordinate data of the point to be interpolated in the sampling space, and the output terminal is connected to the first input terminal of the first adder 521;
  • the second multiplier 512, the second input terminal Weighting[1] is connected to the Y-axis coordinate data of the point to be interpolated in the sampling space, and the output terminal is connected to the first input terminal of the second adder 522;
  • the third multiplier 513, the second input terminal Weighting[2] is connected to the Z-axis coordinate data of the point to be interpolated in the sampling space, and the output terminal is connected to the second input terminal of the second adder 522;
  • the first adder 521, the second input terminal Switched_data_0[0] is connected to the mapping value of the first vertex of the tetrahedron, and the output terminal is connected to the first input terminal of the third adder 523;
  • the second adder 522 has an output terminal connected to the second input terminal of the third adder 523;
  • the third adder 523 the output terminal Data_out outputs the interpolation value of the point to be interpolated.
  • the tetrahedron interpolation calculation device provided by the embodiment of the present invention can be used to calculate the interpolation value of the tetrahedron ABCD obtained by the fourth division.
  • Switched_data_0[1], Switched_data_0[2], Switched_data_0[3] input D D , D C , D B , Switched_data_1[1], Switched_data_1[2], Switched_data_1[3] input D C , D A , D A , Weighting[0], Weighting[1], Weighting[2] respectively input the r, g, b in the coordinates (r, g, b) of the point T to be interpolated in the sampling space
  • Switched_data_0[0] input D A Data_out outputs D.
  • L is a preset fixed value, before using the tetrahedral interpolation calculation device for interpol
  • the tetrahedral interpolation calculation device provided by the embodiment of the present invention can calculate the tetrahedral interpolation value D on the basis of three subtractors, three multipliers and three adders, without consuming a lot of The transistor reduces the hardware cost, and because the calculation method is simple, it greatly improves the speed of the tetrahedral interpolation calculation.
  • LCD liquid crystal display
  • the color gamut range of the RGB color space is usually adjusted by independently adjusting the three color channels of RGB, directly reducing or increasing the three components of R, G, and B, that is, using three gains to adjust the gray levels of the three channels .
  • the granularity of this adjustment method is relatively coarse, and the output display result after adjustment is often not ideal, resulting in poor user experience.
  • the embodiment of the present invention also provides a color gamut conversion method.
  • FIG. 6 the following will describe in detail through specific steps.
  • Step S601 Obtain the image to be converted and its color gamut information.
  • Color gamut is a complete subset of colors defined by a three-dimensional volume, and is usually described by a bounded volume in a uniform color space.
  • the red, green, and blue (RGB) color space is a standard color space definition widely used in the computer industry.
  • the current color space in the computer industry follows the definition of RGB color space, for example, pictures created in the sRGB color gamut and videos in the BT.709 format.
  • Step S602 Select the color gamut conversion data corresponding to the color gamut information of the image to be converted in the preset color gamut conversion database.
  • the color gamut conversion database can perform color gamut measurement and calibration according to the wide color gamut screen characteristics and specific color gamut data to obtain at least one type of color gamut conversion data;
  • the color gamut conversion data may include at least one of the following: sRGB color gamut conversion data, DCI-P3 color gamut conversion data, and AdobeRGB color gamut conversion data. It is understandable that the user can select other color gamut conversion data that meets the color gamut conversion needs according to their own needs, and is not limited to the above three common color gamuts, and the present invention will not be repeated here.
  • the color gamut conversion data corresponding to the color gamut information of the image to be converted can be selected by the following methods: address analysis of the color gamut information of the image to be converted; Convert the color gamut conversion data corresponding to the color gamut information of the image.
  • Step S603 According to the color gamut conversion data corresponding to the color gamut information of the image to be converted, any one of the tetrahedral interpolation calculation methods described above is used to perform color gamut conversion on the image to be converted to obtain the corresponding color. Domain conversion image.
  • multimedia content usually adopts sRGB color gamut, while the color gamut of wide color gamut RGB screens is usually larger. Therefore, before the image to be converted is displayed on the wide color gamut RGB screen, the corresponding display data needs to be adjusted to adapt to the color gamut of the wide color gamut RGB screen, so that the color gamut range of the image to be converted in the RGB color space falls In the wide color gamut RGB screen adjusted color gamut range.
  • a data selector can be used to convert the RGB value of each pixel of the image to be converted into an RGB value suitable for the screen.
  • the conversion process can be carried out in the RGB space, and there is no need to convert again in other color spaces.
  • the color gamut conversion speed can be increased to meet the processing speed requirements of various devices.
  • address analysis is performed on the RGB data of a pixel of the image to be converted to find the position of the RGB data in the three-dimensional lookup table , So as to find the address of the four vertices of the smallest tetrahedron surrounding this pixel. Then, the four addresses of the four vertices are decoded by the address decoder, and the three-dimensional look-up table is used again to obtain the data of the four vertices and the weight of each vertex.
  • tetrahedral interpolation calculation is performed to obtain the interpolation data of this pixel.
  • the pixel points of the image to be converted are sequentially calculated to obtain the color gamut conversion image corresponding to the image to be converted.
  • the color gamut conversion data in the color gamut conversion database can be used, and the color gamut can be adjusted flexibly according to the color gamut of the image to be converted under different color gamuts and different screens. , To achieve the purpose of reducing color distortion and accurately displaying multimedia content.
  • the embodiment of the present invention also provides another tetrahedral interpolation calculation device 70, including: a first acquisition unit 701, a first calculation unit 702, and a second calculation unit 703, wherein:
  • the first acquiring unit 701 is configured to acquire the coordinates of the point to be interpolated in the sampling space, the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space, and the four sides surrounding the point to be interpolated The mapped values of the four vertices of the body;
  • the first calculation unit 702 is configured to calculate the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space according to the coordinates of the point to be interpolated in the sampling space The volume of the tetrahedron, the volume of the four sub-tetrahedrons formed by the point to be interpolated and any three vertices in the tetrahedron;
  • the second calculation unit 703 is configured to obtain the to-be-interpolated value according to the tetrahedral interpolation theorem formula, the volume of the tetrahedron, the volume of the four sub-tetrahedrons, and the mapping values of the four vertices of the tetrahedron The interpolation value of the point.
  • the four vertices are four of the eight sampling points.
  • the first calculation unit 702 may be used to determine the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space according to the coordinates of the point to be interpolated in the sampling space ,
  • V is the volume of the tetrahedron
  • L is the sampling space surrounding the waiting
  • the first calculation unit 702 may be configured to calculate the side length of a cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space according to the coordinates of the point to be interpolated in the sampling space Obtain the volume of the four sub-tetrahedrons formed by the point to be interpolated and any three vertices in the tetrahedron, and use the following formula to calculate the volume of the four sub-tetrahedrons formed by the point to be interpolated and any three vertices.
  • V 1 is the volume of the first subtetrahedron
  • S 1 is the area of the triangle formed by three vertices on one side of the cube
  • L is formed by the eight sampling points surrounding the point to be interpolated in the sampling space
  • the side length of the cube, V 2 is the volume of the second sub-tetrahedron, S 2 is the area of the triangle formed by the vertices on the other side of the cube, V 3 is the volume of the third sub-tetrahedron, S 3 Is the area of the triangle formed by three vertices not on one side of the cube
  • the second calculation unit 703 may be used to obtain the mapping values of the four vertices of the tetrahedron according to the tetrahedral interpolation theorem formula, the volume of the tetrahedron, the volume of the four sub-tetrahedrons,
  • mapping value of D (r, g, b) is the coordinates of the point to be interpolated in the sampling space
  • L is the side length of the cube formed by eight nearby sampling points surrounding the point to be interpolated in the sampling space
  • Side CD is parallel to the X axis
  • side CA is parallel to the Y axis
  • side BA is parallel to the Z axis.
  • an embodiment of the present invention also provides a color gamut conversion device 80, which includes: a second acquisition unit 801, a selection unit 802, and a conversion unit 803, wherein:
  • the second acquiring unit 801 is configured to acquire the image to be converted and its color gamut information
  • the selection unit 802 is configured to select the color gamut conversion data corresponding to the color gamut information of the image to be converted in a preset color gamut conversion database;
  • the conversion unit 803 is configured to perform color gamut conversion on the image to be converted by using any one of the above-mentioned tetrahedral interpolation calculation devices according to the color gamut conversion data corresponding to the color gamut information of the image to be converted to obtain The corresponding color gamut conversion image.
  • the color gamut conversion database can be obtained in the following manner: color gamut measurement and calibration are performed according to the characteristics of the wide color gamut screen and specific color gamut data to obtain at least one type of color gamut conversion data; the color gamut conversion data includes the following At least one: sRGB color gamut conversion data, DCI-P3 color gamut conversion data, and AdobeRGB color gamut conversion data.
  • the selection unit 802 may be used to: perform address analysis on the color gamut information of the image to be converted; use a three-dimensional look-up table to find the color gamut conversion data corresponding to the color gamut information of the image to be converted.
  • the conversion unit 803 may also include an address decoder, which is used to calculate the weights of the four vertices of the tetrahedron according to the positions of the points to be interpolated in the tetrahedron.
  • the embodiment of the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium is a non-volatile storage medium or a non-transitory storage medium, and has computer instructions stored thereon.
  • the computer instructions execute the present invention when they run. The steps of any of the tetrahedral interpolation calculation methods provided in the above embodiments.
  • the embodiment of the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium is a non-volatile storage medium or a non-transitory storage medium, and has computer instructions stored thereon.
  • the computer instructions execute the present invention when they run. The steps of any one of the color gamut conversion methods provided in the foregoing embodiments.
  • An embodiment of the present invention also provides a tetrahedral interpolation calculation device, including a memory and a processor.
  • the memory stores computer instructions that can run on the processor.
  • the processor runs the computer instructions, Perform the steps of any of the tetrahedral interpolation calculation methods provided in the foregoing embodiments of the present invention.
  • An embodiment of the present invention also provides a color gamut conversion device, including a memory and a processor, the memory stores computer instructions that can run on the processor, and when the processor runs the computer instructions, it executes The steps of any one of the color gamut conversion methods provided in the foregoing embodiments of the present invention.
  • the program can be stored in any computer-readable storage medium, and the storage medium can include : ROM, RAM, magnetic disk or CD, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Computer Graphics (AREA)
  • Data Mining & Analysis (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

一种四面体插值计算方法及装置、色域转换方法及装置、介质,所述四面体插值计算方法包括:根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积;根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值。采用上述方案,可以快速高效地进行四面体插值计算。

Description

四面体插值计算方法及装置、色域转换方法及装置、介质
本申请要求于2019年4月25日提交中国专利局、申请号为201910339312.8、发明名称为“四面体插值计算方法及装置、色域转换方法及装置、介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明属于图像处理技术领域,特别涉及一种四面体插值计算方法及装置、色域转换方法及装置、介质。
背景技术
对于RGB数据的色域转换过程,可以采用多种插值方式。例如,双三次插值、三棱柱插值、金字塔插值或者四面体插值等,其中,四面体插值方式的精度最高,但是计算量较大。
通常情况下,图像上的每个像素点都需要计算四个四面体顶点齐次坐标构成的四阶矩阵行列式。因此,采用四面体插值方式来进行色域转换的耗时和设备功耗往往不能达到用户要求。
发明内容
本发明实施例解决的是四面体插值计算的复杂度较高技术问题。
为解决上述技术问题,本发明实施例提供一种四面体插值计算方法,包括:获取待插值点在采样空间的坐标、采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长、包围所述待插值点的四面体的四个顶点的映射值;所述四个顶点为所述八个采样点中的四 个;根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积;根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值。
可选的,采用如下公式计算所述四面体的体积:V=L 3/6;其中,V为所述四面体的体积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长。
可选的,采用如下公式分别计算所述待插值点与任意三个所述顶点形成的四个子四面体的体积:V 1=b*S 1/3=b*L 2/6;V 2=r*S 2/3=r*L 2/6;V 3=h 3*S 3/3=(g-r)*L 2/6;V 4=h 4*S 4/3=(L-b-g)*L 2/6;其中,V 1为第一个子四面体的体积,(r,g,b)为所述待插值点在采样空间的坐标,S 1为三个均在所述立方体一面的顶点所形成的三角形的面积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,V 2为第二个子四面体的体积,S 2为三个均在所述立方体另一面的顶点所形成的三角形的面积,V 3为第三个子四面体的体积,S 3为三个不在所述立方体一面的顶点所形成的三角形的面积,h 3为所述待插值点到所述三个不在所述立方体一面的顶点所形成的三角形的距离,
Figure PCTCN2020084384-appb-000001
V 4为第四个子四面体的体积,S 4为三个不在所述立方体一面的顶点所形成的另一三角形的面积,h 4为所述待插值点到所述三个不在所述立方体一面的顶点所形成的另一三角形的距离,
Figure PCTCN2020084384-appb-000002
可选的,采用如下公式计算所述待插值点的插值数值:D=[D AL+(D D-D C)r+(D C-D A)g+(D B-D A)b]/L;其中,D为所述待插值点的插值数值,D A、D B、D C、D D分别为所述包围待插值点的四面体的四个顶点A、B、C、D的映射值,(r,g,b)为所述待插值点在采 样空间的坐标,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,边CD与X轴平行,边CA与Y轴平行,边BA与Z轴平行。
为解决上述技术问题,本发明实施例还公开了一种色域转换方法,包括:获取待转换图像及其色域信息;在预设的色域转换数据库中,选择与所述待转换图像的色域信息对应的色域转换数据;根据所述待转换图像的色域信息对应的色域转换数据,采用上述任一种所述的四面体插值计算方法对所述待转换图像进行色域转换,得到所述对应的色域转换图像。
可选的,所述色域转换数据库采用以下方式得到:根据广色域屏幕特性以及特定色域数据进行色域测量、标定,得到至少一种色域转换数据;所述色域转换数据包括以下至少一种:sRGB色域转换数据、DCI-P3色域转换数据以及AdobeRGB色域转换数据
可选的,所述选择与所述待转换图像的色域信息对应的色域转换数据,包括:对所述待转换图像的色域信息进行地址解析;采用三维查找表查找与所述待转换图像的色域信息对应的色域转换数据。
本发明实施例还公开了一种四面体插值计算装置,包括:第一获取单元,用于获取待插值点在采样空间的坐标、采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长、包围所述待插值点的四面体的四个顶点的映射值;所述四个顶点为所述八个采样点中的四个;第一计算单元,用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积;第二计算单元,用于根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值。
可选的,所述第一计算单元,用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的 立方体的边长,计算得到所述四面体的体积,采用如下公式计算所述四面体的体积:V=L 3/6;其中,V为所述四面体的体积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长。
可选的,所述第一计算单元,用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积,采用如下公式分别计算所述待插值点与任意三个所述顶点形成的四个子四面体的体积:V 1=b*S 1/3=b*L 2/6;V 2=r*S 2/3=r*L 2/6;V 3=h 3*S 3/3=(g-r)*L 2/6;V 4=h 4*S 4/3=(L-b-g)*L 2/6;其中,V 1为第一个子四面体的体积,(r,g,b)为所述待插值点在采样空间的坐标,S 1为三个均在所述立方体一面的顶点所形成的三角形的面积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,V 2为第二个子四面体的体积,S 2为三个均在所述立方体另一面的顶点所形成的三角形的面积,V 3为第三个子四面体的体积,S 3为三个不在所述立方体一面的顶点所形成的三角形的面积,h 3为所述待插值点到所述三个不在所述立方体一面的顶点所形成的三角形的距离,
Figure PCTCN2020084384-appb-000003
V 4为第四个子四面体的体积,S 4为三个不在所述立方体一面的顶点所形成的另一三角形的面积,h 4为所述待插值点到所述三个不在所述立方体一面的顶点所形成的另一三角形的距离,
Figure PCTCN2020084384-appb-000004
可选的,所述第二计算单元,用于根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值,采用如下公式计算所述待插值点的插值数值:D=[D AL+(D D-D C)r+(D C-D A)g+(D B-D A)b]/L;其中,D为所述待插值点的插值数值,D A、D B、D C、D D分别为所述包围待插值点的四面体的四个顶点A、B、C、D的映射值,(r,g,b)为所述待插值点在采样空间的坐标,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,边CD与X轴平行,边 CA与Y轴平行,边BA与Z轴平行。
本发明实施例还公开了一种色域转换装置,包括:第二获取单元,用于获取待转换图像及其色域信息;选择单元,用于在预设的色域转换数据库中,选择与所述待转换图像的色域信息对应的色域转换数据;转换单元,用于根据所述待转换图像的色域信息对应的色域转换数据,采用上述任一项所述的四面体插值计算装置对所述待转换图像进行色域转换,得到所述对应的色域转换图像。
可选的,所述色域转换数据库采用以下方式得到:根据广色域屏幕特性以及特定色域数据进行色域测量、标定,得到至少一种色域转换数据;所述色域转换数据包括以下至少一种:sRGB色域转换数据、DCI-P3色域转换数据以及AdobeRGB色域转换数据。
可选的,所述选择单元,用于:对所述待转换图像的色域信息进行地址解析;采用三维查找表查找与所述待转换图像的色域信息对应的色域转换数据。
本发明实施例还公开了一种四面体插值计算装置,包括:第一减法器、第二减法器、第三减法器、第一乘法器、第二乘法器、第三乘法器、第一加法器、第二加法器以及第三加法器,其中:所述第一减法器,正端输入端接所述四面体第四顶点的映射值,负端输入端接所述四面体第三顶点的映射值,输出端接所述第一乘法器的第一输入端;所述第二减法器,正端输入端接所述四面体第三顶点的映射值,负端输入端接所述四面体第一顶点的映射值,输出端接所述第二乘法器的第一输入端;所述第三减法器,正端输入端接所述四面体第二顶点的映射值,负端输入端接所述四面体第一顶点的映射值,输出端接所述第三乘法器的第一输入端;所述第一乘法器,第二输入端接所述待插值点在采样空间的X轴坐标数据,输出端接所述第一加法器的第一输入端;所述第二乘法器,第二输入端接所述待插值点在采样空间的Y轴坐标数据,输出端接所述第二加法器的第一输入端;所述第三乘法器,第二输入端接所述待插值点在采样空间的Z轴坐标数 据,输出端接所述第二加法器的第二输入端;所述第一加法器,第二输入端接所述四面体第一顶点的映射值,输出端接所述第三加法器的第一输入端;所述第二加法器,输出端接所述第三加法器的第二输入端;所述第三加法器,输出端输出所述待插值点的插值数值。
本发明实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质为非易失性存储介质或非瞬态存储介质,其上存储有计算机指令,所述计算机指令运行时执行上述任一种所述的四面体插值计算方法的步骤。
本发明实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质为非易失性存储介质或非瞬态存储介质,其上存储有计算机指令,所述计算机指令运行时执行上述任一种所述的色域转换方法的步骤。
本发明实施例还提供了一种四面体插值计算装置,包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的计算机指令,所述处理器运行所述计算机指令时执行上述任一种所述的四面体插值计算方法的步骤。
本发明实施例还提供了一种色域转换装置,包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的计算机指令,所述处理器运行所述计算机指令时执行上述任一种所述的色域转换方法的步骤。
与现有技术相比,本发明实施例的技术方案具有以下有益效果:
根据所述待插值点在采样空间的坐标、所述采样空间中附近八个采样点包围待插值点而形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与任意三个所述顶点形成的四个子四面体的体积。不需要对每个像素点都计算四个四面体顶点齐次坐标构成的四阶矩阵行列式来计算四个子四面体的体积,在获得待插值点在采样空间的坐标、所述采样空间中附近八个采样点包围待插值点而形成的立方 体的边长后,就可以得到待插值点与任意三个所述顶点形成的四个子四面体的体积,大大降低了四面体插值计算的计算量。
进一步,在预设的色域转换数据库中,选择与所述待转换图像的色域信息对应的色域转换数据;根据所述待转换图像的色域信息对应的色域转换数据,采用上述任一种所述的四面体插值计算方法进行色域转换,得到所述待转换图像的色域转换图像。根据色域转换数据库中的色域转换数据,可以不同色域、不同屏幕的情况下,灵活地根据待转换图像的色域来进行色域调整。
附图说明
图1是现有的四面体插值模块的示意图;
图2是本发明实施例中的一种四面体插值计算方法的流程图;
图3是本发明实施例中的六种四面体分割方式的示意图;
图4是本发明实施例中的一种四面体结构示意图;
图5是本发明实施例中的一种四面体插值计算装置的结构示意图;
图6是本发明实施例中的一种色域转换方法的流程图;
图7是本发明实施例中的另一种四面体插值计算装置的结构示意图;
图8是本发明实施例中的一种色域转换装置的结构示意图。
具体实施方式
参照图1,给出了现有的四面体插值模块的示意图。
由图1及四面体插值原理可知,首先找到包围待插值点T的四面体的四个顶点A、B、C、D;然后分别计算四面体ABCD、子四面体 TABD、子四面体TBCD、子四面体TABC、子四面体TACD的体积V ABCD、V TABD、V TBCD、V TABC、V TACD,进而得到四个顶点A、B、C、D的权重;最后计算得到待插值点T的数值。
采用如下公式(1)计算待插值点T的数值:
D T=W AD A+W BD B+W CD C+W DD D;   (1)
其中,D T为待插值点T的数值,D A、D B、D C、D D分别为四个顶点A、B、C、D的映射值(四面体插值计算中,四个顶点的映射值通过三维查找表查找得到),W A、W B、W C、W D分别为四个顶点ABCD的权重,W A=V TBCD/V ABCD,W B=V TACD/V ASCD,W C=V TABD/V ABCD,W D=V TABC/V ABCD
如图1所示,T点距离A点越近,子四面体TBCD的体积越大,A点的权重越高,反之则A点的权重越低。
由于子四面体TABD、子四面体TBCD、子四面体TABC、子四面体TACD的体积之和等于四面体ABCD的体积,因此,采用如下公式(2)表示四个顶点A、B、C、D的权重:
W A+W B+W C+W D=1;   (2)
由公式(2)得到如下公式(3)表示待插值点T的数值:
D T=(V TBCDD A+V TACDD B+V TABDD C+V TABCD D)/V ABCD; (3)
对于非规则的四面体,四面体体积正比于四个顶点齐次坐标构成的矩阵行列式的绝对值。因此,采用如下公式(4)、(5)、(6)、(7)、(8)计算子四面体TABD、子四面体TBCD、子四面体TABC、子四面体TACD的体积V ABCD、V TABD、V TBCD、V TABC、V TACD
Figure PCTCN2020084384-appb-000005
Figure PCTCN2020084384-appb-000006
Figure PCTCN2020084384-appb-000007
Figure PCTCN2020084384-appb-000008
Figure PCTCN2020084384-appb-000009
将公式(4)、(5)、(6)、(7)、(8)代入公式(3),得到T点的插值数值。
现有技术中,图像上的每个像素点都需要计算四个四面体顶点齐次坐标构成的四阶矩阵行列式。因此,采用四面体插值方式来进行色域转换的耗时和设备功耗往往不能达到用户要求。
本发明实施例中,根据所述待插值点在采样空间的坐标、所述采样空间中附近八个采样点包围待插值点而形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与任意三个所述顶点形成的四个子四面体的体积。不需要对每个像素点都计算四个四面体顶点齐次坐标构成的四阶矩阵行列式来计算四个子四面体的体积,在获得待插值点在采样空间的坐标、所述采样空间中附近八个采样点包围待插值点而形成的立方体的边长后,就可以得到待插值点与任意三个所述顶 点形成的四个子四面体的体积,大大降低了四面体插值计算的计算量。
为使本发明的上述目的、特征和有益效果能够更为明显易懂,下面结合附图对本发明的具体实施例做详细的说明。
本发明实施例提供了一种四面体插值计算方法,参照图2,以下通过具体步骤进行详细说明。
步骤S201,获取待插值点在采样空间的坐标、采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长、包围所述待插值点的四面体的四个顶点的映射值。
在具体实施中,四个顶点为所述待插值点的附近八个采样点中的四个。
参照图3,给出了本发明实施例中的六种四面体分割方式的示意图。
本发明实施例中,采样空间为RGB标准的三维空间,找到采样空间中包围所述待插值点的附近八个采样点形成的立方体。由图3可知,本发明实施例中以RGB为三维坐标轴,将六面体分割为6种不同的四面体,依次为四面体1、四面体2、四面体3、四面体4、四面体5以及四面体6。由于立方体的各边等长且相互垂直,并且6个四面体等体积。因此,四面体体积等于六分之一的立方体体积。而四个子四面体体积可以通过三棱锥体积公式计算,即底面积乘以高的三分之一。
步骤S202,根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积。
参照图4,以图3中的第4个分割得到的四面体为例,给出了本发明实施例中的一种四面体结构示意图。
由图4可知,四面体ABCD包围待插值点T,根据图中所示的RGB空间坐标轴,得到各点的相对坐标如下:A点坐标为A(0,0,0),B点坐标为B(0,0,L),C点坐标为C(0,L,0),D点坐标为D(L,L,0),T点坐标为T(r,g,b),L为立方体的边长。
在具体实施中,可以采用如下公式(9)计算四面体ABCD的体积:
V=L 3/6;    (9)
其中,V为四面体ABCD的体积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,即图4中立方体的边长。
在具体实施中,可以采用如下公式(10)、(11)、(12)、(13)分别计算待插值点T与任意三个顶点形成的四个子四面体的体积:
V 1=b*S 1/3=b*L 2/6;   (10)
V 2=r*S 2/3=r*L 2/6;   (11)
V 3=h 3*S 3/3=(g-r)*L 2/6;   (12)
V 4=h 4*S 4/3=(L-b-g)*L 2/6;   (13)
其中,V 1为第一个子四面体的体积,(r,g,b)为所述待插值点T在采样空间的坐标,S 1为三个均在所述立方体一面的顶点所形成的三角形的面积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,V 2为第二个子四面体的体积,S 2为三个均在所述立方体另一面的顶点所形成的三角形的面积,V 3为第三个子四面体的体积,S 3为三个不在所述立方体一面的顶点所形成的三角形的面积,h 3为所述待插值点到所述三个不在所述立方体一面的顶点所形成的三角形的距离,
Figure PCTCN2020084384-appb-000010
Figure PCTCN2020084384-appb-000011
V 4为第四个子四面体的体积,S 4为三个不在所述立方体一面的顶点所形成的另一三角形的面积,h 4为所述待插值点到 所述三个不在所述立方体一面的顶点所形成的另一三角形的距离,
Figure PCTCN2020084384-appb-000012
由图3中所分割的6个四面体类型可知,上述四面体及四个子四面体的计算过程可应用于任意一个所分割的四面体及对应的四个子四面体。由此,子四面体TACD为第一个子四面体,子四面体TABC为第二个子四面体,四面体TABD为第三个子四面体,四面体TBCD为第四个子四面体;S 1为三角形ACD的面积,S 2为三角形ABC的面积,S 3为三角形ABD的面积,S 4为三角形BCD的面积
步骤S203,根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值。
在具体实施中,将公式(10)、(11)、(12)、(13)代入公式(3),化简得到如下公式(14)计算待插值点T的插值数值:
D=[D AL+(D D-D C)r+(D C-D A)g+(D B-D A)b]/L;   (14)
其中,D为所述待插值点T的插值数值,D A、D B、D C、D D分别为所述包围待插值点T的四面体的四个顶点A、B、C、D的映射值,(r,g,b)为所述待插值点T在采样空间的坐标,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,边CD与X轴平行,边CA与Y轴平行,边BA与Z轴平行。
在实际应用中,图3中所示出的第1、2、3、5、6个四面体根据每个四面体顶点位置,将各个顶点数值代入公式(14),即可得到不同分割方式的四面体所对应的待插值点T的插值数值。
综上所述,本发明实施例所提供的四面体插值计算方法不需要对每个像素点都计算四个四面体顶点齐次坐标构成的四阶矩阵行列式来计算四个子四面体的体积,在获得待插值点在采样空间的坐标、所述采样空间中附近八个采样点包围待插值点而形成的立方体的边长后,就可以得到待插值点与任意三个所述顶点形成的四个子四面体的 体积,大大降低了四面体插值计算的计算量。
参照图5,本发明实施例提供了一种四面体插值计算装置,包括:第一减法器501、第二减法器502、第三减法器503、第一乘法器511、第二乘法器512、第三乘法器513、第一加法器521、第二加法器522以及第三加法器523,其中:
第一减法器501,正端输入端Switched_data_0[1]接所述四面体第四顶点的映射值,负端输入端Switched_data_1[1]接所述四面体第三顶点的映射值,输出端接所述第一乘法器511的第一输入端;
第二减法器502,正端输入端Switched_data_0[2]接所述四面体第三顶点的映射值,负端输入端Switched_data_1[2]接所述四面体第一顶点的映射值,输出端接所述第二乘法器512的第一输入端;
第三减法器503,正端输入端Switched_data_0[3]接所述四面体第二顶点的映射值,负端输入端Switched_data_1[3]接所述四面体第一顶点的映射值,输出端接所述第三乘法器513的第一输入端;
第一乘法器511,第二输入端Weighting[0]接所述待插值点在采样空间的X轴坐标数据,输出端接所述第一加法器521的第一输入端;
第二乘法器512,第二输入端Weighting[1]接所述待插值点在采样空间的Y轴坐标数据,输出端接所述第二加法器522的第一输入端;
第三乘法器513,第二输入端Weighting[2]接所述待插值点在采样空间的Z轴坐标数据,输出端接所述第二加法器522的第二输入端;
第一加法器521,第二输入端Switched_data_0[0]接所述四面体第一顶点的映射值,输出端接所述第三加法器523的第一输入端;
第二加法器522,输出端接所述第三加法器523的第二输入端;
第三加法器523,输出端Data_out输出所述待插值点的插值数值。
结合图4以及公式(14)可知,本发明实施例提供的四面体插值计算装置可以用于计算第4个分割得到的四面体ABCD的插值数值。其中,Switched_data_0[1]、Switched_data_0[2]、Switched_data_0[3]分别输入D D、D C、D B,Switched_data_1[1]、Switched_data_1[2]、Switched_data_1[3]分别输入D C、D A、D A,Weighting[0]、Weighting[1]、Weighting[2]分别输入待插值点T在采样空间的坐标(r,g,b)中的r、g、b,Switched_data_0[0]输入D A,Data_out输出D。由于L为预设的固定值,因此采用四面体插值计算装置进行插值计算前,根据公式(14)对所有输入数据进行预处理,以得到准确的插值数值D。
在实际应用中,可以通过比较RGB数据之间的大小关系,确认包围待插值点T的四面体属于图3所划分的6种四面体类型的哪一种,再调整向四面体插值装置输入数据的顺序,以适应快速计算插值数值D的要求。
综上所述,采用本发明实施例提供的上述四面体插值计算装置在三个减法器、三个乘法器以及三个加法器的基础上,就可以计算出四面体插值数值D,无需消耗大量晶体管,降低了硬件成本,又由于计算方式简单,大大提高了四面体插值计算的速度。
如今网页浏览、视频播放、图片欣赏、游戏娱乐等多媒体应用据都需要各类屏幕的参与。同时,多媒体内容生成时所使用的色彩空间种类较多,例如目前计算机业界多使用sRGB色域,电影电视行业多使用DCI-P3色域,出版印刷行业多使用AdobeRGB色域。
目前各类设备上使用较多的是液晶显示(Liquid Crystal Display,LCD)屏幕,但是LCD屏幕往往色域较窄,甚至无法100%覆盖sRGB色域,同时还有部分颜色偏色的问题。因此当LCD屏幕显示标准色域内容时,会产生欠饱和和偏色的现象。
另外,近年来逐渐被投入使用的广色域高亮度的OLED屏幕虽然具有高色彩饱和度高亮度的优点,但是很多广色域的屏幕并没有针对原有的sRGB色域进行校准。因此在显示多媒体内容时,屏幕往往会 出现色域不匹配(Mismatch),导致颜色过饱和、偏色等色彩失真的问题,严重影响用户对多媒体内容的浏览。
现有技术中,通常通过独立调节RGB三个色彩通道,直接减少或增加R、G、B三个分量来调整RGB色彩空间的色域范围,即使用三个增益来调整三个通道的灰阶。这种调整方式调整的粒度较粗,调整后的输出显示结果往往不够理想,造成用户体验不佳。
为了解决上述问题,本发明实施例还提供了一种色域转换方法,参照图6,以下通过具体步骤进行详细说明。
步骤S601,获取待转换图像及其色域信息。
色域是使用三维体定义的颜色的一完备子集,通常用均匀颜色空间中的一个有界立体来进行描述。红、绿、蓝(RGB)色彩空间是一种标准的获得计算机业界广泛应用的色彩空间定义。目前计算机行业的色彩空间均遵照RGB色彩空间的定义,例如,在sRGB色域创作的图片以及采用BT.709格式视频。
步骤S602,在预设的色域转换数据库中,选择与所述待转换图像的色域信息对应的色域转换数据。
在具体实施中,色域转换数据库可以根据广色域屏幕特性以及特定色域数据进行色域测量、标定,得到至少一种色域转换数据;所述色域转换数据可以包括以下至少一种:sRGB色域转换数据、DCI-P3色域转换数据以及AdobeRGB色域转换数据。可以理解的是,用户可以根据自身的需求,选择符合色域转换需要的其他色域转换数据,不限于上述三种常用色域,本发明在此不作赘述。
在具体实施中,可以通过以下方式选择与所述待转换图像的色域信息对应的色域转换数据:对所述待转换图像的色域信息进行地址解析;采用三维查找表查找与所述待转换图像的色域信息对应的色域转换数据。
步骤S603,根据所述待转换图像的色域信息对应的色域转换数 据,采用上述任一种所述的四面体插值计算方法对所述待转换图像进行色域转换,得到所述对应的色域转换图像。
在实际应用中,多媒体内容通常采用sRGB色域,而广色域RGB屏幕的色域通常更大。因此,在将待转化图像放在广色域RGB屏幕上进行显示前,需要调整相应的显示数据,以适应广色域RGB屏幕的色域,使RGB色彩空间的待转换影像的色域范围落在广色域RGB屏幕调整后的色域范围之内。
在实际应用中,可以采用数据选择器将待转换图像的每个像素点的RGB数值转换为屏幕适用的RGB数值。转换的过程在RGB空间内即可进行,无需在其他色彩空间中再次转换,可以提高色域转换速度,以满足各类设备对处理速度的要求。
在本发明一实施例中,在确定待转换图像的色域信息对应的色域转换数据后,先对待转换图像的一个像素点的RGB数据进行地址解析,寻找RGB数据在三维查找表中的位置,从而找到包围这个像素点的最小四面体的四个顶点的地址。然后,经过地址解码器解码四个顶点的四个地址,再次采用三维查找表获取四个顶点的数据以及各个顶点的权重。最后,四个顶点的数据经过数据顺序调整期调整后,进行四面体插值计算,得到这个像素的插值数据。对待转换图像的像素点依次计算,得到待转换图像对应的色域转换图像。
采用本发明实施例提出的色域转换方法,可以根据色域转换数据库中的色域转换数据,可以不同色域、不同屏幕的情况下,灵活地根据待转换图像的色域来进行色域调整,达到减少色彩失真、准确显示多媒体内容的目的。
参照图7,本发明实施例还提供了另一种四面体插值计算装置70,包括:第一获取单元701、第一计算单元702以及第二计算单元703,其中:
所述第一获取单元701,用于获取待插值点在采样空间的坐标、 采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长、包围所述待插值点的四面体的四个顶点的映射值;
所述第一计算单元702,用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积;
所述第二计算单元703,用于根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值。
在具体实施中,所述四个顶点为所述八个采样点中的四个。
在具体实施中,所述第一计算单元702可以用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积,采用如下公式计算所述四面体的体积:V=L 3/6;其中,V为所述四面体的体积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长。
在具体实施中,第一计算单元702可以用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积,采用如下公式分别计算所述待插值点与任意三个所述顶点形成的四个子四面体的体积:V 1=b*S 1/3=b*L 2/6;V 2=r*S 2/3=r*L 2/6;V 3=h 3*S 3/3=(g-r)*L 2/6;V 4=h 4*S 4/3=(L-b-g)*L 2/6;其中,V 1为第一个子四面体的体积,(r,g,b)为所述待插值点在采样空间的坐标,S 1为三个均在所述立方体一面的顶点所形成的三角形的面积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,V 2为第二个子四面体的体积,S 2为三个均在所述立方体另一面的顶点所形成的三角形的面积,V 3为第三个子四面体的体积,S 3为三个不在所述立方体一面的顶 点所形成的三角形的面积,h 3为所述待插值点到所述三个不在所述立方体一面的顶点所形成的三角形的距离,
Figure PCTCN2020084384-appb-000013
V 4为第四个子四面体的体积,S 4为三个不在所述立方体一面的顶点所形成的另一三角形的面积,h 4为所述待插值点到所述三个不在所述立方体一面的顶点所形成的另一三角形的距离,
Figure PCTCN2020084384-appb-000014
在具体实施中,第二计算单元703可以用于根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值,采用如下公式计算所述待插值点的插值数值:D=[D AL+(D D-D C)r+(D C-D A)g+(D B-D A)b]/L;其中,D为所述待插值点的插值数值,D A、D B、D C、D D分别为所述包围待插值点的四面体的四个顶点A、B、C、D的映射值,(r,g,b)为所述待插值点在采样空间的坐标,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,边CD与X轴平行,边CA与Y轴平行,边BA与Z轴平行。
参照图8,本发明实施例还提供了一种色域转换装置80,包括:第二获取单元801、选择单元802以及转换单元803,其中:
所述第二获取单元801,用于获取待转换图像及其色域信息;
所述选择单元802,用于在预设的色域转换数据库中,选择与所述待转换图像的色域信息对应的色域转换数据;
所述转换单元803,用于根据所述待转换图像的色域信息对应的色域转换数据,采用上述任一种所述的四面体插值计算装置对所述待转换图像进行色域转换,得到所述对应的色域转换图像。
在具体实施中,色域转换数据库可以采用以下方式得到:根据广色域屏幕特性以及特定色域数据进行色域测量、标定,得到至少一种色域转换数据;所述色域转换数据包括以下至少一种:sRGB色域转 换数据、DCI-P3色域转换数据以及AdobeRGB色域转换数据。
在具体实施中,选择单元802可以用于:对所述待转换图像的色域信息进行地址解析;采用三维查找表查找与所述待转换图像的色域信息对应的色域转换数据。
在实际应用中,转换单元803还可以包括地址解码器,采用地址解码器根据待插值点在四面体中的位置,计算得到四面体四个顶点的权重。
本发明实施例还提供了一种计算机可读存储介质,计算机可读存储介质为非易失性存储介质或非瞬态存储介质,其上存储有计算机指令,所述计算机指令运行时执行本发明上述实施例中提供的任一种所述的四面体插值计算方法的步骤。
本发明实施例还提供了一种计算机可读存储介质,计算机可读存储介质为非易失性存储介质或非瞬态存储介质,其上存储有计算机指令,所述计算机指令运行时执行本发明上述实施例中提供的任一种所述的色域转换方法的步骤。
本发明实施例还提供了一种四面体插值计算装置,包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的计算机指令,所述处理器运行所示计算机指令时,执行本发明上述实施例中提供的任一种所述的四面体插值计算方法的步骤。
本发明实施例还提供了一种色域转换装置,包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的计算机指令,所述处理器运行所示计算机指令时,执行本发明上述实施例中提供的任一种所述的色域转换方法的步骤。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于任一计算机可读存储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。
虽然本发明披露如上,但本发明并非限定于此。任何本领域技术人员,在不脱离本发明的精神和范围内,均可作各种更动与修改,因此本发明的保护范围应当以权利要求所限定的范围为准。

Claims (19)

  1. 一种四面体插值计算方法,其特征在于,包括:
    获取待插值点在采样空间的坐标、采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长、包围所述待插值点的四面体的四个顶点的映射值;所述四个顶点为所述八个采样点中的四个;
    根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积;
    根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值。
  2. 如权利要求1所述的四面体插值计算方法,其特征在于,采用如下公式计算所述四面体的体积:
    V=L 3/6;
    其中,V为所述四面体的体积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长。
  3. 如权利要求1所述的四面体插值计算方法,其特征在于,采用如下公式分别计算所述待插值点与任意三个所述顶点形成的四个子四面体的体积:
    V 1=b*S 1/3=b*L 2/6;
    V 2=r*S 2/3=r*L 2/6;
    V 3=h 3*S 3/3=(g-r)*L 2/6;
    V 4=h 4*S 4/3=(L-b-g)*L 2/6;
    其中,V 1为第一个子四面体的体积,(r,g,b)为所述待插值点在采样空 间的坐标,S 1为三个均在所述立方体一面的顶点所形成的三角形的面积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,V 2为第二个子四面体的体积,S 2为三个均在所述立方体另一面的顶点所形成的三角形的面积,V 3为第三个子四面体的体积,S 3为三个不在所述立方体一面的顶点所形成的三角形的面积,h 3为所述待插值点到所述三个不在所述立方体一面的顶点所形成的三角形的距离,
    Figure PCTCN2020084384-appb-100001
    V 4为第四个子四面体的体积,S 4为三个不在所述立方体一面的顶点所形成的另一三角形的面积,h 4为所述待插值点到所述三个不在所述立方体一面的顶点所形成的另一三角形的距离,
    Figure PCTCN2020084384-appb-100002
  4. 如权利要求1所述的四面体插值计算方法,其特征在于,采用如下公式计算所述待插值点的插值数值:
    D=[D AL+(D D-D C)r+(D C-D A)g+(D B-D A)b]/L;
    其中,D为所述待插值点的插值数值,D A、D B、D C、D D分别为所述包围待插值点的四面体的四个顶点A、B、C、D的映射值,(r,g,b)为所述待插值点在采样空间的坐标,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,边CD与X轴平行,边CA与Y轴平行,边BA与Z轴平行。
  5. 一种色域转换方法,其特征在于,包括:
    获取待转换图像及其色域信息;
    在预设的色域转换数据库中,选择与所述待转换图像的色域信息对应的色域转换数据;
    根据所述待转换图像的色域信息对应的色域转换数据,采用权利要求1至4任一项所述的四面体插值计算方法对所述待转换图像进行色域转换,得到所述对应的色域转换图像。
  6. 如权利要求5所述的色域转换方法,其特征在于,所述色域转换 数据库采用以下方式得到:
    根据广色域屏幕特性以及特定色域数据进行色域测量、标定,得到至少一种色域转换数据;所述色域转换数据包括以下至少一种:sRGB色域转换数据、DCI-P3色域转换数据以及AdobeRGB色域转换数据。
  7. 如权利要求5所述的色域转换方法,其特征在于,所述选择与所述待转换图像的色域信息对应的色域转换数据,包括:
    对所述待转换图像的色域信息进行地址解析;
    采用三维查找表查找与所述待转换图像的色域信息对应的色域转换数据。
  8. 一种四面体插值计算装置,其特征在于,包括:
    第一获取单元,用于获取待插值点在采样空间的坐标、采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长、包围所述待插值点的四面体的四个顶点的映射值;所述四个顶点为所述八个采样点中的四个;
    第一计算单元,用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积、所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积;
    第二计算单元,用于根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述待插值点的插值数值。
  9. 如权利要求8所述的四面体插值计算装置,其特征在于,所述第一计算单元,用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述四面体的体积,采用如下公式计算所述四面体的体积:
    V=L 3/6;
    其中,V为所述四面体的体积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长。
  10. 如权利要求8所述的四面体插值计算装置,其特征在于,所述第一计算单元,用于根据所述待插值点在采样空间的坐标、所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,计算得到所述待插值点与所述四面体中的任意三个顶点形成的四个子四面体的体积,采用如下公式分别计算所述待插值点与任意三个所述顶点形成的四个子四面体的体积:
    V 1=b*S 1/3=b*L 2/6;
    V 2=r*S 2/3=r*L 2/6;
    V 3=h 3*S 3/3=(g-r)*L 2/6;
    V 4=h 4*S 4/3=(L-b-g)*L 2/6;
    其中,V 1为第一个子四面体的体积,(r,g,b)为所述待插值点在采样空间的坐标,S 1为三个均在所述立方体一面的顶点所形成的三角形的面积,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,V 2为第二个子四面体的体积,S 2为三个均在所述立方体另一面的顶点所形成的三角形的面积,V 3为第三个子四面体的体积,S 3为三个不在所述立方体一面的顶点所形成的三角形的面积,h 3为所述待插值点到所述三个不在所述立方体一面的顶点所形成的三角形的距离,
    Figure PCTCN2020084384-appb-100003
    V 4为第四个子四面体的体积,S 4为三个不在所述立方体一面的顶点所形成的另一三角形的面积,h 4为所述待插值点到所述三个不在所述立方体一面的顶点所形成的另一三角形的距离,
    Figure PCTCN2020084384-appb-100004
  11. 如权利要求8所述的四面体插值计算装置,其特征在于,所述第二计算单元,用于根据四面体插值定理公式、所述四面体的体积、所述四个子四面体的体积、所述四面体的四个顶点的映射值,得到所述 待插值点的插值数值,采用如下公式计算所述待插值点的插值数值:D=[D AL+(D D-D C)r+(D C-D A)g+(D B-D A)b]/L;
    其中,D为所述待插值点的插值数值,D A、D B、D C、D D分别为所述包围待插值点的四面体的四个顶点A、B、C、D的映射值,(r,g,b)为所述待插值点在采样空间的坐标,L为所述采样空间中包围所述待插值点的附近八个采样点形成的立方体的边长,边CD与X轴平行,边CA与Y轴平行,边BA与Z轴平行。
  12. 一种色域转换装置,其特征在于,包括:
    第二获取单元,用于获取待转换图像及其色域信息;
    选择单元,用于在预设的色域转换数据库中,选择与所述待转换图像的色域信息对应的色域转换数据;
    转换单元,用于根据所述待转换图像的色域信息对应的色域转换数据,采用权利要求8至11任一项所述的四面体插值计算装置对所述待转换图像进行色域转换,得到所述对应的色域转换图像。
  13. 如权利要求12所述的色域转换装置,其特征在于,所述色域转换数据库采用以下方式得到:
    根据广色域屏幕特性以及特定色域数据进行色域测量、标定,得到至少一种色域转换数据;所述色域转换数据包括以下至少一种:sRGB色域转换数据、DCI-P3色域转换数据以及AdobeRGB色域转换数据。
  14. 如权利要求12所述的色域转换装置,其特征在于,所述选择单元,用于:
    对所述待转换图像的色域信息进行地址解析;
    采用三维查找表查找与所述待转换图像的色域信息对应的色域转换数据。
  15. 一种四面体插值计算装置,其特征在于,包括:第一减法器、第 二减法器、第三减法器、第一乘法器、第二乘法器、第三乘法器、第一加法器、第二加法器以及第三加法器,其中:
    所述第一减法器,正端输入端接所述四面体第四顶点的映射值,负端输入端接所述四面体第三顶点的映射值,输出端接所述第一乘法器的第一输入端;
    所述第二减法器,正端输入端接所述四面体第三顶点的映射值,负端输入端接所述四面体第一顶点的映射值,输出端接所述第二乘法器的第一输入端;
    所述第三减法器,正端输入端接所述四面体第二顶点的映射值,负端输入端接所述四面体第一顶点的映射值,输出端接所述第三乘法器的第一输入端;
    所述第一乘法器,第二输入端接所述待插值点在采样空间的X轴坐标数据,输出端接所述第一加法器的第一输入端;
    所述第二乘法器,第二输入端接所述待插值点在采样空间的Y轴坐标数据,输出端接所述第二加法器的第一输入端;
    所述第三乘法器,第二输入端接所述待插值点在采样空间的Z轴坐标数据,输出端接所述第二加法器的第二输入端;
    所述第一加法器,第二输入端接所述四面体第一顶点的映射值,输出端接所述第三加法器的第一输入端;
    所述第二加法器,输出端接所述第三加法器的第二输入端;
    所述第三加法器,输出端输出所述待插值点的插值数值。
  16. 一种计算机可读存储介质,所述计算机可读存储介质为非易失性存储介质或非瞬态存储介质,其上存储有计算机指令,其特征在于,所述计算机指令运行时执行权利要求1至4中任一项所述的四面体插值计算方法的步骤。
  17. 一种计算机可读存储介质,所述计算机可读存储介质为非易失性 存储介质或非瞬态存储介质,其上存储有计算机指令,其特征在于,所述计算机指令运行时执行权利要求5至7中任一项所述的色域转换方法的步骤。
  18. 一种四面体插值计算装置,包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的计算机指令,其特征在于,所述处理器运行所述计算机指令时执行权利要求1至4中任一项所述的四面体插值计算方法的步骤。
  19. 一种色域转换装置,包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的计算机指令,其特征在于,所述处理器运行所述计算机指令时执行权利要求5至7中任一项所述的色域转换方法的步骤。
PCT/CN2020/084384 2019-04-25 2020-04-13 四面体插值计算方法及装置、色域转换方法及装置、介质 WO2020216085A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20795272.2A EP3961551B1 (en) 2019-04-25 2020-04-13 Gamut conversion method and apparatus, and medium
US17/606,323 US11861791B2 (en) 2019-04-25 2020-04-13 Tetrahedral interpolation calculation method and apparatus, gamut conversion method and apparatus, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910339312.8 2019-04-25
CN201910339312.8A CN111292235A (zh) 2019-04-25 2019-04-25 四面体插值计算方法及装置、色域转换方法及装置、介质

Publications (1)

Publication Number Publication Date
WO2020216085A1 true WO2020216085A1 (zh) 2020-10-29

Family

ID=71025350

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/084384 WO2020216085A1 (zh) 2019-04-25 2020-04-13 四面体插值计算方法及装置、色域转换方法及装置、介质

Country Status (4)

Country Link
US (1) US11861791B2 (zh)
EP (1) EP3961551B1 (zh)
CN (1) CN111292235A (zh)
WO (1) WO2020216085A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770320B (zh) * 2020-07-14 2022-06-21 深圳市洲明科技股份有限公司 一种色彩校正方法和装置、色彩校正设备和存储介质
CN112907721B (zh) * 2021-03-18 2022-06-07 武汉纺织大学 一种色纺纱线原色体系构建方法
CN114998150B (zh) * 2022-06-15 2024-04-30 北京理工大学 超声图像的三维重建方法及装置
WO2024000465A1 (zh) * 2022-06-30 2024-01-04 京东方科技集团股份有限公司 色彩映射表的生成方法、校正方法及装置、介质、设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040109185A1 (en) * 2002-10-22 2004-06-10 Ching-Yu Hung Tetrahedral interpolation
JP2006119883A (ja) * 2004-10-21 2006-05-11 Canon Inc 四面体補間装置および方法
CN101123080A (zh) * 2007-09-14 2008-02-13 北京中视中科光电技术有限公司 一种色域映射实时处理方法及实时处理电路
CN109615666A (zh) * 2018-11-12 2019-04-12 北京中科慧眼科技有限公司 一种三维颜色空间数据转换方法与装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2666523B2 (ja) * 1990-05-16 1997-10-22 松下電器産業株式会社 色変換装置
US5483360A (en) * 1994-06-06 1996-01-09 Xerox Corporation Color printer calibration with blended look up tables
US6466333B2 (en) * 1998-06-26 2002-10-15 Canon Kabushiki Kaisha Streamlined tetrahedral interpolation
JP3664364B2 (ja) * 1998-11-26 2005-06-22 富士通株式会社 色変換方法
JP4194174B2 (ja) * 1999-05-24 2008-12-10 富士通株式会社 色変換装置、色変換方法およびその方法をコンピュータに実行させるプログラムを記録したコンピュータ読み取り可能な記録媒体
US7341323B2 (en) * 2004-02-13 2008-03-11 Seiko Epson Corporation Printing control device, printing control method, and printing control program recording medium
CN100450144C (zh) * 2005-06-17 2009-01-07 诚研科技股份有限公司 可转换不同色域的像素的色彩管理方法
US7557954B2 (en) * 2005-09-29 2009-07-07 Lexmark International, Inc. Fast color interpolation
JP2007267084A (ja) * 2006-03-29 2007-10-11 Seiko Epson Corp 色変換装置およびそれを備えた画像表示装置
US9031319B2 (en) * 2012-05-31 2015-05-12 Apple Inc. Systems and methods for luma sharpening
CN109636912B (zh) * 2018-11-27 2020-06-26 中国地质大学(武汉) 应用于三维声呐图像重构的四面体剖分有限元插值方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040109185A1 (en) * 2002-10-22 2004-06-10 Ching-Yu Hung Tetrahedral interpolation
JP2006119883A (ja) * 2004-10-21 2006-05-11 Canon Inc 四面体補間装置および方法
CN101123080A (zh) * 2007-09-14 2008-02-13 北京中视中科光电技术有限公司 一种色域映射实时处理方法及实时处理电路
CN109615666A (zh) * 2018-11-12 2019-04-12 北京中科慧眼科技有限公司 一种三维颜色空间数据转换方法与装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3961551A4 *

Also Published As

Publication number Publication date
EP3961551A4 (en) 2022-03-02
EP3961551B1 (en) 2024-03-27
US20220319113A1 (en) 2022-10-06
EP3961551A1 (en) 2022-03-02
CN111292235A (zh) 2020-06-16
US11861791B2 (en) 2024-01-02

Similar Documents

Publication Publication Date Title
WO2020216085A1 (zh) 四面体插值计算方法及装置、色域转换方法及装置、介质
CN111429827B (zh) 显示屏色彩校准方法、装置、电子设备及可读存储介质
US10614596B2 (en) Image processing method, electronic device and apparatus having storage function
US9514508B2 (en) Mapping for display emulation based on image characteristics
KR20190055289A (ko) 색역 변환 방법 및 이를 채용한 표시 장치
US11115563B2 (en) Method and apparatus for nonlinear interpolation color conversion using look up tables
CN106782428A (zh) 一种显示装置的色域调整方法及色域调整系统
US20080123944A1 (en) Apparatus and method for color reproduction
KR20150112754A (ko) 색공간들 사이에 변환을 위한 방법
US11900848B2 (en) Color gamut mapping method, color gamut mapping assembly, and display device
CN110277076B (zh) 一种颜色映射方法及装置、显示设备、介质
TWI640976B (zh) 用於顯示裝置的顏色配置之技術
CN108717839B (zh) 一种rgb到rgbw的转换方法、装置及存储介质
CN112929625B (zh) 一种显示素材渲染方法及装置
JP6015359B2 (ja) カラー映像信号処理装置、処理方法及び処理プログラム
JP2018509835A (ja) 適応的カラーグレード補間方法及びデバイス
CN106973277B (zh) 一种rgb格式图像转yuv420格式的方法及装置
CN116092423A (zh) 一种显示面板色彩校正方法及装置
WO2024000473A1 (zh) 色彩校正模型的生成方法、校正方法及装置、介质、设备
WO2021197213A1 (zh) 显示器调色方法及装置、电子设备、存储介质
WO2016169205A1 (zh) 显示方法和显示设备
WO2024000465A1 (zh) 色彩映射表的生成方法、校正方法及装置、介质、设备
CN109685859B (zh) 基于3d查找表的三维颜色自动调整方法
CN117746808A (zh) 显示校准方法、显示面板的校准系统和显示装置
Wu et al. Cross-media color reproduction using the frequency-based spatial gamut mapping algorithm based on human color vision

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20795272

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020795272

Country of ref document: EP

Effective date: 20211125