TW201835861A - Tone curve mapping for high dynamic range images - Google Patents

Tone curve mapping for high dynamic range images Download PDF

Info

Publication number
TW201835861A
TW201835861A TW107105408A TW107105408A TW201835861A TW 201835861 A TW201835861 A TW 201835861A TW 107105408 A TW107105408 A TW 107105408A TW 107105408 A TW107105408 A TW 107105408A TW 201835861 A TW201835861 A TW 201835861A
Authority
TW
Taiwan
Prior art keywords
output
dynamic range
input
value
indicates
Prior art date
Application number
TW107105408A
Other languages
Chinese (zh)
Other versions
TWI671710B (en
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 TW201835861A publication Critical patent/TW201835861A/en
Application granted granted Critical
Publication of TWI671710B publication Critical patent/TWI671710B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • 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/10004Still image; Photographic image
    • 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/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

Methods for mapping an image from a first dynamic range to a second dynamic range are presented. The mapping is based on a function that includes two spline polynomials determined using three anchor points and three slopes. The first anchor point is determined using the black point levels of the input and target output, the second anchor point is determined using the white point levels of the input and target output, and the third anchor point is determined using mid-tones information data for the input and target output. The mid-tones level of the target output is computed adaptively based on an ideal one-to-one mapping and by preserving input contrast in both the blacks and the highlights. An example tone-mapping transfer function based on third order (cubic) Hermite splines is presented.

Description

用於高動態範圍影像之色調曲線映射Tone curve mapping for high dynamic range images

本發明大體上係關於影像。更特定言之,本發明之一實施例係關於判定用於將高動態範圍(HDR)影像及視訊信號自一第一動態範圍映射至一第二動態範圍之一色調曲線之參數。The present invention is generally directed to images. More specifically, an embodiment of the present invention relates to determining parameters for mapping high dynamic range (HDR) images and video signals from a first dynamic range to a tone curve of a second dynamic range.

如本文中所使用,術語「動態範圍」(DR)可關於人類視覺系統(HVS)感知一影像中之一強度(例如,照度、亮度)範圍(例如,自最暗灰色(黑色)至最亮白色(高亮光))之一能力。在此意義上,DR係關於一「場景相關性」強度。DR亦可關於一顯示裝置充分或近似地呈現一特定廣度之一強度範圍之能力。在此意義上,DR係關於一「顯示相關性」強度。除非在本文中之描述中之任何時刻將一特定意義明顯地規定為具有特定重要性,否則應推斷該術語可例如可互換地以任一意義使用。 如本文中所使用,術語高動態範圍(HDR)係關於跨越人類視覺系統(HVS)之一些14至15個數量級之一DR廣度。實際上,可相對於HDR將DR (人類在超過DR時可同時感知強度範圍中的廣泛廣度)稍微截除。如本文中所使用,術語增強動態範圍(EDR)或視覺動態範圍(VDR)可獨立地或可互換地關於DR,該DR在一場景或影像內可由人類視覺系統(HVS)感知,該HVS包含眼睛移動,從而允許跨該場景或影像之一些光適應變化。 實際上,影像包括一或多個色彩成分(例如,亮度Y及色度Cb及Cr),其中每一色彩成分係以每像素n 位元之一精度表示(例如,n =8)。使用線性照度編碼,將n ≤8之影像(例如,彩色24位元JPEG影像)視為標準動態範圍之影像,同時可將n >8之影像視為增強動態範圍之影像。EDR及HDR影像亦可使用高精度(例如,16位元)浮點格式(諸如,由工業光學魔術公司(Industrial Light and Magic)開發的OpenEXR檔案格式)儲存及分佈。 如本文中所使用,術語「後設資料」係關於作為編碼位元流之部分被傳輸且輔助一解碼器呈現一經解碼影像之任何輔助資訊。此後設資料可包含但不限於如本文中所描述之色彩空間或音域資訊、參考顯示參數及輔助信號參數。 多數消費者桌上型顯示器當前支援200 cd/m2 或尼特(nit)至300 cd/m2 或尼特之照度。大多數消費者HDTV的範圍自300尼特至500尼特,其中新型號達到1000尼特(cd/m2 )。此等習知顯示器因此相對於HDR或EDR為一低動態範圍(LDR)的典型,亦稱為一標準動態範圍(SDR)。當EDR內容之可用性由於擷取設備(例如,相機)及EDR顯示器(例如,來自杜比(Dolby)實驗室的PRM-4200專業基準監視器)兩者的發展而不斷增長,EDR內容可調色及顯示在支援更高動態範圍(例如,自1000尼特至5000尼特或更高)之EDR顯示器上。一般而言且無限制,本發明之方法係關於高於SDR之任何動態範圍。 高動態範圍(HDR)內容創作現在變得非常普遍,因為此技術比更早期格式提供更逼真且栩栩如生的影像。然而,許多顯示系統(包含數億個消費者電視顯示器)不能再現HDR影像。此外,由於HDR顯示器之範圍廣(即,自1,000尼特至5,000尼特或更高),在一HDR顯示器上最佳化的HDR內容可能不適合在另一HDR顯示器上直接播放。用於服務整個市場之一種方法係創作多個版本的新視訊內容;即,一個版本使用HDR影像,且另一版本使用標準動態範圍(SDR)影像。然而,這要求內容作者以多種格式創作他們的視訊內容,且可能要求消費者知道為他們的特定顯示器購買哪種格式。一種潛在更好的方法可能係創作一個版本的內容(為HDR形式),且使用一影像資料變換系統(例如,作為一視訊轉換器功能性之部分)來將輸入HDR內容自動地降頻轉換(或升頻轉換)為適當的輸出SDR或HDR內容。正如本發明人在此所明白的,為改良現存顯示方案,開發了用於判定用於HDR影像之顯示映射之一色調曲線之改良技術。 本段中描述之方法係可追求之方法,但不一定是先前已構想或追求之方法。因此,除非另有指示,否則不應假設本段中描述之方法之任一者僅僅由於它們被包含在本段中而被認為係先前技術。類似地,除非另有指示,否則關於一或多種方法識別之問題不應被假設為在任何先前技術中基於本段被認可。As used herein, the term "dynamic range" (DR) may relate to a range of intensity (eg, illuminance, brightness) in an image with respect to the human visual system (HVS) (eg, from the darkest gray (black) to the brightest) White (highlight) one of the abilities. In this sense, DR is about a "scenes correlation" strength. The DR may also be capable of fully or approximately presenting a range of intensities of a particular extent to a display device. In this sense, DR is about a "display correlation" strength. Unless a particular meaning is explicitly stated as having a particular importance at any point in the description herein, it should be inferred that the term may be used interchangeably, in any sense. As used herein, the term high dynamic range (HDR) relates to the DR breadth of one of some 14 to 15 orders of magnitude across the human visual system (HVS). In fact, DR (humans can simultaneously perceive a wide breadth of the intensity range when DR is exceeded) can be slightly truncated relative to HDR. As used herein, the terms enhanced dynamic range (EDR) or visual dynamic range (VDR) may be independently or interchangeably related to DR, which may be perceived by a human visual system (HVS) within a scene or image, the HVS including The eye moves, allowing some of the light across the scene or image to adapt to changes. In practice, the image includes one or more color components (eg, luminance Y and chrominance Cb and Cr), wherein each color component is represented by one of n bits per pixel (eg, n =8). Using linear illumination encoding, images with n ≤ 8 (for example, color 24-bit JPEG images) are treated as images with a standard dynamic range, while images with n >8 can be viewed as images with enhanced dynamic range. EDR and HDR images can also be stored and distributed using high precision (eg, 16 bit) floating point formats such as the OpenEXR file format developed by Industrial Light and Magic. As used herein, the term "post-data" relates to any auxiliary information that is transmitted as part of a coded bitstream and that assists a decoder in presenting a decoded image. Subsequent settings may include, but are not limited to, color space or range information, reference display parameters, and auxiliary signal parameters as described herein. Most consumer desktop displays currently support illumination of 200 cd/m 2 or nit to 300 cd/m 2 or nit. Most consumer HDTVs range from 300 nits to 500 nits, with new models reaching 1000 nits (cd/m 2 ). Such conventional displays are therefore typically low dynamic range (LDR) with respect to HDR or EDR, also referred to as a standard dynamic range (SDR). When the availability of EDR content continues to grow due to the development of both capture devices (eg, cameras) and EDR displays (eg, PRM-4200 professional benchmark monitors from Dolby Laboratories), EDR content can be tinted And displayed on EDR displays that support higher dynamic range (eg, from 1000 nits to 5000 nits or higher). In general and without limitation, the method of the present invention relates to any dynamic range above SDR. High dynamic range (HDR) content authoring is now very common as this technology provides more realistic and lifelike images than earlier formats. However, many display systems, including hundreds of millions of consumer television displays, are unable to reproduce HDR images. Moreover, due to the wide range of HDR displays (ie, from 1,000 nits to 5,000 nits or higher), HDR content optimized on an HDR display may not be suitable for direct playback on another HDR display. One method used to serve the entire market is to create multiple versions of new video content; that is, one version uses HDR images and the other version uses standard dynamic range (SDR) images. However, this requires content authors to author their video content in a variety of formats, and may require consumers to know which format to purchase for their particular display. A potentially better approach might be to create a version of the content (in HDR form) and use an image data transformation system (eg, as part of a video converter functionality) to automatically down convert the input HDR content ( Or upconverting) for proper output SDR or HDR content. As the inventors hereunder understand, in order to improve the existing display scheme, an improved technique for determining a tone curve for display mapping of HDR images has been developed. The methods described in this paragraph are methods that can be pursued, but are not necessarily methods that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the methods described in this paragraph are considered to be prior art only because they are included in this paragraph. Similarly, questions identified with respect to one or more methods should not be assumed to be recognized based on this paragraph in any prior art unless otherwise indicated.

相關申請案交叉參考 本申請案主張皆在2017年2月15日申請之美國專利申請案第62/459,141號及歐洲專利申請案第17156284.6號以及在2017年3月1日申請之美國臨時專利申請案第62/465,298號之優先權利,該等申請案之各者以引用方式併入本文中。 本文中描述了用於判定用於顯示高動態範圍(HDR)影像之映射之一色調曲線之方法。在以下描述中,出於解釋目的,闡述數種特定細節以提供對本發明之一透徹理解。然而,將明白可在沒有此等特定細節之情況下實踐本發明。在其他例項中,未詳盡地描述眾所周知的的結構及裝置以避免不必要地封閉、模糊或混淆本發明。 概述 本文中描述之例示性實施例係關於用於判定用於顯示高動態範圍(HDR)影像之映射之一色調曲線之方法。在一視訊系統中,在一實施例中,對於一輸入影像,一處理器接收第一資訊資料,其包括一第一動態範圍中之一輸入黑點位準(x1,SMin)、一輸入中間色調位準(x2,SMid)及一輸入白點位準(x3,SMax)。處理器亦在一第二動態範圍中存取一輸出影像之第二資訊資料,該第二資訊資料包括該第二動態範圍中之一第一輸出黑點位準(TminPQ)及一第一輸出白點位準(TmaxPQ)。該處理器基於該第一及該第二資訊資料來判定該第二動態範圍中之一輸出中間色調值。該處理器基於該第二資訊資料及該輸出中間色調值來計算該第二動態範圍中之一第二輸出黑點及一第二輸出白點。接著,該處理器基於該第一資訊資料、該第二資訊資料及該輸出中間色調值來計算一尾部斜率、一頭部斜率及一中間色調斜率。該處理器判定一轉移函數,該轉移函數用於將該第一動態範圍中之該輸入影像之像素值映射至該第二動態範圍中之該輸出影像之對應像素值,其中該轉移函數包括兩段,其中該第一段係基於該尾部斜率、該中間色調斜率、該輸入黑點位準、該輸入中間色調位準、該第二輸出黑點及該輸出中間色調值來判定,且該第二段係基於該中間色調斜率、該頭部斜率、該輸入中間色調位準、該輸入白點位準、該輸出中間色調值及第二輸出白點來判定。該處理器使用該經判定轉移函數將該輸入影像映射至該輸出影像。 在一實施例中,該處理器基於該第一資訊資料、該第二資訊資料及該輸出中間色調值來計算該第二輸出黑點及該第二輸出白點。 在一實施例中,該處理器基於該輸入黑點位準、該輸入中間色調位準、該第二輸出黑點及該輸出中間色調值來計算一尾部斜率。 在一實施例中,該處理器基於該輸入白點位準、該輸入中間色調位準、該第二輸出白點及該輸出中間色調值來計算一頭部斜率。 在一實施例中,該處理器基於該第一資訊資料、該第二輸出黑點、該第二輸出白點及該輸出中間色調值來計算一中間色調斜率。 動態範圍轉換 HDR信號之視訊編碼 圖1描繪了展示自視訊擷取至視訊內容顯示之各個階段之一習知視訊傳遞管線(100)之一例示性程序。使用影像產生方塊(105)擷取或產生一視訊圖框序列(102)。可(例如,由一數位相機)數位擷取或由一電腦(例如,使用電腦動畫)產生視訊圖框(102)以提供視訊資料(107)。替代地,可由一電影攝影機在膠片上擷取視訊圖框(102)。該膠片被轉換為一數位格式以提供視訊資料(107)。在一製作階段(110)中,編輯視訊資料(107)以提供一視訊製作流(112)。 接著在方塊(115)處將製作流(112)之視訊資料提供給一處理器以用於後期製作編輯。方塊(115)後期製作編輯可包含根據視訊創作者的創意意圖調整或修改一影像之特定區域中之色彩或亮度以增強影像品質或達成影像之一特定外觀。這有時被稱為「色彩時序(color timing)」或「調色(color grading)」。可在方塊(115)執行其它編輯(例如,場景選擇及排序、影像剪裁、添加電腦產生的視覺特別效果等)以產生製作之一最終版本(117)以供發行。在後期製作編輯(115)期間,在一參考顯示器(125)上觀看視訊影像。 在後期製作(115)之後,最終製作(117)之視訊資料可被傳遞至編碼方塊(120)以用於下游地傳遞至解碼及回放裝置,諸如電視機、視訊轉換器、電影院等。在一些實施例中,編碼方塊(120)可包含音訊及視訊編碼器,諸如由ATSC、DVB、DVD、Blu-Ray及其他傳遞格式所定義之編碼器,以產生經編碼位元流(122)。在一接收器中,解碼單元(130)對經編碼位元流(122)進行解碼,以產生表示信號(117)之一相同或嚴格近似之一解碼信號(132)。接收器可附接至一目標顯示器(140),其可具有與參考顯示器(125)完全不同的特性。在該情況中,一顯示管理方塊(135)可用於藉由產生顯示映射信號(137)將經解碼信號(132)之動態範圍映射至目標顯示器(140)之特性。 使用一Sigmoid映射進行影像變換 在由A.Ballestad及A.Kostin發表、在本文中被稱為'480專利之美國專利8,593,480「Method and apparatus for image data transformation 」中(本專利以引用方式全部併入本文中),發明人提出了一種使用一參數化S形函數之影像變換映射,該S形函數可使用三個錨點及一中間色調自由參數來唯一判定。圖2中描繪了此函數之一實例。 如圖2中所描繪,映射函數(220)由三個錨點(205、210、215)定義:黑點(x1,y1)、中間色調點(x2,y2)及白點(x3,y3)。此變換具有以下性質: · 自x1至x3之值表示描述組成輸入影像之像素之可能值之範圍。此等值可為一特定色彩原色(R、G或B)之亮度位準,可為像素之總體照度位準(即,一YCbCr表示中之Y分量)。通常,此等值對應於由用於創作內容之顯示器(「主顯示器」(125))所支援之最暗(黑點)及最亮(白點)位準;然而,在一些實施例中,當參考顯示器之特性未知時,此等值可表示輸入影像中之最小值及最大值(例如,R、G或B、照度等中之最小值及最大值),該等最大值及最小值可經由影像後設資料接收或在接收器中計算。 · 自y1至y3之值表示描述組成輸出影像(同樣,色彩原色亮度或總體照度位準)之像素之可能值之範圍。通常,此等值對應於由預期輸出顯示器(「目標顯示器」(140))所支援之最暗(黑點)及最亮(白點)位準。 · 具有值x1之任何輸入像素皆被約束為映射至具有值y1之一輸出像素,且具有值x3之任何輸入像素皆被約束為映射至具有值y3之一輸出像素。 · x2及y2之值表示自輸入至輸出之一特定映射,該映射用作影像之某個「中間範圍」(或中間色調)元素之一錨點。在x2及y2之特定選擇中允許有相當大的範圍,且'480專利教導了可如何選擇此等參數之許多替代方案。 一旦選擇了這三個錨點,轉移函數(220)就可被描述為(1) 其中C1 C2 C3 係常數,x 標示一色彩通道或照度之輸入值,y 標示對應的輸出值,且n 係可用於調整中間色調對比度之一自由參數。 如'480專利中所描述,C1 C2 C3 值可藉由求解下式來判定(2) 方程式(1)之色調曲線已成功應用於多種顯示映射應用;然而,正如發明人所明白,其亦具有多種潛在限制,包含: · 難以定義色調曲線參數使得在目標顯示器之一特定範圍記內存在一對一映射 · 難以判定參數(即,指數n )來控制對比度 · 中間錨點(x2,y2)之細微變化可能會產生非預期行為 · 不允許黑色錨點(205)下方及/或白色錨點(215)上方存在一線性映射 圖3描繪了根據一實施例之一新的色調映射曲線之一實例。如圖3中所描繪,色調映射曲線(320)包括多達四段: · 對於低於(x1,y1) (x1亦可為負)之值,選用線段L1 · 樣條S1,其自(x1,y1)至(x2,y2) · 樣條S2,其自(x2,y2)至(x3,y3) · 對於大於(x3,y3) (x1亦可大於1)之值,選用線段L2 在一實施例中且無限制,使用一個三階(三次)賀米特多項式來判定段S1及S2。 如稍後將要論述,當例如在逆色調映射期間計算色調曲線之逆時(即,當需要自一標準動態範圍影像產生一高動態範圍影像時),使用線段L1及L2之映射可能係特別有用的。 如在方程式(1)中,曲線(320)由三個錨點(305、310、315)控制:黑點(x1,y1)、中間色調值點(x2,y2)及白點(x3,y3)。此外,在每一端點處,樣條段之各者可進一步受到兩個斜率約束;因此完整曲線由三個錨點及三個斜率控制:(x1,y1)處之尾部斜率、(x2,y2)處之中間色調斜率及(x3,y3)處之頭部斜率。 例如,考慮到在點(x1,y1)與點(x2,y2)之間判定之一樣條在(x1,y1)處具有斜率s1且在(x2,y2)處具有斜率s2,則對於一輸入x ,該三次賀米特樣條之轉移函數可被定義為:), (3a) 其中)。 (3b) 在一實施例中,為確保沒有過衝或欠衝(即,為確保曲線係單調的),以下規則亦可應用於斜率s1及s2:其中標示一常數(例如,=3)。 鑑於方程式(3)之賀米特樣條,在一實施例中且無限制,對於一視訊輸入,即,使用一感知量化器(PQ) (例如,根據SMPTE ST 2084:2014,「High Dynamic Range EOTF of Mastering Reference Displays」)編碼之一視訊輸入,可基於以下參數來定義完整曲線: · SMin=x1;標示源內容之最小照度。若沒有給定,則SMin可被設定為表示典型黑色之一值(例如,SMin=0.0151) · SMax=x3;標示源內容之最大照度。若沒有給定,則SMax可被設定為表示「高亮光」之一大值(例如,SMax=0.9026) · SMid=x2;標示源內容之平均(例如,算術、中值、幾何)照度。在一些實施例中,其可簡單地標示輸入圖片中之一「重要」照度特徵。在一些其他實施例中,其亦可標示一選定區域(即,一臉部)之平均值或中值。SMid可手動或自動定義,且其值可基於偏好進行偏移以在高亮光或陰影中保留某個外觀。若沒有給定,則可將SMid設定為一典型平均值(例如,SMid=0.36,表示膚色)。 此等資料可使用影像或源後設資料來接收,其等可由一顯示管理單元(例如,135)來計算,或其等可基於關於主或參考顯示環境之已知假設。此外,假定目標顯示器已知以下資料(例如,藉由讀取顯示器的擴充顯示識別資料(EDID))來接收以下資料): · TminPQ =目標顯示器之最小照度 · TmaxPQ =目標顯示器之最大照度 其中如本文中使用之術語「PQ」標示此等值(通常以尼特給定)根據SMPTE ST 2084轉換為PQ值。 為完全判定映射曲線,需要計算以下點及參數: TMin=y1; TMax=y3; TMid=y2; slopeMin=(x1,y1)處之斜率; slopeMid=(x2,y2)處之斜率;及 slopeMax=(x3,y3)處之斜率。 圖4A描繪了根據一實施例之用於判定色調映射曲線之錨點及斜率之一例示性程序。鑑於輸入參數(405) SMin、SMid、SMax、TminPQ及TmaxPQ,步驟412計算y2 (TMid)。例如,在一實施例中,只要TMid在邊界點TminPQ及TmaxPQ以及一預定緩衝區內,中間色調錨點(SMid,TMid)可被選擇為在1對1映射線上,即,強制TMid=SMid。對於接近TminPQ及TmaxPQ之TMid值,TMid可被選擇為在一固定距離內(例如,在TMinPQ+c 與TmaxPQ-d 之間,其中cd 係固定值)或在計算為此等值之一百分比之一距離內。例如,TMid可能被強制永遠不會低於TminPQ+*TminPQ或高於TmaxPQ-b *TMaxPQ,其中及b係[0,1]中之常數,表示百分比值(例如,=b =5%=0.05)。 鑑於TMid,步驟425計算剩餘未知參數(例如,y1、y2及三個斜率)。最後,步驟430計算兩個樣條段及兩個線段。 在另一實施例中,可藉由嘗試保持輸入「尾部對比度」(即,黑色(SMin)與中間色調(SMid)之間之對比度)與輸入「頭部對比度「(即,中間色調(SMid)與高亮光(SMax)之間之對比度)之間之原始比進一步完善計算TMid。在圖4B中描繪了且亦在表1中以偽碼描述根據一實施例之此一程序之一實例。此程序之目標係: · 判定輸出中間色調錨點(SMid,TMid)儘可能接近對角線(1對1)映射。即,在理想情況下,TMid應儘可能接近SMid以保持輸入中間色調; · 若一1對1映射不可能,則判定TMid,使得「尾部對比度」及「頭部對比度」範圍之輸出值在對應輸入範圍之預定極限內。如本文中所使用,輸入「頭部對比度」係基於(SMax-SMid)之一函數,且輸入「尾部對比度」係基於(SMid-SMin)之一函數。 · 鑑於中間錨點(x2,y2)或(SMid,TMid),判定三個斜率使得可特徵化整個色調曲線。 1 :用於判定色調曲線參數之例示性程序 在上面的步驟4中,為計算頭部及尾部偏移參數,將諸項乘以被標示為「offsetScalar」之一項,在一實施例中,該項可被表達為 此函數目的係在最大可能偏移(例如,headroom*preservationHead或tailroom*preserveTail)與對應的頭部或尾部斜率之間提供一平滑過渡。方程式(5)中之s() 函數可為|2*midLoc-1|之任何合適的線性或非線性函數。例如,在另一實施例中:。(6) 在上面的步驟8中,slopeMid被計算為接近一1對1映射之對角線。相比之下,slopeMax被計算為與成比例地保持高亮光;即,(x2,y2)與(x3,y3)之間之斜率,而slopeMin被計算為與成比例地保持黑色,即,(x1,y1)與(x2,y2)之間之斜率)。指數ht 判定高亮光或灰階需要「墜毀」之速度。ht 之典型值包含1/2或4。在一實施例中,h =t 。 鑑於三個錨點及三個斜率,可如下產生四段: if(x ) //S1曲線), (7a) 其中)。 (7b) if(x ) // S2曲線), (7c) 其中)。 (7d) if(x ) // L1段(7e) if(// L2段(7f) 返回至圖4B,鑑於輸入參數(405) (例如,SMin、SMid、SMax、TminPQ及TmaxPQ),步驟(410)基於輸入參數來計算一第一目標中間色調值及相關聯之目標頭部空間及尾部空間值(例如,參見表1中之步驟2)。鑑於頭部及尾部對比度保存百分比(例如,約50%)、第一目標中間色調值及相關聯之目標頭部空間及尾部空間,步驟(415)計算頭部及尾部偏移(例如,參見表1中之步驟4)。步驟(420)將頭部及尾部偏移施加於輸入SMid值以計算目標TMid值(例如,參見表1中之步驟5)。接下來,步驟(425)基於輸入參數及TMid計算TMax及TMin(例如,參見表1中之步驟6)。在嘗試保持單調性的同時,步驟(425)亦計算兩個樣條之兩個末端斜率及中間斜率(例如,參見表1中之步驟8)。鑑於輸入參數TMid、TMin、TMax及三個斜率,接著可應用方程式(7)在步驟(430)中計算色調映射曲線。 圖5描繪了所提出之色調曲線之兩個不同實例,將PQ編碼資料自一第一動態範圍映射至一第二較低動態範圍。請注意,相同曲線亦可用於一逆映射,即,用於將資料自一較低動態範圍轉譯回原始高動態範圍。在一實施例中,可如下計算逆映射: · 如早期描述,導出色調映射曲線,即,表達為y=f(x) · 產生一正向查找表,使用yi =f (xi )將輸入xi 值映射為輸出yi 值 · 產生一反向查找表,使用來自正向LUT之值(即,,則=)將輸入低動態範圍值映射至輸出更高動態範圍值, · 藉由對現存值進行插值產生反向LUT之額外值。例如,若,則可藉由在之間進行插值來產生對應輸出。 圖6A描繪了展示根據一實施例之如何將輸入中間色調值(SMid)映射至輸出中間色調值(TMid)以(例如,使用表1中之步驟1至4)判定色調曲線映射函數之中間色調錨點。鑑於SMin=0.01,SMax=0.92,且TminPQ=0.1,曲線605描繪了當TmaxPQ=0.5時SMid如何映射至TMid,且曲線610描繪了當TmaxPQ=0.7時SMid如何映射至TMid。 自圖6A可看出,在SMid值之一小範圍內觀察到函數605不係單調的,即,在漸近或漸遠期間可能產生非預期結果。為了解決此問題,在表1之步驟4中,反而可使用以下偽碼來計算頭部及尾部偏移: cutoff = a;//例如,a=0.5。 offsetHead=min(max(0,(midLoc-cutoff))*TDR,max(0,headroom*preservationHead+midLoc_1)*TDR); offsetTail=min(max(0,(cutoff-midLoc))*TDR, max(0,tailroom*preserveTail-midLoc)*TDR); 其中cutoff 係一變數,其藉由指定頭部及尾部偏移將被剪切之目標動態範圍之百分比來優先維護高亮光與陰影。例如,一cutoff 值0.5給定高亮光及陰影相等的優先順序,而一cutoff 值0.7對高亮光比對陰影給定更高的優先順序。 此方法在計算上更為簡單,因為其不需要計算餘弦函數或平方根函數,且如圖6B中所描繪,其保持單調性。鑑於SMin=0.01,SMax=0.92,且TminPQ=0.1,在圖6B中,曲線615描繪了當TmaxPQ=0.5時SMid如何映射至TMid,且曲線620描繪了當TmaxPQ=0.7時SMid如何映射至TMid。 與方程式(1)相比,所提出之色調曲線展現出多個優點,包含: · 使用slopeMid參數,可定義目標顯示器之一特定範圍內之SMid值與TMid值之間之一對一映射以保持對比度; · 可經由slopeMid及contrastFactor變數顯式地控制影像對比度(參見表1,步驟8)。例如,在一實施例中,contrastFactor值之範圍可不限於在0.5與2.0之間,其中預設值為contrastFactor=1; · 藉由將整個曲線分成兩個樣條曲線,圍繞中間色調錨點(x2,y2)沒有更多非預期行為; · 使用SlopeMin及SlopMax可預定黑色錨點之前及白色錨點之後的映射曲線之行為; · 該曲線可映射負值輸入值(例如,。此一狀況可能由於雜訊或其他系統狀況(例如,空間濾波)而發生。通常將負值箝位為0;然而,此箝位可能最終會增加雜訊並降低整體品質。由於能夠映射負輸入值,可減少或消除此等基於箝位之偽影。 · 色調映射曲線可很容易地藉由x至y映射或一y至x映射之一簡單切換來求逆; · 沒有要求使用任何非整數指數或冪函數,因此計算更快且更高效,這係因為沒有使用非整數指數。 關於最後一點,就一計算觀點來看,對於一非微不足道的對比度值(例如,及/或當n 不係整數時)判定方程式(2)中之函數參數需要使用六個冪函數(例如,對於y=pow(x,n) )。相比之下,表1中之計算從來不需要任何非整數冪函數(計算2或4之冪需要簡單的乘法)。總之,與方程式(1)相比,方程式(7)需要對每個輸入樣品進行幾次乘/除及加/減運算,但不需要冪函數。在一些實施例中,方程式(7)可使用查表來實施。更重要的是,由發明人執行之使用者研究似乎指示使用者更喜歡使用新的色調映射函數產生之影像之整體影像品質(320)。 例示性電腦系統實施方案 本發明之實施例可用一電腦系統、經組態在電子電路及組件中之系統,諸如一微控制器之一積體電路(IC)裝置、場可程式化閘陣列(FPGA)或另一可組態或可程式設計邏輯裝置( PLD)、一離散時間或數位信號處理器(DSP)、一特定應用IC (ASIC)及/或包含此等系統、裝置或組件之一或多者之設備來實施。電腦及/或IC可執行、控制或執行與針對具有高動態範圍之影像之影像變換有關之指令,諸如在本文中描述之指令。電腦及/或IC可計算與本文中描述之影像變換程序相關之各種參數或值之任一者。影像及視訊實施例可在硬體、軟體、韌體及其各種組合中來實施。 本發明之某些實施方案包括執行使處理器執行本發明之一方法之軟體指令之電腦處理器。例如,如上文所描述,藉由在處理器可存取之一程式記憶體中執行軟體指令,一顯示器、一編碼器、一視訊轉換器、一轉碼器等中之一或多個處理器可實施與HDR影像之影像變換相關之方法。本發明亦可以一程式產品之形式提供。該程式產品可包括攜帶包括指令之電腦可讀信號集合之任何非暫時性媒體,該等指令在由一資料處理器執行時使資料處理器執行本發明之一方法。根據本發明之程式產品可為多種形式之任一者。程式產品可包括例如實體媒體,諸如包含軟碟之磁資料儲存媒體、硬碟驅動器,包含CD ROM、DVD之光資料儲存媒體、包含ROM、快閃記憶體RAM等之電子資料儲存媒體。程式產品上之電腦可讀信號可視情況被壓縮或加密。 在上文提及一組件(例如,一軟體模組、處理器、總成、裝置、電路等)之情況下,除非另有指示,否則對該組件之引用(包含對一「裝置」之一引用)應被解譯為包含為該組件之等效物,諸如執行所描述組件之功能之任何組件(例如,功能上等效的組件),包含在結構上不等效於執行本發明之經圖解說明例示性實施例中之功能之所揭示結構之組件。 等效物、擴展、替代品及雜項 因此描述了與HDR視訊至SDR視訊之有效影像變換之例示性實施例。在前述說明書中,已參考可隨著實施方案變動之許多特定細節描述本發明之實施例。因此,本發明之唯一及專有指示及申請人意圖作為本發明之唯一及專有指示係由此申請案發佈之一組申請專利範圍,其呈此等申請專利範圍發佈之特定形式(包含任何後續校正)。本文中為此等請求項中包含之術語明確闡述之任何定義將決定請求項中使用之此等術語之含義。因此,請求項中未明確敘述之限制、元件、性質、特徵、優點或屬性不應以任何方式限制該請求項之範疇。因此,本說明書及圖式應被視為一闡釋性含義而非一限制性含義。 本發明之各個態樣可自以下列舉之例示性實施例(EEE)中明白: EEE 1. 一種用於使用處理器將一影像自一第一動態範圍映射至一第二動態範圍之方法,該方法包括: 在該第一動態範圍中存取一輸入影像之第一資訊資料,包括該第一動態範圍中之一輸入黑點位準(x1,SMin)、一輸入中間色調位準(x2,SMid)及一輸入白點位準(x3,SMax); 在該第二動態範圍中存取一輸出影像之第二資訊資料,該第二資訊資料包括該第二動態範圍中之一第一輸出黑點位準(TminPQ)及一第一輸出白點位準(TmaxPQ); 基於該第一資訊資料及該第二資訊資料來判定該第二動態範圍中之一輸出中間色調值; 基於該第二資訊資料及該輸出中間色調值來計算該第二動態範圍中之一第二輸出黑點及一第二輸出白點; 基於該第一資訊資料、該第二資訊資料及該輸出中間色調值來計算一尾部斜率、一頭部斜率及一中間色調斜率; 判定一轉移函數,該轉移函數用於將該第一動態範圍中之該輸入影像之像素值映射至該第二動態範圍中之該輸出影像之對應像素值,其中該轉移函數包括兩段,其中該第一段係基於該尾部斜率、該中間色調斜率、該輸入黑點、該輸入中間色調位準、該第二輸出黑點及該輸出中間色調值來判定,且該第二段係基於該中間色調斜率、該頭部斜率、該輸入中間色調位準、該輸入白點、該輸出中間色調值及第二輸出白點來判定;及 使用該經判定轉移函數將該輸入影像映射至該輸出影像。 EEE2. 如EEE 1之方法,其中該第一動態範圍包括一高動態範圍,且該第二動態範圍包括一標準動態範圍。 EEE3. 如EEE 1或EEE 2之方法,其中該轉移函數進一步包括一第一線段,該第一線段用於低於該第一動態範圍中之該輸入黑點之輸入值,其中該線段具有等於該尾部斜率之一斜率。 EEE 4 如EEE 3之方法,其中該第一線段之轉移函數包括, 其中x 標示一輸入像素值,y 標示一輸出像素值,slopeMin標示該尾部斜率,TMin標示該第二動態範圍中之該第二輸出黑點,且SMin標示該第一動態範圍中之該輸入黑點。 EEE5. 如EEE 1至4中任一項之方法,其中該轉移函數進一步包括一第二線段,該第二線段用於大於該第一動態範圍中之該輸入白點之輸入值,其中該線段具有等於該頭部斜率之一斜率。 EEE 6. 如EEE 5之方法,其中該第二線段之轉移函數包括, 其中x 標示一輸入像素值,y 標示一輸出像素值,slopeMax標示該頭部斜率,TMax標示該第二動態範圍中之該第二輸出白點,且SMax標示該第一動態範圍中之該輸入白點。 EEE 7. 如EEE 1至6中任一項之方法,其中該第一段及/或該第二段係基於一個三階賀米特樣條多項式來判定。 EEE 8. 如EEE 7之方法,其中判定該第一段包括計算), 其中),x 標示一輸入像素值,y 標示一輸出像素值,slopeMin標示該尾部斜率,slopeMid標示該中間色調斜率,TMin及TMid標示該第二輸出黑點及該輸出中間色調位準,且SMin及SMid標示該第一動態範圍中之該輸入黑點及該輸入中間色調位準。 EEE 9. 如EEE 7或EEE 8之方法,其中判定該第二段包括計算), (5c) 其中),x 標示一輸入像素值,y 標示一輸出像素值,slopeMax標示該頭部斜率,slopeMid標示該中間色調斜率,TMid及TMax標示該第二動態範圍中之該輸出中間色調位準及該第二輸出白點,且SMid及SMax標示該第一動態範圍中之該輸入中間色調位準及該輸入白點。 EEE 10. 如EEE 1到9中任一項之方法,其中計算該輸出中間色調值包括計算: 若SMidTminPQ+*TMinPQ 則TMid = TMinPQ+*TMinPQ; 否則若SMid > TmaxPQ-b *TmaxPQ 則TMid = TmaxPQ-b *TmaxPQ; 否則TMid = SMid; 其中TMid標示該輸出中間色調值,及b係[0,1]中之百分比值,SMid標示該輸入中間色調位準,且TminPQ及TmaxPQ包括該第二資訊資料中之值。 EEE 11. 如EEE 1到9中任一項之方法,其中計算該輸出中間色調值進一步包括: 基於該第一資訊資料及該第一輸出黑點來判定該第二動態範圍中之一初步輸出中間色調值及該初步輸出中間色調值之第一及第二邊界值; 基於該初步輸出中間色調值、該等第一及第二邊界值以及一或多個輸入對比度保存值來計算該第二動態範圍中之一頭部偏移及一尾部偏移;及 基於該第一動態範圍中之該輸入中間色調位準以及該等頭部及尾部偏移來計算該第二動態範圍中之該輸出中間色調值。 EEE12. 如EEE 11之方法,其中判定該初步輸出中間色調值以及該第一輸出中間色調值之該等第一及第二邊界值包括計算 midLoc=(SMid-TminPQ)/TDR; headroom=(SMax-SMid)/TDR; tailroom=(SMid-SMin)/TDR; 其中 TDR = TmaxPQ-TminPQ, midLoc標示該初步輸出中間色調值,tailroom及headroom標示該第一輸出中間色調值之該等第一及第二邊界值,SMin、SMid及SMax標示該第一資訊資料,且TminPQ標示該第一輸出黑點位準。 EEE 13. 如EEE 11或EEE 12之方法,其中至少一對比度保存值為近似50%。 EEE 14. 如EEE 11到13中任一項之方法,其中計算該輸出中間色調值(TMid)包括計算 TMid = SMid-offsetHead + offsetTail, 其中SMid標示該第一動態範圍中之該輸入中間色調位準,且offsetHead及offsetTail標示該等頭部及尾部偏移。 EEE 15. 如EEE 14之方法,其中計算該第二動態範圍中之該第二輸出白點及該第二輸出黑點包括計算 TMax = min(TMid+SMax-SMid,TmaxPQ), TMin = max(TMid-SMid+SMin,TminPQ, 其中TMin標示該第二輸出黑點,TMax標示該第二輸出白點,SMin及SMax標示該第一動態範圍中之該輸入黑點及該輸入白點,TminPQ及TmaxPQ標示該第二動態範圍中之該第一輸出黑點及該第一輸出白點。 EEE 16. 如EEE 10或EEE 15之方法,其進一步包括將該尾部斜率之一最大值(maxMinSlope)及/或該頭部斜率之一最大值(maxMaxSlope)計算為 maxMinSlope = 3*(TMid-TMin)/(SMid-SMin), maxMaxSlope=3*(TMax-TMid)/(SMax-SMid)。 EEE 17. 如EEE 16之方法,其中計算該尾部斜率(slopeMin)、該中間色調斜率(slopeMid)及該頭部斜率(slopeMax)進一步包括計算 slopeMin = min([maxMinSlope,(( TMid - TMin)/(SMid - SMin))2 ]); slopeMax = min([maxMaxSlope,1,((TMax - TMid)/(SMax - SMid))4 ]); slopeMid=min([maxMinSlope,maxMaxSlope,contrastFactor*(1-SMid+TMid)]); 其中contrastFactor標示一對比度參數。 EEE 18. 如EEE 1至17中任一項之方法,其進一步包括判定一反向查找表以將一影像自該第二動態範圍映射回到該第一動態範圍,該方法包括: 基於該經判定轉移函數判定一正向查找表,該正向查找表將該第一動態範圍中之複數個x(i) 值映射至該第二動態範圍中之y(i) 值;及 藉由設定以下項來產生該反向查找表,該反向查找表將該第二動態範圍中之複數個y'(k) 值映射至該第一動態範圍中之對應x'(k) 值: 若y’ (k ) =y (i ),則x’ (k ) =x (i ) 否則 若y (i ) <y’ (k ) <y (i +1),則藉由將一值內插在x(i)x(i + 1) 之間來產生該對應輸出x'(k)。 EEE 19. 一種設備,其包括一處理器且經組態以執行如EEE 1至18中敘述之方法之任一者。 EEE 20. 一種上面儲存有電腦可執行指令之非暫時性電腦可讀儲存媒體,該電腦可執行指令用於以一或多個處理器執行如EEE 1至18中任一項之一方法。CROSS-REFERENCE TO RELATED APPLICATIONS RELATED APPLICATIONS RELATED APPLICATIONS RELATED APPLICATIONS RELATED APPLICATIONS RELATED APPLICATIONS RELATED APPLICATIONS Priority No. 62/465,298, each of which is incorporated herein by reference. A method for determining a tone curve for mapping a high dynamic range (HDR) image is described herein. In the following description, numerous specific details are set forth However, it will be appreciated that the invention may be practiced without such specific details. In other instances, well-known structures and devices are not described in detail to avoid unnecessarily obscuring, obscuring or obscuring the invention. SUMMARY The exemplary embodiments described herein relate to methods for determining a tone curve for mapping a high dynamic range (HDR) image. In an embodiment, in an embodiment, for an input image, a processor receives the first information material, and includes one of the first dynamic range, the input black level (x1, SMin), and an input intermediate. Hue level (x2, SMid) and an input white point level (x3, SMax). The processor also accesses a second information material of an output image in a second dynamic range, the second information material including a first output black level (TminPQ) and a first output of the second dynamic range White point level (TmaxPQ). The processor determines one of the second dynamic ranges to output an intermediate tone value based on the first and the second information material. The processor calculates a second output black point and a second output white point in the second dynamic range based on the second information material and the output halftone value. Then, the processor calculates a tail slope, a head slope, and a midtone slope based on the first information material, the second information data, and the output halftone value. The processor determines a transfer function for mapping a pixel value of the input image in the first dynamic range to a corresponding pixel value of the output image in the second dynamic range, wherein the transfer function includes two a segment, wherein the first segment is determined based on the tail slope, the midtone slope, the input black point level, the input halftone level, the second output black point, and the output halftone value, and the The second stage is determined based on the midtone slope, the head slope, the input midtone level, the input white point level, the output halftone value, and the second output white point. The processor maps the input image to the output image using the determined transfer function. In one embodiment, the processor calculates the second output black point and the second output white point based on the first information material, the second information material, and the output halftone value. In one embodiment, the processor calculates a tail slope based on the input black point level, the input midtone level, the second output black point, and the output midtone value. In one embodiment, the processor calculates a head slope based on the input white point level, the input midtone level, the second output white point, and the output midtone value. In one embodiment, the processor calculates a midtone slope based on the first information material, the second output black point, the second output white point, and the output midtone value. Video Coding of Dynamic Range Converted HDR Signals FIG. 1 depicts an exemplary procedure for displaying a conventional video delivery pipeline (100) from various stages of video capture to video content display. A video frame sequence (102) is captured or generated using the image generation block (105). The video frame (102) can be generated (e.g., by a digital camera) digitally or by a computer (e.g., using computer animation) to provide video material (107). Alternatively, the video frame (102) can be captured on the film by a movie camera. The film is converted to a digital format to provide video material (107). In a production phase (110), the video material (107) is edited to provide a video production stream (112). The video material of the production stream (112) is then provided at block (115) to a processor for post-production editing. Block (115) post-production editing may include adjusting or modifying the color or brightness in a particular region of an image based on the creative intent of the video creator to enhance image quality or achieve a particular appearance of the image. This is sometimes referred to as "color timing" or "color grading." Other edits (e.g., scene selection and sorting, image cropping, adding computer generated visual special effects, etc.) may be performed at block (115) to produce a final version (117) for distribution. During the post-production editing (115), the video image is viewed on a reference display (125). After post-production (115), the video material of the final production (117) can be passed to a coding block (120) for downstream transmission to a decoding and playback device, such as a television, video converter, movie theater, and the like. In some embodiments, the encoding block (120) can include an audio and video encoder, such as an encoder defined by ATSC, DVB, DVD, Blu-Ray, and other transfer formats to produce an encoded bitstream (122). . In a receiver, the decoding unit (130) decodes the encoded bitstream (122) to produce a decoded signal (132) that is identical or strictly approximated by one of the representation signals (117). The receiver can be attached to a target display (140), which can have completely different characteristics than the reference display (125). In this case, a display management block (135) can be used to map the dynamic range of the decoded signal (132) to the characteristics of the target display (140) by generating a display mapping signal (137). The use of a Sigmoid mapping for image transformation is disclosed in U.S. Patent No. 8,593,480, entitled " Method and Apparatus for image data transformation ", which is hereby incorporated by reference. Herein, the inventors have proposed an image transformation map using a parametric sigmoid function that can be uniquely determined using three anchor points and a midtone free parameter. An example of this function is depicted in Figure 2. As depicted in Figure 2, the mapping function (220) is defined by three anchor points (205, 210, 215): black point (x1, y1), midtone point (x2, y2), and white point (x3, y3). . This transformation has the following properties: • Values from x1 to x3 represent the range of possible values that describe the pixels that make up the input image. The value can be the brightness level of a particular color primary color (R, G, or B), which can be the overall illumination level of the pixel (ie, the Y component in a YCbCr representation). Typically, such values correspond to the darkest (blackpoint) and brightest (whitepoint) levels supported by the display used to author the content ("primary display"(125)); however, in some embodiments, When the characteristics of the reference display are unknown, the values may represent the minimum and maximum values in the input image (for example, the minimum and maximum values of R, G or B, illuminance, etc.), and the maximum and minimum values may be The data is received via the image or calculated in the receiver. • The value from y1 to y3 represents the range of possible values describing the pixels that make up the output image (again, the color primary color brightness or the overall illumination level). Typically, these values correspond to the darkest (blackpoint) and brightest (whitepoint) levels supported by the intended output display ("Target Display" (140)). Any input pixel having the value x1 is constrained to be mapped to one of the output pixels having the value y1, and any input pixel having the value x3 is constrained to be mapped to one of the output pixels having the value y3. • The values of x2 and y2 represent a specific mapping from input to output that is used as an anchor point for one of the "middle range" (or midtone) elements of the image. A considerable range is allowed in the particular choice of x2 and y2, and the '480 patent teaches many alternatives for how these parameters can be selected. Once these three anchor points are selected, the transfer function (220) can be described as (1) where C 1 , C 2 and C 3 are constants, x indicates the input value of a color channel or illuminance, y indicates the corresponding output value, and n is a free parameter that can be used to adjust the midtone contrast. As described in the '480 patent, the C 1 , C 2 and C 3 values can be determined by solving the following equation (2) The tone curve of equation (1) has been successfully applied to a variety of display mapping applications; however, as the inventors have appreciated, it also has a number of potential limitations, including: • Difficult to define tone curve parameters such that a specific range of target displays Remember that there is a one-to-one mapping in the memory. It is difficult to determine the parameters (ie, the exponent n ) to control the contrast. Subtle changes in the intermediate anchor point (x2, y2) may produce unexpected behavior. Do not allow the black anchor point (205) below and / Or a linear map above the white anchor point (215). Figure 3 depicts an example of a new tone mapping curve in accordance with one of the embodiments. As depicted in Figure 3, the tone mapping curve (320) includes up to four segments: • For values below (x1, y1) (x1 can also be negative), select line segment L1 · Spline S1, from (x1 , y1) to (x2, y2) · Spline S2, from (x2, y2) to (x3, y3) · For values greater than (x3, y3) (x1 can also be greater than 1), select line segment L2 in one In the embodiment and without limitation, a third-order (three-time) Hermitian polynomial is used to determine segments S1 and S2. As will be discussed later, the mapping using line segments L1 and L2 may be particularly useful when calculating the inverse of the tone curve, for example during inverse tone mapping (ie, when a high dynamic range image is required to be generated from a standard dynamic range image). of. As in equation (1), the curve (320) is controlled by three anchor points (305, 310, 315): black point (x1, y1), midtone value point (x2, y2), and white point (x3, y3) ). Furthermore, at each end point, each of the spline segments can be further constrained by two slopes; therefore the complete curve is controlled by three anchor points and three slopes: the slope of the tail at (x1, y1), (x2, y2 The midtone slope at the base and the slope of the head at (x3, y3). For example, considering that the same strip between the point (x1, y1) and the point (x2, y2) has a slope s1 at (x1, y1) and a slope s2 at (x2, y2), for an input x , the transfer function of the three Hermitian splines can be defined as: ), (3a) where ). (3b) In an embodiment, to ensure that there is no overshoot or undershoot (ie, to ensure that the curve is monotonic), the following rules can also be applied to the slopes s1 and s2: among them Mark a constant (for example, =3). In view of the Hermitian spline of equation (3), in one embodiment and without limitation, for a video input, ie, a perceptual quantizer (PQ) is used (eg, according to SMPTE ST 2084:2014, "High Dynamic Range EOTF of Mastering Reference Displays") encodes one of the video inputs and defines a complete curve based on the following parameters: • SMin=x1; indicates the minimum illumination of the source content. If not given, SMin can be set to represent one of the typical black values (eg, SMin = 0.0151) · SMax = x3; the maximum illumination of the source content is indicated. If not given, SMax can be set to indicate a large value of "highlight" (for example, SMax = 0.9026) · SMid = x2; the average (eg, arithmetic, median, geometric) illumination of the source content is indicated. In some embodiments, it may simply indicate one of the "important" illuminance features in the input picture. In some other embodiments, it may also indicate the average or median of a selected area (ie, a face). The SMid can be defined manually or automatically, and its value can be offset based on preferences to preserve a certain appearance in highlights or shadows. If not given, the SMid can be set to a typical average (for example, SMid = 0.36, representing skin tone). Such data may be received using image or source post-data, which may be calculated by a display management unit (e.g., 135), or the like, based on known assumptions regarding the primary or reference display environment. In addition, it is assumed that the target display knows the following information (for example, by reading the extended display identification data (EDID) of the display) to receive the following information: • TminPQ = minimum illumination of the target display • TmaxPQ = maximum illumination of the target display The term "PQ" as used herein indicates that this value (usually given in nits) is converted to a PQ value according to SMPTE ST 2084. To fully determine the mapping curve, the following points and parameters need to be calculated: TMin=y1; TMax=y3; TMid=y2; slopeMin=(x1,y1) slope; slopeMid=(x2,y2) slope; and slopeMax= The slope at (x3, y3). 4A depicts an exemplary procedure for determining an anchor point and a slope of a tone mapping curve, in accordance with an embodiment. In view of the input parameters (405) SMin, SMid, SMax, TminPQ, and TmaxPQ, step 412 calculates y2 (TMid). For example, in one embodiment, as long as the TMid is within the boundary points TminPQ and TmaxPQ and a predetermined buffer, the midtone anchor (SMid, TMid) may be selected to be on the 1-to-1 mapping line, ie, forcing TMid=SMid. For TMid values close to TminPQ and TmaxPQ, TMid can be selected to be within a fixed distance (eg, between TninPQ+ c and TmaxPQ- d , where c and d are fixed values) or a percentage of this value is calculated One of the distances. For example, TMid may be forced to never be lower than TminPQ+ *TminPQ or higher than TmaxPQ- b *TMaxPQ, where And a constant in the b system [0, 1], indicating a percentage value (for example, = b = 5% = 0.05). In view of TMid, step 425 calculates the remaining unknown parameters (eg, y1, y2, and three slopes). Finally, step 430 calculates two spline segments and two segment segments. In another embodiment, by attempting to maintain the input "tail contrast" (ie, the contrast between black (SMin) and midtone (SMid)) and input "head contrast" (ie, midtone (SMid) The original ratio between the contrast with the highlight (SMax) is further refined to calculate the TMid. An example of such a procedure according to an embodiment is depicted in FIG. 4B and also in pseudo-code in Table 1. The goal of the program is: • Determine that the output midtone anchor (SMid, TMid) is mapped as close as possible to the diagonal (1 to 1). That is, in the ideal case, the TMid should be as close as possible to the SMid to maintain the input midtone; If a one-to-one mapping is not possible, the TMid is determined such that the output values of the "tail contrast" and "head contrast" ranges are within predetermined limits of the corresponding input range. As used herein, the input "head contrast" is based on one of the functions (SMax-SMid), and the input "tail contrast" is based on one of the functions (SMid-SMin). Given the intermediate anchor point (x2, y2) or (SMid, TMid), determining the three slopes makes it possible to characterize the entire tone curve. Table 1 : Exemplary procedures for determining tone curve parameters In step 4 above, to calculate the head and tail offset parameters, the items are multiplied by an item labeled "offsetScalar," which in one embodiment can be expressed as This function is intended to provide a smooth transition between the maximum possible offset (eg, headroom*preservationHead or tailroom*preserveTail) and the corresponding head or tail slope. The s() function in equation (5) can be any suitable linear or non-linear function of |2*midLoc-1|. For example, in another embodiment: . (6) In the above step 8, the slopeMid is calculated to be close to the diagonal of a 1-to-1 mapping. In contrast, slopeMax is calculated as Proportionally maintain high brightness; that is, the slope between (x2, y2) and (x3, y3), and slopeMin is calculated as The ratio is kept black, that is, the slope between (x1, y1) and (x2, y2). The index h and t determine the speed at which the highlight or grayscale needs to "crash". Typical values for h and t include 1/2 or 4. In an embodiment, h = t . Given the three anchor points and three slopes, four segments can be generated as follows: if( < x ) //S1 curve ), (7a) where ). (7b) if( < x ) // S2 curve ), (7c) where ). (7d) if( x ) // L1 segment (7e) if( // L2 segment (7f) Returning to FIG. 4B, in view of the input parameters (405) (eg, SMin, SMid, SMax, TminPQ, and TmaxPQ), step (410) calculates a first target midtone value and associated target header based on the input parameters. Space and tail space values (see, for example, step 2 in Table 1). In view of the head and tail contrast preservation percentage (eg, about 50%), the first target halftone value, and the associated target headspace and tail space, step (415) calculates the head and tail offset (see, for example, the table). Step 4) in 1. Step (420) applies a head and tail offset to the input SMid value to calculate the target TMid value (see, for example, step 5 in Table 1). Next, step (425) calculates TMax and TMin based on the input parameters and TMid (see, for example, step 6 in Table 1). While attempting to maintain monotonicity, step (425) also calculates the two end slopes and the intermediate slope of the two splines (see, for example, step 8 in Table 1). In view of the input parameters TMid, TMin, TMax and the three slopes, the tone mapping curve can then be calculated in step (430) using equation (7). Figure 5 depicts two different examples of the proposed tone curve, mapping PQ encoded data from a first dynamic range to a second lower dynamic range. Note that the same curve can also be used for an inverse mapping, ie for translating data from a lower dynamic range back to the original high dynamic range. In an embodiment, the inverse mapping can be calculated as follows: • As described earlier, the tone mapping curve is derived, ie, expressed as y=f(x) · Generate a forward lookup table, using y i = f ( x i ) The input x i value is mapped to the output y i value. A reverse lookup table is generated, using the value from the forward LUT (ie, If ,then = ) will enter a low dynamic range value Map to output higher dynamic range values , • Generate additional values for the inverse LUT by interpolating the existing values. For example, if By versus Interpolate between them to produce a corresponding output . 6A depicts how the input midtone value (SMid) is mapped to the output midtone value (TMid) to determine the midtone of the tone curve mapping function (eg, using steps 1 through 4 in Table 1), according to an embodiment. Anchor point. Given that SMin = 0.01, SMax = 0.92, and TminPQ = 0.1, curve 605 depicts how SMid maps to TMid when TmaxPQ = 0.5, and curve 610 depicts how SMid maps to TMid when TmaxPQ = 0.7. As can be seen from Figure 6A, it is observed that the function 605 is not monotonic within a small range of SMid values, i.e., unexpected results may occur during asymptotic or fading. To solve this problem, in step 4 of Table 1, the following pseudo-code can be used to calculate the head and tail offset: cutoff = a; / / for example, a = 0.5. offsetHead=min(max(0,(midLoc-cutoff))*TDR,max(0,headroom*preservationHead+midLoc_1)*TDR); offsetTail=min(max(0,(cutoff-midLoc))*TDR, max( 0,tailroom*preserveTail-midLoc)*TDR); where cutoff is a variable that preferentially maintains highlights and shadows by specifying the percentage of the target dynamic range that the head and tail offsets will be clipped. For example, a cutoff value of 0.5 gives a priority order in which highlights and shadows are equal, and a cutoff value of 0.7 gives a higher priority to highlights than shadows. This method is computationally simpler because it does not require the calculation of a cosine function or a square root function, and it remains monotonic as depicted in Figure 6B. Given that SMin = 0.01, SMax = 0.92, and TminPQ = 0.1, in Figure 6B, curve 615 depicts how SMid maps to TMid when TmaxPQ = 0.5, and curve 620 depicts how SMid maps to TMid when TmaxPQ = 0.7. Compared to equation (1), the proposed tone curve exhibits several advantages, including: • Using the slopeMid parameter, a one-to-one mapping between the SMid value and the TMid value within a specific range of the target display can be defined to maintain Contrast; · Image contrast can be explicitly controlled via the slopeMid and contrastFactor variables (see Table 1, Step 8). For example, in one embodiment, the range of the contrastFactor value may not be limited to between 0.5 and 2.0, where the preset value is contrastFactor=1; • around the midtone anchor point (x2) by dividing the entire curve into two splines. , y2) No more unexpected behavior; • Use SlopeMin and SlopMax to pre-define the behavior of the mapping curve before the black anchor and after the white anchor; • The curve can map negative input values (for example, . This condition may occur due to noise or other system conditions (eg, spatial filtering). The negative value is usually clamped to 0; however, this clamp may eventually increase noise and reduce overall quality. These clamp-based artifacts can be reduced or eliminated by being able to map negative input values. · Tone mapping curves can be easily reversed by simple switching from x to y mapping or one y to x mapping; • No non-integer exponents or power functions are required, so calculations are faster and more efficient. Because no non-integer index is used. Regarding the last point, for a computational point of view, for a non-trivial contrast value (for example, And/or when n is not an integer) the function parameters in equation (2) need to use six power functions (for example, for y=pow(x,n) ). In contrast, the calculations in Table 1 never require any non-integer power functions (calculating a power of 2 or 4 requires a simple multiplication). In summary, Equation (7) requires several multiply/divide and add/subtract operations for each input sample compared to equation (1), but does not require a power function. In some embodiments, equation (7) can be implemented using a look-up table. More importantly, user research performed by the inventor seems to indicate that the user prefers the overall image quality of the image produced using the new tone mapping function (320). Illustrative Computer System Embodiments Embodiments of the present invention may be implemented in a computer system, a system configured in an electronic circuit and components, such as an integrated circuit (IC) device of a microcontroller, a field programmable gate array ( FPGA) or another configurable or programmable logic device (PLD), a discrete time or digital signal processor (DSP), an application specific IC (ASIC), and/or one of such systems, devices or components Or more equipment to implement. The computer and/or IC can execute, control or execute instructions related to image transformation for images having a high dynamic range, such as the instructions described herein. The computer and/or IC can calculate any of a variety of parameters or values associated with the image transformation procedures described herein. Image and video embodiments can be implemented in hardware, software, firmware, and various combinations thereof. Certain embodiments of the present invention include a computer processor that executes a software instruction that causes a processor to perform one of the methods of the present invention. For example, as described above, one or more processors in a display, an encoder, a video converter, a transcoder, etc., by executing software instructions in a program memory accessible by the processor A method related to image conversion of HDR images can be implemented. The invention may also be provided in the form of a program product. The program product can include any non-transitory media carrying a collection of computer readable signals including instructions that, when executed by a data processor, cause the data processor to perform one of the methods of the present invention. The program product according to the present invention can be in any of a variety of forms. The program product may include, for example, physical media, such as a magnetic data storage medium containing a floppy disk, a hard disk drive, an optical data storage medium including a CD ROM, a DVD, and an electronic material storage medium including a ROM, a flash memory RAM, and the like. The computer readable signal on the program product may be compressed or encrypted as appropriate. In the case of a component (eg, a software module, processor, assembly, device, circuit, etc.) as mentioned above, unless otherwise indicated, a reference to the component (including one of the "devices" References to the equivalents of the components, such as any components that perform the functions of the described components (e.g., functionally equivalent components), are not structurally equivalent to the practice of the present invention. The components of the disclosed structure are illustrated to illustrate the functions of the illustrative embodiments. Equivalents, extensions, alternatives, and miscellaneous thus describe an illustrative embodiment of efficient image conversion from HDR video to SDR video. In the foregoing specification, embodiments of the invention have been described with reference Therefore, the sole and exclusive indications of the invention and the applicant's intention to be the sole and exclusive indication of the invention are the scope of the application for the application of this application, which is in the form of Subsequent correction). Any definitions expressly set forth herein for terms contained in such claims will determine the meaning of such terms used in the claim. Therefore, the limitations, elements, properties, characteristics, advantages or attributes not specifically recited in the claims should not limit the scope of the claim in any way. Accordingly, the specification and drawings are to be regarded as a Various aspects of the present invention can be understood from the following enumerated exemplary embodiments (EEE): EEE 1. A method for mapping an image from a first dynamic range to a second dynamic range using a processor, The method includes: accessing, in the first dynamic range, the first information material of an input image, including one of the first dynamic range, an input black level (x1, SMin), and an input intermediate tone level (x2, SMid) and an input white point level (x3, SMax); accessing the second information material of the output image in the second dynamic range, the second information material comprising one of the second dynamic range and the first output a black point level (TminPQ) and a first output white point level (TmaxPQ); determining one of the second dynamic range output midtone values based on the first information material and the second information material; And the output intermediate tone value is used to calculate a second output black point and a second output white point in the second dynamic range; based on the first information material, the second information material, and the output intermediate tone value To calculate a tail slope, a head slope And a midtone slope; determining a transfer function for mapping a pixel value of the input image in the first dynamic range to a corresponding pixel value of the output image in the second dynamic range, wherein the transfer The function includes two segments, wherein the first segment is determined based on the tail slope, the midtone slope, the input black point, the input midtone level, the second output black point, and the output halftone value, and the The second stage is determined based on the midtone slope, the head slope, the input midtone level, the input white point, the output halftone value, and the second output white point; and using the determined transfer function The input image is mapped to the output image. EEE2. The method of EEE 1, wherein the first dynamic range comprises a high dynamic range and the second dynamic range comprises a standard dynamic range. EEE3. The method of EEE 1 or EEE 2, wherein the transfer function further comprises a first line segment for an input value lower than the input black point in the first dynamic range, wherein the line segment Has a slope equal to one of the tail slopes. EEE 4 The method of EEE 3, wherein the transfer function of the first line segment comprises Where x indicates an input pixel value, y indicates an output pixel value, slopeMin indicates the tail slope, TMin indicates the second output black point in the second dynamic range, and SMin indicates the input in the first dynamic range Black spots. The method of any one of EEE 1 to 4, wherein the transfer function further comprises a second line segment for inputting an input value greater than the input white point in the first dynamic range, wherein the line segment Has a slope equal to one of the slopes of the head. EEE 6. The method of EEE 5, wherein the transfer function of the second line segment comprises Where x indicates an input pixel value, y indicates an output pixel value, slopeMax indicates the head slope, TMax indicates the second output white point in the second dynamic range, and SMax indicates the first dynamic range Enter a white point. The method of any of EEE 1 to 6, wherein the first segment and/or the second segment is determined based on a third-order Hermitian spline polynomial. EEE 8. The method of EEE 7, wherein determining the first segment comprises calculating ), among them x indicates an input pixel value, y indicates an output pixel value, slopeMin indicates the tail slope, slopeMid indicates the midtone slope, TMin and TMid indicate the second output black point and the output halftone level, and SMin and The SMid indicates the input black point in the first dynamic range and the input midtone level. EEE 9. The method of EEE 7 or EEE 8, wherein the second segment is determined to include calculations ), (5c) where x indicates an input pixel value, y indicates an output pixel value, slopeMax indicates the head slope, slopeMid indicates the midtone slope, TMid and TMax indicate the output halftone level in the second dynamic range and the first Two output white points, and SMid and SMax indicate the input halftone level and the input white point in the first dynamic range. EEE 10. The method of any of EEE 1 to 9, wherein calculating the output midtone value comprises calculating: if SMid TminPQ+ *TMinPQ then TMid = TMinPQ+ *TMinPQ; otherwise if SMid > TmaxPQ- b *TmaxPQ then TMid = TmaxPQ- b *TmaxPQ; otherwise TMid = SMid; where TMid indicates the output midtone value, And the percentage value in b system [0, 1], SMid indicates the input halftone level, and TminPQ and TmaxPQ include the value in the second information material. The method of any one of EEE 1 to 9, wherein calculating the output midtone value further comprises: determining a preliminary output of the second dynamic range based on the first information material and the first output black point a midtone value and first and second boundary values of the preliminary output halftone value; calculating the second based on the preliminary output halftone value, the first and second boundary values, and one or more input contrast saved values a head offset and a tail offset in the dynamic range; and calculating the output in the second dynamic range based on the input midtone level in the first dynamic range and the head and tail offsets Midtone value. EEE12. The method of EEE 11, wherein determining the preliminary output midtone value and the first and second boundary values of the first output midtone value comprises calculating midLoc=(SMid-TminPQ)/TDR; headroom=(SMax -SMid)/TDR; tailroom=(SMid-SMin)/TDR; where TDR = TmaxPQ-TminPQ, midLoc indicates the initial output midtone value, and tailroom and headroom indicate the first and second of the first output midtone value The second boundary value, SMin, SMid, and SMax, indicates the first information material, and TminPQ indicates the first output black point level. EEE 13. The method of EEE 11 or EEE 12, wherein at least one of the contrast preservation values is approximately 50%. The method of any one of EEE 11 to 13, wherein calculating the output midtone value (TMid) comprises calculating TMid = SMid-offsetHead + offsetTail, wherein SMid indicates the input midtone bit in the first dynamic range Quasi, and offsetHead and offsetTail indicate the head and tail offsets. EEE 15. The method of EEE 14, wherein calculating the second output white point and the second output black point in the second dynamic range comprises calculating TMax = min(TMid+SMax-SMid, TmaxPQ), TMin = max( TMid-SMid+SMin, TminPQ, where TMin indicates the second output black point, TMax indicates the second output white point, and SMin and SMax indicate the input black point and the input white point in the first dynamic range, TminPQ and TmaxPQ indicates the first output black point and the first output white point in the second dynamic range. EEE 16. The method of EEE 10 or EEE 15, further comprising maximizing one of the tail slopes (maxMinSlope) and / or one of the head slope maxima (maxMaxSlope) is calculated as maxMinSlope = 3*(TMid-TMin)/(SMid-SMin), maxMaxSlope=3*(TMax-TMid)/(SMax-SMid). The method of EEE 16, wherein calculating the tail slope (slopeMin), the midtone slope (slopeMid), and the head slope (slopeMax) further comprises calculating slopeMin = min([maxMinSlope,(( TMid - TMin)/(SMid - SMin)) 2 ]); slopeMax = min([maxMaxSlope,1,((TMax - TMid)/(SMax - SMid)) 4 ]); slopeMid=min([maxMinSl Ope, maxMaxSlope, contrastFactor*(1-SMid+TMid)]); wherein the contrastFactor indicates a contrast parameter. EEE 18. The method of any of EEE 1 to 17, further comprising determining a reverse lookup table to Mapping the image from the second dynamic range back to the first dynamic range, the method comprising: determining a forward lookup table based on the determined transfer function, the forward lookup table having a plurality of x in the first dynamic range ( i) mapping the value to the y(i) value in the second dynamic range; and generating the reverse lookup table by setting the following: the reverse lookup table for the plurality of y 's in the second dynamic range ( k) the value is mapped to the corresponding x'(k) value in the first dynamic range: if y' ( k ) = y ( i ), then x' ( k ) = x ( i ) otherwise if y ( i ) <y' ( k ) < y ( i +1), the corresponding output x'(k) is generated by interpolating a value between x(i) and x(i + 1 ). EEE 19. An apparatus comprising a processor and configured to perform any of the methods as described in EEE 1 through 18. EEE 20. A non-transitory computer readable storage medium having stored thereon computer executable instructions for performing the method of any one of EEEs 1 to 18 in one or more processors.

100‧‧‧視訊傳遞管線100‧‧‧Video transmission pipeline

102‧‧‧視訊圖框序列102‧‧‧Video frame sequence

105‧‧‧視訊圖框序列105‧‧‧Video frame sequence

107‧‧‧視訊資料107‧‧‧Video Information

110‧‧‧製作階段110‧‧‧Production stage

112‧‧‧視訊製作流112‧‧‧Video production stream

115‧‧‧後期製作編輯115‧‧‧ post-production editor

117‧‧‧最終製作117‧‧‧ final production

120‧‧‧編碼方塊120‧‧‧ coding block

122‧‧‧經編碼位元流122‧‧‧ encoded bit stream

125‧‧‧參考顯示器125‧‧‧Reference display

130‧‧‧解碼單元130‧‧‧Decoding unit

132‧‧‧解碼信號132‧‧‧Decoding signal

135‧‧‧顯示管理方塊135‧‧‧Display Management Block

137‧‧‧顯示映射信號137‧‧‧Display map signal

140‧‧‧目標顯示器140‧‧‧Target display

205‧‧‧錨點205‧‧‧ anchor

210‧‧‧錨點210‧‧‧ Anchor

215‧‧‧錨點215‧‧‧ Anchor

220‧‧‧轉移函數220‧‧‧transfer function

305‧‧‧錨點305‧‧‧ Anchor

310‧‧‧錨點310‧‧‧ Anchor

315‧‧‧錨點315‧‧‧ Anchor

320‧‧‧整體影像品質320‧‧‧ overall image quality

405‧‧‧方塊405‧‧‧ square

410‧‧‧方塊410‧‧‧ square

412‧‧‧方塊412‧‧‧ square

415‧‧‧方塊415‧‧‧ square

420‧‧‧方塊420‧‧‧ square

425‧‧‧方塊425‧‧‧ square

430‧‧‧方塊430‧‧‧ square

605‧‧‧曲線605‧‧‧ Curve

610‧‧‧曲線610‧‧‧ Curve

615‧‧‧曲線615‧‧‧ Curve

620‧‧‧曲線620‧‧‧ Curve

L1‧‧‧線段L1‧‧‧ line segment

L2‧‧‧線段L2‧‧‧ line segment

S1‧‧‧樣條/曲線S1‧‧‧ Spline/Curve

S2‧‧‧樣條/曲線S2‧‧‧ Spline/Curve

經由隨附圖式之圖中之實例而非經由其限制圖解說明本發明之一實施例,且其中相似元件符號指類似元件,且其中: 圖1描繪了用於一視訊傳遞管線之一例示性程序; 圖2描繪了根據先前技術之用於使用三個錨點將影像自一第一動態範圍映射至一第二動態範圍之一例示性映射函數; 圖3描繪了根據本發明之一實施例之用於將影像自一第一動態範圍映射至一第二動態範圍之一例示性映射函數; 圖4A及圖4B描繪了根據本發明之實施例之用於判定色調映射函數之例示性程序; 包括(a)及(b)之圖5描繪了根據本發明之實施例判定之兩個例示性映射函數;及 圖6A及圖6B描繪了展示根據本發明之實施例之如何將輸入中間色調值映射至輸出中間色調值以判定一色調曲線映射函數之中間色調錨點之例示性曲線圖。An embodiment of the present invention is illustrated by way of example in the accompanying drawings, and FIG. Figure 2 depicts an exemplary mapping function for mapping an image from a first dynamic range to a second dynamic range using three anchor points in accordance with the prior art; Figure 3 depicts an embodiment in accordance with an embodiment of the present invention An exemplary mapping function for mapping an image from a first dynamic range to a second dynamic range; FIGS. 4A and 4B depict exemplary procedures for determining a tone mapping function, in accordance with an embodiment of the present invention; Figure 5 (a) and (b) depict two exemplary mapping functions determined in accordance with an embodiment of the present invention; and Figures 6A and 6B depict how the input midtone values are mapped in accordance with an embodiment of the present invention. An exemplary graph to the midtone value of the one tone curve mapping function is output to the midtone value.

Claims (19)

一種用於使用一處理器將一影像自一第一動態範圍映射至一第二動態範圍之方法,該方法包括: 在該第一動態範圍中存取一輸入影像之第一資訊資料,該第一資訊資料包括該第一動態範圍中之一輸入黑點位準(x1,SMin)、一輸入中間色調位準(x2,SMid)及一輸入白點位準(x3,SMax); 在該第二動態範圍中存取一輸出影像之第二資訊資料,該第二資訊資料包括該第二動態範圍中之一第一輸出黑點位準(TminPQ)及一第一輸出白點位準(TmaxPQ); 基於該第一資訊資料及該第二資訊資料來判定該第二動態範圍中之一輸出中間色調值; 基於該第二資訊資料及該輸出中間色調值來計算該第二動態範圍中之一第二輸出黑點及一第二輸出白點; 基於該第一資訊資料、該第二資訊資料及該輸出中間色調值來計算一尾部斜率、一頭部斜率及一中間色調斜率; 判定一轉移函數,該轉移函數用於將該第一動態範圍中之該輸入影像之像素值映射至該第二動態範圍中之該輸出影像之對應像素值,其中該轉移函數包括兩段,其中該第一段係基於該尾部斜率、該中間色調斜率、該輸入黑點位準、該輸入中間色調位準、該第二輸出黑點及該輸出中間色調值來判定,且該第二段係基於該中間色調斜率、該頭部斜率、該輸入中間色調位準、該輸入白點位準、該輸出中間色調值及該第二輸出白點來判定;及 使用該經判定轉移函數將該輸入影像映射至該輸出影像。A method for mapping an image from a first dynamic range to a second dynamic range using a processor, the method comprising: accessing, by the first dynamic range, a first information material of an input image, the first An information material includes one of the first dynamic range input black level (x1, SMin), an input intermediate tone level (x2, SMid), and an input white point level (x3, SMax); And accessing, by the second dynamic range, the second information material of the output image, the second information material comprising one of the first output black point level (TminPQ) and a first output white point level (TmaxPQ) of the second dynamic range Determining one of the second dynamic ranges based on the first information data and the second information data to output an intermediate tone value; calculating the second dynamic range based on the second information material and the output intermediate tone value a second output black point and a second output white point; calculating a tail slope, a head slope, and a midtone slope based on the first information material, the second information data, and the output halftone value; Transfer function The number is used to map a pixel value of the input image in the first dynamic range to a corresponding pixel value of the output image in the second dynamic range, where the transfer function includes two segments, wherein the first segment is based on the Determining the tail slope, the midtone slope, the input black point level, the input halftone level, the second output black point, and the output halftone value, and the second segment is based on the midtone slope, the Determining a head slope, the input midtone level, the input white point level, the output halftone value, and the second output white point; and mapping the input image to the output image using the determined transfer function. 如請求項1之方法,其中計算該第二動態範圍中之該第二輸出黑點及該第二輸出白點係進一步基於該第一資訊資料。The method of claim 1, wherein calculating the second output black point and the second output white point in the second dynamic range are further based on the first information material. 如請求項1或2之方法,其中: 計算該尾部斜率係基於該輸入黑點位準、該輸入中間色調位準、該第二輸出黑點及該輸出中間色調值; 計算該頭部斜率係基於該輸入白點位準、該輸入中間色調位準、該第二輸出白點及該輸出中間色調值;且 計算該中間色調斜率係基於該第一資訊資料、該第二輸出黑點、該第二輸出白點及該輸出中間色調值。The method of claim 1 or 2, wherein: calculating the tail slope is based on the input black point level, the input midtone level, the second output black point, and the output midtone value; calculating the head slope system Based on the input white point level, the input midtone level, the second output white point, and the output halftone value; and calculating the midtone slope based on the first information material, the second output black point, the The second output white point and the output halftone value. 如請求項1或2之方法,其中該第一動態範圍包括一高動態範圍,且該第二動態範圍包括一標準動態範圍。The method of claim 1 or 2, wherein the first dynamic range comprises a high dynamic range and the second dynamic range comprises a standard dynamic range. 如請求項1或2之方法,其中該轉移函數進一步包括一第一線段,該第一線段用於低於該第一動態範圍中之該輸入黑點位準之輸入值,其中該線段具有等於該尾部斜率之一斜率,其中視情況用於該第一線段之該轉移函數包括, 其中x 標示一輸入像素值,y 標示一輸出像素值,slopeMin標示該尾部斜率,TMin標示該第二動態範圍中之該第二輸出黑點,且SMin標示該第一動態範圍中之該輸入黑點位準。The method of claim 1 or 2, wherein the transfer function further comprises a first line segment for an input value lower than the input black point level in the first dynamic range, wherein the line segment Having a slope equal to one of the slopes of the tail, wherein the transfer function for the first line segment as appropriate includes Where x indicates an input pixel value, y indicates an output pixel value, slopeMin indicates the tail slope, TMin indicates the second output black point in the second dynamic range, and SMin indicates the input in the first dynamic range Black spots are standard. 如請求項1或2之方法,其中該轉移函數進一步包括一第二線段,該第二線段用於大於該第一動態範圍中之該輸入白點位準之輸入值,其中該線段具有等於該頭部斜率之一斜率,其中視情況用於該第二線段之該轉移函數包括, 其中x 標示一輸入像素值,y 標示一輸出像素值,slopeMax標示該頭部斜率,TMax標示該第二動態範圍中之該第二輸出白點,且SMax標示該第一動態範圍中之該輸入白點位準。The method of claim 1 or 2, wherein the transfer function further comprises a second line segment for an input value greater than the input white point level in the first dynamic range, wherein the line segment has equal to the a slope of the slope of the head, wherein the transfer function for the second line segment as appropriate includes Where x indicates an input pixel value, y indicates an output pixel value, slopeMax indicates the head slope, TMax indicates the second output white point in the second dynamic range, and SMax indicates the first dynamic range Enter the white point level. 如請求項1或2之方法,其中該第一段及/或該第二段係基於一個三階賀米特樣條多項式來判定。The method of claim 1 or 2, wherein the first segment and/or the second segment is determined based on a third-order Hermitian spline polynomial. 如請求項7之方法,其中判定該第一段包括計算), 其中),x 標示一輸入像素值,y 標示一輸出像素值,slopeMin標示該尾部斜率,slopeMid標示該中間色調斜率,TMin及TMid標示該第二輸出黑點及該輸出中間色調值,且SMin及SMid標示該第一動態範圍中之該輸入黑點位準及該輸入中間色調位準。The method of claim 7, wherein the determining the first segment comprises calculating ), among them x indicates an input pixel value, y indicates an output pixel value, slopeMin indicates the tail slope, slopeMid indicates the midtone slope, TMin and TMid indicate the second output black point and the output halftone value, and SMin and SMid The input black point level and the input halftone level in the first dynamic range are indicated. 如請求項7之方法,其中判定該第二段包括計算), (5c) 其中),x 標示一輸入像素值,y 標示一輸出像素值,slopeMax標示該頭部斜率,slopeMid標示該中間色調斜率,TMid及TMax標示該第二動態範圍中之該輸出中間色調值及該第二輸出白點,且SMid及SMax標示該第一動態範圍中之該輸入中間色調位準及該輸入白點位準。The method of claim 7, wherein the determining the second segment comprises calculating ), (5c) where x indicates an input pixel value, y indicates an output pixel value, slopeMax indicates the head slope, slopeMid indicates the midtone slope, TMid and TMax indicate the output halftone value in the second dynamic range, and the second The white point is output, and SMid and SMax indicate the input halftone level and the input white point level in the first dynamic range. 如請求項1或2之方法,其中計算該輸出中間色調值包括計算: 若SMidTminPQ+*TMinPQ 則TMid = TMinPQ+*TMinPQ; 否則若SMid > TmaxPQ-b *TmaxPQ 則TMid = TmaxPQ-b *TmaxPQ; 否則TMid = SMid; 其中TMid標示該輸出中間色調值,b 係[0,1]中之百分比值,SMid標示該輸入中間色調位準,且TminPQ及TmaxPQ包括該第二資訊資料中之值。The method of claim 1 or 2, wherein calculating the output midtone value comprises calculating: if SMid TminPQ+ *TMinPQ then TMid = TMinPQ+ *TMinPQ; otherwise if SMid > TmaxPQ- b *TmaxPQ then TMid = TmaxPQ- b *TmaxPQ; otherwise TMid = SMid; where TMid indicates the output midtone value, And the percentage value in b system [0, 1], SMid indicates the input halftone level, and TminPQ and TmaxPQ include the value in the second information material. 如請求項1或2之方法,其中計算該輸出中間色調值進一步包括: 基於該第一資訊資料及該第一輸出黑點來判定該第二動態範圍中之一初步輸出中間色調值及該初步輸出中間色調值之第一及第二邊界值; 基於該初步輸出中間色調值、該等第一及第二邊界值以及一或多個輸入對比度保持值來計算該第二動態範圍中之一頭部偏移及一尾部偏移;及 基於該第一動態範圍中之該輸入中間色調位準以及該等頭部及尾部偏移來計算該第二動態範圍中之該輸出中間色調值。The method of claim 1 or 2, wherein calculating the output halftone value further comprises: determining, based on the first information material and the first output black point, a preliminary output intermediate tone value and the preliminary Outputting first and second boundary values of the midtone value; calculating one of the second dynamic ranges based on the preliminary output halftone value, the first and second boundary values, and one or more input contrast retention values a portion offset and a tail offset; and calculating the output halftone value in the second dynamic range based on the input midtone level in the first dynamic range and the head and tail offsets. 如請求項11之方法,其中判定該初步輸出中間色調值以及該第一輸出中間色調值之該等第一及第二邊界值包括計算 midLoc = (SMid-TminPQ)/TDR; headroom = (SMax-SMid)/TDR; tailroom = (SMid-SMin)/TDR; 其中 TDR = TmaxPQ-TminPQ, midLoc標示該初步輸出中間色調值,tailroom及headroom標示該第一輸出中間色調值之該等第一及第二邊界值,SMin、SMid及SMax標示該第一資訊資料,且TminPQ標示該第一輸出黑點位準。The method of claim 11, wherein determining the preliminary output midtone value and the first and second boundary values of the first output midtone value comprises calculating midLoc = (SMid - TminPQ) / TDR; headroom = (SMax - SMid)/TDR; tailroom = (SMid-SMin)/TDR; where TDR = TmaxPQ-TminPQ, midLoc indicates the preliminary output midtone value, and tailroom and headroom indicate the first and second of the first output midtone value The boundary value, SMin, SMid, and SMax indicate the first information material, and TminPQ indicates the first output black point level. 如請求項11之方法,其中至少一對比度保持值為近似50%。The method of claim 11, wherein the at least one contrast retention value is approximately 50%. 如請求項11之方法,其中計算該輸出中間色調值(TMid)包括計算 TMid = SMid-offsetHead + offsetTail, 其中SMid標示該第一動態範圍中之該輸入中間色調位準,且offsetHead及offsetTail標示該等頭部及尾部偏移。The method of claim 11, wherein calculating the output halftone value (TMid) comprises calculating TMid = SMid-offsetHead + offsetTail, wherein SMid indicates the input midtone level in the first dynamic range, and offsetHead and offsetTail indicate the Wait for the head and tail offset. 如請求項14之方法,其中計算該第二動態範圍中之該第二輸出白點及該第二輸出黑點包括計算 TMax = min(TMid+SMax-SMid,TmaxPQ), TMin = max(TMid-SMid+SMin,TminPQ, 其中TMin標示該第二輸出黑點,TMax標示該第二輸出白點,SMin及SMax標示該第一動態範圍中之該輸入黑點位準及該輸入白點位準,且TminPQ及TmaxPQ標示該第二動態範圍中之該第一輸出黑點及該第一輸出白點。The method of claim 14, wherein calculating the second output white point and the second output black point in the second dynamic range comprises calculating TMax = min(TMid+SMax-SMid, TmaxPQ), TMin = max(TMid- SMid+SMin, TminPQ, where TMin indicates the second output black point, TMax indicates the second output white point, and SMin and SMax indicate the input black point level and the input white point level in the first dynamic range. And TminPQ and TmaxPQ indicate the first output black point and the first output white point in the second dynamic range. 如請求項10之方法,其進一步包括將該尾部斜率之一最大值(maxMinSlope)及/或該頭部斜率之一最大值(maxMaxSlope)計算為 maxMinSlope = 3*(TMid-TMin)/(SMid-SMin), maxMaxSlope = 3*(TMax-TMid)/(SMax-SMid), 其中視情況: 計算該尾部斜率(slopeMin)、該中間色調斜率(slopeMid)及該頭部斜率(slopeMax)進一步包括計算 slopeMin = min([maxMinSlope,((TMid-TMin)/(SMid-SMin))2 ]); slopeMax=min([maxMaxSlope,1,((TMax-TMid)/(SMax-SMid))4 ]); slopeMid= min([maxMinSlope,maxMaxSlope,contrastFactor*(1-SMid+TMid)]); 其中contrastFactor標示一對比度參數。The method of claim 10, further comprising calculating the maximum value of the tail slope (maxMinSlope) and/or the maximum value of the head slope (maxMaxSlope) as maxMinSlope = 3*(TMid-TMin)/(SMid- SMin), maxMaxSlope = 3*(TMax-TMid)/(SMax-SMid), wherein depending on the case: calculating the tail slope (slopeMin), the midtone slope (slopeMid), and the head slope (slopeMax) further includes calculating a slopeMin = min([maxMinSlope,((TMid-TMin)/(SMid-SMin)) 2 ]); slopeMax=min([maxMaxSlope,1,((TMax-TMid)/(SMax-SMid)) 4 ]); slopeMid = min([maxMinSlope, maxMaxSlope, contrastFactor*(1-SMid+TMid)]); where the contrastFactor indicates a contrast parameter. 如請求項1或2之方法,其進一步包括判定一反向查找表以將一影像自該第二動態範圍映射回到該第一動態範圍,該方法包括: 基於該經判定轉移函數判定一正向查找表,該正向查找表將該第一動態範圍中之複數個x(i) 值映射至該第二動態範圍中之y(i) 值;及 藉由設定以下項來產生該反向查找表,該反向查找表將該第二動態範圍中之複數個y'(k) 值映射至該第一動態範圍中之對應x'(k) 值: 若y’ (k ) =y (i ),則x’ (k ) =x (i ) 否則 若y (i ) <y’ (k ) <y (i +1),則藉由將一值內插在x(i)x(i + 1) 之間來產生該對應輸出x'(k)The method of claim 1 or 2, further comprising determining a reverse lookup table to map an image from the second dynamic range back to the first dynamic range, the method comprising: determining a positive based on the determined transfer function a lookup table that maps a plurality of x(i) values in the first dynamic range to y(i) values in the second dynamic range; and generates the reverse by setting the following a lookup table that maps a plurality of y'(k) values in the second dynamic range to corresponding x'(k) values in the first dynamic range: if y' ( k ) = y ( i ), then x' ( k ) = x ( i ) otherwise if y ( i ) <y' ( k ) < y ( i +1), by interpolating a value at x(i) and x( The corresponding output x'(k) is generated between i + 1 ) . 一種設備,其包括一處理器且經組態以執行如請求項1至17中任一項所述之方法。An apparatus comprising a processor and configured to perform the method of any one of claims 1 to 17. 一種上面儲存有電腦可執行指令之非暫時性電腦可讀儲存媒體,該電腦可執行指令用於以一或多個處理器來執行如請求項1至17中任一項之一方法。A non-transitory computer readable storage medium having stored thereon computer executable instructions for performing the method of any one of claims 1 to 17 in one or more processors.
TW107105408A 2017-02-15 2018-02-14 Tone curve mapping for high dynamic range images TWI671710B (en)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
US201762459141P 2017-02-15 2017-02-15
??17156284.6 2017-02-15
US62/459,141 2017-02-15
EP17156284 2017-02-15
US201762465298P 2017-03-01 2017-03-01
US62/465,298 2017-03-01

Publications (2)

Publication Number Publication Date
TW201835861A true TW201835861A (en) 2018-10-01
TWI671710B TWI671710B (en) 2019-09-11

Family

ID=58094214

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107105408A TWI671710B (en) 2017-02-15 2018-02-14 Tone curve mapping for high dynamic range images

Country Status (2)

Country Link
TW (1) TWI671710B (en)
WO (1) WO2018152063A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022127336A1 (en) * 2020-12-17 2022-06-23 华为技术有限公司 Method and device for tone mapping

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102287095B1 (en) * 2018-09-17 2021-08-06 돌비 레버러토리즈 라이쎈싱 코오포레이션 Display Mapping for High Dynamic Range Images on Power-Limited Displays
EP3857872A1 (en) 2018-09-26 2021-08-04 Dolby Laboratories Licensing Corporation Projector light source dimming using metadata from future frames
US11594159B2 (en) 2019-01-09 2023-02-28 Dolby Laboratories Licensing Corporation Display management with ambient light compensation
JP7249154B2 (en) * 2019-01-11 2023-03-30 日本テレビ放送網株式会社 Conversion device, conversion method and program
KR20220002977A (en) 2019-04-23 2022-01-07 돌비 레버러토리즈 라이쎈싱 코오포레이션 Display management for high dynamic range images
CN112215760A (en) * 2019-07-11 2021-01-12 华为技术有限公司 Image processing method and device
CN112686810A (en) * 2019-10-18 2021-04-20 华为技术有限公司 Image processing method and device
CN115552511A (en) * 2020-04-28 2022-12-30 杜比实验室特许公司 Image dependent contrast and brightness control for HDR displays
KR20230002720A (en) * 2020-05-08 2023-01-05 후아웨이 테크놀러지 컴퍼니 리미티드 Encoders, decoders, systems, and methods for determining tone mapping curve parameters
JP2022144005A (en) * 2021-03-18 2022-10-03 キヤノン株式会社 Image processing device, display device, image processing method, and program
GB2608990A (en) * 2021-07-08 2023-01-25 British Broadcasting Corp Method and apparatus for conversion of HDR signals
GB2625218A (en) * 2021-07-08 2024-06-12 British Broadcasting Corp Method and apparatus for conversion of HDR signals

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7298373B2 (en) * 2003-06-11 2007-11-20 Agfa Healthcare Method and user interface for modifying at least one of contrast and density of pixels of a processed image
TWI538473B (en) * 2011-03-15 2016-06-11 杜比實驗室特許公司 Methods and apparatus for image data transformation
US9024961B2 (en) * 2011-12-19 2015-05-05 Dolby Laboratories Licensing Corporation Color grading apparatus and methods

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022127336A1 (en) * 2020-12-17 2022-06-23 华为技术有限公司 Method and device for tone mapping

Also Published As

Publication number Publication date
WO2018152063A1 (en) 2018-08-23
TWI671710B (en) 2019-09-11

Similar Documents

Publication Publication Date Title
TWI671710B (en) Tone curve mapping for high dynamic range images
CN110337667B (en) Tone curve mapping for high dynamic range images
RU2762384C1 (en) Signal reformation for signals of wide dynamic range
US9613407B2 (en) Display management for high dynamic range video
US9230338B2 (en) Graphics blending for high dynamic range video
US9554020B2 (en) Workflow for content creation and guided display management of EDR video
RU2643485C2 (en) Device and method for conversion of dynamic range of images
CN110192223B (en) Display mapping of high dynamic range images
CN111095931B (en) Tone curve optimization method and associated video encoder and video decoder
WO2016172091A1 (en) Signal reshaping and coding in the ipt-pq color space
CN112703529B (en) Display mapping of high dynamic range images on power limited displays
US9729801B2 (en) Blending images using mismatched source and display electro-optical transfer functions
CN116167950B (en) Image processing method, device, electronic equipment and storage medium
CN118020090A (en) Multi-step display mapping and metadata reconstruction for HDR video