WO2019071737A1 - 一种图像处理方法、电子设备以及具有存储功能的装置 - Google Patents

一种图像处理方法、电子设备以及具有存储功能的装置 Download PDF

Info

Publication number
WO2019071737A1
WO2019071737A1 PCT/CN2017/112621 CN2017112621W WO2019071737A1 WO 2019071737 A1 WO2019071737 A1 WO 2019071737A1 CN 2017112621 W CN2017112621 W CN 2017112621W WO 2019071737 A1 WO2019071737 A1 WO 2019071737A1
Authority
WO
WIPO (PCT)
Prior art keywords
color gamut
point
gamut point
value
gamut
Prior art date
Application number
PCT/CN2017/112621
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 US15/736,928 priority Critical patent/US10614596B2/en
Publication of WO2019071737A1 publication Critical patent/WO2019071737A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6058Reduction of colour to a range of reproducible colours, e.g. to ink- reproducible colour gamut
    • 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 present invention relates to the field of image processing and display technologies, and in particular, to an image processing method, an electronic device, and a device having a storage function.
  • the display screen serves as a friendly interface for man-machine communication, and can output information accurately, intuitively and clearly.
  • the image quality of the display screen becomes one of the important determinants of consumer purchase.
  • the image quality is determined by parameters such as brightness, color shift, and sharpness. Therefore, evaluating the image quality of the display screen is an important part of the development and design of the display screen. Since the display information of the display screen is directly observed by the human eye, the evaluation criteria are different for different environments and uses. In recent years, with the rapid increase in the number and variety of various display technologies, the demand for display image quality has increased.
  • the color gamut matching method is generally used to map the color point of the source color gamut to the target color gamut to reduce the difference between the color gamut and the target color gamut, thereby achieving high fidelity reproduction of the color point.
  • the inventor of the present application found that the color points outside the target color gamut in the prior art are easily mapped to the target color gamut boundary, resulting in loss of detail level of the image after mapping, blurring the image, and blooming. Noise phenomenon.
  • the technical problem to be solved by the present invention is to provide an image processing method, an electronic device, and a device having a storage function, which can improve the color detail level of the mapped image.
  • a technical solution adopted by the present invention is to provide an electronic device, including: a processor, a communication circuit, and a memory, the processor is coupled to the communication circuit and the memory; the communication circuit is used for the input source The image to be processed of the color gamut; the processor is configured to convert the pixel value in the image to be processed into a coordinate value of the preset color space, and determine, by the coordinate value, whether the first color gamut point in the source color gamut is located in the target color gamut In addition, if yes, the first color gamut point is converted into a second color gamut point in the outer conversion region of the target color gamut; if not, the first color gamut point is converted into the target color gamut according to a preset rule The seventh color gamut point, and lose The image to be processed of the target color gamut; wherein the preset color space is a Lab space, and the coordinate value is an L*a*b* value.
  • another technical solution adopted by the present invention is to provide an image processing method, which includes: inputting a to-be-processed image of a source color gamut; and converting pixel values in the image to be processed into a preset color space. The coordinate value; determining whether the first color gamut point in the source color gamut is outside the target color gamut by the coordinate value; if so, converting the first color gamut point to the second of the outer conversion region in the target color gamut Color gamut points.
  • another technical solution adopted by the present invention is to provide a device having a storage function, wherein the device having the storage function stores program data, and when the program data is executed by the processor, the input source color can be realized.
  • the image to be processed of the domain converting the pixel value in the image to be processed into a coordinate value of the preset color space; determining whether the first color gamut point in the source color gamut is outside the target color gamut by the coordinate value; if yes, The first gamut point is transformed into a second gamut point in the outer transition region of the target gamut.
  • the image processing method comprises: inputting a to-be-processed image of a source gamut; converting pixel values in the image to be processed into a preset color, different from the prior art.
  • the coordinate value of the space determining whether the first color gamut point in the source color gamut is outside the target color gamut by the coordinate value; if so, converting the first color gamut point into the outer side of the conversion region in the target color gamut Two color gamut points.
  • the present invention can convert the first color gamut point outside the target color gamut in the source color gamut to the second color gamut point in the outer conversion region in the target color gamut, thereby avoiding more in the source gamut
  • the gamut points are mapped to the same point of the target gamut, thereby avoiding overlapping mapping, increasing the level of detail of the mapped image, and improving the color of the image to obtain a high definition image.
  • FIG. 1 is a schematic flow chart of an embodiment of an image processing method according to the present invention.
  • step S103 is a schematic flow chart of step S103 of an embodiment of an image processing method according to the present invention.
  • FIG. 3 is a schematic flow chart of another embodiment of an image processing method according to the present invention.
  • FIG. 4 is a schematic diagram of a mapping path of an embodiment of an image processing method according to the present invention.
  • FIG. 5 is a schematic flowchart of step S202 of another embodiment of an image processing method according to the present invention.
  • step S104 of an embodiment of an image processing method according to the present invention
  • FIG. 7 is a schematic flow chart of still another embodiment of an image processing method according to the present invention.
  • FIG. 8 is a schematic structural view of an embodiment of an electronic device according to the present invention.
  • FIG. 9 is a schematic structural view of an embodiment of a device having a storage function according to the present invention.
  • FIG. 1 is a schematic flow chart of an embodiment of an image processing method according to the present invention.
  • the method includes the following steps:
  • S101 Input a to-be-processed image of a source gamut.
  • the source color gamut may be any color gamut.
  • the source gamut may be an sRGB color gamut.
  • the source color gamut may also be other color gamuts, such as the Adobe RGB color gamut, and the desired custom color gamut may be set according to the user's own requirements, which is not limited herein.
  • the image to be processed may be a color image containing one or more pixels.
  • the pixel value in the image to be processed may be a grayscale value of each color sub-pixel corresponding to the pixel point.
  • the pixel value may be a grayscale value of a red R sub-pixel, a green G sub-pixel, and a blue B sub-pixel corresponding to a pixel point, and the pixel value may be collected by using various existing methods. There is no limit here.
  • the pixel values in the image to be processed in the source color gamut can be converted into coordinate values of the preset color space by using various existing methods. For example, a color space conversion model can be established, and pixel value data in the image to be processed is input to In the color space conversion model, the conversion of the color space coordinate values is completed, which is not limited herein.
  • the preset color space can be a user-defined color space. Different electronic devices can set different color spaces, and can also set the same color space. Specifically, in this embodiment, the preset color space may be a CIELUV space, a CIE 1964U*V*W* space, a CIELAB space, a CMYK space, a HIS space, or a LAB space, which is not limited herein.
  • the coordinate value is a plurality of coordinate values in the preset color space for representing the chromaticity of the image.
  • S103 Determine, by the coordinate value, whether the first color gamut point in the source color gamut is outside the target color gamut.
  • the first color gamut point is a pixel point.
  • the target color gamut may be a color gamut outputted by the display of the electronic device.
  • the target color gamut may also be a custom color gamut that is desired according to the user's own needs, which is not limited herein.
  • the source gamut and the target gamut have mutually overlapping overlapping gamuts, and the regions outside the target gamut are regions in the source gamut where the first gamut is located outside the overlapping gamut of the source gamut.
  • whether the first color gamut point is outside the target color gamut is determined by sequentially comparing the coordinate values of the first color gamut point with the coordinate values of the target color gamut boundary. In other embodiments, the determination may also be made by other means, such as whether the coordinate value of the first color gamut point is greater than the coordinate value of the outermost boundary point of the target color gamut.
  • the second color gamut point is a pixel point.
  • the transition color gamut on the outer side of the target color gamut may be an area near the target color gamut boundary in the target color gamut.
  • the first color gamut point when the first color gamut point is outside the target color gamut, the first color gamut point is transformed into a second color gamut point located in the target color gamut by the target color gamut boundary area.
  • the present invention provides an image processing method, which includes: inputting a to-be-processed image of a source color gamut; converting pixel values in the image to be processed into coordinate values of a preset color space; The value determines whether the first gamut point in the source gamut is outside the target gamut; if so, the first gamut point is transformed to a second gamut point in the outer transition region of the target gamut.
  • the present invention can convert the first color gamut point outside the target color gamut in the source color gamut to the second color gamut point in the outer conversion region in the target color gamut, thereby avoiding more in the source gamut
  • the gamut points are mapped to the same point of the target gamut, thereby avoiding overlapping mapping, increasing the level of detail of the mapped image, and improving the color of the image to obtain a high definition image.
  • the preset color space is a Lab space
  • the coordinate value corresponding to the Lab space is an L*a*b* value
  • the color space is defined using the b*, a*, and L* axes in the Lab space.
  • the L* value represents the brightness index
  • b* and a* represent the chromaticity index, where a* represents the red-green axis and b* represents the yellow-blue axis.
  • the source gamut is the sRGB color gamut.
  • the RGB value of the pixel of the image is collected by using a color analyzer, and the corresponding gamma curve is selected according to the parameters of different electronic devices or the user's own needs, according to the selected
  • the gamma curve adjusts the RGB value of the pixel to the RGB optical value.
  • the RGB optical value is a grayscale value of a red R sub-pixel, a green G sub-pixel, and a blue B sub-pixel.
  • Equation 1 The corresponding XYZ tristimulus values are calculated according to Equation 1 using the RGB optical values and the pre-stored TM matrix. Equation 1 is:
  • the TM matrix is a conversion matrix between RGB optical values (red scale values of red R sub-pixels, green G sub-pixels, and blue B sub-pixels) and XYZ tristimulus values.
  • X Indicates the red stimulus amount
  • Y indicates the green stimulus amount
  • Z indicates the blue stimulus amount.
  • the TM matrix is a 3 ⁇ 3 matrix determined by the vertex coordinates of the sRGB color gamut triangle, and each matrix point element in the TM matrix is a constant preset according to an empirical value or a calculated value.
  • the TM matrix is:
  • the XYZ tristimulus value is calculated according to Formula 2 to the L*a*b* value in the corresponding Lab space.
  • Equation 2 Equation 2
  • Xn, Yn, and Zn are constants set according to the maximum luminance value in the color gamut. Specifically, in the present embodiment, when the maximum luminance of the sRGB color gamut is normalized to 100, Xn is 95.047, Yn is 100, and Zn is 108.883.
  • Whether the first gamut point in the source gamut is outside the target gamut is determined by the L*a*b* value of the first gamut point. If the first gamut point is outside the target gamut, the first gamut point is transformed into a second gamut point in the outer transition region of the target gamut.
  • FIG. 2 is a schematic flowchart of step S103 of an embodiment of an image processing method according to the present invention.
  • step S103 includes:
  • Sub-step S1031 Converting the L*a*b* value into an XYZ tristimulus value, and obtaining a corresponding RGB value by a preset rule.
  • the corresponding XYZ tristimulus value is calculated according to the formula 3 by the L*a*b* value.
  • Equation 3 Equation 3
  • a is the a* value of the first gamut point in the Lab space.
  • Xn, Yn, and Zn are constants set according to the maximum luminance value in the color gamut. Specifically, in the present embodiment, when the maximum luminance of the sRGB color gamut is normalized to 100, Xn is 95.047, Yn is 100, and Zn is 108.883.
  • the XYZ tristimulus value is calculated according to a preset rule to calculate a corresponding RGB optical value.
  • Equation 4 is:
  • the TMc matrix is a conversion matrix between the XYZ tristimulus value and the RGB value.
  • the TMc matrix is a 3 ⁇ 3 matrix determined by the color gamut triangle shape outputted by the display of the electronic device. Since the output color gamut is different due to different electronic devices, the TMc matrix cannot be preset according to an empirical value or a calculated value.
  • Sub-step S1032 When the RGB values belong to the set [0, 1], it is determined that the first gamut point in the source gamut is not outside the target gamut.
  • sub-step S1031 calculates that the grayscale value of the red R sub-pixel of the first color gamut point, the grayscale value of the green G sub-pixel, and the grayscale value of the blue B sub-pixel belong to the set [0, 1]
  • the first gamut point in the source gamut is not outside the target gamut.
  • the grayscale value of the red R sub-pixel, the grayscale value of the green G sub-pixel, and the grayscale value of the blue B sub-pixel are 0, 0, and 0, respectively, the first color gamut The point is not outside the target gamut.
  • the first color gamut point is not located. Outside the target gamut.
  • the grayscale value of the red R sub-pixel, the grayscale value of the green G sub-pixel, and the grayscale value of the blue B sub-pixel are merely examples, and are not limited.
  • Sub-step S1033 When at least one of the RGB values does not belong to the set [0, 1], it is determined that the first gamut point in the source gamut is outside the target gamut.
  • the sub-step S1031 calculates that the grayscale value of the red R sub-pixel of the first color gamut point, the grayscale value of the green G sub-pixel, and the grayscale value of the blue B sub-pixel do not belong to the set [0, 1 When the first gamut point in the source gamut is not outside the target gamut.
  • the first color gamut point is not outside the target gamut.
  • the grayscale value of the red R sub-pixel, the grayscale value of the green G sub-pixel, and the grayscale value of the blue B sub-pixel are 2, 0, and 0, respectively.
  • the grayscale value of the red R sub-pixel, the grayscale value of the green G sub-pixel, and the grayscale value of the blue B sub-pixel are 2, 2, and 0, respectively.
  • the grayscale value of the red R sub-pixel, the grayscale value of the green G sub-pixel, and the grayscale value of the blue B sub-pixel are merely examples, and are not limited.
  • the position of the first color gamut point is determined, so that the coordinates of the first color gamut point can be omitted.
  • the operation of the coordinate value of the value and the boundary of the target gamut saves the judgment time and at the same time accurately determines the position of the first gamut point.
  • FIG. 3 is a schematic flowchart of another embodiment of an image processing method according to the present invention
  • FIG. 4 is a schematic diagram of a mapping path in the embodiment of FIG.
  • the method includes the following steps:
  • Step S201 Determine a two-dimensional tone coordinate plane of the first color gamut point in the Lab space according to the L*a*b* value of the first color gamut point.
  • the two-dimensional tone coordinate plane of the Lab space is a coordinate plane with the color brightness L in the LCH color space as the ordinate and the color saturation degree C as the abscissa.
  • the first color gamut point and the brightness axis are planar in the Lab space, and the Lab space three-dimensional space can be converted into a two-dimensional color coordinate plane.
  • the L*a*b* value of the first color gamut point is calculated according to Formula 5, and the corresponding color brightness L, color saturation degree C, and hue angle H are calculated. Equation 5 is:
  • the position of the first color gamut point P is measured by the color luminance L and the color saturation degree C of the first color gamut point P on the two-dimensional tone coordinate plane.
  • Step S202 determining a first constraint line and a second constraint line.
  • the first constraint line I and the second constraint line II may be line segments that constrain the second color gamut point (not labeled) into a certain area. .
  • the first constraint line I and the sRGB color gamut (area QOB) are parallel to the first intersecting line segment OA of the sub-gamut (area QOB) outside the target color gamut (area QOD) and the target color gamut (area QOD).
  • the first constraint line I and the first intersection line segment OA may each be one of a curve and a line segment, which is illustrated in the form of a line segment in FIG. 4 for convenience of understanding.
  • the sRGB color gamut (area QOB), the sub-gamut (area AOB), and the target color gamut (area QOD) may each be an irregular curved surface, and are illustrated in a triangular form in FIG. 4 for convenience of understanding.
  • the second constraint line II is jointly determined by the third color gamut point Lm corresponding to the median maximum brightness on the luminance axis L of the two-dimensional tone coordinate plane and the first color gamut point P.
  • the median maximum brightness may be the median maximum brightness in the source color gamut. In other embodiments, the median maximum brightness may also be the median maximum brightness in the target color gamut. The median maximum brightness in the target color gamut can be the median maximum brightness in the source gamut.
  • the third color gamut point Lm corresponding to the median maximum luminance of the source color gamut on the luminance axis L is known, and the third color gamut point Lm and the first color gamut point P are connected to obtain the line segment PLm.
  • the line segment PLm is extended along the point P to obtain the second constraint line II.
  • Step S203 Acquire a second intersecting line segment formed by the second constraint line intersecting the first constraint line and the first intersecting line segment as a transition region near the outer side in the target color gamut.
  • the second constraint line II intersects with the first constraint line I to form a point Pi
  • the second constraint line II intersects with the first intersecting line segment OA to form a point Pc
  • the connection point Pi and the point Pc obtain a second intersecting line segment PiPc
  • the line segment PiPc is close to the boundary OD of the target color gamut (surface QOD).
  • the second intersecting line segment PiPc serves as a transition region near the outer side in the target color gamut (area QOD).
  • the first constraint line and the second constraint line are established to determine the position of the conversion area.
  • the present embodiment is simple and easy to operate, and the conversion area within the boundary of the target area can be accurately obtained without the calculation of copying, and thus It is further ensured that the first gamut point is not mapped to the boundary of the target area.
  • step S202 includes:
  • the area S of the sub-gamut (area AOB) and the length a of the first intersecting line segment OA can be obtained by various methods in the prior art, which is not limited herein.
  • Sub-step S2022 determining the first constraint line with k as the distance between the first constraint line and the first intersection line segment.
  • the distance k obtained by the sub-step S2021 is a distance, and is a parallel line with a distance k from the first intersecting line segment OA, and the parallel line is the first constraint line I.
  • the calculated k is half of the high length of the surface AOB, thereby ensuring that the position of the first constraint line does not coincide with the boundary of the target area.
  • step S104 includes:
  • Sub-step S1041 Acquire a fourth color gamut point, a fifth color gamut point, and a sixth color gamut point corresponding to the boundary of the first constraint line, the first intersection line segment, and the source color gamut.
  • the second constraint line II intersects the first constraint line I to obtain a fourth color gamut point Pi
  • the second constraint line II intersects the first intersection line segment OA to obtain a fifth color gamut point Pc
  • the second constraint line II and the source The boundary OB of the gamut intersects to obtain a sixth gamut point Ps.
  • Sub-step S1042 Converting the first color gamut point to the second color gamut point in the conversion area by using the first color gamut point, the fourth color gamut point, the fifth color gamut point, and the sixth color gamut point.
  • the first color gamut point P is mapped to the second intersecting line segment PiPc by using coordinate values of the first color gamut point P, the fourth color gamut point Pi, the fifth color gamut point Pc, and the sixth color gamut point Ps. , get the second gamut point.
  • the position of the first color gamut point is further determined by using the positions of the plurality of color gamut points
  • the mapping range saves the calculation steps and ensures that the first gamut points are not mapped on the boundary of the target area.
  • the coordinate values (C 1 , L 1 ) of the first color gamut point P, the coordinate values (C 4 , L 4 ) of the fourth color gamut point Pi, and the fifth are obtained by using the existing method.
  • the coordinate value of the color gamut point Pc (C 5 , L 5 ) and the coordinate value of the sixth color gamut point Ps (C 6 , L 6 ), and the coordinates of the second color gamut point are calculated according to the formula 6 (C 2 , L 2 ) ). Equation 6 is:
  • a 1 is the coordinate value a* of the first color gamut point in the Lab space
  • b 1 is the coordinate value b* of the first color gamut point in the Lab space
  • the second color gamut point hue angle H 2 and the first The hue angle H 1 of the color gamut point P is the same.
  • the pixel values of the second gamut point in the target gamut are obtained.
  • the pixel value in the target color gamut (area QOD) may be a grayscale value of each color sub-pixel corresponding to the second color gamut point.
  • the pixel value is a grayscale value of a red R sub-pixel, a green G sub-pixel, and a blue B sub-pixel corresponding to the second color gamut point.
  • the coordinates (C 2 , L 2 ) of the second color gamut point and the corresponding hue angle H 2 are calculated according to Equation 7 as the L*a*b* value of the second color gamut point.
  • Equation 7 Equation 7
  • a 2 is the coordinate value a* of the second gamut point in the Lab space
  • b 2 is the coordinate value b* of the second gamut point in the Lab space
  • L 2 is the second gamut point in the Lab space The coordinate value L*.
  • Equation 8 The XYZ tristimulus value of the second gamut point is calculated according to Equation 8 by the L*a*b* value of the second gamut point. Equation 8 is:
  • a is the a* value of the second gamut point in the Lab space
  • b is the coordinate value b* of the second gamut point in the Lab space.
  • Xn, Yn, and Zn are constants set according to the maximum brightness value in the color gamut, and are not limited herein.
  • the XYZ tristimulus value is calculated according to Equation 9 to calculate the RGB optical value of the second color gamut point.
  • Equation 9 is:
  • the TM inverse matrix is a conversion matrix between the RGB optical value and the XYZ tristimulus value.
  • the TM inverse matrix is a 3 ⁇ 3 matrix determined by the color gamut triangle shape outputted by the display of the electronic device.
  • the color gamut triangle of the output is different due to different electronic devices, and the TM inverse matrix cannot be preset according to an empirical value or a calculated value. set.
  • the RGB optical value is selected according to the parameters of different electronic devices or the user's own requirements to adjust the corresponding gamma curve to the pixel value in the target color gamut.
  • the pixel value may be a grayscale value of a red R sub-pixel, a green G sub-pixel, and a blue B sub-pixel corresponding to the second color gamut point in the target color gamut.
  • FIG. 7 is a schematic flow chart of still another embodiment of an image processing method according to the present invention.
  • the method includes the following steps:
  • S301 Determine, by the coordinate value, whether the first color gamut point in the source color gamut is outside the target color gamut.
  • step S103 For details, refer to step S103 above, and details are not described herein.
  • the RGB optical value of the seventh color gamut point is calculated according to Equation 10 from the first color gamut point XYZ tristimulus value.
  • Equation 10 is:
  • the TM inverse matrix is a conversion matrix between the RGB optical value and the XYZ tristimulus value.
  • the TM inverse matrix is a 3 ⁇ 3 matrix determined by the color gamut triangle shape outputted by the display of the electronic device.
  • the color gamut triangle of the output is different due to different electronic devices, and the TM inverse matrix cannot be preset according to an empirical value or a calculated value. set.
  • the RGB optical value is selected according to the parameters of different electronic devices or the user's own requirements to adjust the corresponding gamma curve to the pixel value in the target color gamut.
  • the pixel value may be a grayscale value of a red R sub-pixel, a green G sub-pixel, and a blue B sub-pixel corresponding to the seventh color gamut point.
  • the first color gamut point outside the target area is mapped into the target area, the calculation step is saved, and the color image according to the user's demand can be output.
  • FIG. 8 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
  • the electronic device may be an electronic device having an image display function, and the user can process and edit the image through the electronic device, and specifically may be a television, a mobile phone, a notebook computer, a tablet computer, an MP4, or the like.
  • the electronic device 10 includes a processor 11, a communication circuit 12, and a memory 13, wherein the communication circuit 12 can be a display screen.
  • the processor 11 is coupled to the communication circuit 12 and the memory 13.
  • the processor 11, the communication circuit 12 and the memory 13 can jointly perform the steps in the foregoing image processing method embodiment of the present invention, as follows:
  • the communication circuit 12 is configured to input an image to be processed of the source gamut
  • the memory 13 is configured to store an image to be processed of the input source gamut
  • the processor 11 is configured to convert pixel values in the image to be processed into coordinate values of the preset color space
  • the processor 11 is configured to determine, by the coordinate value, whether the first color gamut point in the source color gamut is outside the target color gamut; if yes, convert the first color gamut point into a transition area in the outer side of the target color gamut Two-color field point;
  • the communication circuit 12 is for outputting a to-be-processed image of a target color gamut.
  • the preset color space is Lab space, and the coordinate value is L* x *b* value.
  • the L*a*b* value is converted into the XYZ tristimulus value, and the preset rule is adopted.
  • Corresponding RGB values are obtained; when the RGB values belong to the set [0, 1], it is determined that the first gamut point in the source gamut is not outside the target gamut; at least one of the RGB values does not belong to the set [ 0, 1], it is determined that the first gamut point in the source gamut is outside the target gamut.
  • the processor 11 is configured to determine a two-dimensional tone coordinate plane of the first color gamut point in the Lab space according to the L*a*b* value of the first color gamut point. Specifically, the processor 11 determines a first constraint line and a second constraint line. Wherein, the first constraint line is parallel to the first intersecting line segment of the sub-gamut outside the target color gamut and the target color gamut, and the second constraint line is the median maximum brightness on the brightness axis of the two-dimensional hue coordinate plane Corresponding third color gamut point is determined together with the first color gamut point;
  • the processor 11 is further configured to acquire a second intersecting line segment formed by the second constraint line intersecting the first constraint line and the first intersecting line segment as a transition region near the outer side in the target color gamut.
  • the processor 11 determines the first constraint line by using the k value as the distance between the first constraint line and the first intersection line segment.
  • the processor 11 obtains a fourth color gamut point, a fifth color gamut point, and a sixth corresponding to the boundary of the first constraint line, the first intersection line segment, and the source color gamut by the second constraint line.
  • Color gamut point a fourth color gamut point, a fifth color gamut point, and a sixth corresponding to the boundary of the first constraint line, the first intersection line segment, and the source color gamut by the second constraint line.
  • the processor 11 converts the first color gamut point into a second color gamut point in the conversion area by using the first color gamut point, the fourth color gamut point, the fifth color gamut point, and the sixth color gamut point.
  • the processor 11 is further configured to acquire coordinate values of the first color gamut point, the fourth color gamut point, the fifth color gamut point, and the sixth color gamut point on the two-dimensional color coordinate plane, respectively Is (C 1 , L 1 ), (C 4 , L 4 ), (C 5 , L 5 ), (C 6 , L 6 ), and the coordinates of the second color gamut point (C 2 , L 2 ) are obtained. ;
  • the second gamut point has the same hue angle as the first gamut point:
  • the processor 11 obtains the pixel value of the second color gamut point in the target color gamut according to the coordinates (C 2 , L 2 ) of the second color gamut point and the corresponding hue angle H 2 .
  • the processor 11 converts the first color gamut point into a target according to a preset rule in the memory 13. a seventh color gamut point in the gamut;
  • the communication circuit 12 is configured to output a to-be-processed image of a target color gamut
  • the memory 13 is used to store an image to be processed of the input source gamut.
  • FIG. 9 is a schematic structural diagram of an embodiment of a device having a storage function according to the present invention.
  • the device 40 having the storage function stores program data 41, which can be executed to implement the steps in the embodiment of the image processing method of the present invention.
  • program data 41 can be executed to implement the steps in the embodiment of the image processing method of the present invention.
  • the device 40 having the storage function may be at least one of a server, a floppy disk drive, a hard disk drive, a CD-ROM reader, a magneto-optical disk reader, a CPU (for a RAM), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Color Image Communication Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了一种图像处理方法、电子设备以及具有存储功能的装置,该方法包括:输入源色域的待处理图像;将待处理图像内的像素值转换为预设色彩空间的坐标值;通过坐标值确定源色域中的第一色域点是否位于目标色域之外;若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点。通过上述方式,本发明能够增加图像在不同色域映射后的细节层次。

Description

一种图像处理方法、电子设备以及具有存储功能的装置 【技术领域】
本发明涉及图像处理和显示技术领域,特别是涉及一种图像处理方法、电子设备以及具有存储功能的装置。
【背景技术】
显示屏作为友好的人机交流信息的界面,可以准确、直观、清晰地输出信息。显示屏作为一款电子产品销售时,显示屏图像质量成为消费者购买的重要决定因素之一,图像质量由亮度、色偏、清晰度等相关参数决定。因此,评价显示屏图像质量是显示屏开发与设计需要考虑的重要内容。由于显示屏的显示信息直接通过人眼观察得到,对于不同的环境与用途,其评价标准是不同的。近年来,随着各种显示技术的数量和多样性的快速增加,人们对显示屏图像质量的要求与日俱增。
现有技术中,通常采用色域匹配方法将源色域的色点映射至目标色域.以减小色点在源色域和目标色域的差别,从而实现色点的高保真再现。然而,本申请的发明人在长期的研发过程中,发现现有技术中目标色域外的色点容易映射到目标色域边界,导致映射后的图像损失细节层次,使图像模糊,并出现光晕噪声现象。
【发明内容】
本发明主要解决的技术问题是提供一种图像处理方法、电子设备以及具有存储功能的装置,能够提升映射后的图像颜色细节层次。
为解决上述技术问题,本发明采用的一个技术方案是:提供一种电子设备,该电子设备包括:处理器、通信电路及存储器,处理器耦接通信电路及存储器;该通信电路用于输入源色域的待处理图像;该处理器用于将待处理图像内的像素值转换为预设色彩空间的坐标值,并通过坐标值确定源色域中的第一色域点是否位于目标色域之外,若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点;若不是,则根据预设规则,将第一色域点转变为目标色域中的第七色域点,并输 出目标色域的待处理图像;其中,所述预设色彩空间为Lab空间,坐标值为L*a*b*值。
为解决上述技术问题,本发明采用的另一个技术方案是:提供一种图像处理方法,该方法包括:输入源色域的待处理图像;将待处理图像内的像素值转换为预设色彩空间的坐标值;通过坐标值确定源色域中的第一色域点是否位于目标色域之外;若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点。
为解决上述技术问题,本发明采用的又一个技术方案是:提供一种具有存储功能的装置,该具有存储功能的装置上存储有程序数据,程序数据被处理器执行时能够实现:输入源色域的待处理图像;将待处理图像内的像素值转换为预设色彩空间的坐标值;通过坐标值确定源色域中的第一色域点是否位于目标色域之外;若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点。
本发明的有益效果是:区别于现有技术的情况,本发明提供一种图像处理方法,该方法包括:输入源色域的待处理图像;将待处理图像内的像素值转换为预设色彩空间的坐标值;通过坐标值确定源色域中的第一色域点是否位于目标色域之外;若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点。通过上述方法,本发明能够将源色域中位于目标色域之外的第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点,能避免源色域中多个色域点映射到目标色域的同一点,进而避免重叠映射,增加了映射后的图像的细节层次,并改善图像色彩,得到高清晰度的图像。
【附图说明】
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。其中:
图1是本发明一种图像处理方法一实施方式的流程示意图;
图2是本发明一种图像处理方法一实施方式步骤S103的流程示意图;
图3是本发明一种图像处理方法另一实施方式的流程示意图;
图4是本发明一种图像处理方法一实施方式的映射路径示意图;
图5是本发明一种图像处理方法另一实施方式步骤S202的流程示意图;
图6是本发明一种图像处理方法一实施方式步骤S104的流程示意图;
图7是本发明一种图像处理方法又一实施方式的流程示意图;
图8是本发明一种电子设备一实施方式的结构示意图;
图9是本发明一种具有存储功能的装置一实施方式的结构示意图。
【具体实施方式】
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性的劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参阅图1,图1是本发明一种图像处理方法一实施方式的流程示意图。在本实施方式中,该方法包括以下步骤:
S101:输入源色域的待处理图像。
其中,在本实施方式中,源色域可以为任意色域。具体地,源色域可以为sRGB色域。在其他实施方式中,源色域也可以为其他色域,如Adobe RGB色域、根据用户自身需求设定想要的自定义色域,在此不做限定。
其中,待处理图像可以为包含一个或多个像素点的色彩图像。
S102:将待处理图像内的像素值转换为预设色彩空间的坐标值。
其中,待处理图像内的像素值可以为像素点对应的各颜色子像素的灰阶值。具体地,在本实施方式中,像素值可以为像素点对应的红色R子像素、绿色G子像素、蓝色B子像素的灰阶值,该像素值可以利用现有的各种方法采集,在此不做限定。
可以利用现有的各种方法将源色域中待处理图像内的像素值转换为预设色彩空间的坐标值,例如,可以建立色彩空间转换模型,将待处理图像内的像素值数据输入到色彩空间转换模型中,完成色彩空间坐标值的转换,在此不做限定。
其中,预设色彩空间可以为用户自定义设置的色彩空间。不同电子设备可以设置不同的色彩空间,也可以设置相同的色彩空间。具体地,在本实施方式中,预设色彩空间可以为CIELUV空间、CIE 1964U*V*W*空间、CIELAB空间、CMYK空间、HIS空间、或LAB空间,在此不做限定。
其中,坐标值为预设色彩空间中的多个用以表示图像色度的坐标值。
S103:通过坐标值确定源色域中的第一色域点是否位于目标色域之外。
其中,第一色域点为像素点。
其中,在本实施方式中,目标色域可以为电子设备的显示器输出的色域。在其他实施方式中,目标色域也可以为根据用户自身需求设定想要的自定义色域,在此不做限定。
源色域与目标色域有相互重叠的重叠色域,目标色域之外的区域为源色域中的第一色域点位于源色域除重叠区域之外的区域。在本实施方式中,可以利用现有的各种方法和装置判断源色域中的第一色域点是否位于目标色域之外,在此不做限定。
在一个具体实施方式中,通过将第一色域点的坐标值与目标色域边界的坐标值依次进行比对,来判断第一色域点是否在目标色域之外。在其他实施方式中,还可以通过其他方式进行判断,例如第一色域点的坐标值是否大于目标色域最外边界点的坐标值。
S104:若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点。
其中,第二色域点为像素点。
其中,目标色域中靠外侧的转换色域可以为该目标色域中靠近目标色域边界的区域。
具体地,在本实施方式中,当第一色域点位于目标色域之外时,将该第一色域点变换为位于目标色域中靠目标色域边界区域的第二色域点。
区别于现有技术的情况,本发明提供一种图像处理方法,该方法包括:输入源色域的待处理图像;将待处理图像内的像素值转换为预设色彩空间的坐标值;通过坐标值确定源色域中的第一色域点是否位于目标色域之外;若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点。通过上述方法,本发明能够将源色域中位于目标色域之外的第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点,能避免源色域中多个色域点映射到目标色域的同一点,进而避免重叠映射,增加了映射后的图像的细节层次,并改善图像色彩,得到高清晰度的图像。
其中,在一实施方式中,预设色彩空间为Lab空间,对应Lab空间的坐标值为L*a*b*值。
具体地,在Lab空间中使用b*、a*和L*坐标轴定义色彩空间。其中,L*值代表明度指数,b*和a*代表色度指数,其中a*代表红-绿轴,b*代表黄-蓝轴。
下面以一应用场景对上述实施方式进行举例:
源色域为sRGB色域,输入sRGB色域中的图像后,使用色彩分析仪采集该图像像素点的RGB值,根据不同电子设备的参数或者用户自身需求选择对应的伽马曲线,根据所选择的伽马曲线,将像素点的RGB值调整为RGB光学值。其中,RGB光学值为红色R子像素、绿色G子像素、蓝色B子像素的灰阶值。
将RGB光学值和预先存储的TM矩阵按照公式1计算出对应的XYZ三刺激值。公式1为:
X     R
Y=TMs×G
Z     B
其中,TM矩阵为RGB光学值(红色R子像素、绿色G子像素、蓝色B子像素的灰阶值)与XYZ三刺激值之间的转换矩阵。这里,X 表示红色刺激量、Y表示绿色刺激量、Z表示蓝色刺激量。具体地,TM矩阵为由sRGB色域三角形的顶点坐标决定的3×3矩阵,TM矩阵中的各矩阵点元素为根据经验值或计算值预先设定的常数。具体地,在本实施方式中,TM矩阵为:
Figure PCTCN2017112621-appb-000001
将XYZ三刺激值按照公式2计算出对应的Lab空间中的L*a*b*值。
公式2为:
Figure PCTCN2017112621-appb-000002
Figure PCTCN2017112621-appb-000003
Figure PCTCN2017112621-appb-000004
Figure PCTCN2017112621-appb-000005
其中,Xn、Yn、Zn为根据色域中的最大亮度值设定的常数。具体地,在本实施方式中,当sRGB色域的最大亮度归一化为100时,Xn为95.047,Yn为100,Zn为108.883。
通过第一色域点的L*a*b*值确定源色域中的第一色域点是否位于目标色域之外。若第一色域点是否位于目标色域之外,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点。
请参阅图2,图2是本发明一种图像处理方法一实施方式步骤S103的流程示意图。在一实施方式中,步骤S103包括:
子步骤S1031:将L*a*b*值转化为XYZ三刺激值,并经预设规则得出对应的RGB值。
其中,将L*a*b*值根据公式3计算出对应的XYZ三刺激值。
公式3为:
Figure PCTCN2017112621-appb-000006
Figure PCTCN2017112621-appb-000007
Figure PCTCN2017112621-appb-000008
Figure PCTCN2017112621-appb-000009
其中,a为第一色域点在Lab空间中的a*值。Xn、Yn、Zn为根据色域中的最大亮度值设定的常数。具体地,在本实施方式中,当sRGB色域的最大亮度归一化为100时,Xn为95.047,Yn为100,Zn为108.883。
将该XYZ三刺激值按照预设规则计算出对应的RGB光学值。
该预设规则可以为公式4。公式4为:
R     X
G=TMc-1*Y
B    Z
其中,TMc矩阵为XYZ三刺激值与RGB值之间的转换矩阵。具体地,TMc矩阵为由电子设备的显示器输出的色域三角形形状决定的3×3矩阵,由于电子设备不同,其输出的色域三角形不同,TMc矩阵不能根据经验值或计算值预先设定。
子步骤S1032:在RGB值均属于集合[0,1]时,确定源色域中的第一色域点不位于目标色域之外。
其中,当子步骤S1031计算出第一色域点的红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值均属于集合[0,1]时,源色域中的第一色域点不位于目标色域之外。具体地,在本实施方式中,当红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值分别为0、0、0时,第一色域点不位于目标色域之外。在其他实施方式中,当红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值分别为1、1、1时,第一色域点不位于目标色域之外。 需要说明的是,这里的红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值仅为举例,并非限制。
子步骤S1033:在RGB值中的至少一个不属于集合[0,1]时,确定源色域中的第一色域点位于目标色域之外。
其中,当子步骤S1031计算出第一色域点的红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值至少一个不属于集合[0,1]时,源色域中的第一色域点不位于目标色域之外。
具体地,在本实施方式中,当红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值分别为2、0、0时,第一色域点不位于目标色域之外。在其他实施方式中,当红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值分别为2、2、0时,第一色域点不位于目标色域之外。需要说明的是,这里的红色R子像素的灰阶值、绿色G子像素的灰阶值、蓝色B子像素的灰阶值仅为举例,并非限制。
通过本实施方式,将第一色域点的L*a*b*值换算RGB值后,再进行判断第一色域点的位置,这样能够省去一一比对第一色域点的坐标值与目标色域边界的坐标值的操作,节省了判断时间,同时又能够准确判断第一色域点的位置。
请参阅图3和图4,图3是本发明一种图像处理方法另一实施方式的流程示意图,图4是图3实施方式中的映射路径示意图。在本实施方式中,该方法包括以下步骤:
步骤S201:根据第一色域点的L*a*b*值,确定第一色域点在Lab空间的二维色调坐标平面。
其中,Lab空间的二维色调坐标平面为以LCH色彩空间中的色彩亮度L为纵坐标,以色彩饱和程度C为横坐标的坐标平面。具体地,在Lab空间中过第一色域点和亮度轴作平面,可将Lab空间三维空间转化为二维色调坐标平面。将第一色域点的L*a*b*值按照公式5计算出对应的色彩亮度L、色彩饱和程度C、色调角H。公式5为:
Figure PCTCN2017112621-appb-000010
Figure PCTCN2017112621-appb-000011
L=L*
在二维色调坐标平面上通过第一色域点P的色彩亮度L、色彩饱和程度C来度量第一色域点P的位置。
步骤S202:确定第一约束线、第二约束线。
其中,第一约束线I、第二约束线II可以为将第二色域点(未标示)约束到一定区域中的线段。。
其中,第一约束线I与sRGB色域(面QOB)位于目标色域(面QOD)之外的子色域(面AOB)和目标色域(面QOD)的第一相交线段OA平行。第一约束线I、第一相交线段OA均可以为曲线、线段中的一种,为了方便理解,在图4中以线段形式示意。sRGB色域(面QOB)、子色域(面AOB)和目标色域(面QOD)均可以为不规则曲面,为了方便理解,在图4中以三角形形式示意。
其中,第二约束线II由二维色调坐标平面的亮度轴L上的最大亮度中值对应的第三色域点Lm与第一色域点P共同确定。
其中,在本实施方式中,最大亮度中值可以为源色域中的最大亮度中值。在其他实施方式中,最大亮度中值也可以为目标色域中的最大亮度中值。目标色域中的最大亮度中值可以为源色域中的最大亮度中值。
具体地,在本实施方式中,已知亮度轴L上的源色域的最大亮度中值对应的第三色域点Lm,连接第三色域点Lm与第一色域点P得到线段PLm,将线段PLm沿点P延长得到第二约束线II。
步骤S203:获取第二约束线与第一约束线、第一相交线段相交所形成的第二相交线段,作为目标色域中靠近外侧的转换区域。
其中,第二约束线II与第一约束线I相交形成点Pi,第二约束线II与第一相交线段OA相交形成点Pc,连接点Pi与点Pc得到第二相交线段PiPc,第二相交线段PiPc靠近目标色域(面QOD)的边界OD。第二相交线段PiPc作为目标色域(面QOD)中靠近外侧的转换区域。
通过本实施方式,建立了第一约束线与第二约束线,从而确定转换区域的位置,本实施方式简单易操作,不需要复制的计算就能准确得到目标区域边界以内的转换区域,进而更进一步地保证了第一色域点不会映射到目标区域的边界上。
参阅图4和图5,图5是图2是本发明一种图像处理方法另一实施方式步骤S202的流程示意图。在一实施方式中,步骤S202包括:
子步骤S2021:获取子色域的面积S,以及第一相交线段的长度a,并得出k=S/a。
其中,可以利用现有的各种方法获取子色域(面AOB)的面积S和第一相交线段OA的长度a,在此不做限定。
子步骤S2022:以k作为第一约束线与第一相交线段之间的距离,确定第一约束线。
具体地,以子步骤S2021求得的k为距离,作与第一相交线段OA距离k的平行线,该平行线为第一约束线I。
通过本实施方式,计算得到的k为面AOB的高的长度的一半,进而保证了第一约束线的位置不会与目标区域的边界重合。
参阅图4和图6,图6是本发明一种图像处理方法一实施方式步骤S104的流程示意图。在本实施方式中,步骤S104包括:
子步骤S1041:获取第二约束线与第一约束线、第一相交线段、源色域的边界所对应的第四色域点、第五色域点、第六色域点。
具体地,第二约束线II与第一约束线I相交得到第四色域点Pi,第二约束线II与第一相交线段OA相交得到第五色域点Pc,第二约束线II与源色域的边界OB相交得到第六色域点Ps。
子步骤S1042:利用第一色域点、第四色域点、第五色域点、第六色域点,将第一色域点变换为转换区域中的第二色域点。
具体地,利用第一色域点P、第四色域点Pi、第五色域点Pc、第六色域点Ps的坐标值,将第一色域点P映射到第二相交线段PiPc上,得到第二色域点。
通过本实施方式,利用多个色域点的位置进一步确定第一色域点的 映射范围,这样既节省了计算步骤,也能够保证第一色域点不会映射在目标区域的边界上。
其中,在一实施方式中,利用现有的方法获取第一色域点P的坐标值(C1,L1)、第四色域点Pi的坐标值(C4,L4)、第五色域点Pc的坐标值(C5,L5)、第六色域点Ps的坐标值(C6,L6),按照公式6计算得到第二色域点的坐标(C2,L2)。公式6为:
Figure PCTCN2017112621-appb-000012
Figure PCTCN2017112621-appb-000013
Figure PCTCN2017112621-appb-000014
Figure PCTCN2017112621-appb-000015
其中,a1为第一色域点在Lab空间中的坐标值a*,b1为第一色域点在Lab空间中的坐标值b*,第二色域点色调角H2与第一色域点P的色调角H1相同。
根据第二色域点的坐标(C2,L2)及对应的色调角H2,得出第二色域点在目标色域(面QOD)中的像素值。其中,目标色域(面QOD)中的像素值可以为第二色域点对应的各颜色子像素的灰阶值。具体地,在本实施方式中,像素值为第二色域点对应的红色R子像素、绿色G子像素、蓝色B子像素的灰阶值。
具体地,在本实施方式中,将第二色域点的坐标(C2,L2)及对应的色调角H2按照公式7计算出第二色域点的L*a*b*值。
公式7为:
Figure PCTCN2017112621-appb-000016
Figure PCTCN2017112621-appb-000017
其中,a2为第二色域点在Lab空间中的坐标值a*,b2为第二色域点在Lab空间中的坐标值b*,L2为第二色域点在Lab空间中的坐标值L*。
将第二色域点的L*a*b*值按照公式8计算出第二色域点的XYZ三刺激值。公式8为:
Figure PCTCN2017112621-appb-000018
Figure PCTCN2017112621-appb-000019
Figure PCTCN2017112621-appb-000020
Figure PCTCN2017112621-appb-000021
其中,a为第二色域点在Lab空间中的a*值,b为第二色域点在Lab空间中的坐标值b*。Xn、Yn、Zn为根据色域中的最大亮度值设定的常数,在此不做限定。
将该XYZ三刺激值按照公式9计算出第二色域点的RGB光学值。
公式9为:
R    X
G=TM-1*Y
B    Z
其中,TM逆矩阵为RGB光学值与XYZ三刺激值之间的转换矩阵。具体地,TM逆矩阵为由电子设备的显示器输出的色域三角形形状决定的3×3矩阵,由于电子设备不同,其输出的色域三角形不同,TM逆矩阵不能根据经验值或计算值预先设定。
将该RGB光学值根据不同电子设备的参数或者用户自身需求选择对应的伽马曲线,调整为目标色域中像素值。其中,具体地,在本实施方式中,像素值可以目标色域中第二色域点对应的红色R子像素、绿色G子像素、蓝色B子像素的灰阶值。
参阅图7,图7是本发明一种图像处理方法又一实施方式的流程示意图。在本实施方式中,该方法包括以下步骤:
S301:通过坐标值确定源色域中的第一色域点是否位于目标色域之外。
具体内容可参见上述步骤S103,在此不作赘述。
S302:若不是,则根据预设规则,将第一色域点转变为目标色域中的第七色域点。
具体地,在本实施方式中,将第一色域点XYZ三刺激值按照公式10计算出第七色域点的RGB光学值。
公式10为:
R    X
G=TM-1*Y
B    Z
其中,TM逆矩阵为RGB光学值与XYZ三刺激值之间的转换矩阵。具体地,TM逆矩阵为由电子设备的显示器输出的色域三角形形状决定的3×3矩阵,由于电子设备不同,其输出的色域三角形不同,TM逆矩阵不能根据经验值或计算值预先设定。
将该RGB光学值根据不同电子设备的参数或者用户自身需求选择对应的伽马曲线,调整为目标色域中像素值。其中,具体地,在本实施方式中,像素值可以为第七色域点对应的红色R子像素、绿色G子像素、蓝色B子像素的灰阶值。
S303:输出目标色域的待处理图像。
通过本实施方式,将在目标区域之外的第一色域点映射到目标区域内,节省了计算步骤,并能输出根据用户需求的色彩图像。
参阅图8,图8是本发明一种电子设备一实施方式的结构示意图。其中,电子设备可以是具有图像显示功能,且用户能够通过该电子设备对图像进行处理编辑操作的电子设备,具体可以是电视机、手机、笔记本电脑、平板电脑、MP4等。该电子设备10包括:处理器11、通信电路12及存储器13,其中,通信电路12可以为显示屏。处理器11耦接通信电路12及存储器13,处理器11、通信电路12及存储器13能够共同执行上述本发明图像处理方法实施方式中的步骤,具体如下:
通信电路12用于输入源色域的待处理图像;
存储器13用于存储输入源色域的待处理图像;
处理器11用于将待处理图像内的像素值转换为预设色彩空间的坐标值;
处理器11用于通过坐标值确定源色域中的第一色域点是否位于目标色域之外;若是,则将第一色域点变换为目标色域中靠外侧的转换区域中的第二色域点;
通信电路12用于输出目标色域的待处理图像。
其中,预设色彩空间为Lab空间,坐标值为L*x*b*值。
其中,在一实施方式中,处理器11确认源色域中的第一色域点位于目标色域之外后,将L*a*b*值转化为XYZ三刺激值,并经预设规则得出对应的RGB值;在RGB值均属于集合[0,1]时,确定源色域中的第一色域点不位于目标色域之外;在RGB值中的至少一个不属于集合[0,1]时,确定源色域中的第一色域点位于目标色域之外。
其中,在一实施方式中,处理器11用于根据第一色域点的L*a*b*值,确定第一色域点在Lab空间的二维色调坐标平面。具体地,处理器11确定第一约束线、第二约束线。其中,第一约束线与源色域位于目标色域之外的子色域和目标色域的第一相交线段平行,第二约束线由二维色调坐标平面的亮度轴上的最大亮度中值对应的第三色域点与第一色域点共同确定;
处理器11还用于获取第二约束线与第一约束线、第一相交线段相交所形成的第二相交线段,作为目标色域中靠近外侧的转换区域。
其中,在一实施方式中,处理器11用于获取子色域的面积S,以及第一相交线段的长度a,并得出k=S/a;
处理器11以k值作为第一约束线与第一相交线段之间的距离,确定第一约束线。
其中,在一实施方式中,处理器11通过获取第二约束线与第一约束线、第一相交线段、源色域的边界所对应的第四色域点、第五色域点、第六色域点;
处理器11通过利用第一色域点、第四色域点、第五色域点、第六色域点,将第一色域点变换为转换区域中的第二色域点。
其中,在一实施方式中,处理器11还用于获取第一色域点、第四色域点、第五色域点、第六色域点在二维色调坐标平面上的坐标值,分 别为(C1,L1),(C4,L4),(C5,L5),(C6,L6),并得出第二色域点的坐标(C2,L2);
其中,
Figure PCTCN2017112621-appb-000022
第二色域点与第一色域点的色调角相同:
Figure PCTCN2017112621-appb-000023
处理器11根据第二色域点的坐标(C2,L2)及对应的色调角H2,得出第二色域点在目标色域中的像素值。
其中,在一实施方式中,若确定源色域中的第一色域点不位于目标色域之外,则处理器11根据存储器13中的预设规则,将第一色域点转变为目标色域中的第七色域点;
通信电路12用于输出目标色域的待处理图像;
存储器13用于存储输入源色域的待处理图像。
参阅图9,图9是本发明一种具有存储功能的装置一实施方式的结构示意图。本实施方式中,具有存储功能的装置40,存储有程序数据41,该程序数据41能够被执行以实现如上述本发明图像处理方法实施方式中的步骤,相关内容的详细说明请参见上述方法部分,在此不再赘叙。
其中,该具有存储功能的装置40可以为服务器、软盘驱动器、硬盘驱动器、CD-ROM读取器、磁光盘读取器、CPU(针对RAM)等中的至少一种。
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (20)

  1. 一种电子设备,其中,所述电子设备包括:
    处理器、通信电路及存储器,所述处理器耦接所述通信电路及所述存储器;
    所述通信电路用于输入源色域的待处理图像;
    所述处理器用于将所述待处理图像内的像素值转换为预设色彩空间的坐标值,并通过所述坐标值确定所述源色域中的第一色域点是否位于目标色域之外,若是,则将所述第一色域点变换为所述目标色域中靠外侧的转换区域中的第二色域点;若不是,则根据预设规则,将所述第一色域点转变为所述目标色域中的第七色域点,并输出所述目标色域的所述待处理图像;
    其中,所述预设色彩空间为Lab空间,坐标值为L*a*b*值。
  2. 根据权利要求1所述的电子设备,其中,所述处理器用于,将所述L*a*b*值转化为XYZ三刺激值,经预设规则得出对应的RGB值,并在所述RGB值均属于集合[0,1]时,确定所述源色域中的第一色域点不位于所述目标色域之外,而在所述RGB值中的至少一个不属于集合[0,1]时,确定所述源色域中的第一色域点位于所述目标色域之外。
  3. 根据权利要求1所述的电子设备,其中,所述处理器还用于,根据所述第一色域点的L*a*b*值,确定所述第一色域点在所述Lab空间的二维色调坐标平面,以及确定第一约束线、第二约束线,并获取所述第二约束线与所述第一约束线、所述第一相交线段相交所形成的第二相交线段,作为所述目标色域中靠近外侧的所述转换区域;
    其中,所述第一约束线与源色域位于所述目标色域之外的子色域和所述目标色域的第一相交线段平行,所述第二约束线由所述二维色调坐标平面的亮度轴上的最大亮度中值对应的第三色域点与所述第一色域点共同确定。
  4. 根据权利要求3所述的电子设备,其中,所述处理器还用于,获取所述子色域的面积S,以及所述第一相交线段的长度a,得出k=S/a, 并以k值作为所述第一约束线与所述第一相交线段之间的距离,确定所述第一约束线。
  5. 根据权利要求3所述的电子设备,其中,所述处理器还用于,
    获取所述第二约束线与所述第一约束线、所述第一相交线段、所述源色域的边界所对应的第四色域点、第五色域点、第六色域点,并利用所述第一色域点、所述第四色域点、所述第五色域点、所述第六色域点,将所述第一色域点变换为所述转换区域中的所述第二色域点。
  6. 根据权利要求5所述的电子设备,其中,所述处理器还用于,
    获取所述第一色域点、所述第四色域点、所述第五色域点、所述第六色域点在所述二维色调坐标平面上的坐标值,分别为(C1,L1),(C4,L4),(C5,L5),(C6,L6)并得出所述第二色域点的坐标(C2,L2),并根据所述第二色域点的坐标(C2,L2)及对应的色调角H2,得出所述第二色域点在所述目标色域中的像素值;
    其中,
    Figure PCTCN2017112621-appb-100001
    所述第二色域点与所述第一色域点的色调角相同:
    Figure PCTCN2017112621-appb-100002
  7. 一种图像处理方法,其中,所述方法包括:
    输入源色域的待处理图像;
    将所述待处理图像内的像素值转换为预设色彩空间的坐标值;
    通过所述坐标值确定所述源色域中的第一色域点是否位于目标色域之外;
    若是,则将所述第一色域点变换为所述目标色域中靠外侧的转换区域中的第二色域点。
  8. 根据权利要求7所述的方法,其中,所述预设色彩空间为Lab空间,所述坐标值为L*a*b*值。
  9. 根据权利要求8所述的方法,其中,所述通过所述L*a*b*值确定所述源色域中的第一色域点是否位于目标色域之外,包括:
    将所述L*a*b*值转化为XYZ三刺激值,并经预设规则得出对应的RGB值;
    在所述RGB值均属于集合[0,1]时,确定所述源色域中的第一色域点不位于所述目标色域之外;
    在所述RGB值中的至少一个不属于集合[0,1]时,确定所述源色域中的第一色域点位于所述目标色域之外。
  10. 根据权利要求8所述的方法,其中,所述方法还包括:
    根据所述第一色域点的L*a*b*值,确定所述第一色域点在所述Lab空间的二维色调坐标平面;
    确定第一约束线、第二约束线;
    其中,所述第一约束线与源色域位于所述目标色域之外的子色域和所述目标色域的第一相交线段平行,所述第二约束线由所述二维色调坐标平面的亮度轴上的最大亮度中值对应的第三色域点与所述第一色域点共同确定;
    获取所述第二约束线与所述第一约束线、所述第一相交线段相交所形成的第二相交线段,作为所述目标色域中靠近外侧的所述转换区域。
  11. 根据权利要求10所述的方法,其中,所述确定第一约束线,包括:
    获取所述子色域的面积S,以及所述第一相交线段的长度a,并得出k=S/a;
    以k值作为所述第一约束线与所述第一相交线段之间的距离,确定所述第一约束线。
  12. 根据权利要求10所述的方法,其中,所述将所述第一色域点变换为所述目标色域中靠外侧的转换区域中的第二色域点,包括:
    获取所述第二约束线与所述第一约束线、所述第一相交线段、所述源色域的边界所对应的第四色域点、第五色域点、第六色域点;
    利用所述第一色域点、所述第四色域点、所述第五色域点、所述第六色域点,将所述第一色域点变换为所述转换区域中的所述第二色域点。
  13. 根据权利要求12所述的方法,其中,所述利用所述第一色域点、所述第四色域点、所述第五色域点、所述第六色域点,将所述第一色域点变换为所述转换区域中的所述第二色域点,包括:
    获取所述第一色域点、所述第四色域点、所述第五色域点、所述第六色域点在所述二维色调坐标平面上的坐标值,分别为(C1,L1),(C4,L4),(C5,L5),(C6,L6)并得出所述第二色域点的坐标(C2,L2);
    其中,
    Figure PCTCN2017112621-appb-100003
    所述第二色域点与所述第一色域点的色调角相同:
    Figure PCTCN2017112621-appb-100004
    根据所述第二色域点的坐标(C2,L2)及对应的色调角H2,得出所述第二色域点在所述目标色域中的像素值。
  14. 根据权利要求7所述的方法,其中,所述方法还包括:
    若不是,则根据预设规则,将所述第一色域点转变为所述目标色域中的第七色域点;
    输出所述目标色域的所述待处理图像。
  15. 一种具有存储功能的装置,其中,所述具有存储功能的装置上存储有程序数据,所述程序数据被处理器执行时,实现以下步骤:
    输入源色域的待处理图像;
    将所述待处理图像内的像素值转换为预设色彩空间的坐标值;
    通过所述坐标值确定所述源色域中的第一色域点是否位于目标色域之外;
    若是,则将所述第一色域点变换为所述目标色域中靠外侧的转换区域中的第二色域点。
  16. 根据权利要求15所述的装置,其中,所述预设色彩空间为Lab空间,所述坐标值为L*a*b*值。
  17. 根据权利要求16所述的装置,其中,所述程序数据被处理器执行时,实现以下步骤:
    将所述L*a*b*值转化为XYZ三刺激值,并经预设规则得出对应的RGB值;
    在所述RGB值均属于集合[0,1]时,确定所述源色域中的第一色域点不位于所述目标色域之外;
    在所述RGB值中的至少一个不属于集合[0,1]时,确定所述源色域 中的第一色域点位于所述目标色域之外。
  18. 根据权利要求16所述的装置,其中,所述程序数据被处理器执行时,实现以下步骤:
    根据所述第一色域点的L*a*b*值,确定所述第一色域点在所述Lab空间的二维色调坐标平面;
    确定第一约束线、第二约束线;
    其中,所述第一约束线与源色域位于所述目标色域之外的子色域和所述目标色域的第一相交线段平行,所述第二约束线由所述二维色调坐标平面的亮度轴上的最大亮度中值对应的第三色域点与所述第一色域点共同确定;
    获取所述第二约束线与所述第一约束线、所述第一相交线段相交所形成的第二相交线段,作为所述目标色域中靠近外侧的所述转换区域。
  19. 根据权利要求18所述的装置,其中,所述程序数据被处理器执行时,实现以下步骤:获取所述子色域的面积S,以及所述第一相交线段的长度a,并得出k=S/a;
    以k值作为所述第一约束线与所述第一相交线段之间的距离,确定所述第一约束线。
  20. 根据权利要求18所述的装置,其中,所述程序数据被处理器执行时,实现以下步骤:
    获取所述第二约束线与所述第一约束线、所述第一相交线段、所述源色域的边界所对应的第四色域点、第五色域点、第六色域点;
    利用所述第一色域点、所述第四色域点、所述第五色域点、所述第六色域点,将所述第一色域点变换为所述转换区域中的所述第二色域点。
PCT/CN2017/112621 2017-10-10 2017-11-23 一种图像处理方法、电子设备以及具有存储功能的装置 WO2019071737A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/736,928 US10614596B2 (en) 2017-10-10 2017-11-23 Image processing method, electronic device and apparatus having storage function

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710937445.6A CN107705264B (zh) 2017-10-10 2017-10-10 一种图像处理方法、电子设备以及具有存储功能的装置
CN201710937445.6 2017-10-10

Publications (1)

Publication Number Publication Date
WO2019071737A1 true WO2019071737A1 (zh) 2019-04-18

Family

ID=61184928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/112621 WO2019071737A1 (zh) 2017-10-10 2017-11-23 一种图像处理方法、电子设备以及具有存储功能的装置

Country Status (3)

Country Link
US (1) US10614596B2 (zh)
CN (1) CN107705264B (zh)
WO (1) WO2019071737A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3367659A1 (en) * 2017-02-28 2018-08-29 Thomson Licensing Hue changing color gamut mapping
CN107888893A (zh) * 2017-11-07 2018-04-06 深圳市华星光电半导体显示技术有限公司 一种色域映射方法及色域映射装置
US10565957B2 (en) 2018-06-19 2020-02-18 Shenzhen China Star Optoelectronics Technology Co., Ltd. Gamut mapping method and device for compressing out-of-gamut area to in-of-gamut area, storage medium, and electronic device
CN108810508B (zh) * 2018-06-19 2019-11-15 深圳市华星光电技术有限公司 压缩域外区域至域内的色域映射方法、装置、存储介质及电子设备
CN109119046B (zh) * 2018-09-10 2020-06-05 深圳市华星光电技术有限公司 灰阶亮度的调节系统及调节方法、存储器
US11138765B2 (en) * 2018-12-10 2021-10-05 Gopro, Inc. Non-linear color correction
CN111489711B (zh) * 2019-01-28 2022-01-04 咸阳彩虹光电科技有限公司 一种利用演算法改善视角低色偏的方法、装置及显示面板
CN114067739B (zh) * 2020-07-31 2024-02-06 北京小米移动软件有限公司 色域映射方法及装置、电子设备及存储介质
CN112069953B (zh) * 2020-08-26 2021-10-29 江苏农林职业技术学院 一种水稻秧苗生长期自动识别方法、装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030179925A1 (en) * 2002-03-25 2003-09-25 Chiun-Wen Hsu Method for compressing an image by classifying colors
CN1620150A (zh) * 2003-11-20 2005-05-25 三星电子株式会社 用于控制彩色图像的色彩的设备和方法
CN1825974A (zh) * 2005-02-22 2006-08-30 三星电子株式会社 选择性地调整输入图像颜色的颜色转换设备和方法
US20090009528A1 (en) * 2007-07-02 2009-01-08 Jose Antonio Olive Rgb color conversion palettes
JP2011135215A (ja) * 2009-12-22 2011-07-07 Fuji Xerox Co Ltd 画像情報処理装置、画像処理装置、画像情報処理プログラム

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3634633B2 (ja) * 1998-07-24 2005-03-30 キヤノン株式会社 画像処理装置およびその方法
JP2000278546A (ja) * 1999-01-22 2000-10-06 Sony Corp 画像処理装置及び画像処理方法、色域変換テーブル作成装置及び色域変換テーブル作成方法、画像処理プログラムを記録した記録媒体、並びに色域変換テーブル作成プログラムを記録した記録媒体
KR100629516B1 (ko) * 2004-09-21 2006-09-28 삼성전자주식회사 색역 경계 검출장치 및 이를 이용하는 매핑 장치 그리고그 방법
US7893945B2 (en) * 2006-08-21 2011-02-22 Texas Instruments Incorporated Color mapping techniques for color imaging devices
KR101379367B1 (ko) * 2006-11-23 2014-03-31 티피 비전 홀딩 비.브이. 범위 적합화
CN102209179B (zh) * 2011-05-31 2012-10-31 武汉大学 一种基于图像色域的自适应色域匹配方法
JP5460805B1 (ja) * 2012-10-01 2014-04-02 株式会社東芝 画像表示装置
CN104809994B (zh) * 2015-04-24 2017-09-29 青岛海信电器股份有限公司 一种rgbw类型四基色显示器灰阶组合转换方法
CN104869378B (zh) * 2015-06-23 2017-03-15 深圳市华星光电技术有限公司 基于源图像色域的色域匹配方法
EP3110127A1 (en) * 2015-06-25 2016-12-28 Thomson Licensing Color gamut mapping using a lightness mapping based also on the lightness of cusp colors belonging to different constant-hue leaves
CN106991675A (zh) * 2017-03-31 2017-07-28 联想(北京)有限公司 一种图像处理方法及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030179925A1 (en) * 2002-03-25 2003-09-25 Chiun-Wen Hsu Method for compressing an image by classifying colors
CN1620150A (zh) * 2003-11-20 2005-05-25 三星电子株式会社 用于控制彩色图像的色彩的设备和方法
CN1825974A (zh) * 2005-02-22 2006-08-30 三星电子株式会社 选择性地调整输入图像颜色的颜色转换设备和方法
US20090009528A1 (en) * 2007-07-02 2009-01-08 Jose Antonio Olive Rgb color conversion palettes
JP2011135215A (ja) * 2009-12-22 2011-07-07 Fuji Xerox Co Ltd 画像情報処理装置、画像処理装置、画像情報処理プログラム

Also Published As

Publication number Publication date
US10614596B2 (en) 2020-04-07
CN107705264B (zh) 2020-10-02
US20190385343A1 (en) 2019-12-19
CN107705264A (zh) 2018-02-16

Similar Documents

Publication Publication Date Title
CN107705264B (zh) 一种图像处理方法、电子设备以及具有存储功能的装置
WO2019238071A1 (zh) 色域转换方法、色域转换器、显示装置、图像信号转换方法、计算机设备和非暂时性存储介质
US9514508B2 (en) Mapping for display emulation based on image characteristics
US8538147B2 (en) Methods and appartuses for restoring color and enhancing electronic images
WO2019090914A1 (zh) 一种色域映射方法及色域映射装置
US20100054584A1 (en) Image-based backgrounds for images
JP6793281B2 (ja) 色域マッピング方法及び色域マッピング装置
WO2016045146A1 (zh) 用于显示器的图像色彩增强方法及装置
WO2020216085A1 (zh) 四面体插值计算方法及装置、色域转换方法及装置、介质
WO2017101534A1 (zh) 液晶显示屏的色彩信号转换方法及装置
JP2009159580A (ja) 画質評価装置及びその方法
CN109286802A (zh) 色域匹配方法、装置、显示终端及可读存储介质
CN107852446A (zh) 使用也基于属于不同恒定色调叶片的尖点颜色的亮度的亮度映射的色域映射
WO2019080243A1 (zh) 改善域外色重叠映射的方法
KR102534810B1 (ko) 디스플레이 장치의 색상 조정 방법 및 장치
EP3685346A1 (en) System and method for image dynamic range adjusting
JP6664409B2 (ja) 適応的カラーグレード補間方法及びデバイス
US20150356751A1 (en) Display evaluation device, display evaluation method, and non-transitory computer readable medium
WO2022120799A1 (zh) 图像处理方法、装置、电子设备及存储介质
US9030575B2 (en) Transformations and white point constraint solutions for a novel chromaticity space
CN107635122B (zh) 对在设备屏幕色域内重映射的图像进行处理的方法及装置
TWI485694B (zh) 影像色彩調整方法與其電子裝置
KR20120138477A (ko) 디지털 영상 처리 장치에서의 파노라마 영상 생성 방법
KR20090060029A (ko) 영상 시퀀스 디스플레이에 대한 몰입감 향상 방법 및시스템
TW201712633A (zh) 影像處理方法

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: 17928444

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17928444

Country of ref document: EP

Kind code of ref document: A1