WO2023036181A1 - 一种图像处理方法及装置 - Google Patents

一种图像处理方法及装置 Download PDF

Info

Publication number
WO2023036181A1
WO2023036181A1 PCT/CN2022/117557 CN2022117557W WO2023036181A1 WO 2023036181 A1 WO2023036181 A1 WO 2023036181A1 CN 2022117557 W CN2022117557 W CN 2022117557W WO 2023036181 A1 WO2023036181 A1 WO 2023036181A1
Authority
WO
WIPO (PCT)
Prior art keywords
optical signal
color
signal set
color display
image
Prior art date
Application number
PCT/CN2022/117557
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 北京字跳网络技术有限公司
Publication of WO2023036181A1 publication Critical patent/WO2023036181A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • 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
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to an image processing method and device.
  • the background image and the foreground image can be directly fused based on the preset light transmittance to generate a fused image that meets the expected effect.
  • different color display standards have different color spaces, primary colors, and brightness ranges, superimposing and fusing the foreground image under one color display standard with the background image under another color display standard will cause the color of the fused image to fail to meet expectations. Therefore, images under different color display standards cannot be superimposed and fused.
  • the foreground image is a sticker under the standard dynamic range (Standard Dynamic Range, SDR) color display standard
  • the background image is an image under the high dynamic range (High Dynamic Range, HDR) color display standard
  • SDR Standard Dynamic Range
  • HDR High Dynamic Range
  • the sticker under the SDR color display standard is directly superimposed and fused onto the background image under the HDR color display standard, the sticker color area in the fused image will change and the brightness will be dark, which does not meet the pre-designed sticker effect.
  • the embodiments of the present disclosure provide an image processing method and device, which are used to solve the problem that superimposed and fused images under different color display standards will lead to abnormal fused images.
  • an embodiment of the present disclosure provides an image processing method, including:
  • the target display device is a device for displaying a fusion image of the foreground image and the background image;
  • an image processing device including:
  • the first conversion unit is configured to convert the color of each pixel of the foreground image from the color in the first color space of the first color display standard to an optical signal under the second color display standard, and obtain a first set of optical signals;
  • a conversion coefficient acquisition unit configured to acquire a conversion coefficient according to the peak luminance of the second color display standard and the peak luminance of the target display device; the target display device is used to display the fusion of the foreground image and the background image image device;
  • a second conversion unit configured to convert each optical signal in the first optical signal set according to the conversion coefficient, and obtain a second optical signal set
  • the third conversion unit is configured to convert the color of each pixel of the background image from the color in the second color space of the second color display standard to an optical signal under the second color display standard, and obtain a third optical signal set ;
  • a fusion unit configured to fuse the optical signals in the second optical signal set and the third optical signal set based on the light transmittance of the foreground image, to obtain a fourth optical signal set
  • a fused image acquiring unit configured to convert the light signals in the fourth set of light signals into colors in the second color space, and acquire a fused image of the foreground image and the background image.
  • an embodiment of the present disclosure provides an electronic device, including: a memory and a processor, the memory is used to store a computer program; the processor is used to enable the electronic device to implement the above-mentioned The image processing method described in any one of the embodiments.
  • an embodiment of the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computing device, the computing device realizes any of the above-mentioned The image processing method described in the embodiment.
  • an embodiment of the present disclosure provides a computer program product, which enables the computer to implement the image processing method described in any of the foregoing embodiments when the computer program product is run on a computer.
  • the image processing method provided by the embodiment of the present disclosure includes: converting the color of each pixel of the foreground image from the color in the first color space of the first color display standard to the light signal under the second color display standard, and obtaining the first light collection of signals. Obtain a conversion coefficient according to the peak brightness of the second color display standard and the peak brightness of the target display device, convert each optical signal in the first optical signal set according to the conversion coefficient, and obtain a second optical signal set . The color of each pixel of the background image is converted from the color in the second color space of the second color display standard to an optical signal under the second color display standard to obtain a third optical signal set.
  • Fusion is performed on the optical signals in the second optical signal set and the third optical signal set based on the light transmittance of the foreground image to obtain a fourth optical signal set. converting the light signals in the fourth set of light signals into colors in the second color space, and acquiring a fusion image of the foreground image and the background image.
  • the image processing method provided by the embodiment of the present disclosure can convert the foreground image belonging to the first color display standard and the background image belonging to the second color display standard into optical signals under the second color display standard, and then perform fusion. Therefore, the embodiments of the present disclosure can avoid anomalies caused by color gamut differences between the foreground image and the background image.
  • the image processing method provided by the embodiments of the present disclosure converts the foreground image into the light signal of the second color display standard, it will also display the peak brightness of the standard and the peak brightness of the target display device according to the second color , acquiring a conversion coefficient, and converting each optical signal in the first optical signal set according to the conversion coefficient.
  • the embodiments of the present disclosure can also align the brightness of the foreground image to the color display standard to which the background image belongs through the brightness of the target display device, thereby avoiding abnormalities caused by abnormal brightness of the foreground image and the background image.
  • the image processing method provided by the embodiments of the present disclosure can avoid abnormalities caused by color gamut differences and brightness abnormalities between the foreground image and the background image, and solve the problem that superimposed and fused images under different color display standards will cause abnormalities in the fused image.
  • FIG. 1 is one of the flow charts of the steps of the image processing method provided by the embodiment of the present disclosure
  • FIG. 2 is the second flowchart of the steps of the image processing method provided by the embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a data flow of an image processing method provided by an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a positional relationship between a foreground image and a background image provided by an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present disclosure.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present disclosure shall not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • the meaning of "plurality” refers to two or more.
  • the image processing method provided by the embodiments of the present disclosure may be executed by an image processing apparatus.
  • the image processing device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle terminal, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA). , a personal computer (personal computer, PC), etc., which are not specifically limited in this embodiment of the present disclosure.
  • First color display standard the color display standard to which the foreground image belongs.
  • the first color display standard is the standard dynamic range (Standard Dynamic Range, SDR) color display standard as an example for illustration, but the embodiments of the present disclosure do not Limited to this, the first color display standard may also be other color display standards, as long as the first color display standard and the second color display standard are different color display standards, the technical solutions provided by the embodiments of the present disclosure may be applicable.
  • SDR Standard Dynamic Range
  • the primary color displays the standard color space.
  • the first color display standard is the SDR color display standard
  • the first color space is bt.709.
  • Second color display standard the color display standard to which the background image belongs.
  • the second color display standard is a high dynamic range (High Dynamic Range, SDR) color display standard as an example for illustration.
  • SDR High Dynamic Range
  • the embodiments of the present disclosure are not limited thereto, and the second color display standard can also be other color display standards, as long as the first color display standard and the second color display standard are different color display standards, it can be applied to the present disclosure The technical scheme that embodiment provides.
  • the secondary color displays the standard color space.
  • the second color display standard is the HDR color display standard
  • the second color space is bt.2020.
  • the first set of light signals a set of light signals obtained by converting the color of each pixel of the foreground image into light signals in the second color space. Since the color space of the HDR color display standard is bt.2020, the optical signal in the first optical signal set is represented by L 2020sticker (x, y) below.
  • the second optical signal set an optical signal set obtained by converting each optical signal in the first optical signal set according to the conversion coefficient.
  • the optical signals in the second optical signal set are represented by L Typical (x, y ).
  • the third optical signal set the optical signal set obtained by converting the color of each pixel of the background image into an optical signal in the second color space.
  • the optical signals in the third optical signal set are denoted by L 2020imgIn (x, y) below.
  • the fourth optical signal set an optical signal set obtained by fusing the optical signals in the second optical signal set and the third optical signal set based on the light transmittance of the foreground image.
  • the optical signals in the third optical signal set are represented by L 2020imgOut (x, y) below.
  • Fifth optical signal set an optical signal set obtained by converting the color of each pixel of the foreground image into an optical signal under the first color display standard. Since the color space of the SDR color display standard is bt.709, the optical signal in the fifth optical signal set is represented by L 709 sticker (x, y) below.
  • Target color set a color set obtained by converting the optical signals in the fourth optical signal set into colors in the second color space.
  • the color in the target color set is represented by C 2020imgOut (x, y) below.
  • an embodiment of the present disclosure provides an image processing method, as shown in FIG. 1 , the image processing method includes the following steps S11 to S16:
  • the foreground image in the embodiments of the present disclosure refers to an image that needs to be superimposed on and fused with other images.
  • the foreground image may be any image under the first color display standard.
  • the embodiment of the present disclosure does not limit the type of the foreground image.
  • the foreground image may include an image sticker in special effect editing.
  • the first color display standard may be an SDR color display standard
  • the second color display standard may be a high dynamic range (High Dynamic Range, HDR) color display standard.
  • the second color display standard is specifically the Perceptual Quantizer (PQ) color display standard in the HDR color display standard as an example for illustration, but the embodiments of the present disclosure are not limited thereto.
  • the second color display standard in the embodiment of the present disclosure may also be a hybrid logarithmic gamma curve (Hybrid Log Gamma, HLG) color display standard in the HDR color display standard.
  • the PQ color display standard is a high dynamic range HDR color display standard.
  • the color space of the PQ color display standard is the color space bt.2020
  • the three primary colors are the three primary colors bt.2020
  • the photoelectric conversion function is the SMPTE2084 standard.
  • the maximum brightness allowed by the SDR color display standard is smaller.
  • the color space of the PQ color display standard is the color space bt.709
  • the three primary colors are the three primary colors bt.709
  • the photoelectric conversion function is ITU-RBT. 1886 standard.
  • the target display device is a device for displaying a fused image of the foreground image and the background image.
  • the peak brightness of the second color display standard in the embodiments of the present disclosure refers to the brightness value of the color with the highest brightness among all the colors in the second color space.
  • the peak brightness of the second color display standard is 10000 nit.
  • the peak brightness of the target display device in the embodiments of the present disclosure refers to the maximum brightness of a device for displaying a fused image of the foreground image and the background image.
  • the ideal effect to be obtained is the combination of the foreground image and the background image both belonging to the second color display standard Fusion has the same effect.
  • the individual optical signals in the first optical signal set are not converted according to the peak brightness of the second color display standard and the peak brightness of the target display device, but the brightness of the first color display standard and the second color display standard are directly Normalize the range, and align the brightness of each pixel of the foreground image to the second color display standard after normalization, or directly use the brightness of each pixel of the foreground image as the brightness input, which will cause the brightness of the foreground image to be abnormal .
  • the brightness range of the first color display standard is [0, 100] nit
  • the brightness range of the second color display standard is [0, 10000] nit.
  • the brightness of each pixel of the foreground image is directly used as the brightness input, the brightness of the originally bright pixel will be displayed as a smaller brightness value, (the maximum brightness value of 100nit in SDR will also be displayed as a PQ color display A very small brightness value in the standard), which in turn causes the brightness of the foreground image to be too small, which does not meet the expected effect.
  • the brightness of the pixels in the image is finally reflected by the screen display brightness of the display device.
  • the brightness and the peak brightness of the display device obtain the conversion coefficient, and convert each optical signal in the first optical signal set according to the conversion coefficient, so that the brightness of each pixel point of the foreground image can be aligned to the second by the brightness of the display device.
  • the color shows the brightness in the standard, thereby avoiding abnormal brightness of the foreground image.
  • the converted optical signals in the second optical signal set are still optical signals under the second color display standard.
  • the background image in the embodiments of the present disclosure refers to an image that needs to be set under the foreground image for fusion during fusion.
  • the background image may be any image under the second color display standard, and the embodiment of the present disclosure does not limit the type of the background image.
  • the light transmittance of the foreground image may be a light transmittance set by an image editor according to requirements or a default light transmittance.
  • the light transmittance of the foreground image may be 50%, 80% and so on.
  • the light transmittance at each position of the foreground image may be the same, or the foreground image may be divided into multiple regions, and different light transmittances may be set for each region.
  • optical signals in the second optical signal set and the optical signals in the third optical signal set are all optical signals under the second color display standard, the optical signals in the second optical signal set are still the second The color shows the light signal under the standard.
  • the image processing method provided by the embodiment of the present disclosure includes: converting the color of each pixel of the foreground image from the color in the first color space of the first color display standard to the light signal under the second color display standard, and obtaining the first light collection of signals. Obtain a conversion coefficient according to the peak brightness of the second color display standard and the peak brightness of the target display device, convert each optical signal in the first optical signal set according to the conversion coefficient, and obtain a second optical signal set . The color of each pixel of the background image is converted from the color in the second color space of the second color display standard to an optical signal under the second color display standard to obtain a third optical signal set.
  • Fusion is performed on the optical signals in the second optical signal set and the third optical signal set based on the light transmittance of the foreground image to obtain a fourth optical signal set. converting the light signals in the fourth set of light signals into colors in the second color space, and acquiring a fusion image of the foreground image and the background image.
  • the image processing method provided by the embodiment of the present disclosure can convert the foreground image belonging to the first color display standard and the background image belonging to the second color display standard into optical signals under the second color display standard, and then perform fusion. Therefore, the embodiments of the present disclosure can avoid anomalies caused by color gamut differences between the foreground image and the background image.
  • the image processing method provided by the embodiments of the present disclosure converts the foreground image into the light signal of the second color display standard, it will also display the peak brightness of the standard and the peak brightness of the target display device according to the second color , acquiring a conversion coefficient, and converting each optical signal in the first optical signal set according to the conversion coefficient.
  • the embodiments of the present disclosure can also align the brightness of the foreground image to the color display standard to which the background image belongs through the brightness of the target display device, thereby avoiding abnormalities caused by abnormal brightness of the foreground image and the background image.
  • the image processing method provided by the embodiments of the present disclosure can avoid abnormalities caused by color gamut differences and brightness abnormalities between the foreground image and the background image, and solve the problem that superimposed and fused images under different color display standards will cause abnormalities in the fused image.
  • the embodiment of the present disclosure also provides another image processing method.
  • the image processing method includes:
  • the electro-optical conversion function in the embodiments of the present disclosure refers to a function used to describe the relationship between the nonlinear color value (digital coded pixel value, electrical signal) input to the display and the linear color value (optical signal) displayed by the display. function.
  • the device Since the device stores and transmits electrical signals (color values), and the electro-optical transfer functions of different color display standards are not the same, the color (electrical signal) of each pixel point of the foreground image that will belong to the first color display standard
  • the color (electrical signal) of each pixel point of the foreground image that will belong to the first color display standard
  • it is first necessary to convert the color of each pixel of the foreground image into an optical signal under the first color display standard, so as to realize the conversion of color values in different color color spaces in linear space .
  • step S201 will be described below by taking the first color display standard as the SDR color display standard and the first color space as bt.2020 as an example.
  • the standard photoelectric conversion function of SDR color display is:
  • y is the electrical signal under the first color display standard
  • L c is the optical signal under the first color display standard
  • L ⁇ is the optical signal corresponding to the maximum value of the electrical signal
  • L b is the corresponding optical signal to the minimum value of the electrical signal
  • is a constant.
  • the red component R 709sticker (x, y), the green component G 709sticker (x, y) and the blue component B 709sticker (x, y) of the color C 709sticker (x, y) of each pixel in the foreground image are respectively used as Substituting the electrical signal V into the electro-optical conversion function above can convert the color of each pixel in the foreground image into the optical signal L 70gsticker (x, y) under the first color display standard, and then obtain the fifth optical signal set.
  • each optical signal in the first optical signal set is an optical signal under the first color display standard
  • the above step S202 is to convert the optical signal under the first color display standard into an optical signal under the second color display standard .
  • the optical signal under the SDR color display standard is expressed as L 709sticker (x, y), and for L 709sticker (x, y)
  • the converted PQ color display standard optical signal is expressed as L 2020sticker (x, y), then:
  • the embodiment of the present disclosure realizes the conversion of the color of each pixel of the foreground image from the color in the first color space of the first color display standard to the light signal under the second color display standard, and obtains the second color display standard.
  • the conversion factor is A
  • the peak brightness of the target display device is Nit Typical
  • the peak brightness of the second color display standard is Nit pQpeak
  • the embodiment of the present disclosure realizes obtaining the conversion coefficient according to the peak brightness of the second color display standard and the peak brightness of the target display device.
  • the conversion coefficient A, the optical signal L 2020sticker (x, y) in the first optical signal set, and the optical signal L Typical (x, y) in the second optical signal set satisfy the following conversion methods:
  • the embodiment of the present disclosure implements conversion of each optical signal in the first optical signal set according to the conversion coefficient to obtain a second optical signal set.
  • step S205 will be described below by taking the second color display standard as the PQ color display standard as an example.
  • the standard electro-optical conversion function of PQ color display is:
  • V is the electrical signal under the PQ color display standard
  • L c is the light signal of the PQ color display standard
  • the red component R 2020imgIn (x, y) of the color C 2020imgIn (x, y) of each pixel of the background image is respectively
  • the green component G 2020imgIn (x, y) and the blue component B 2020imgIn (x, y) are substituted into the above formula as the electrical signal V
  • the color C 2020imgIn (x, y) of each pixel of the background image can be Convert to an optical signal L 2020imgIn (x, y) under the second color display standard, so as to obtain a third optical signal set.
  • the embodiment of the present disclosure realizes the conversion of the color of each pixel of the background image from the color in the second color space of the second color display standard to an optical signal under the second color display standard.
  • the above step S206 (based on the light transmittance of the foreground image, fusing the optical signals in the second optical signal set and the third optical signal set to obtain The implementation of the fourth optical signal set) includes:
  • the optical signals of the optical signals in the second optical signal set having different pixel coordinates from the optical signals in any of the third optical signal sets
  • the third optical signal set Generating the fourth optical signal set for the optical signals of the optical signals that have different pixel coordinates from the optical signals in any of the second optical signal sets.
  • the optical signals of the optical signals in the second optical signal set that have different pixel coordinates from the optical signals in any of the third optical signal sets, and the first The optical signals in the optical signals of the three optical signal sets have different pixel coordinates from the optical signals in any of the second optical signal sets, and the implementation of generating the fourth optical signal set includes:
  • the pixel coordinates of the optical signals in the second optical signal set that are different from those in any of the third optical signal sets and the optical signals in the third optical signal set are different from any of the optical signals in the third optical signal set
  • Optical signals whose pixel coordinates of the optical signals in the second optical signal set are all different are added to the fused optical signal set to generate the fourth optical signal set.
  • Optical signals LT typical (2, 4), L Typical (2, 5), L Typical (3, 4), L Typical (3, 5), L Typical (4, 4), L Typical in the second optical signal set Typical (4, 5) is respectively connected with the optical signals L 2020imgIn (2, 4), L 2020imgIn (2, 5), L 2020imgIn (3, 4), L 2020imgIn (3, 5), L 2020imgIn (3, 5) and L in the third optical signal set
  • the pixel coordinates of 2020imgIn (4, 4) and L 2020imgIn (4, 5) are the same.
  • L Typical (2,4) and L 2020imgIn (2,4) L Typical (2,5) and L 2020imgIn (2,5), L Typical (3,4) and L 2020imgIn (3, 4), L Typical (3, 5) and L 2020imgIn (3, 5), L Typical (4, 4) and L 2020imgIn (4, 4), L Typical (4, 5) and L 2020imgIn (4, 5) performs weighted fusion to obtain a fusion optical signal set ⁇ L 2020imgOut (2, 4), L 2020imgOut (2, 5), L 2020imgOut (3, 4), L 2020imgOut (3, 5), L 2020imgOut (4, 4), L 2020 imgOut (4, 5) ⁇ .
  • weighted fusion is performed on the optical signals with the same pixel coordinates in the second optical signal set and the third optical signal set to obtain a fused optical signal set, including the following steps a to step d:
  • Step a Obtain the weight value of the first optical signal in the second optical signal set.
  • the weight value of the first light signal is the product of the first light signal and the shading rate of the foreground image.
  • the difference between the shading rate of the foreground image and the light transmittance of the foreground image is 1.
  • the weight value of the first light signal is P 1_(x, y)
  • the light transmittance of the foreground image is q
  • the weight value of the first light signal obtained is:
  • Step b Obtain the weight value of the second optical signal in the third optical signal set.
  • the second optical signal and the first optical signal are optical signals having the same pixel coordinates, and the weight value of the second optical signal is equal to the light transmittance of the second optical signal and the foreground image. product.
  • the weight value of the second light signal is P 2_(x, y)
  • the light transmittance of the foreground image is q
  • the weight value for obtaining the second light signal is:
  • Step c Obtain the sum of the weight value of the first optical signal and the weight value of the second optical signal as a fusion result of the first optical signal and the second optical signal.
  • L 2020imgOut (x, y) L Typical (x, y)*(1-q)+L 2020imgIn (x, y)*q
  • Step d Generate the fused optical signal set according to the fusion result of the optical signals having the same pixel coordinates in the second optical signal set and the third optical signal set.
  • the fusion result of each pair of optical signals with the same pixel coordinates is obtained through the above steps a to step d, and then the fusion results of each pair of optical signals with the same pixel coordinates are combined into a fused optical signal set.
  • the optical signals in the optical signals of the second optical signal set that have different pixel coordinates from the optical signals in any of the third optical signal sets include: L Typical (2, 6), L Typical (3, 6), L Typical (4, 6), the optical signals in the optical signals of the third optical signal set that have different pixel coordinates from the optical signals in any of the second optical signal sets include : L 2020imgIn (1, 1), L 2020imgIn (1, 2), L 2020imgIn (1, 3), L 2020imgIn (1, 4), L 2020imgIn (1, 5), L 2020imgIn (2, 1), L 2020imgIn (2, 2), L 2020imgIn (2, 3), L 2020imgIn (3, 1), L 2020imgIn (3, 2), L 2020imgIn (3, 3), L 2020imgIn (4, 1), L 2020imgIn (4, 2), L 2020imgIn (4, 3), L 2020imgIn (5, 1), L 2020imgIn (5, 2), L 2020imgIn (5, 3), L 2020imgIn
  • the obtained fourth optical signal set is ⁇ L 2020imgOut (2, 4), L 2020imgOut (2, 5), L 2020imgOut (3, 4), L 2020imgOut (3, 5), L 2020imgOut (4, 4) , L 2020imgOut (4, 5), L 2020imgIn (1, 1), L 2020imgIn (1, 2), L 2020imgIn (1, 3), L 2020imgIn (1, 4), L 2020imgIn (1, 5), L 2020imgIn (1, 5), L 2020imgIn (2, 1), L 2020imgIn (2, 2), L 2020imgIn (2, 3), L 2020imgIn (3, 1), L 2020imgIn (3, 2), L 2020imgIn (3, 3), L 2020imgIn ( 4, 1), L 2020imgIn (4, 2), L 2020imgIn (4, 3), L 2020imgIn (5, 1), L 2020imgIn (5, 2), L 2020imgIn (5, 3), L 2020imgIn (5, 4), L 2020imgIn (5, 5), L Typical (2, 6), L
  • the red component, the green component, and the green component of the optical signal L 2020imgOut (x, y) in the fourth optical signal set are respectively brought into the above equation as L c one by one, that is, the optical signal in the fourth optical signal set is converted into the second Color C 2020imgOut (x, y) in color space.
  • a fused image of the foreground image and the background image can be obtained by arranging the colors in the second color space obtained by converting the optical signals in the fourth optical signal set according to pixel coordinates.
  • the embodiment of the present disclosure realizes converting the optical signals in the fourth optical signal set into colors in the second color space, and obtaining a fusion image of the foreground image and the background image .
  • the image processing method provided by the embodiment of the present disclosure includes: converting the color of each pixel of the foreground image from the color in the first color space of the first color display standard to the light signal under the second color display standard, and obtaining the first light collection of signals. Obtain a conversion coefficient according to the peak brightness of the second color display standard and the peak brightness of the target display device, convert each optical signal in the first optical signal set according to the conversion coefficient, and obtain a second optical signal set . The color of each pixel of the background image is converted from the color in the second color space of the second color display standard to an optical signal under the second color display standard to obtain a third optical signal set.
  • Fusion is performed on the optical signals in the second optical signal set and the third optical signal set based on the light transmittance of the foreground image to obtain a fourth optical signal set. converting the light signals in the fourth set of light signals into colors in the second color space, and acquiring a fusion image of the foreground image and the background image.
  • the embodiment of the present disclosure can convert the foreground image belonging to the first color display standard and the background image belonging to the second color display standard into optical signals under the second color display standard, and then perform fusion. Therefore, the embodiment of the present disclosure can avoid the abnormality of the foreground image caused by the color gamut difference.
  • the image processing method provided by the embodiments of the present disclosure converts the foreground image into the light signal of the second color display standard, it will also display the peak brightness of the standard and the peak brightness of the target display device according to the second color , acquiring a conversion coefficient, and converting each optical signal in the first optical signal set according to the conversion coefficient.
  • the embodiments of the present disclosure can also align the brightness of the foreground image to the color display standard to which the background image belongs through the brightness of the target display device, thereby avoiding anomalies caused by abnormal brightness of the foreground image.
  • the image processing method provided by the embodiments of the present disclosure can avoid the abnormality caused by the color gamut difference and abnormal brightness of the foreground image, and solve the problem that the superposition and fusion of images under different color display standards will cause the abnormality of the fused image.
  • the embodiment of the present disclosure also provides an image processing device, the device embodiment corresponds to the aforementioned method embodiment, for the convenience of reading, this device embodiment does not implement the aforementioned method
  • the image processing apparatus in this embodiment can correspondingly implement all the content in the foregoing method embodiments.
  • FIG. 5 is a schematic structural diagram of the image processing device. As shown in FIG. 5, the image processing device 500 includes:
  • the first conversion unit 51 is configured to convert the color of each pixel point of the foreground image from the color in the first color space of the first color display standard to an optical signal under the second color display standard, and obtain a first set of optical signals;
  • a conversion coefficient acquisition unit 52 configured to acquire a conversion coefficient according to the peak brightness of the second color display standard and the peak brightness of the target display device;
  • the target display device is a display device for displaying the foreground image and the background image Devices for fusing images;
  • the second conversion unit 53 is configured to convert each optical signal in the first optical signal set according to the conversion coefficient to obtain a second optical signal set;
  • the third conversion unit 54 is configured to convert the color of each pixel of the background image from the color in the second color space of the second color display standard into an optical signal under the second color display standard, and obtain a third optical signal gather;
  • a fusion unit 55 configured to fuse the optical signals in the second optical signal set and the third optical signal set based on the light transmittance of the foreground image, to obtain a fourth optical signal set;
  • a fused image acquiring unit 56 configured to convert the light signals in the fourth set of light signals into colors in the second color space, and acquire a fused image of the foreground image and the background image.
  • the first converting unit 51 may be configured to convert the color of each pixel of the foreground image into the The optical signal under the first color display standard is obtained to obtain a fifth optical signal set; the optical signal in the fifth optical signal set is converted into an optical signal under the second color display standard to obtain the first optical signal collection of signals.
  • the conversion coefficient acquisition unit 52 may be configured to acquire the ratio of the peak brightness of the target display device to the peak brightness of the second color display standard as the conversion coefficient.
  • the second converting unit 53 may be configured to convert each optical signal in the first optical signal set into each optical signal in the first optical signal set The product of the signal and the conversion coefficient is used to obtain the second set of optical signals.
  • the third converting unit 54 may be configured to convert the color of each pixel of the background image into the The light signal under the above-mentioned second color display standard.
  • the fusion unit 55 may be configured to, based on the light transmittance of the foreground image, calculate pixel coordinates in the second light signal set and the third light signal set The same optical signals are weighted and fused to obtain a fused optical signal set; according to the fused optical signal set, the pixel coordinates of the optical signals in the second optical signal set and any of the optical signals in the third optical signal set are equal Different optical signals, and optical signals in the optical signals of the third optical signal set that have different pixel coordinates from optical signals in any of the second optical signal sets, generate the fourth optical signal set.
  • the fusion unit 55 may be configured to obtain the weight value of the first optical signal in the second optical signal set, where the weight value of the first optical signal is The product of the first optical signal and the shading ratio of the foreground image, where the shading ratio of the foreground image is 1 and the difference between the light transmittance of the foreground image; obtaining the first light signal in the third optical signal set
  • the weight value of two optical signals, the second optical signal and the first optical signal are optical signals with the same pixel coordinates, the weight value of the second optical signal is the second optical signal and the foreground image
  • the product of the light transmittance obtain the sum of the weight value of the first optical signal and the weight value of the second optical signal as the fusion result of the first optical signal and the second optical signal; according to the A fusion result of optical signals having the same pixel coordinates in the second optical signal set and the third optical signal set generates the fused optical signal set.
  • the fused image acquisition unit 56 may be configured to convert each optical signal in the fourth optical signal set based on the photoelectric conversion function of the second color display standard Acquiring a target color set for the colors in the second color space; acquiring the foreground image and the background image according to each color in the target color set and the pixel coordinates of each color in the target color set fused image.
  • the first color display standard is a standard dynamic range SDR color display standard
  • the second color display standard is the sensory quantization curve PQ color display standard.
  • the image processing apparatus provided in this embodiment can execute the image processing method provided in the foregoing method embodiment, and its implementation principle and technical effect are similar, and details are not repeated here.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the electronic device provided by this embodiment includes: a memory 61 and a processor 62, the memory 61 is used to store computer programs; the processing The device 62 is configured to enable the electronic device to implement the image processing method provided in the foregoing embodiments when executing the computer program.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computing device, the computing device realizes the image provided by the above-mentioned embodiments Approach.
  • An embodiment of the present disclosure further provides a computer program product, which enables the computer to implement the image processing method provided in the foregoing embodiments when the computer program product is run on a computer.
  • embodiments of the present disclosure may be provided as methods, systems, or computer program products. Accordingly, embodiments of the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
  • the processor can be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash random access memory
  • Computer-readable media includes both volatile and non-volatile, removable and non-removable storage media.
  • the storage medium may store information by any method or technology, and the information may be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, A magnetic tape cartridge, disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • computer readable media does not include transitory computer readable media, such as modulated data signals and carrier waves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

本公开提供了一种图像处理方法及装置,涉及图像处理技术领域。该方法包括:将前景图像的像素点的颜色为第二色彩显示标准下的光信号获取第一光信号集合;根据第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度获取转换系数;根据转换系数对第一光信号集合中的光信号进行转换获取第二光信号集合;将背景图像的像素点的颜色转换为第二色彩显示标准下的光信号获取第三光信号集合;基于前景图像的透光率对第二光信号集合和第三光信号集合中的光信号进行融合获取第四光信号集合;将第四光信号集合中的光信号转换为第二颜色空间中的颜色获取融合图像。本公开可以解决不同色彩显示标准下的图像进行叠加融合会导致融合图像异常的问题。

Description

一种图像处理方法及装置
本公开要求于2021年09月10日提交中国国家知识产权局、申请号为202111062473.0、发明名称为“一种图像处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及图像处理技术领域,尤其涉及一种图像处理方法及装置。
背景技术
在进行图像处理时,常常会有对多张图像进行叠加融合以生成融合图像的需求。例如:在原图像上添加贴纸特效时,需要将预先制作的图像贴纸叠加融合到原图像上,以生成包含贴纸特效的融合图像。
在进行图像叠加融合时,若背景图像和前景图像的色彩显示标准相同,则可以基于预设定的透光率直接对背景图像与前景图像进行融合,生成符合预期效果的融合图像。但由于不同色彩显示标准的颜色空间、三原色、亮度范围均不相同,将一个色彩显示标准下的前景图像与另一个色彩显示标准下的背景图像叠加融合,会导致融合图像的颜色等不符合预期效果,因此不同色彩显示标准下的图像不能进行叠加融合。例如:当前景图像为标准动态范围(Standard Dynamic Range,SDR)色彩显示标准下的贴纸,背景图像为高动态范围(High Dynamic Range,HDR)色彩显示标准下的图像时,由于SDR色彩显示标准的颜色空间为bt.709,亮度范围为0~100nit,而HDR色彩显示标准的颜色空间为bt.2020,亮度范围为0~10000nit。因此若直接将SDR色彩显示标准下的贴纸叠加融合到HDR色彩显示标准下的背景图像上,则会导致融合图像中的贴纸色区域相变化且亮度偏暗,不符合预设计的贴纸效果。
发明内容
有鉴于此,本公开实施例提供了一种图像处理方法及装置,用于解决不同色彩显示标准下的图像进行叠加融合会导致融合图像异常的问题。
为了实现上述目的,本公开实施例提供技术方案如下:
第一方面,本公开的实施例提供了一种图像处理方法,包括:
将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合;
根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数;所述目标显示设备为用于显示所述前景图像和所述背景图像的融合图像的设备;
根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合;
将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合;
基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合;
将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
第二方面,本公开实施例提供一种图像处理装置,包括:
第一转换单元,用于将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合;
转换系数获取单元,用于根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数;所述目标显示设备为用于显示所述前景图像和所述背景图像的融合图像的设备;
第二转换单元,用于根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合;
第三转换单元,用于将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合;
融合单元,用于基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合;
融合图像获取单元,用于将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
第三方面,本公开实施例提供一种电子设备,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在执行所述计算机程序时,使得所述电子设备实现上述任一实施例所述的图像处理方法。
第四方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现上述任一实施例所述的图像处理方法。
第五方面,本公开实施例提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机实现上述任一实施例所述的图像处理方法。
本公开实施例提供的图像处理方法包括:将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合。根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数,根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合。将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合。基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合。将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
一方面,由于本公开实施例提供的图像处理方法可以将属于第一色彩显示标准的前景图像和属于第二色彩显示标准的背景图像均转换为第二色彩显示标准下的光信号,然后再进行融合。因此本公开实施例可以避免前景图像与背景图像的色域差异导致的异常。另一方面,由于本公开实施例提供的图像处理方法在将前景图像转换为第二色彩显示标准的光信号后,还会根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度, 获取转换系数,并根据所述转换系数对所述第一光信号集合中的各个光信号进行转换。因此本公开实施例还可以通过目标显示设备的亮度将前景图像的亮度对齐到背景图像所属的色彩显示标准中,进而避免前景图像与背景图像的亮度异常导致的异常。综上,本公开实施例提供的图像处理方法可以避免前景图像与背景图像的色域差异和亮度异常导致的异常,解决了不同色彩显示标准下的图像进行叠加融合会导致融合图像异常的问题。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开实施例的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的图像处理方法的步骤流程图之一;
图2为本公开实施例提供的图像处理方法的步骤流程图之二;
图3为本公开实施例提供的图像处理方法的数据流示意图;
图4为本公开实施例提供的前景图像和背景图像的位置关系示意图;
图5为本公开实施例提供的图像处理装置的结构示意图;
图6为本公开实施例提供的电子设备的硬件结构示意图。
具体实施方式
为了能够更清楚地理解本公开实施例的上述目的、特征和优点,下面将对本公开实施例的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开实施例,但本公开实施例还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
在本公开实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或 说明。本公开实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。此外,在本公开实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。
本公开实施例提供的图像处理方法的执行主体可以为图像处理装置。该图像处理装置可以为手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)、个人计算机(personal computer,PC)等,本公开实施例对此不作具体限定。
以下对本公开实施例中的自定义术语进行说明:
第一色彩显示标准:前景图像所属的色彩显示标准,以下实施例中以第一色彩显示标准为标准动态范围(Standard Dynamic Range,SDR)色彩显示标准为例进行说明,但本公开实施例并不限定于此,第一色彩显示标准还可以为其它色彩显示标准,只要满足第一色彩显示标准与第二色彩显示标准为不同的色彩显示标准即可适用于本公开实施例提供的技术方案。
第一颜色空间:第一色彩显示标准的颜色空间。当第一色彩显示标准为SDR色彩显示标准时,第一颜色空间为bt.709。
第二色彩显示标准:背景图像所属的色彩显示标准,以下实施例中以第二色彩显示标准为高动态范围(High Dynamic Range,SDR)色彩显示标准为例进行说明。同样,本公开实施例并不限定于此,第二色彩显示标准也可以为其它色彩显示标准,只要满足第一色彩显示标准与第二色彩显示标准为不同的色彩显示标准即可适用于本公开实施例提供的技术方案。
第二颜色空间:第二色彩显示标准的颜色空间。当第二色彩显示标准为HDR色彩显示标准时,第二颜色空间为bt.2020。
第一光信号集合:将前景图像的各个像素点的颜色转换为第二颜色空间中的光信号得到的光信号集合。由于HDR色彩显示标准的颜色空间为bt.2020,因此以下通过L 2020sticker(x,y)表示第一光信号集合中的光信号。
第二光信号集合:根据转换系数对所述第一光信号集合中的各个光信号进行转换得到的光信号集合。以下通过L Typical(x, y)表示第二光信号集合中的光 信号。
第三光信号集合:将背景图像的各个像素点的颜色转换为第二颜色空间中的光信号得到的光信号集合。以下通过L 2020imgIn(x,y)表示第三光信号集合中的光信号。
第四光信号集合:基于前景图像的透光率对第二光信号集合和第三光信号集合中的光信号进行融合得到的光信号集合。以下通过L 2020imgOut(x,y)表示第三光信号集合中的光信号。
第五光信号集合:将前景图像的各个像素点的颜色转换为第一色彩显示标准下的光信号得到的光信号集合。由于SDR色彩显示标准的颜色空间为bt.709,因此以下通过L 709sticker(x,y)表示第五光信号集合中的光信号。
目标颜色集合:将所述第四光信号集合中的光信号转换为第二颜色空间中的颜色得到的颜色集合。以下通过C 2020imgOut(x,y)表示目标颜色集合中的颜色。
基于上述内容,本公开实施例提供了一种图像处理方法,参照图1所示,该图像处理方法包括如下步骤S11至S16:
S11、将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合。
本公开实施例中的前景图像是指需要叠加于其他图像之上并与其他图像进行融合的图像。前景图像可以为第一色彩显示标准下的任意图像,本公开实施例对前景图像的类型不做限定,示例性的,前景图像可以包括特效编辑中的图像贴纸。
示例性的,第一色彩显示标准可以为SDR色彩显示标准,第二色彩显示标准可以为高动态范围(High Dynamic Range,HDR)色彩显示标准。
下述实施例中以第二色彩显示标准具体为HDR色彩显示标准中的感官量化曲线(Perceptual Quantizer,PQ)色彩显示标准为例进行说明,但本公开实施例并不限定于此。例如:本公开实施例中的第二色彩显示标准还可以为HDR色彩显示标准中的混合对数型伽玛曲线(Hybrid Log Gamma,HLG)色彩显 示标准。
具体的,PQ色彩显示标准是一种高动态范围HDR色彩显示标准,PQ色彩显示标准的颜色空间为颜色空间bt.2020,三原色为三原色bt.2020,光电转换函数为SMPTE2084标准。相比于PQ色彩显示标准,SDR色彩显示标准的允许显示的最大亮度更小,PQ色彩显示标准的颜色空间为颜色空间bt.709,三原色为三原色bt.709,光电转换函数为ITU-RBT.1886标准。
S12、根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数。
其中,所述目标显示设备为用于显示所述前景图像和所述背景图像的融合图像的设备。
具体的,本公开实施例中的第二色彩显示标准的峰值亮度是指第二颜色空间的所有颜色中亮度最大的颜色的亮度值。当第二色彩显示标准为PQ色彩显示标准时,第二色彩显示标准的峰值亮度为10000nit。本公开实施例中的目标显示设备的峰值亮度是指用于显示所述前景图像和所述背景图像的融合图像的设备的最大亮度。
S13、根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合。
具体的,在将属于第一色彩显示标准的前景图像与属于第二色彩显示标准的背景图像进行融合时,想要得到的理想效果为与均属于第二色彩显示标准的前景图像和背景图像的融合效果相同。但若不根据第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度对第一光信号集合中的各个光信号进行转换,而是直接对第一色彩显示标准和第二色彩显示标准的亮度范围进行归一化,并在归一化后将前景图像各个像素点的亮度对齐到第二色彩显示标准,或者直接采用前景图像各个像素点的亮度作为亮度输入,则会导致前景图像的亮度异常。
例如:当第一色彩显示标准为SDR色彩显示标准,第二色彩显示标准为PQ色彩显示标准时,第一色彩显示标准的亮度范围为[0,100]nit,第二色彩显示标准的亮度范围为[0,10000]nit。若直接对SDR色彩显示标准和PQ色彩显示标准的亮度范围进行归一化,并在归一化后将前景图像各个像素点的亮度对齐到第二色彩显示标准,则原本亮度较小的像素点的亮度会被转换为较大的 亮度值,进而导致前景图像亮度过大,不符合预期效果。若直接采用前景图像各个像素点的亮度作为亮度输入,则原本亮度较大的像素点的亮度会被显示为较小的亮度值,(SDR中的最大亮度值100nit也会被显示为PQ色彩显示标准中的很小的一个亮度值),进而导致前景图像亮度过小,不符合预期效果。
图像中像素点的亮度最终是由显示设备的屏幕显示亮度体现的,在将前景图像的各个像素点的颜色转换为第二色彩显示标准中的光信号后,根据第二色彩显示标准中的峰值亮度与显示设备的峰值亮度获取转换系数,并根据转换系数对所述第一光信号集合中的各个光信号进行转换,可以使前景图像的各个像素点的亮度通过显示设备的亮度对齐到第二色彩显示标准中的亮度,进而避免前景图像的亮度异常。
由于所述第一光信号集合中的光信号为第二色彩显示标准下的光信号,因此转换得到的第二光信号集合中的光信号仍为第二色彩显示标准下的光信号。
S14、将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合。
本公开实施例中的背景图像是指需要在融合时设置于前景图像之下进行融合的图像。背景图像可以为第二色彩显示标准下的任意图像,本公开实施例对背景图像的类型不做限定。
S15、基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合。
具体的,前景图像的透光率可以为图像编辑人员根据需求设定的透光率或者为默认的透光率。示例性的,前景图像的透光率可以为50%、80%等。
需要说明的是,前景图像各个位置的透光率可以均相同,也可以将前景图像划分为多个区域,并分别为每一个区域设置不同的透光率。
由于所述第二光信号集合中的光信号和所述第三光信号集合中的光信号均为第二色彩显示标准下的光信号,因此第二光信号集合中的光信号仍为第二色彩显示标准下的光信号。
S16、将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
本公开实施例提供的图像处理方法包括:将前景图像的各个像素点的颜色 由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合。根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数,根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合。将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合。基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合。将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
一方面,由于本公开实施例提供的图像处理方法可以将属于第一色彩显示标准的前景图像和属于第二色彩显示标准的背景图像均转换为第二色彩显示标准下的光信号,然后再进行融合。因此本公开实施例可以避免前景图像与背景图像的色域差异导致的异常。另一方面,由于本公开实施例提供的图像处理方法在将前景图像转换为第二色彩显示标准的光信号后,还会根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数,并根据所述转换系数对所述第一光信号集合中的各个光信号进行转换。因此本公开实施例还可以通过目标显示设备的亮度将前景图像的亮度对齐到背景图像所属的色彩显示标准中,进而避免前景图像与背景图像的亮度异常导致的异常。综上,本公开实施例提供的图像处理方法可以避免前景图像与背景图像的色域差异和亮度异常导致的异常,解决了不同色彩显示标准下的图像进行叠加融合会导致融合图像异常的问题。
作为对上述实施例的扩展和细化,本公开实施例还提供了另一种图像处理方法,参照图2所示步骤流程图以及图3所示数据流示意图,该图像处理方法包括:
S201、基于所述第一色彩显示标准的电光转换函数将所述前景图像的各个像素点的颜色转换为所述第一色彩显示标准下的光信号,获取第五光信号集合。
具体的,本公开实施例中的电光转换函数是指用于描述输入显示器的非线性颜色值(数字编码像素值,电信号)和显示器所显示的线性颜色值(光信号)之间的关系的函数。
由于设备存储、传输的是电信号(颜色值),且不同的色彩显示标准的电光转换函数并不相同,因此在将属于第一色彩显示标准的前景图像的各个像素点的颜色(电信号)转为第二颜色空间中的光信号时,首先需要将前景图像的各个像素点的颜色转换为第一色彩显示标准下的光信号,以在线性空间中实现不同色颜色空间的颜色值的转换。
示例性的,以下以第一色彩显示标准为SDR色彩显示标准,第一颜色空间为bt.2020为例对上述步骤S201进行说明。
SDR色彩显示标准的光电转换函数为:
L c=a{max[(y+b),0]} γ
Figure PCTCN2022117557-appb-000001
Figure PCTCN2022117557-appb-000002
其中,y为第一色彩显示标准下的电信号,L c为第一色彩显示标准下的光信号,L ω为电信号的最大值对应的光信号,L b为电信号的最小值对应的光信号,γ为常数。
可选的,可以对电信号的最大值对应的光信号L ω、电信号的最小值对应的光信号L b做归一化处理。即,令L b=0,L ω=1,其它电信号对应的光信号以浮点形式位于0-1之间。
将前景图像中的各个像素点的颜色C 709sticker(x,y)的红色分量R 709sticker(x,y)、绿色分量G 709sticker(x,y)、蓝色分量B 709sticker(x,y)分别作为电信号V代入上述电光转换函数,即可将前景图像中各个像素点的颜色转换为第一色彩显示标准下的光信号L 70gsticker(x,y),进而获取第五光信号集合。
S202、将所述第五光信号集合中的光信号转换为所述第二色彩显示标准下的光信号,获取所述第一光信号集合。
具体的,第一光信号集合中的各个光信号为第一色彩显示标准下的光信号,因此上述步骤S202为将第一色彩显示标准下的光信号转换为第二色彩显示标准下的光信号。不同色彩显示标准下的光信号之间具有特定的转换矩阵,通过相应的转换矩阵即可将第一色彩显示标准下的光信号至第二色彩显示标准下 的光信号的转换。
示例性的,当第一色彩实现标准为SDR色彩显示标准,第二标准为PQ色彩显示标准,将SDR色彩显示标准下的光信号表示为L 709sticker(x,y),对L 709sticker(x,y)进行转换得到的PQ色彩显示标准下光信号表示为L 2020sticker(x,y),则有:
Figure PCTCN2022117557-appb-000003
逐一将第五光信号集合中的光信号L 709sticker(x,y)带入上述转换方程式即可以将第五光信号集合中的光信号转换为所述第二色彩显示标准下的光信号L 2020sticker(x,y),进而获取第一光信号集合。
通过上述步骤S201至S202,本公开实施例实现了将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合。
S203、获取所述目标显示设备的峰值亮度与所述第二色彩显示标准的峰值亮度的比值作为所述转换系数。
设:转换系数为A,目标显示设备的峰值亮度为Nit Typical,第二色彩显示标准的峰值亮度为Nit pQpeak,则有:
A=Nit Typical/Nit pQpeak
通过上述步骤S203,本公开实施例实现了根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数。
S204、将所述第一光信号集合中的各个光信号转换为所述第一光信号集合中的各个光信号与所述转换系数的乘积,获取所述第二光信号集合。
即,转换系数A、第一光信号集合中的光信号L 2020sticker(x,y)以及第二光信号集合中的光信号L Typical(x,y)满足如下转换方式:
L Typical(x,y)=L 2020sticker(x,y)*A=L 2020sticker(x,y)*Nit Typical/Nit pQPeak
逐一将第一光信号集合中的光信号L 2020sticker(x,y)带入上述转换方程式即可以将第一光信号集合中的各个光信号与所述转换系数的乘积L Typical(x,y),进而获取第二光信号集合。
通过上述步骤S204,本公开实施例实现了根据所述转换系数对所述第一 光信号集合中的各个光信号进行转换,获取第二光信号集合。
S205、基于所述第二色彩显示标准的电光转换函数将所述背景图像的各个像素点的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合。
示例性的,以下以第二色彩显示标准为PQ色彩显示标准,为例对上述步骤S205进行说明。
PQ色彩显示标准的电光转换函数为:
Figure PCTCN2022117557-appb-000004
Figure PCTCN2022117557-appb-000005
其中,V为PQ色彩显示标准下的电信号,L c为PQ色彩显示标准的光信号,分别将背景图像的各个像素点的颜色C 2020imgIn(x,y)的红色分量R 2020imgIn(x,y)、绿色分量G 2020imgIn(x,y)以及蓝色分量B 2020imgIn(x,y)作为电信号V代入上式,即可将所述背景图像的各个像素点的颜色C 2020imgIn(x,y)转换为第二色彩显示标准下的光信号L 2020imgIn(x,y),从而获取第三光信号集合。
通过上述步骤S205,本公开实施例实现了将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号。
S206、基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合。
作为本公开实施例一种可选的实施方式,上述步骤S206(基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合)的实现方式包括:
基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集 合中像素坐标相同的光信号进行加权融合,获取融合光信号集合;
根据所述融合光信号集合、所述第二光信号集合的光信号中与任意所述第三光信号集合中的光信号的像素坐标均不相同的光信号,以及所述第三光信号集合的光信号中与任意所述第二光信号集合中的光信号的像素坐标均不相同的光信号,生成所述第四光信号集合。
可选的,根据所述融合光信号集合、所述第二光信号集合的光信号中与任意所述第三光信号集合中的光信号的像素坐标均不相同的光信号,以及所述第三光信号集合的光信号中与任意所述第二光信号集合中的光信号的像素坐标均不相同的光信号,生成所述第四光信号集合的实现方式包括:
将所述第二光信号集合的光信号中与任意所述第三光信号集合中的光信号的像素坐标均不相同的光信号和所述第三光信号集合的光信号中与任意所述第二光信号集合中的光信号的像素坐标均不相同的光信号添加到所述融合光信号集合中,生成所述第四光信号集合。
示例性的,参照图4所示,图4中以背景图像41包括5*5个像素点、前景图像42包括3*3个像素点为例对本公开实施例进行说明。第二光信号集合中的光信号LT ypical(2,4)、L Typical(2,5)、L Typical(3,4)、L Typical(3,5)、L Typical(4,4)、L Typical(4,5)分别与第三光信号集合中的光信号L 2020imgIn(2,4)、L 2020imgIn(2,5)、L 2020imgIn(3,4)、L 2020imgIn(3,5)、L 2020imgIn(4,4)、L 2020imgIn(4,5)的像素坐标相同。因此基于所述前景图像的透光率对L Typical(2,4)和L 2020imgIn(2,4)、L Typical(2,5)和L 2020imgIn(2,5)、L Typical(3,4)和L 2020imgIn(3,4)、L Typical(3,5)和L 2020imgIn(3,5)、L Typical(4,4)和L 2020imgIn(4,4)、L Typical(4,5)和L 2020imgIn(4,5)进行加权融合,获取融合光信号集合{L 2020imgOut(2,4)、L 2020imgOut(2,5)、L 2020imgOut(3,4)、L 2020imgOut(3,5)、L 2020imgOut(4,4)、L 2020imgOut(4,5)}。
可选的,基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中像素坐标相同的光信号进行加权融合,获取融合光信号集合,包括如下步骤a至步骤d:
步骤a、获取所述第二光信号集合中的第一光信号的权重值。
其中,所述第一光信号的权重值为所述第一光信号与所述前景图像的遮光率的乘积。所述前景图像的遮光率为1与所述前景图像的透光率的差值。
设:第一光信号的权重值为P 1_(x,y),前景图像的透光率为q,获取所述第一光信号的权重值即为:
P 1_(x,y)=L Typical(x,y)*(1-q)
步骤b、获取所述第三光信号集合中的第二光信号的权重值。
其中,所述第二光信号与所述第一光信号为像素点坐标相同的光信号,所述第二光信号的权重值为所述第二光信号与所述前景图像的透光率的乘积。
设:第二光信号的权重值为P 2_(x,y),前景图像的透光率为q,获取所述第二光信号的权重值即为:
P 2_(x,y)=L 2020imgIn(x,y)*q
步骤c、获取所述第一光信号的权重值和所述第二光信号的权重值的和作为所述第一光信号和所述第二光信号的融合结果。
L 2020imgOut(x,y)=L Typical(x,y)*(1-q)+L 2020imgIn(x,y)*q
步骤d、根据所述第二光信号集合和所述第三光信号集合中各个像素坐标相同的光信号的融合结果,生成所述融合光信号集合。
即,通过上述步骤a至步骤d获取每一对像素坐标相同的光信号的融合结果,然后将每一对像素坐标相同的光信号的融合结果组合为融合光信号集合。
进一步参照图4所示,所述第二光信号集合的光信号中与任意所述第三光信号集合中的光信号的像素坐标均不相同的光信号包括:L Typical(2,6)、L Typical(3,6)、L Typical(4,6),所述第三光信号集合的光信号中与任意所述第二光信号集合中的光信号的像素坐标均不相同的光信号包括:L 2020imgIn(1,1)、L 2020imgIn(1,2)、L 2020imgIn(1,3)、L 2020imgIn(1,4)、L 2020imgIn(1,5)、L 2020imgIn(2,1)、L 2020imgIn(2,2)、L 2020imgIn(2,3)、、L 2020imgIn(3,1)、L 2020imgIn(3,2)、L 2020imgIn(3,3)、L 2020imgIn(4,1)、L 2020imgIn(4,2)、L 2020imgIn(4,3)、L 2020imgIn(5,1)、L 2020imgIn(5,2)、L 2020imgIn(5,3)、 L 2020imgIn(5,4)、L 2020imgIn(5,5),因此根据融合光信号集合{L 2020imgOut(2,4)、L 2020imgOut(2,5)、L 2020imgOut(3,4)、L 2020imgOut(3,5)、L 2020imgOut(4,4)、L 2020imgOut(4,5)}、L Typical(2,6)、L Typical(3,6)、L Typical(4,6)、L 2020imgIn(1,1)、L 2020imgIn(1,2)、L 2020imgIn(1,3)、L 2020imgIn(1,4)、L 2020imgIn(1,5)、L 2020imgIn(2,1)、L 2020imgIn(2,2)、L 2020imgIn(2,3)、、L 2020imgIn(3,1)、L 2020imgIn(3,2)、L 2020imgIn(3,3)、L 2020imgIn(4,1)、L 2020imgIn(4,2)、L 2020imgIn(4,3)、L 2020imgIn(5,1)、L 2020imgIn(5,2)、L 2020imgIn(5,3)、L 2020imgIn(5,4)、L 2020imgIn(5,5),生成第四光信号集合。
最终,得到的第四光信号集合为{L 2020imgOut(2,4)、L 2020imgOut(2,5)、L 2020imgOut(3,4)、L 2020imgOut(3,5)、L 2020imgOut(4,4)、L 2020imgOut(4,5)、L 2020imgIn(1,1)、L 2020imgIn(1,2)、L 2020imgIn(1,3)、L 2020imgIn(1,4)、L 2020imgIn(1,5)、L 2020imgIn(2,1)、L 2020imgIn(2,2)、L 2020imgIn(2,3)、L 2020imgIn(3,1)、L 2020imgIn(3,2)、L 2020imgIn(3,3)、L 2020imgIn(4,1)、L 2020imgIn(4,2)、L 2020imgIn(4,3)、L 2020imgIn(5,1)、L 2020imgIn(5,2)、L 2020imgIn(5,3)、L 2020imgIn(5,4)、L 2020imgIn(5,5)、L Typical(2,6)、L Typical(3,6)、L Typical(4,6)}。
S207、基于所述第二色彩显示标准的光电转换函数将所述第四光信号集合中的各个光信号转换为所述第二颜色空间中的颜色,获取目标颜色集合。
当第二色彩显示标准为PQ色彩显示标准时,第四光信号集中的各个光信号与第二颜色空间中的颜色之间转换关系遵循如下方程式:
Figure PCTCN2022117557-appb-000006
Figure PCTCN2022117557-appb-000007
逐一将第四光信号集合中的光信号L 2020imgOut(x,y)的红色分量、绿色分量、绿色分量分别作为L c带入上述方程式,即将第四光信号集合中的光信号转换为第二颜色空间中的颜色C 2020imgOut(x,y)。
S208、根据所述目标颜色集合中的各个颜色和所述目标颜色集合中的各个颜色的像素坐标,获取所述前景图像和所述背景图像的融合图像。
进一步的,将第四光信号集合中的光信号转换得到的第二颜色空间中的颜色按照像素坐标排列,即可得到前景图像和所述背景图像的融合图像。
通过上述步骤S207至S208,本公开实施例实现了将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
本公开实施例提供的图像处理方法包括:将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合。根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数,根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合。将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合。基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合。将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
一方面,由于本公开实施例提供的图像处理方法可以将属于第一色彩显示标准的前景图像和属于第二色彩显示标准的背景图像均转换为第二色彩显示标准下的光信号,然后再进行融合。因此本公开实施例可以避免前景图像因为色域差异导致的异常。另一方面,由于本公开实施例提供的图像处理方法在将前景图像转换为第二色彩显示标准的光信号后,还会根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数,并根据所述转换系数对所述第一光信号集合中的各个光信号进行转换。因此本公开实施例还可以通过目标显示设备的亮度将前景图像的亮度对齐到背景图像所属的色彩显示标准中,进而避免前景图像因为亮度异常导致的异常。综上,本公开实施例提 供的图像处理方法可以避免前景图像因此色域差异和亮度异常导致的异常,解决了不同色彩显示标准下的图像进行叠加融合会导致融合图像异常的问题。
基于同一发明构思,作为对上述方法的实现,本公开实施例还提供了一种图像处理装置,该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的图像处理装置能够对应实现前述方法实施例中的全部内容。
本公开实施例提供了一种图像处理装置。图5为该图像处理装置的结构示意图,如图5所示,该图像处理装置500包括:
第一转换单元51,用于将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合;
转换系数获取单元52,用于根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数;所述目标显示设备为用于显示所述前景图像和所述背景图像的融合图像的设备;
第二转换单元53,用于根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合;
第三转换单元54,用于将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合;
融合单元55,用于基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合;
融合图像获取单元56,用于将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
作为本公开实施例一种可选的实施方式,所述第一转换单元51,可以用于基于所述第一色彩显示标准的电光转换函数将所述前景图像的各个像素点的颜色转换为所述第一色彩显示标准下的光信号,获取第五光信号集合;将所述第五光信号集合中的光信号转换为所述第二色彩显示标准下的光信号,获取所述第一光信号集合。
作为本公开实施例一种可选的实施方式,所述转换系数获取单元52,可 以用于获取所述目标显示设备的峰值亮度与所述第二色彩显示标准的峰值亮度的比值作为所述转换系数。
作为本公开实施例一种可选的实施方式,所述第二转换单元53,可以用于将所述第一光信号集合中的各个光信号转换为所述第一光信号集合中的各个光信号与所述转换系数的乘积,获取所述第二光信号集合。
作为本公开实施例一种可选的实施方式,所述第三转换单元54,可以用于基于所述第二色彩显示标准的电光转换函数将所述背景图像的各个像素点的颜色转换为所述第二色彩显示标准下的光信号。
作为本公开实施例一种可选的实施方式,所述融合单元55,可以用于基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中像素坐标相同的光信号进行加权融合,获取融合光信号集合;根据所述融合光信号集合、所述第二光信号集合的光信号中与任意所述第三光信号集合中的光信号的像素坐标均不相同的光信号,以及所述第三光信号集合的光信号中与任意所述第二光信号集合中的光信号的像素坐标均不相同的光信号,生成所述第四光信号集合。
作为本公开实施例一种可选的实施方式,所述融合单元55,可以用于获取所述第二光信号集合中的第一光信号的权重值,所述第一光信号的权重值为所述第一光信号与所述前景图像的遮光率的乘积,所述前景图像的遮光率为1与所述前景图像的透光率的差值;获取所述第三光信号集合中的第二光信号的权重值,所述第二光信号与所述第一光信号为像素点坐标相同的光信号,所述第二光信号的权重值为所述第二光信号与所述前景图像的透光率的乘积;获取所述第一光信号的权重值和所述第二光信号的权重值的和作为所述第一光信号和所述第二光信号的融合结果;根据所述第二光信号集合和所述第三光信号集合中各个像素坐标相同的光信号的融合结果,生成所述融合光信号集合。
作为本公开实施例一种可选的实施方式,所述融合图像获取单元56,可以用于基于所述第二色彩显示标准的光电转换函数将所述第四光信号集合中的各个光信号转换为所述第二颜色空间中的颜色,获取目标颜色集合;根据所述目标颜色集合中的各个颜色和所述目标颜色集合中的各个颜色的像素坐标,获取所述前景图像和所述背景图像的融合图像。
作为本公开实施例一种可选的实施方式,
所述第一色彩显示标准为标准动态范围SDR色彩显示标准;
所述第二色彩显示标准为感官量化曲线PQ色彩显示标准。
本实施例提供的图像处理装置可以执行上述方法实施例提供的图像处理方法,其实现原理与技术效果类似,此处不再赘述。
基于同一发明构思,本公开实施例还提供了一种电子设备。图6为本公开实施例提供的电子设备的结构示意图,如图6所示,本实施例提供的电子设备包括:存储器61和处理器62,所述存储器61用于存储计算机程序;所述处理器62用于在执行所述计算机程序时,使得所述电子设备实现上述实施例提供的图像处理方法。
本公开实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现上述实施例提供的图像处理方法。
本公开实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机实现上述实施例提供的图像处理方法。
本领域技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。
处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动存储介质。存储介质可以由任何方法或技术来实现信息存储,信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。根据本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
最后应说明的是:以上各实施例仅用以说明本公开实施例的技术方案,而非对其限制;尽管参照前述各实施例对本公开实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的范围。

Claims (13)

  1. 一种图像处理方法,包括:
    将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合;
    根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数;所述目标显示设备为用于显示所述前景图像和所述背景图像的融合图像的设备;
    根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合;
    将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合;
    基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合;
    将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
  2. 根据权利要求1所述的方法,其中,所述将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合,包括:
    基于所述第一色彩显示标准的电光转换函数将所述前景图像的各个像素点的颜色转换为所述第一色彩显示标准下的光信号,获取第五光信号集合;
    将所述第五光信号集合中的光信号转换为所述第二色彩显示标准下的光信号,获取所述第一光信号集合。
  3. 根据权利要求1所述的方法,其中,所述根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数,包括:
    获取所述目标显示设备的峰值亮度与所述第二色彩显示标准的峰值亮度的比值作为所述转换系数。
  4. 根据权利要求1所述的方法,其中,所述根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合,包括:
    将所述第一光信号集合中的各个光信号转换为所述第一光信号集合中的各个光信号与所述转换系数的乘积,获取所述第二光信号集合。
  5. 根据权利要求1所述的方法,其中,所述将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,包括:
    基于所述第二色彩显示标准的电光转换函数将所述背景图像的各个像素点的颜色转换为所述第二色彩显示标准下的光信号。
  6. 根据权利要求1所述的方法,其中,所述基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合,包括:
    基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中像素坐标相同的光信号进行加权融合,获取融合光信号集合;
    根据所述融合光信号集合、所述第二光信号集合的光信号中与任意所述第三光信号集合中的光信号的像素坐标均不相同的光信号,以及所述第三光信号集合的光信号中与任意所述第二光信号集合中的光信号的像素坐标均不相同的光信号,生成所述第四光信号集合。
  7. 根据权利要求6所述的方法,其中,所述基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中像素坐标相同的光信号进行加权融合,获取融合光信号集合,包括:
    获取所述第二光信号集合中的第一光信号的权重值,所述第一光信号的权重值为所述第一光信号与所述前景图像的遮光率的乘积,所述前景图像的遮光率为1与所述前景图像的透光率的差值;
    获取所述第三光信号集合中的第二光信号的权重值,所述第二光信号与所述第一光信号为像素点坐标相同的光信号,所述第二光信号的权重值为所述第二光信号与所述前景图像的透光率的乘积;
    获取所述第一光信号的权重值和所述第二光信号的权重值的和作为所述第一光信号和所述第二光信号的融合结果;
    根据所述第二光信号集合和所述第三光信号集合中各个像素坐标相同的光信号的融合结果,生成所述融合光信号集合。
  8. 根据权利要求1所述的方法,其中,所述将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像,包括:
    基于所述第二色彩显示标准的光电转换函数将所述第四光信号集合中的各个光信号转换为所述第二颜色空间中的颜色,获取目标颜色集合;
    根据所述目标颜色集合中的各个颜色和所述目标颜色集合中的各个颜色的像素坐标,获取所述前景图像和所述背景图像的融合图像。
  9. 根据权利要求1-8任一项所述的方法,其中,
    所述第一色彩显示标准为标准动态范围SDR色彩显示标准;
    所述第二色彩显示标准为高动态范围HDR色彩显示标准。
  10. 一种图像处理装置,包括:
    第一转换单元,用于将前景图像的各个像素点的颜色由第一色彩显示标准的第一颜色空间中的颜色转换为第二色彩显示标准下的光信号,获取第一光信号集合;
    转换系数获取单元,用于根据所述第二色彩显示标准的峰值亮度和目标显示设备的峰值亮度,获取转换系数;所述目标显示设备为用于显示所述前景图像和所述背景图像的融合图像的设备;
    第二转换单元,用于根据所述转换系数对所述第一光信号集合中的各个光信号进行转换,获取第二光信号集合;
    第三转换单元,用于将背景图像的各个像素点的颜色由第二色彩显示标准的第二颜色空间中的颜色转换为所述第二色彩显示标准下的光信号,获取第三光信号集合;
    融合单元,用于基于所述前景图像的透光率对所述第二光信号集合和所述第三光信号集合中的光信号进行融合,获取第四光信号集合;
    融合图像获取单元,用于将所述第四光信号集合中的光信号转换为所述第二颜色空间中的颜色,获取所述前景图像和所述背景图像的融合图像。
  11. 一种电子设备,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在执行所述计算机程序时,使得所述电子设备实现权利要求1-9任一项所述的图像处理方法。
  12. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现权利要求1-9任一项所述的图像处理方法。
  13. 一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机实现权利要求1-9任一项所述的图像处理方法。
PCT/CN2022/117557 2021-09-10 2022-09-07 一种图像处理方法及装置 WO2023036181A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111062473.0 2021-09-10
CN202111062473.0A CN115797237A (zh) 2021-09-10 2021-09-10 一种图像处理方法及装置

Publications (1)

Publication Number Publication Date
WO2023036181A1 true WO2023036181A1 (zh) 2023-03-16

Family

ID=85473601

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/117557 WO2023036181A1 (zh) 2021-09-10 2022-09-07 一种图像处理方法及装置

Country Status (2)

Country Link
CN (1) CN115797237A (zh)
WO (1) WO2023036181A1 (zh)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040239966A1 (en) * 2003-05-30 2004-12-02 Larson Bradley R. Color imaging devices, color imaging methods, and color separation methods
JP2005252392A (ja) * 2004-03-01 2005-09-15 Canon Inc 画像処理装置及び方法、並びにコンピュータプログラム及びコンピュータ可読記憶媒体
CN105744159A (zh) * 2016-02-15 2016-07-06 努比亚技术有限公司 一种图像合成方法及装置
CN107111980A (zh) * 2014-12-11 2017-08-29 皇家飞利浦有限公司 针对特定显示器优化高动态范围图像
CN107851421A (zh) * 2015-07-31 2018-03-27 索尼公司 视频信号处理装置、视频信号处理方法和显示装置
JP2018107649A (ja) * 2016-12-27 2018-07-05 ブラザー工業株式会社 画像処理装置、および、コンピュータプログラム
JP2018121222A (ja) * 2017-01-25 2018-08-02 ブラザー工業株式会社 画像処理装置、および、コンピュータプログラム
CN108370428A (zh) * 2015-12-25 2018-08-03 夏普株式会社 显示装置、显示装置的控制方法、控制程序、以及记录介质
CN110177230A (zh) * 2014-06-10 2019-08-27 松下知识产权经营株式会社 再现方法和再现装置
CN110447051A (zh) * 2017-03-20 2019-11-12 杜比实验室特许公司 在感知上保持参考场景的对比度和色度
CN112689138A (zh) * 2019-10-18 2021-04-20 华为技术有限公司 一种图像信号转换处理方法、装置及终端设备

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040239966A1 (en) * 2003-05-30 2004-12-02 Larson Bradley R. Color imaging devices, color imaging methods, and color separation methods
JP2005252392A (ja) * 2004-03-01 2005-09-15 Canon Inc 画像処理装置及び方法、並びにコンピュータプログラム及びコンピュータ可読記憶媒体
CN110177230A (zh) * 2014-06-10 2019-08-27 松下知识产权经营株式会社 再现方法和再现装置
CN107111980A (zh) * 2014-12-11 2017-08-29 皇家飞利浦有限公司 针对特定显示器优化高动态范围图像
CN107851421A (zh) * 2015-07-31 2018-03-27 索尼公司 视频信号处理装置、视频信号处理方法和显示装置
CN108370428A (zh) * 2015-12-25 2018-08-03 夏普株式会社 显示装置、显示装置的控制方法、控制程序、以及记录介质
CN105744159A (zh) * 2016-02-15 2016-07-06 努比亚技术有限公司 一种图像合成方法及装置
JP2018107649A (ja) * 2016-12-27 2018-07-05 ブラザー工業株式会社 画像処理装置、および、コンピュータプログラム
JP2018121222A (ja) * 2017-01-25 2018-08-02 ブラザー工業株式会社 画像処理装置、および、コンピュータプログラム
CN110447051A (zh) * 2017-03-20 2019-11-12 杜比实验室特许公司 在感知上保持参考场景的对比度和色度
CN112689138A (zh) * 2019-10-18 2021-04-20 华为技术有限公司 一种图像信号转换处理方法、装置及终端设备

Also Published As

Publication number Publication date
CN115797237A (zh) 2023-03-14

Similar Documents

Publication Publication Date Title
US10614603B2 (en) Color normalization for a multi-camera system
US20150363912A1 (en) Rgbw demosaic method by combining rgb chrominance with w luminance
CN109076169B (zh) 捕获彩色图像数据的方法、装置及计算机可读媒体
US20200288092A1 (en) Model training method, chromatic aberration correction method, apparatus, medium and electronic device
US20190005630A1 (en) High Dynamic Range Image Processing Method and Apparatus
US6828982B2 (en) Apparatus and method for converting of pixels from YUV format to RGB format using color look-up tables
US10348978B2 (en) Processor selecting between image signals in response to illuminance condition, image processing device including same, and related method for image processing
US20180352263A1 (en) Method and device for processing color image data representing colors of a color gamut
WO2018035879A1 (zh) 一种图像处理方法以及装置
CN106031156A (zh) 一种拍摄补光的控制方法、装置及终端
WO2021214474A1 (en) System and method for image format conversion using 3d lookup table approximation
US10692193B2 (en) Saturation enhancement method and device based on fuzzy control
CN111738950B (zh) 图像处理方法及装置
WO2023036181A1 (zh) 一种图像处理方法及装置
WO2023125467A1 (zh) 图像处理方法、装置、电子设备及可读存储介质
CN104639925A (zh) 一种rgb信号到rgbw信号的图像转换方法及装置
WO2023036110A1 (zh) 一种图像处理方法及装置
CN112805745A (zh) 一种混合图层处理方法及装置
US11647298B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
US10958886B2 (en) System and method of reducing distortion during downsampling
US8665486B2 (en) Look-up table for transfer function
WO2023036182A1 (zh) 一种颜色映射卡生成方法及装置
WO2023035943A1 (zh) 色卡生成方法、图像处理方法、装置及可读存储介质
WO2023036111A1 (zh) 视频处理方法、装置、设备及介质
CN112017174B (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: 22866644

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE