[go: up one dir, main page]

HK1221544B - Image processing for hdr images - Google Patents

Image processing for hdr images Download PDF

Info

Publication number
HK1221544B
HK1221544B HK16109656.8A HK16109656A HK1221544B HK 1221544 B HK1221544 B HK 1221544B HK 16109656 A HK16109656 A HK 16109656A HK 1221544 B HK1221544 B HK 1221544B
Authority
HK
Hong Kong
Prior art keywords
image
ratio
hdr
tone
images
Prior art date
Application number
HK16109656.8A
Other languages
Chinese (zh)
Other versions
HK1221544A1 (en
Inventor
A.莎
A.尼南
贾文辉
童慧明
杨巧丽
A.顿
G.王
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 HK1221544A1 publication Critical patent/HK1221544A1/en
Publication of HK1221544B publication Critical patent/HK1221544B/en

Links

Description

用于高动态范围图像的图像处理方法、装置及存储介质Image processing method, device and storage medium for high dynamic range images

本申请是申请号为201380003328.2,申请日为2013年7月31 日,题为“用于高动态范围图像的图像处理”的中国发明专利申请的分案申请。This application is a divisional application of the Chinese invention patent application with application number 201380003328.2, application date July 31, 2013, and titled “Image processing for high dynamic range images”.

本专利文档的公开内容的一部分包含受版权保护的资料。版权所有人不反对任何人如该专利文档或专利公开内容在专利商标局专利文件或记录中所登载的那样对它进行传真复制,但是保留所有其他版权权利。A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all other copyright rights whatsoever.

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请要求2012年8月8日提交的美国临时专利申请No. 61/681061的优先权,该申请的全部内容通过引用合并于此。This application claims priority to U.S. Provisional Patent Application No. 61/681,061, filed August 8, 2012, the entire contents of which are incorporated herein by reference.

技术领域Technical Field

本发明总体上涉及图像处理。更特别地,本发明的实施例涉及用于具有高动态范围(HDR)的图像的图像处理。The present invention relates generally to image processing. More particularly, embodiments of the present invention relate to image processing for images with high dynamic range (HDR).

背景技术Background Art

一些当代的或老式的数字图像遵循24位格式。这些图像包括存储关于图像中的每个像素的颜色和明亮度信息(诸如亮度和色度数据) 两者的多达24位。这样的格式保留足够的图像信息以使得图像可以被老式电子显示器绘制或再现,因此被认为是输出参考标准。老式显示器通常具有三个数量级的动态范围(DR)。然而,因为正常人类视觉可以区分高达1:10000或更高的对比率,所以可以感知到具有明显更高的动态范围的图像。Some contemporary or older digital images follow a 24-bit format. These images include up to 24 bits storing both color and brightness information (such as luminance and chrominance data) for each pixel in the image. This format retains enough image information to allow the image to be drawn or reproduced by older electronic displays and is therefore considered an output reference standard. Older displays typically have a dynamic range (DR) of three orders of magnitude. However, because normal human vision can distinguish contrast ratios of up to 1:10,000 or higher, images with significantly higher dynamic ranges can be perceived.

现代电子显示技术的发展使得可以以明显超过老式显示器的DR 的更高的动态范围绘制和再现图像。高动态范围(HDR)图像比遵循输出参考标准的图像格式更忠实地表示真实世界场景。因此,HDR图像可以被认为是参考的场景。在HDR图像和能够呈现它们的显示器的背景下,DR更加有限的老式或其他图像和显示器在本文中可以被称为低动态范围(LDR)图像/显示器。The development of modern electronic display technology has made it possible to draw and reproduce images with a higher dynamic range that significantly exceeds the DR of older displays. High dynamic range (HDR) images represent real-world scenes more faithfully than image formats that follow output-referenced standards. Therefore, HDR images can be considered to be reference scenes. In the context of HDR images and displays capable of rendering them, older or other images and displays with more limited DR may be referred to herein as low dynamic range (LDR) images/displays.

本章节中所描述的方法是可以寻求的方法,但是不必是以前设想过或寻求过的方法。因此,除非另有指示,否则不应仅由于本章节中所描述的任一方法包括在本章节中就假定该方法有资格作为现有技术。类似地,不应基于本章节就假定在任何现有技术中已经认识到了针对一种或多种方法识别的问题,除非另有指示。The approaches described in this section are approaches that could be pursued, but are not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any approach described in this section qualifies as prior art simply because it is included in this section. Similarly, it should not be assumed based on this section that the problems identified for one or more approaches have been recognized in any prior art, unless otherwise indicated.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

在附图中以举例的方式、而非限制的方式例示了本发明,在附图中,相似的标号指的是类似的元件,其中:The present invention is illustrated by way of example, and not by way of limitation, in the accompanying figures and in which like references refer to similar elements and in which:

图1A描绘根据本发明一实施例的示例性局部多尺度(multiscale) 色调映射系统;FIG1A depicts an exemplary local multiscale tone mapping system according to one embodiment of the present invention;

图1B描绘根据本发明一实施例的示例性图像编码处理;FIG1B depicts an exemplary image encoding process according to an embodiment of the present invention;

图2描绘根据本发明一实施例的示例性局部多尺度图像处理方法;FIG2 depicts an exemplary local multi-scale image processing method according to an embodiment of the present invention;

图3A和图3B分别描绘根据本发明一实施例的示例性HCTN块和相应的多尺度滤波;3A and 3B respectively depict an exemplary HCTN block and corresponding multi-scale filtering according to an embodiment of the present invention;

图4A、图4B和图4C分别描绘根据本发明一实施例的示例性多尺度滤波器块和相应的示例性多尺度滤波实现和示例性处理;4A , 4B , and 4C , respectively, depict an exemplary multiscale filter block and a corresponding exemplary multiscale filtering implementation and exemplary processing according to an embodiment of the present invention;

图5描绘根据本发明一实施例的示例性比值图像处理器;FIG5 depicts an exemplary ratio image processor according to an embodiment of the present invention;

图6A和图6B描绘根据本发明一实施例的用于HDR图像的示例性编码处理数据流;6A and 6B depict an exemplary encoding process data flow for an HDR image according to an embodiment of the present invention;

图7描绘根据本发明一实施例的用于显示HDR图像的融合-合并曝光处理;以及FIG. 7 depicts a fusion-merging exposure process for displaying an HDR image according to an embodiment of the present invention; and

图8A和图8B描绘根据本发明一实施例的支持广色域和多个颜色空间的示例性JPEG-HDR编码和解码处理。8A and 8B depict an exemplary JPEG-HDR encoding and decoding process supporting a wide color gamut and multiple color spaces according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

本文中对涉及HDR图像的图像处理的示例性实施例进行了描述。在以下描述中,为了说明的目的,阐述了许多特定细节,以便提供本发明的透彻理解。然而将显而易见的是,可以在没有这些特定细节的情况下实施本发明。在其他情况下,没有详尽地描述公知的结构和装置,以便避免不必要地掩蔽、模糊、或混淆本发明的一方面。Exemplary embodiments of image processing involving HDR images are described herein. In the following description, for illustrative purposes, numerous specific details are set forth to provide a thorough understanding of the present invention. However, it will be apparent that the present invention can be practiced without these specific details. In other instances, well-known structures and devices are not described in detail to avoid unnecessarily obscuring, obscuring, or confusing aspects of the present invention.

概述—HDR图像Overview—HDR Images

该概述呈现了本发明的示例性实施例的一些方面的基本描述。应注意,该概述不是可能的实施例的各方面的广泛的或详尽的总结。而且应注意,该概述并非意图被理解为识别可能的实施例的任何特别重要的方面或元素,也非意图被理解为具体地记述可能的实施例的任何范围,也非意图被理解为概括地记述本发明的任何范围。该概述仅以简洁的、简化的格式呈现与可能的示例性实施例相关的一些构思,并且应被理解为仅仅是以下接着的对示例性实施例的更详细描述的概念性序言。This overview presents a basic description of some aspects of exemplary embodiments of the present invention. It should be noted that this overview is not an extensive or exhaustive summary of all aspects of possible embodiments. Furthermore, it should be noted that this overview is not intended to be understood as identifying any particularly important aspects or elements of possible embodiments, nor is it intended to be understood as specifically reciting any range of possible embodiments, nor is it intended to be understood as generally reciting any range of the present invention. This overview merely presents some concepts related to possible exemplary embodiments in a concise, simplified format, and should be understood as merely a conceptual prelude to the more detailed description of exemplary embodiments that follows below.

本发明的示例性实施例涉及对HDR图像进行编码。使HDR输入图像中的对数(log)亮度直方图化以产生色调映射,以及计算对数整体色调映射亮度图像。对数整体色调映射亮度图像被降尺度。对数亮度和对数整体色调映射亮度图像产生对数比值图像。对数比值图像受到多尺度分辨率滤波,产生对数多尺度比值图像。对数多尺度比值图像和对数亮度产生第二对数色调映射图像,其被规范化以基于降尺度的对数整体色调映射亮度图像和规范化的图像输出色调映射图像。 HDR输入图像和输出色调映射图像产生被量化的第二比值图像。Example embodiments of the present invention relate to encoding an HDR image. Logarithmic (log) luminance in an HDR input image is histogrammed to produce a tone map, and a log overall tone map luminance image is calculated. The log overall tone map luminance image is downscaled. The log luminance and the log overall tone map luminance image produce a log ratio image. The log ratio image is subjected to multi-scale resolution filtering to produce a log multi-scale ratio image. The log multi-scale ratio image and the log luminance produce a second log tone map image, which is normalized to output a tone map image based on the downscaled log overall tone map luminance image and the normalized image. The HDR input image and the output tone map image produce a quantized second ratio image.

有源器件(例如,晶体管)的阵列设置在半导体管芯中。有源器件被构造为用作图像编码器,或者操作地互连以用作图像编码器。该编码器具有第一色调映射器,其用于使从高动态范围(HDR)输入图像的每个像素导出的多个对数亮度值直方图化。第一色调映射器用直方图化的值绘制第一比值图像。多尺度滤波器-抽取器(decimator) 递归地对第一比值图像进行降尺度并且在水平方向和垂直方向上对其每个像素进行低通滤波。根据第一比值图像的大小,在一个、两个或三个层次上对第一比值图像进行抽取和滤波。如此在这些层次中的每个层次上绘制相应的比值图像。相应的比值图像中的每个均被写入到独立于IC器件(即,在IC器件外部)的储存器(例如,存储器)。这些层次中的每个层次上的放大器用与抽取器所作用的每个层次相应的缩放因子对相应比值图像中的每个比值图像的每个滤波后的像素进行加权。双线性插值器将加权的比值图像中的每个升尺度到前面的层次中的每个之后的下一个层次。这些层次中的每个层次处的加法器对加权的比值图像中的每个与来自前一层次的加权比值图像进行求和。第二色调映射器色调映射基础图像及其色调映射的比值图像,这些图像均对应于输入HDR图像,但是动态范围更低。对基础图像及其基础比值图像进行量化。可以将量化的基础图像和基础比值图像输出到例如JPEG编码器以用于按JPEG格式进行压缩。An array of active devices (e.g., transistors) is disposed within a semiconductor die. The active devices are configured to function as, or are operatively interconnected to function as, an image encoder. The encoder includes a first tone mapper for histizing a plurality of logarithmic luminance values derived from each pixel of a high dynamic range (HDR) input image. The first tone mapper plots a first ratio image using the histogrammed values. A multiscale filter-decimator recursively downscales the first ratio image and low-pass filters each pixel thereof horizontally and vertically. Depending on the size of the first ratio image, the first ratio image is decimated and filtered at one, two, or three levels. A corresponding ratio image is plotted at each of these levels. Each of the corresponding ratio images is written to a storage device (e.g., a memory) independent of (i.e., external to) the IC device. An amplifier at each of these levels weights each filtered pixel of each of the corresponding ratio images using a scaling factor corresponding to each level acted upon by the decimator. A bilinear interpolator upscales each of the weighted ratio images to the next level after each of the previous levels. An adder at each of these levels sums each of the weighted ratio images with the weighted ratio image from the previous level. A second tone mapper tone maps the base image and its tone-mapped ratio image, both of which correspond to the input HDR image but with a lower dynamic range. The base image and its base ratio image are quantized. The quantized base image and base ratio image can be output to, for example, a JPEG encoder for compression in the JPEG format.

一些现代电子显示器本质上绘制参考场景的HDR图像,这些 HDR图像超过老式显示器的DR能力。在显示器DR能力的背景下,术语“绘制”、“再现”、“恢复”、“呈现”、“生成”、“复原”和“产生”在本文中可以同义地和/或可互换地使用。本发明的实施例有效地与现代显示器以及老式显示器一起运行。实施例使得有能力的现代显示器可以基本上以它们的全对比率绘制HDR图像,并且向后兼容性使得老式显示装置和LDR显示装置可以在它们自己的更有限的DR再现能力内绘制图像。实施例支持对于LDR显示器以及新式 HDR显示技术的这样的向后兼容性。Some modern electronic displays essentially render HDR images of a reference scene that exceed the DR capabilities of older displays. In the context of display DR capabilities, the terms "render," "restore," "render," "generate," "restore," and "produce" may be used synonymously and/or interchangeably herein. Embodiments of the present invention operate effectively with modern displays as well as older displays. Embodiments enable capable modern displays to render HDR images at substantially their full contrast ratio, and backward compatibility enables older display devices and LDR display devices to render images within their own more limited DR rendering capabilities. Embodiments support such backward compatibility for LDR displays as well as newer HDR display technologies.

实施例本质上用色调映射的基础图像(诸如图像的具有比该图像的相应HDR实例低的DR的实例)连同编码的元数据来表示HDR图像,编码的元数据提供关于该图像的附加信息。附加信息包括图像强度相关的(例如,亮度、luma)数据和/或颜色相关的(例如,色度、chroma)数据。附加数据与HDR图像实例和相应的基础图像实例之间的DR差异相关。因此,具有相对有限的DR再现能力的第一(例如,老式)显示器可以使用色调映射图像来例如根据现有的、建立的或流行的图像压缩/解压缩(编解码)标准呈现正常的DR图像。An embodiment essentially represents an HDR image using a tone-mapped base image (such as an instance of an image having a lower DR than a corresponding HDR instance of the image) together with encoded metadata that provides additional information about the image. The additional information includes image intensity-related (e.g., brightness, luma) data and/or color-related (e.g., chroma) data. The additional data is related to the DR difference between the HDR image instance and the corresponding base image instance. Thus, a first (e.g., older) display with relatively limited DR reproduction capabilities can use the tone-mapped image to render a normal DR image, for example, according to an existing, established, or popular image compression/decompression (codec) standard.

示例性实施例使得可以根据国际电信联盟和国际电工协会的联合照片专家组的JPEG标准、JPEG ISO/IEC 10918-1ITU-T Rec.T.81 来对正常DR图像进行处理,该标准的全部内容出于所有目的通过引用合并于此,如同在本文中充分阐述一样。而且,第二(例如,现代的)有HDR能力的显示器可以将色调映射图像连同图像元数据一起进行处理以有效地呈现HDR图像。一方面,使用色调映射图像来在老式显示器上呈现正常动态范围图像。另一方面,可以使用附加元数据与色调映射图像来(例如,由HDR显示器)产生、恢复或呈现HDR 图像。实施例使用色调映射算子(TMO)来基于HDR图像创建色调映射图像实例。Exemplary embodiments enable processing of normal DR images in accordance with the JPEG standard of the Joint Photographic Experts Group of the International Telecommunication Union and the International Electrotechnical Commission, JPEG ISO/IEC 10918-1 ITU-T Rec. T.81, the entire contents of which are incorporated herein by reference for all purposes as if fully set forth herein. Furthermore, a second (e.g., modern) HDR-capable display can process the tone-mapped image along with the image metadata to effectively render the HDR image. In one aspect, the tone-mapped image is used to render a normal dynamic range image on an older display. In another aspect, the additional metadata can be used with the tone-mapped image to generate, restore, or render an HDR image (e.g., by an HDR display). Embodiments use a tone mapping operator (TMO) to create a tone-mapped image instance based on the HDR image.

可以使用各种TMO(诸如Reinhard的整体拍摄算子)来相对高效率地生成色调映射图像。在计算成本是无关的、可获得的或以其他方式可忽略的情况下,可以使用双边滤波器来生成相对高质量的色调映射图像。双边滤波帮助保留通常在计算上更经济的Reinhardt算子可能丢失的、诸如其明亮区域中的图像细节。另外地或可替代地,可以使用直方图调整算子TMO和/或梯度域算子TMO。Various TMOs, such as Reinhardt's global capture operator, can be used to generate tone-mapped images relatively efficiently. Where computational cost is irrelevant, available, or otherwise negligible, bilateral filtering can be used to generate relatively high-quality tone-mapped images. Bilateral filtering helps preserve image detail, such as in bright areas, that the typically more computationally efficient Reinhardt operator may lose. Additionally or alternatively, a histogram adjustment operator (TMO) and/or a gradient domain operator (TMO) can be used.

在实施例中,图像格式能够高效率地绘制HDR图像以及非HDR 图像。实施例可以与JPEG格式和/或各种其他图像格式一起运行。例如,实施例可以与与图像相关的领域中的技术人员所熟悉的MPEG、 AVI、TIFF、BMP、GIF或其他合适的格式中的一种或多种一起运行。实施例根据JPEG-HDR格式运行,在以下文献中描述了JPEG-HDR 格式:Ward、Greg和Simmons,Maryanne在First ACM Symposium on Applied Perception in Graphics and Visualization(APGV)第83-90 页(2004)中的“Subband Encoding of High DynamicRange Imagery”; Ward、Greg和Simmons,Maryanne在Proceedings of the Thirteenth Color Imaging Conference第283-290页(2005)中的“JPEG-HDR: Backwards-Compatible,High Dynamic Range Extension to JPEG”以及E.Reinhard、G.Ward等人在第105-108页Elsevier,MA(2010)的High Dynamic Range Imaging–Acquisition,Display and Image- based Lighting,这些文献的全部内容出于所有目的通过引用合并于此,如同在本文中充分阐述一样。In embodiments, the image format is capable of efficiently rendering both HDR and non-HDR images. Embodiments may operate with the JPEG format and/or various other image formats. For example, embodiments may operate with one or more of MPEG, AVI, TIFF, BMP, GIF, or other suitable formats familiar to those skilled in the art of image processing. Embodiments operate according to the JPEG-HDR format, which is described in Ward, Greg, and Simmons, Maryanne, “Subband Encoding of High Dynamic Range Imagery,” in First ACM Symposium on Applied Perception in Graphics and Visualization (APGV) , pp. 83-90 (2004); Ward, Greg, and Simmons, Maryanne, “JPEG-HDR: Backwards-Compatible, High Dynamic Range Extension to JPEG,” in Proceedings of the Thirteenth Color Imaging Conference, pp. 283-290 (2005), and E. Reinhard, G. Ward, et al. , High Dynamic Range Imaging–Acquisition, Display and Image- based Lighting , Elsevier, MA (2010), pp. 105-108, the entire contents of which are incorporated herein by reference for all purposes as if fully set forth herein.

为了在多种多样的图像绘制装置上显示图像,色调映射算子 (TMO)将输入的HDR图像处理为色调映射(TM)基本图像。TM 基本图像可以包括相对于输入图像的色变(例如,色度变化、颜色截限、艺术外观等)。根据一些技术,将TM基本图像与亮度比率一起提供给下游图像解码器,以重构与输入HDR图像相当的HDR图像。然而,下游图像解码器将不能移除重构HDR图像中的色变,依赖于 TM基本图像和灰阶亮度比率。结果,色变在重构HDR图像中将仍然明显。To display images on a variety of image rendering devices, a tone mapping operator (TMO) processes the input HDR image into a tone-mapped (TM) base image. The TM base image can include color variations relative to the input image (e.g., chroma variations, color clipping, artistic appearance, etc.). According to some techniques, the TM base image is provided to a downstream image decoder along with the luminance ratio to reconstruct an HDR image comparable to the input HDR image. However, the downstream image decoder will not be able to remove the color variations in the reconstructed HDR image, relying on the TM base image and the grayscale luminance ratio. As a result, the color variations will still be noticeable in the reconstructed HDR image.

本文中描述的实施例的HDR图像编码器不仅创建亮度比率,而且还基于输入HDR图像和TM基本图像创建颜色残差值。亮度比率和颜色残差值可以被共同表示为HDR重构数据。可选地和/或另外地,将亮度比率变换到对数域以支持范围相对广泛的亮度值。可选地和/或另外地,对所得的对数亮度比率和颜色残差值进行量化。可选地和/ 或另外地,将量化的对数比率和颜色残差值存储在残差图像中。在一些实施例中,将量化的对数比率和颜色残差值,或残差图像,与TM 基本图像一起提供给下游图像解码器。可选地和/或另外地,与TM基本图像一起,还提供与量化的对数比率和颜色残差值相关的参数(例如,范围极限等)。The HDR image encoder of the embodiment described herein not only creates a brightness ratio, but also creates a color residual value based on the input HDR image and the TM base image. The brightness ratio and the color residual value can be jointly represented as HDR reconstruction data. Optionally and/or additionally, the brightness ratio is transformed into a logarithmic domain to support a relatively wide range of brightness values. Optionally and/or additionally, the resulting logarithmic brightness ratio and the color residual value are quantized. Optionally and/or additionally, the quantized logarithmic ratio and the color residual value are stored in a residual image. In some embodiments, the quantized logarithmic ratio and the color residual value, or the residual image, are provided to a downstream image decoder together with the TM base image. Optionally and/or additionally, together with the TM base image, parameters related to the quantized logarithmic ratio and the color residual value (e.g., range limits, etc.) are also provided.

本文中所描述的实施例的TMO可以针对具有低(黑)或高(白) 亮度级的个体像素在颜色通道中自由地执行颜色截限(clipping)。此外,不要求本文描述的TMO保持每个像素处的色度。根据本文中所描述的技术,用户基于图像内容(例如,人形、室内图像、户外场景、夜景、日落等)或应用(例如,电影、海报、结婚照、杂志等中所使用的应用)自由地选择TMO。可以有意地且自由地使用颜色截限或修改来创建图像的艺术外观。本文中的HDR图像编码器和解码器支持由不同类型的编辑软件和照相机制造商实现的TMO,这些TMO可以引入范围广泛的可能的色变。根据本文中所描绘的技术,HDR编码器将颜色残差值提供给HDR解码器。HDR解码器继而使用这些颜色残差值来防止(或最小化)色变存在于重构的HDR图像中。The TMO of the embodiments described herein can freely perform color clipping in the color channel for individual pixels with low (black) or high (white) brightness levels. In addition, the TMO described herein is not required to maintain the chromaticity at every pixel. According to the technology described herein, the user is free to select the TMO based on the image content (e.g., human figures, indoor images, outdoor scenes, night scenes, sunsets, etc.) or application (e.g., applications used in movies, posters, wedding photos, magazines, etc.). Color clipping or modification can be used intentionally and freely to create an artistic look for the image. The HDR image encoder and decoder herein support TMOs implemented by different types of editing software and camera manufacturers, which can introduce a wide range of possible color changes. According to the technology described herein, the HDR encoder provides color residual values to the HDR decoder. The HDR decoder then uses these color residual values to prevent (or minimize) color changes from being present in the reconstructed HDR image.

实施例可以使用比特流和/或图像文件来存储TM基本图像及其各自相应的HDR重构数据,并且将这些图像和数据提供给下游图像查看器或解码器以用于解码和/或绘制。在示例性实施例中,图像格式支持可以由各种编辑软件应用程序和/或照相机制造商实现的TMO。示例性实施例可以与各种图像格式一起运行,所述图像格式包括例如标准JPEG图像格式、以及扩展的、增强的、扩增的或改进的JPEG 相关格式,诸如JPEG-HDR。另外地、可替代地或可选地,示例性实施例可以使用基于编解码器/标准的或者与编解码器/标准一起使用的图像格式,所述编解码器和/或标准在与可以与JPEG相关的图像格式一起使用的那些编解码器和/或标准相关的一个或多个重要方面、属性、对象、编码规范或性能参数上有所变化。示例性实施例使用 JPEG-HDR图像格式来支持将TM基本图像与亮度比率和颜色残差值一起存储。另外地、可选地或可替代地,可以对存储在图像文件中的 TM基本图像和残差图像中的一个或两个进行压缩。在示例性实施例中,根据JPEG标准来执行图像数据压缩。另外地、可替代地或可选地,示例性实施例可以根据在与可以与JPEG相关的图像格式一起使用的那些标准相关的一个或多个重要方面、属性、对象、编码规范或性能参数上有所变化的标准来执行压缩。Embodiments may use bitstreams and/or image files to store TM base images and their respective corresponding HDR reconstruction data, and provide these images and data to downstream image viewers or decoders for decoding and/or rendering. In exemplary embodiments, the image format supports TMO, which may be implemented by various editing software applications and/or camera manufacturers. Exemplary embodiments may operate with various image formats, including, for example, the standard JPEG image format, as well as extended, enhanced, augmented, or improved JPEG-related formats, such as JPEG-HDR. Additionally, alternatively, or optionally, exemplary embodiments may use image formats based on or used with codecs/standards that differ in one or more significant aspects, attributes, objects, coding specifications, or performance parameters relative to those codecs and/or standards that may be used with JPEG-related image formats. Exemplary embodiments use the JPEG-HDR image format to support storage of TM base images along with luminance ratios and color residual values. Additionally, alternatively, or optionally, one or both of the TM base image and the residual image stored in the image file may be compressed. In exemplary embodiments, image data compression is performed in accordance with the JPEG standard. Additionally, alternatively, or optionally, exemplary embodiments may perform compression according to standards that vary in one or more significant aspects, attributes, objects, encoding specifications, or performance parameters relative to those standards that may be used with JPEG-related image formats.

因为JPEG格式限于LDR图像,所以JPEG-HDR本质上包括 JPEG格式的可向后兼容的HDR扩展。JPEG-HDR同时支持新式 HDR显示装置上的HDR图像绘制、以及HDR或非HDR显示装置上的非HDR(例如,LDR)图像绘制。JPEG-HDR将色调映射图像存储在如JPEG中所定义的标准位置上(例如,存储在比特流中、按盘格式存储等),并将附加元数据存储在可以被非HDR显示装置忽略的新位置上。可以将附加元数据与色调映射图像一起用于产生/或复原原始HDR图像的HDR版本。Because the JPEG format is limited to LDR images, JPEG-HDR essentially comprises a backward-compatible HDR extension of the JPEG format. JPEG-HDR supports both rendering of HDR images on modern HDR displays and rendering of non-HDR (e.g., LDR) images on both HDR and non-HDR displays. JPEG-HDR stores the tone-mapped image in a standard location as defined in JPEG (e.g., in the bitstream, on disk, etc.) and stores additional metadata in a new location that can be ignored by non-HDR displays. The additional metadata can be used together with the tone-mapped image to generate and/or restore an HDR version of the original HDR image.

在实施例中,JPEG HDR编码器用集成电路(IC)器件实现,或者设置在集成电路(IC)器件中。在实施例中,如本文中所述的装置、电路和/或机构包括照相机或另一图像记录和绘制或显示系统、蜂窝无线电话、个人数字助理(PDA)或个人便携式或消费类电子装置(例如,用于图片、计算、电影、音乐、信息、娱乐、运算、语音)中的组件。In an embodiment, the JPEG HDR encoder is implemented using, or provided in, an integrated circuit (IC) device. In an embodiment, the apparatus, circuits, and/or mechanisms as described herein comprise components in a camera or other image recording and rendering or display system, a cellular radiotelephone, a personal digital assistant (PDA), or a personal portable or consumer electronic device (e.g., for pictures, computing, movies, music, information, entertainment, calculations, voice).

实施例可以执行如Wenhui Jia等人于2012年4月16日依照专利合作条约(PCT)提交的题为“ENCODING,DECODING,AND REPRESENTING HIGH DYNAMIC RANGE IMAGE”的第PCT/US2012/033795号专利申请中或者Dolby Laboratories的规范化文档“JPEG-HDREncoder and Decoder Algorithm Specification”中所描述的一种或多种功能,该文献出于所有目的并入本文,该文献的副本作为附录“A”附到本说明书(提交时)。Embodiments may perform one or more functions as described in patent application No. PCT/US2012/033795, entitled “ENCODING, DECODING, AND REPRESENTING HIGH DYNAMIC RANGE IMAGE,” filed by Wenhui Jia et al. on April 16, 2012 under the Patent Cooperation Treaty (PCT), or in Dolby Laboratories’ standardization document “JPEG-HDR Encoder and Decoder Algorithm Specification,” which is incorporated herein for all purposes, a copy of which is attached as Appendix “A” to this specification (at the time of filing).

实施例可以执行如Gregory John Ward于2012年3月1日依照 PCT提交的题为“LOCAL MULTI-SCALE TONE MAPPING OPERATOR”的第PCT/US2012/027267号专利申请中所描述的一种或多种功能,该专利申请的全部内容出于所有目的通过引用并入本文。Embodiments may perform one or more functions as described in PCT/US2012/027267, filed by Gregory John Ward on March 1, 2012, entitled “LOCAL MULTI-SCALE TONE MAPPING OPERATOR,” the entire contents of which are incorporated herein by reference for all purposes.

对于本文中描述的优选实施例和总体原理和特征的各种修改对于本领域的技术人员将是容易明白的。因此,本公开并非意图限于所示的实施例,而是要被给予与本文中所描述的原理和特征一致的最广泛的范围。Various modifications to the preferred embodiments and overall principles and features described herein will be readily apparent to those skilled in the art. Therefore, the present disclosure is not intended to be limited to the embodiments shown, but is to be accorded the broadest scope consistent with the principles and features described herein.

示例性JPEG HDR编码器Example JPEG HDR encoder

在实施例中,JPEG HDR编码器用集成电路(IC)器件实现,IC 器件通常被称为芯片。例如,编码器可以设置在IC器件内。IC器件可以被实现为专用IC(ASIC)器件、数字信号处理器(DSP)、现场可编程门阵列(FPGA)和/或图形处理器。IC器件可以用ASIC或一个或多个可配置或可编程器件(诸如微处理器、可编程逻辑器件 (PLD)、现场可编程门阵列(FPGA)或微控制器)而被实现为片上系统(SOC)。In an embodiment, the JPEG HDR encoder is implemented using an integrated circuit (IC) device, which is often referred to as a chip. For example, the encoder may be provided within the IC device. The IC device may be implemented as an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a field-programmable gate array (FPGA), and/or a graphics processor. The IC device may be implemented as a system-on-chip (SOC) using an ASIC or one or more configurable or programmable devices, such as a microprocessor, a programmable logic device (PLD), a field-programmable gate array (FPGA), or a microcontroller.

IC器件包括设置在半导体管芯内的有源器件组件(诸如晶体管) 的阵列。有源器件组件被排列为、被布置为、被构造为和/或被编程为用作模块、寄存器、高速缓存、逻辑门、逻辑和计算(例如,算术/ 浮点)单元,或者执行可以与JPEG HDR编码一致的其他这样的操作。该阵列的有源组件与设置在管芯内的至少部分导电的路由结构(诸如迹线/过孔的网络、地址/字线的网格等)互连,以使得在有源器件组件与随其一起形成的各种功能模块之间可以进行信号和数据的电气/ 电子交换。有源组件在操作上可以通过至少部分导电的接口进行寻址,这使得可以与IC器件外部的信号、数据和电源进行电气、电子和/或通信耦合。The IC device includes an array of active device components (such as transistors) disposed within a semiconductor die. The active device components are arranged, configured, and/or programmed to function as modules, registers, caches, logic gates, logic and computational (e.g., arithmetic/floating point) units, or to perform other such operations consistent with JPEG HDR encoding. The active components of the array are interconnected with at least partially conductive routing structures (such as a network of traces/vias, a grid of address/word lines, etc.) disposed within the die to enable electrical/electronic exchange of signals and data between the active device components and various functional modules formed therewith. The active components are operatively addressable via at least partially conductive interfaces, which enable electrical, electronic, and/or communicative coupling with signals, data, and power external to the IC device.

示例性JPEG HDR编码器实施例在本文中被描述为用ASIC实现。为了清晰、简洁和一致,本文中所描述的示例ASIC实现还表示可配置的且可编程的IC实现。图1A描绘根据本发明的实施例的示例 JPEG HDR编码器10。An exemplary JPEG HDR encoder embodiment is described herein as being implemented using an ASIC. For clarity, brevity, and consistency, the exemplary ASIC implementation described herein also represents a configurable and programmable IC implementation. FIG1A depicts an exemplary JPEG HDR encoder 10 according to an embodiment of the present invention.

示例编码器10用ASIC实现。编码器10通过高级高性能总线 (AHB)接口来接收输入图像。预色调映射Pre_TM将输入图像数据转换为对于色调映射有用的格式。PRE_TM执行色度上采样,例如从 4:2:2色度采样格式到4:4:4格式。PRE_TM将图像输入的颜色空间 (例如,YCbCr)转换到三色颜色空间,诸如RGB。Pre_TM对RGB 转换图像执行反向(逆向)伽玛(γ)校正。The example encoder 10 is implemented using an ASIC. The encoder 10 receives an input image via an Advanced High-Performance Bus (AHB) interface. A pre-tone mapper (Pre_TM) converts the input image data into a format useful for tone mapping. Pre_TM performs chroma upsampling, for example, from a 4:2:2 chroma sampling format to a 4:4:4 format. Pre_TM converts the color space of the image input (e.g., YCbCr) to a three-color color space, such as RGB. Pre_TM performs inverse gamma (γ) correction on the RGB converted image.

编码器10执行从输入HDR图像产生色调映射基础图像的色调映射功能。编码器10可以被实现为对以诸如以下表1中所示的示例输入格式的各种格式输入的HDR图像进行处理。The encoder 10 performs a tone mapping function to generate a tone-mapped base image from an input HDR image. The encoder 10 can be implemented to process HDR images input in various formats, such as the example input formats shown in Table 1 below.

表1Table 1

色调映射功能包括直方图调整多尺度色调映射算子 (HAMS-TMO),其使用对比度受限自适应直方图均衡化(CLAHE) 来对输入HDR图像执行色调映射规范化功能。该规范化功能可以用直方图CLAHE色调映射规范化(HCTN)来对输入图像实施。 HAMS-TMO HCTN以12位线性RGB格式输出规范化色调映射基础图像。以下描述示例HAMS-TMO HCTN实施例(图2和图3A)。比值图像处理器RI_Proc可以从规范化色调映射基础图像计算一个或多个比值图像并对这些比值图像进行处理。The tone mapping function includes a Histogram Adjusted Multi-Scale Tone Mapping Operator (HAMS-TMO), which uses Contrast Limited Adaptive Histogram Equalization (CLAHE) to perform a tone mapping normalization function on the input HDR image. This normalization function can be implemented on the input image using Histogram CLAHE Tone Mapping Normalization (HCTN). The HAMS-TMO HCTN outputs a normalized tone mapped base image in 12-bit linear RGB format. An example HAMS-TMO HCTN embodiment is described below (Figures 2 and 3A). A ratio image processor RI_Proc can calculate one or more ratio images from the normalized tone mapped base image and process these ratio images.

当进行HAMS-TMO HCTN处理时,后色调映射Post_TM复原对规范化12位RGB图像的伽玛校正,并随其产生8位RGB图像。 Post_TM负责将色调映射基础图像发送到JPEG编码器进行压缩。 Post_TM将重新经过伽玛校正的8位图像的RGB颜色空间转换为具有JPEG可兼容颜色格式(例如,4:2:2或4:2:0)的YCbCr图像。例如,后TMO可以包括以下操作:伽玛编码(其中,通常通过用户定义的查找表来将12位RGB输入转化为8位输入)、RGB到YCbCr 颜色变换(例如,经由3×3颜色矩阵变换)、以及经由色度颜色平面的适当的二次采样的4:4:4到4:2:2或4:2:0变换。编码器10可以包括多于一个的后色调映射模块Post_TM子块。例如,编码器10可以用三(3)个Post_TM子块来实现。When performing HAMS-TMO HCTN processing, the post-tone mapping Post_TM restores the gamma correction of the normalized 12-bit RGB image and produces an 8-bit RGB image therewith. Post_TM is responsible for sending the tone mapped base image to the JPEG encoder for compression. Post_TM converts the RGB color space of the re-gamma-corrected 8-bit image into a YCbCr image with a JPEG compatible color format (e.g., 4:2:2 or 4:2:0). For example, the post-TMO may include the following operations: gamma encoding (wherein the 12-bit RGB input is typically converted to 8-bit input via a user-defined lookup table), RGB to YCbCr color conversion (e.g., via a 3×3 color matrix conversion), and 4:4:4 to 4:2:2 or 4:2:0 conversion via appropriate subsampling of the chroma color planes. The encoder 10 may include more than one post-tone mapping module Post_TM sub-block. For example, the encoder 10 may be implemented with three (3) Post_TM sub-blocks.

图1B描绘根据本发明的实施例的示例性图像编码处理100。在实施例中,编码器10在接收到或访问输入的HDR图像时如与处理100 相关地描述的那样运行。在步骤101中,基于HDR输入图像中的像素的对数亮度值来计算直方图。在步骤102中,基于所计算的直方图来产生色调映射曲线。在步骤103中,基于输入HDR图像的对数亮度像素值和色调映射曲线来计算对数整体色调映射亮度图像。FIG1B depicts an exemplary image encoding process 100 according to an embodiment of the present invention. In an embodiment, encoder 10 operates as described in connection with process 100 upon receiving or accessing an input HDR image. In step 101, a histogram is calculated based on the logarithmic luminance values of pixels in the HDR input image. In step 102, a tone mapping curve is generated based on the calculated histogram. In step 103, a logarithmic overall tone-mapped luminance image is calculated based on the logarithmic luminance pixel values of the input HDR image and the tone mapping curve.

在步骤104中,对对数整体色调映射亮度图像进行下采样(例如,垂直地且水平地抽取)以计算降尺度的对数整体色调映射亮度图像。在步骤105中,基于降尺度的对数整体色调映射亮度图像和HDR输入图像的对数亮度像素值来计算对数比值图像。在步骤106中,对对数比值图像执行多尺度滤波以产生对数多尺度比值图像。在步骤107 中,基于对数多尺度比值图像和HDR输入图像的对数亮度像素值来产生第二对数色调映射图像。In step 104, the logarithmic global tone-mapped luminance image is downsampled (e.g., decimated vertically and horizontally) to calculate a downscaled logarithmic global tone-mapped luminance image. In step 105, a logarithmic ratio image is calculated based on the downscaled logarithmic global tone-mapped luminance image and the logarithmic luminance pixel values of the HDR input image. In step 106, multiscale filtering is performed on the logarithmic ratio image to generate a logarithmic multiscale ratio image. In step 107, a second logarithmic tone-mapped image is generated based on the logarithmic multiscale ratio image and the logarithmic luminance pixel values of the HDR input image.

在步骤108中,使第二对数色调映射图像规范化以改变像素强度值的范围并且实现对比度拉伸,并且基于此和降尺度的对数整体色调映射亮度图像来产生输出色调映射图像。在步骤109中,基于输出色调映射图像和输入HDR图像来产生第二比值图像。在步骤110中,对第二比值图像进行量化。在步骤111中,将输出色调映射图像和量化的第二比值图像输出到JPEG编码器。在示例处理100的每个步骤,可以例如经由示例编码器10的接口将所产生的整体色调映射图像和比值图像写入到外部存储器、和/或从外部存储器读取所产生的整体色调映射图像和比值图像。In step 108, the second logarithmic tone-mapped image is normalized to change the range of pixel intensity values and achieve contrast stretching, and an output tone-mapped image is generated based on this and the downscaled logarithmic overall tone-mapped luminance image. In step 109, a second ratio image is generated based on the output tone-mapped image and the input HDR image. In step 110, the second ratio image is quantized. In step 111, the output tone-mapped image and the quantized second ratio image are output to a JPEG encoder. At each step of the example process 100, the generated overall tone-mapped image and ratio image can be written to and/or read from an external memory, for example, via an interface of the example encoder 10.

图2描绘根据本发明的实施例的示例性直方图调整多尺度色调映射器200。在实施例中,直方图调整多尺度色调映射器200实现上述 (图1A)HAMS-TMO HCTN功能。HAMS-TMO200接收三色(例如, RGB)或其他(例如,YCbCr)颜色空间中的HDR图像。亮度模块 (201)对输入HDR RGB图像计算16位亮度值Y。对数亮度模块LOG (202)将亮度值Y从线性域变换到对数域。LOG 202模块实现亮度值Y到以2为底数的对数“logY”的变换。FIG2 depicts an exemplary histogram-adjusted multi-scale tone mapper 200 according to an embodiment of the present invention. In an embodiment, the histogram-adjusted multi-scale tone mapper 200 implements the HAMS-TMO HCTN functionality described above ( FIG1A ). The HAMS-TMO 200 receives an HDR image in a three-color (e.g., RGB) or other (e.g., YCbCr) color space. The luminance module (201) calculates a 16-bit luminance value Y for the input HDR RGB image. The logarithmic luminance module LOG (202) transforms the luminance value Y from a linear domain to a logarithmic domain. The LOG 202 module implements a transformation of the luminance value Y to its base-2 logarithm "logY."

当对16位线性亮度值进行变换时,LOG模块将所得的以2为底数的对数(log2)值logY保存为Q4.12数据(例如,名义二进制点之前为4位,其后为12位)。例如,对数包括整数成分和小数成分。因此,实施例分离整数logY分量和小数logY分量以实现以2为底数的对数log2Y。例如,如以下表2的示例伪代码中所示的,根据规范化中的左移的数量来计算整数部分,并且将小数8位编索引到查找表 LUT。When converting 16-bit linear luminance values, the LOG module stores the resulting base-2 logarithm (log 2 ) value, logY, as Q4.12 data (e.g., 4 bits before the nominal binary point and 12 bits after it). For example, the logarithm includes an integer component and a fractional component. Therefore, embodiments separate the integer logY component and the fractional logY component to implement the base-2 logarithm, log 2 Y. For example, as shown in the example pseudocode of Table 2 below, the integer portion is calculated based on the number of left shifts in normalization, and the fractional 8 bits are indexed into the lookup table LUT.

表2Table 2

从小数logY成分构建包括512个区间的直方图HIST(203)。小数对数亮度值被作为16位整数值进行处理。因此,区间之间的间隔包括65536/512=128。HAMS-TMO 200然后对直方图执行CLAHE调整。例如根据以下表3A中所示的示例伪代码,从直方图计算动态范围。A histogram HIST (203) comprising 512 bins is constructed from the fractional logY components. The fractional logarithmic luminance values are processed as 16-bit integer values. Therefore, the interval between bins comprises 65536/512=128. The HAMS-TMO 200 then performs a CLAHE adjustment on the histogram. The dynamic range is calculated from the histogram, for example, according to the example pseudocode shown in Table 3A below.

表3ATable 3A

输出动态范围(ODR)在自然(以e为底数)对数域中可用默认值3.5配置,默认值3.5被转化为以2为底数的值五(5)。例如,按照以下公式计算直方图截限因子“cf”:The output dynamic range (ODR) is configurable in the natural (base e) logarithmic domain with a default value of 3.5, which is converted to a base 2 value of five (5). For example, the histogram cutoff factor "cf" is calculated as follows:

cf=((odr*(bmax-bmin+1))<<12)/(drin);cf=((odr*(bmax-bmin+1))<<12)/(drin);

并且可以随其一起通过例如根据以下表3B中所示的伪代码的多次迭代来调整直方图。And along with it the histogram may be adjusted by, for example, multiple iterations according to the pseudo code shown in Table 3B below.

表3BTable 3B

例如,根据以下表3C中所示的伪代码,从调整的直方图计算累积直方图,并将累积直方图映射到Q4.12数据格式的12位对数域。For example, according to the pseudo code shown in Table 3C below, a cumulative histogram is calculated from the adjusted histogram and mapped to the 12-bit logarithmic domain of the Q4.12 data format.

表3CTable 3C

这样的CLAHE直方图均衡化产生映射曲线,其被实现为用于 logY图像的整体色调映射算子。当映射曲线包括512个区间时,例如根据以下表3D中所示的伪代码对512个区间中的每个中的亮度值计算线性插值。Such CLAHE histogram equalization produces a mapping curve that is implemented as an overall tone mapping operator for the logY image. When the mapping curve includes 512 bins, a linear interpolation is calculated for the luminance values in each of the 512 bins, for example, according to the pseudo code shown in Table 3D below.

表3DTable 3D

CLAHE映射输出包括Q4.12格式的logY图像(204)。在实施例中, HAMS-TMO 200用执行直方图CLAHE(对比度受限自适应直方图均衡化)色调映射规范化功能的块来实现。The CLAHE mapping output comprises a logY image (204) in Q4.12 format. In an embodiment, the HAMS-TMO 200 is implemented with a block that performs a histogram CLAHE (Contrast Limited Adaptive Histogram Equalization) tone mapping normalization function.

图3A和图3B分别描绘根据本发明的实施例的示例性直方图 CLAHE色调映射规范化(HCTN)块30和相应的示例性HCTN处理 300的流程。HCTN块30可以被实现为支持2千5百万像素或更多像素的图像。当接收到三色(例如,RGB)或其他(例如,YCbCr)颜色空间中的输入图像时,HCTN 30计算其亮度值Y(处理步骤301)。在步骤302中,将Y值导出到共享逻辑以用于计算与其相应的对数值“logY”,其被返回给HCTN块30。在步骤303中,基于这些logY 值计算直方图,并将该直方图存储在表“ht0”中。当对所有输入图像像素进行计数时,在步骤304中,计算对比度受限自适应直方图均衡化(CLAHE)以使ht0直方图值规范化。FIG3A and FIG3B respectively depict the flow of an exemplary histogram CLAHE tone mapping normalization (HCTN) block 30 and a corresponding exemplary HCTN process 300, according to an embodiment of the present invention. The HCTN block 30 can be implemented to support images of 25 million pixels or more. Upon receiving an input image in a three-color (e.g., RGB) or other (e.g., YCbCr) color space, the HCTN 30 calculates its luminance value, Y (processing step 301). In step 302, the Y value is exported to shared logic for calculating its corresponding logarithmic value, "logY," which is returned to the HCTN block 30. In step 303, a histogram is calculated based on these logY values and stored in a table, "ht0." Once all input image pixels are counted, contrast limited adaptive histogram equalization (CLAHE) is calculated in step 304 to normalize the ht0 histogram values.

当对所有输入图像像素进行计数时,在步骤304中,计算对比度受限自适应直方图均衡化(CLAHE)以使ht0直方图值规范化。在步骤305中,对缓冲的logY值进行插值,如此产生对数色调映射图像“logYtm”。例如,在直方图的512个区间上实现色调映射曲线。因此,对这512个区间中的每个中的亮度值计算线性插值以实现logYtm。在步骤306中,通过在对数域上执行的减法函数:logRI=logYtm– logY,从logY值和logYtm图像计算对数比值图像“logRI”。在步骤 307中,然后对LogY直方图进行截限。在步骤308中,在多尺度滤波之后,使色调映射logY值规范化为线性亮度值Y’。在步骤309中,可以对线性色调映射Y’值应用可选的曲线函数以输出最终的色调映射图像。Once all input image pixels are counted, contrast-limited adaptive histogram equalization (CLAHE) is calculated in step 304 to normalize the ht0 histogram values. In step 305, the buffered logY values are interpolated, generating a logarithmic tone-mapped image, "logYtm." For example, a tone-mapped curve is implemented across the 512 bins of the histogram. Therefore, linear interpolation is calculated for the luminance values in each of these 512 bins to implement logYtm. In step 306, a log-ratio image, "logRI," is calculated from the logY values and the logYtm image using the subtraction function performed in the logarithmic domain: logRI = logYtm - logY. In step 307, the logY histogram is then clipped. In step 308, after multi-scale filtering, the tone-mapped logY values are normalized to linear luminance values, Y'. In step 309, an optional curve function can be applied to the linear tone-mapped Y' values to output the final tone-mapped image.

图4A、图4B和图4C分别描绘根据本发明的实施例的示例性多尺度滤波器(MSF)块400、以及相应的示例性多尺度滤波实现和示例处理400。如同HCTN块30(图3A)那样,MSF4000可以被实现为支持2千5百万像素或更多像素的图像。MSF 4000按预先计算的因子(例如,8)在其水平维度上以及在其垂直维度上对输入对数比值图像IBI进行抽取。MSF 4000通过多个(例如,七(7)个)抽头对构成抽取图像的每个像素进行低通滤波。低通降尺度图像随后可以用例如它先前被降尺度的相同的预先计算的因子来被升尺度。4A , 4B and 4C depict an exemplary multiscale filter (MSF) block 400, and a corresponding exemplary multiscale filtering implementation and example process 400, respectively, according to an embodiment of the present invention. As with the HCTN block 30 ( FIG. 3A ), the MSF 4000 can be implemented to support images of 25 million pixels or more. The MSF 4000 decimates the input log-ratio image IBI by a pre-calculated factor (e.g., 8) in its horizontal dimension and in its vertical dimension. The MSF 4000 low-pass filters each pixel that constitutes the decimated image through a plurality of (e.g., seven (7)) taps. The low-pass downscaled image can then be upscaled using, for example, the same pre-calculated factor by which it was previously downscaled.

MSF 4000预先例如根据如下示例性实现等式,基于输入图像在输入时的原始大小来计算对输入图像进行缩放的级的数量“msn”: msn=floor(log8min(width,height))+1=floor(log2min(width, height)/3+1)。MSF 4000可以被实现为在四(4)个级中的每个上在水平维度上以及在垂直维度上按高达八(8)的因子对输入的对数比值图像IBI进行抽取,在每个维度上总共为64。MSF 4000 calculates in advance the number of levels "msn" at which to scale the input image based on its original size at input, for example, according to the following exemplary implementation equation: msn = floor(log 8 min(width, height)) + 1 = floor(log 2 min(width, height)/3 + 1). MSF 4000 may be implemented to decimate the input log-ratio image IBI by a factor of up to eight (8) in the horizontal dimension and in the vertical dimension at each of four (4) levels, for a total of 64 in each dimension.

因此,在实施例中,如图4B中所描绘的那样,滤波实现包括四(4)个级40、41、42和43。级40-43中的每个均按因子八在垂直维度和水平维度上对图像进行抽取,以使得图像大小缩小82=64倍,因此MSF 4000按总因子64对图像进行抽取。因此,在每个级,按因子八对对数比值图像进行降尺度。在msn个层次(例如,级)中的每个层次上,例如,根据以下表4中所示的伪代码来重复因子为8的这种降尺度。Thus, in an embodiment, as depicted in FIG4B , the filtering implementation includes four (4) stages 40, 41, 42, and 43. Each of the stages 40-43 decimates the image in both the vertical and horizontal dimensions by a factor of eight, such that the image size is reduced by a factor of 8 2 =64, so that the MSF 4000 decimates the image by a total factor of 64. Thus, at each stage, the log-ratio image is downscaled by a factor of eight. This downscaling by a factor of 8 is repeated at each of the msn levels (e.g., stages), for example, according to the pseudo-code shown in Table 4 below.

表4Table 4

/*dimenslon for next stage*//*dimenslon for next stage*/

width=(width+6)/8+1;width=(width+6)/8+1;

height=(height+6)/8+1;height = (height + 6) / 8 + 1;

在每个级,可以对抽取了的图像的每个像素执行7抽头的低通滤波。实现这样的实施例,在该实施例中,首先在与抽取图像中的每个抽取图像的第一空间方位相应的水平方向上对抽取图像进行滤波,然后在空间上与第一方位相关的正交的垂直方向上对抽取图像进行滤波。在各个缩放图像的边界处,例如通过填补(诸如镜像延伸)来使这些缩放图像对齐。At each stage, a 7-tap low-pass filter can be performed on each pixel of the decimated image. An embodiment is implemented in which the decimated image is first filtered in a horizontal direction corresponding to a first spatial orientation of each of the decimated images, and then filtered in a vertical direction spatially orthogonal to the first orientation. At the boundaries of the respective scaled images, the scaled images are aligned, for example, by padding (such as mirroring).

在每个级处,放大器将加权因子“Alpha”应用于比值图像。对于级“k”中的每个(其中k包括在零至msn减一范围内的整数(k=0,…, msn-1)),实施例根据Ak=2*(k+1)/(msn(msn+1))来计算加权因子 Alpha(A)。权重总和为1。可以实现其中加权因子被计算为 2*(msn-(k-1)+1)/msn*(msn+1)或1/msn的实施例。At each stage, the amplifier applies a weighting factor "Alpha" to the ratio image. For each of the stages "k," where k comprises an integer ranging from zero to msn minus one (k=0, ..., msn-1), an embodiment calculates the weighting factor Alpha (A) according to Ak = 2*(k+1)/(msn(msn+1)). The weights sum to 1. Embodiments may also be implemented in which the weighting factor is calculated as 2*(msn-(k-1)+1)/msn*(msn+1) or 1/msn.

对降尺度的滤波了的比值图像执行升尺度(msn-1)次。在每个级处将加权的对数比值图像与升尺度图像相加。实施例通过前一级较低分辨率图像的插值(例如,双线性插值)(例如使用图像的空间拐角处的四(4)个点以及在其水平维度和垂直维度上的插值来重构上采样块) 来实现升尺度。Upscaling is performed (msn-1) times on the downscaled filtered ratio image. At each level, the weighted log-ratio image is added to the upscaled image. An embodiment achieves upscaling by interpolation (e.g., bilinear interpolation) of the lower resolution image of the previous level (e.g., using four (4) points at the spatial corners of the image and interpolation in its horizontal and vertical dimensions to reconstruct the upsampled block).

级401对输入图像R0进行降尺度和滤波,并且将第一比值图像 R1传给级402。同样地,级402和级403-407中的每个(包含)将降尺度的低通滤波的比值图像传给它们各自的下一级,这些降尺度的低通滤波的比值图像顺序上在由它们各自的前一级中的每个传给它的比值图像之后。对来自每个级的加权的比值图像与来自下一级的升尺度的图像进行求和。Stage 401 downscales and filters the input image R0 and passes the first ratio image R1 to stage 402. Similarly, stage 402 and each of stages 403-407 (inclusive) pass downscaled low-pass filtered ratio images to their respective next stages, which are sequentially followed by the ratio images passed to them by each of their respective previous stages. The weighted ratio images from each stage are summed with the upscaled image from the next stage.

MSF 4000产生色调映射luma、亮度或其他强度相关的色调映射值,这些值经由寄存器接口用配置寄存器写入到板外存储器。The MSF 4000 generates tone-mapped luma, luminance, or other intensity-related tone-mapped values that are written to off-board memory using configuration registers via a register interface.

在实施例中,MSF 4000和/或实现400根据示例性多尺度分辨率滤波处理400的一个或多个步骤运行。以下参照图4B和图4C中描绘的流程图来描述示例处理400。处理400始于通过渐进地在层次41、 42和43中的每个上对图像进行降尺度来对对数比值图像R0(例如,在图1B处的步骤105中产生)进行处理。在降尺度的每个层次,渐进地在垂直方向上以及在水平方向上对图像进行抽取。In an embodiment, the MSF 4000 and/or implementation 400 operates according to one or more steps of an exemplary multi-scale resolution filtering process 400. The exemplary process 400 is described below with reference to the flowcharts depicted in FIG4B and FIG4C. The process 400 begins by processing a log-ratio image R0 (e.g., generated in step 105 at FIG1B) by progressively downscaling the image at each of levels 41, 42, and 43. At each level of downscaling, the image is progressively decimated vertically and horizontally.

在步骤401中,按因子“N”垂直地且水平地对对数比值图像R0进行降尺度,其中,N包括正整数,例如八(8)。如此产生第一层降尺度的对数比值图像R1。然后,在步骤402中,按因子N对第一层降尺度的对数比值图像R1进行抽取以产生第二层降尺度的对数比值图像R2。然后,在步骤403中,按因子N对第二层降尺度的对数比值图像R2进行抽取以产生第三层降尺度的对数比值图像R3。在示例性实施例中,对每个层次的降尺度的图像输出进行低通滤波。在示例性实施例中,不需要使用所有的层次。In step 401, the log-ratio image R 0 is downscaled vertically and horizontally by a factor "N", where N comprises a positive integer, such as eight (8). This produces a first-level downscaled log-ratio image R 1 . Then, in step 402, the first-level downscaled log-ratio image R 1 is decimated by a factor N to produce a second-level downscaled log-ratio image R 2 . Then, in step 403, the second-level downscaled log-ratio image R 2 is decimated by a factor N to produce a third-level downscaled log-ratio image R 3 . In an exemplary embodiment, the downscaled image output of each level is low-pass filtered. In an exemplary embodiment, not all levels need be used.

在步骤404中,用第三层缩放因子(例如,Alpha[3])对第三层降尺度的对数比值图像R3的像素值进行缩放以产生第三层加权的比值图像R’3。在步骤405中,用第二层缩放因子(例如,Alpha[2])对第二层降尺度的对数比值图像R2的像素值进行缩放以产生第二层加权的比值图像R’2。在步骤406中,第三层加权的比值图像R’3按因子 N进行升尺度,并与第二层缩放的加权的比值图像R’2进行求和以产生第二层升尺度的对数比值图像In step 404, the pixel values of the third layer downscaled log-ratio image R 3 are scaled by a third layer scaling factor (e.g., Alpha[3]) to produce a third layer weighted ratio image R' 3. In step 405, the pixel values of the second layer downscaled log-ratio image R 2 are scaled by a second layer scaling factor (e.g., Alpha[2]) to produce a second layer weighted ratio image R' 2. In step 406, the third layer weighted ratio image R' 3 is upscaled by a factor N and summed with the second layer scaled weighted ratio image R' 2 to produce a second layer upscaled log-ratio image

在步骤407中,用第一层缩放因子(例如,Alpha[1])对第一层降尺度的比值图像R’1进行缩放以产生第一层加权的比值图像R’1。在步骤408中,按因子N对第二层升尺度的对数比值图像进行升尺度以产生第一层升尺度的对数比值图像在步骤409中,用零层缩放因子(例如,Alpha[0])对对数比值图像R0进行缩放以产生零层加权的对数比值图像R’0。在步骤410中,第一层升尺度的对数比值图像按因子N进行升尺度,并与零层缩放的加权的比值图像R’0进行求和以产生对数多尺度比值图像示例处理400的步骤可以是可选的。In step 407, the first layer downscaled ratio image R'1 is scaled by a first layer scaling factor (e.g., Alpha[1]) to produce a first layer weighted ratio image R'1 . In step 408, the second layer upscaled log-ratio image is upscaled by a factor N to produce a first layer upscaled log-ratio image. In step 409, the log-ratio image R0 is scaled by a zero layer scaling factor (e.g., Alpha[0]) to produce a zero layer weighted log-ratio image R'0 . In step 410, the first layer upscaled log-ratio image is upscaled by a factor N and summed with the zero layer scaled weighted ratio image R'0 to produce a logarithmic multi-scale ratio image. The steps of the example process 400 may be optional.

图5描绘根据本发明的实施例的示例性比值图像处理器500。实施例用比值图像处理器500实现RI_Proc(图1A)。比值图像处理器 500从TMO 200(图2)接收输入图像。从来自原始HDR输入图像的亮度值Y和来自色调映射图像的亮度值计算亮度比率。计算整个图片上的最大值和最小值,这些值用于对不同图像的对数亮度值logY和 CbCr色度值DiffCbCr进行量化。FIG5 depicts an exemplary ratio image processor 500 according to an embodiment of the present invention. The embodiment implements RI_Proc ( FIG1A ) using ratio image processor 500. Ratio image processor 500 receives an input image from TMO 200 ( FIG2 ). It calculates a luminance ratio from the luminance value Y from the original HDR input image and the luminance value from the tone-mapped image. It calculates the maximum and minimum values across the entire image, which are used to quantize the logarithmic luminance values logY and the CbCr chrominance values DiffCbCr for the different images.

例如,经由高级微控制器总线架构高级可扩展接口(AXI)接口或有类似能力的接口把logY和DiffCbCr保存到/写入到外部存储器。经由AXI读回/加载回外部保存/存储的值以及时地进行量化。线性反馈移位寄存器(LFSR)在量化期间产生用于在logY通道上抖动的随机数值。RI_Proc 500将量化的DiffCbCr和logY值输出到JPEG编码器,JPEG编码器可以输出与输入图像相应的JPEG格式的图像。For example, logY and DiffCbCr are saved to/written to external memory via an Advanced eXtensible Interface (AXI) interface or a similarly capable interface. The externally saved/stored values are read/loaded back via AXI for timely quantization. A linear feedback shift register (LFSR) generates random values for dithering the logY channel during quantization. RI_Proc 500 outputs the quantized DiffCbCr and logY values to a JPEG encoder, which can output a JPEG-formatted image corresponding to the input image.

图6A和图6B分别描绘根据本发明的实施例的示例性编码处理 60及其示例数据流程时间线600。当接收到HDR输入图片(61)时,在步骤62中,产生直方图和降尺度的LogY图像LogY1。直方图被规范化。在流程600中,JPEG-HDR编码器(例如,编码器100;图1B) 内核读取整个HDR输入图像。编码器基于输入图像像素的LogY值产生直方图,对直方图进行均衡化,并将LogY1写入到降尺度图像缓冲器Buff_Log1。在实施例中,使用CLAHE对直方图进行均衡化。6A and 6B depict an exemplary encoding process 60 and an example data flow timeline 600, respectively, according to an embodiment of the present invention. Upon receiving an HDR input picture (61), a histogram and a downscaled LogY image LogY1 are generated in step 62. The histogram is normalized. In process 600, a JPEG-HDR encoder (e.g., encoder 100; FIG. 1B ) core reads the entire HDR input image. The encoder generates a histogram based on the LogY values of the input image pixels, equalizes the histogram, and writes LogY1 to a downscaled image buffer Buff_Log1. In an embodiment, the histogram is equalized using CLAHE.

在步骤63中,执行多尺度滤波,其产生在色调映射中使用的实际的每一像素的缩放因子。在步骤64中,在每个像素上应用每一像素的缩放因子。将色调映射基础图像转换为8位伽玛编码的YCbCr 4:2:2/4:2:0/4:4:4,并且可以将该色调映射基础图像发送到JPEG编码器,JPEG编码器将压缩的基础图像写入到外部存储器。对初始的和色调映射了的RGB数据进行处理以产生原始的量化前比值图像,其也被写入到外部存储器。在步骤65中,从外部存储器读回未经处理的比值图像,并对比值图像进行量化。可以将量化的比值图像输出到JPEG编码器(66),并用JPEG编码器对该比值图像进行压缩。In step 63, multiscale filtering is performed, which produces the actual per-pixel scaling factors used in tone mapping. In step 64, the per-pixel scaling factors are applied to each pixel. The tone-mapped base image is converted to 8-bit gamma-encoded YCbCr 4:2:2/4:2:0/4:4:4 and can be sent to a JPEG encoder, which writes the compressed base image to external memory. The original and tone-mapped RGB data are processed to produce the original pre-quantization ratio image, which is also written to external memory. In step 65, the unprocessed ratio image is read back from external memory and the ratio image is quantized. The quantized ratio image can be output to a JPEG encoder (66) and compressed using a JPEG encoder.

对HDR图像的示例性加权的基于多区域的曝光Example weighted multi-zone based exposure for HDR images

传统的低端消费类显示装置(诸如智能电话、计算机监视器等) 可能不能显示JPEG-HDR图像的整个动态范围。在这样的情况下,显示器通常将输出相应的HDR图像的色调映射的、低动态范围(LDR) 版本。该色调映射图像通常在没有用户输入的情况下由照相机自动地产生,因此它可能不能捕捉拍摄者的意图。Traditional low-end consumer display devices (such as smartphones, computer monitors, etc.) may not be able to display the full dynamic range of a JPEG-HDR image. In such cases, the display will typically output a tone-mapped, low dynamic range (LDR) version of the corresponding HDR image. This tone-mapped image is typically generated automatically by the camera without user input, so it may not capture the photographer's intent.

在一些实施例中,用户可以使用装置的用户接口(诸如触摸屏、计算机鼠标、滚动条等)来在整个HDR图片上滚动。在这种情况下,用户可以能够观察图像在整个动态范围的部分,但是图像的其余部分可能被太暗地或太亮地显示。然而,用户可能想查看图像的多个部分中的细节。因此,使得用户可以基于感兴趣区域来调整HDR图像的曝光将是有益的。In some embodiments, a user can use a user interface of the device (such as a touch screen, a computer mouse, a scroll bar, etc.) to scroll through the entire HDR picture. In this case, the user may be able to observe a portion of the image over the entire dynamic range, but the rest of the image may be displayed too darkly or too brightly. However, the user may want to view details in multiple portions of the image. Therefore, it would be beneficial to allow the user to adjust the exposure of the HDR image based on the region of interest.

在一实施例中,最终HDR图像的曝光可以考虑用户所选的两个或更多个感兴趣区域。这些区域可以在(例如,用照相机或其他捕捉装置)捕捉图像之前、或者在捕捉图像之后(例如,当显示相应的LDR 图像时)选择。在具有触摸屏接口的一些实施例(例如,iPhone或iPad) 中,这些区域可以表示被用户触摸的一个或多个像素周围的相对相同亮度的像素。在其他实施例中,用户可以使用替代接口(诸如计算机鼠标、跟踪球、键盘等)来选择这些区域。在还有的其他实施例中,可以自动地基于预先选择的用户偏好(例如,脸、动物、文本等)来选择这些区域。In one embodiment, the exposure of the final HDR image can take into account two or more regions of interest selected by the user. These regions can be selected before (e.g., with a camera or other capture device) capturing the image, or after (e.g., when displaying the corresponding LDR image). In some embodiments with a touch screen interface (e.g., iPhone or iPad), these regions can represent pixels of relatively equal brightness around one or more pixels touched by the user. In other embodiments, the user can use an alternative interface (such as a computer mouse, trackball, keyboard, etc.) to select these regions. In other embodiments, these regions can be automatically selected based on pre-selected user preferences (e.g., faces, animals, text, etc.).

在一实施例中,可以将第一触摸点周围的区域设置为第一最佳曝光伽玛(例如,18%灰度)。接着,对于第二触摸点,计算第二最佳曝光伽玛。可以使用用第一曝光伽玛和第二曝光伽玛加权的最终曝光伽玛来显示最终图像。这使第一触摸点和第二触摸点两个都在显示器的动态范围内,同时融合所得图片的其余部分。可以识别任何数量的触摸点,诸如3个、4个或N个。加权因子可以是相等的平均值、均值、中值、比例权重、线性的、非线性的和/或有限度的(最大/最小)。在特定实施例中,可以通过用户命令(例如,撤销按钮)来撤销所述技术。In one embodiment, the area around the first touch point can be set to a first optimal exposure gamma (e.g., 18% grayscale). Then, for the second touch point, a second optimal exposure gamma is calculated. The final image can be displayed using a final exposure gamma weighted by the first exposure gamma and the second exposure gamma. This allows both the first touch point and the second touch point to be within the dynamic range of the display while blending in with the rest of the resulting image. Any number of touch points can be recognized, such as 3, 4, or N. The weighting factor can be an equal average, mean, median, proportional weight, linear, nonlinear, and/or limited (maximum/minimum). In certain embodiments, the technique can be undone by a user command (e.g., an undo button).

如图7中所描绘的,在另一实施例中,可以使用融合-合并处理来产生所得图像。在该处理中,对于每个所选的感兴趣点(710),该处理产生相应的曝光的LDR图像(720)。给定从原始HDR图像创建的N个这样的曝光(或LDR图像),实施例可以通过合适地将所有 N个曝光融合到单个输出图像中来创建融合图像(730)。这样的融合处理的例子可以使用在T.Mertens等人在15th Pacific Conference on Computer Graphics and Applications(Pacific Graphics,2007)第 382-390页的“Exposure Fusion”中所描述的技术来实现,该文献的全部内容通过引用合并于此,如同在本文中充分阐述一样。As depicted in FIG7 , in another embodiment, a fusion-merging process may be used to produce the resulting image. In this process, for each selected point of interest (710), the process produces a corresponding exposed LDR image (720). Given N such exposures (or LDR images) created from the original HDR image, an embodiment may create a fused image (730) by appropriately fusing all N exposures into a single output image. An example of such a fusion process may be implemented using the techniques described in “Exposure Fusion” by T. Mertens et al., 15 Pacific Conference on Computer Graphics and Applications (Pacific Graphics, 2007), pp. 382-390, the entire contents of which are incorporated herein by reference as if fully set forth herein.

示例性自适应比值图像量化Exemplary Adaptive Ratio Image Quantization

给定如前所述的亮度HDR图像(Yh)及其色调映射表示(Yt),比值图像YR可以表示为:Given the luminance HDR image (Y h ) and its tone-mapped representation (Y t ) as described above, the ratio image Y R can be expressed as:

可以通过将可逆函数(诸如对数函数或均方根函数)应用于比值图像来对该比值图像的动态范围进行压缩。因此,在一个实施例中,应用对数函数:The dynamic range of the ratio image can be compressed by applying a reversible function (such as a logarithmic function or a root mean square function) to the ratio image. Therefore, in one embodiment, a logarithmic function is applied:

还可以进一步对对数比值图像(log(YR))进行量化以得到8位比值图像:The logarithmic ratio image (log(Y R )) can be further quantized to obtain an 8-bit ratio image:

由于原始比值图像包括用高精度或动态范围(例如,使用浮点数)表示的像素值,所以将比值图像量化为8位像素值将产生当应用逆量化函数时不能恢复的四舍五入的误差。该误差可以影响图像编码的精度,并且可以限制可以使用JPEG-HDR格式编码的图像的动态范围。Since the original ratio image includes pixel values represented with high precision or dynamic range (e.g., using floating point numbers), quantizing the ratio image to 8-bit pixel values will produce rounding errors that cannot be recovered when the inverse quantization function is applied. This error can affect the accuracy of the image encoding and can limit the dynamic range of images that can be encoded using the JPEG-HDR format.

在实施例中,因此用任意的可逆函数“F”来取代以上对数函数。给定F,可以将量化的8位比值图像表达为:In an embodiment, the above logarithmic function is therefore replaced by an arbitrary reversible function "F". Given F, the quantized 8-bit ratio image can be expressed as:

这使得解码器可以按照以下公式来恢复原始比值图像:This allows the decoder to recover the original ratio image according to the following formula:

其中,YR’表示恢复的比值图像。在实施例中,将最小和最大F(YR)值作为可被JPEG解码器访问的元数据包括在JPEG-HDR图像中。wherein Y R ′ denotes the recovered ratio image. In an embodiment, the minimum and maximum F(Y R ) values are included in the JPEG-HDR image as metadata accessible to a JPEG decoder.

在实施例中,可以选择F函数,以使得它使M(YR’,YR)最小,其中,M表示根据一些质量标准对YR’与YR之间的差进行测量的度量,所述质量标准诸如:均方误差、信噪比(SNR)或峰值信噪比 (PSMR)。M(例如,两个图像之间的MSE)表示用于F的优化处理的目标函数。F可以是参数化函数,或者可以经由(LUT)来定义。给定M,可以应用公知的优化技术来确定F,所述公知的优化技术诸如J.A Nelder、John和R.Mead在1965年Computer Journal第7 期第308-313页的“A simplex method for function minimization”中所描述的Nelder-Mead方法。In an embodiment, the function F may be selected so that it minimizes M(Y R ′, Y R ), where M represents a metric that measures the difference between Y R ′ and Y R according to some quality criterion, such as mean square error, signal-to-noise ratio (SNR), or peak signal-to-noise ratio (PSMR). M (e.g., the MSE between the two images) represents the objective function for the optimization process of F. F may be a parameterized function or may be defined via a (LUT). Given M, well-known optimization techniques may be applied to determine F, such as the Nelder-Mead method described by J.A. Nelder, John, and R. Mead in “A simplex method for function minimization,” Computer Journal, vol. 7, pp. 308-313, 1965.

在实施例中,JPEG-HDR标头可以包括表示逆编码函数F-1的解码LUT。适应的JPEG-HDR解码器可以使用该LUT来将所接收的比值图像从8位数据转换为更高精度(例如,浮点)Y通道数据。该LUT 可以具有将8位数据直接映射到浮点值的256个条目。In an embodiment, the JPEG-HDR header may include a decoding LUT representing the inverse encoding function F - 1. An adapted JPEG-HDR decoder may use this LUT to convert the received ratio image from 8-bit data to higher precision (e.g., floating point) Y channel data. The LUT may have 256 entries that directly map 8-bit data to floating point values.

示例性基于直方图均衡化的方法Exemplary histogram equalization-based method

实施例也涉及计算效率,因为直方图均衡化或对比度受限直方图均衡化提供导出F函数的处理。直方图均衡化处理将具有任意分布的源亮度转换为具有均匀直方图的亮度,以使得可以更高效率地对比值图像进行编码。在使用直方图均衡化的实施例中,可以如以下所述的那样计算F。Embodiments also relate to computational efficiency, as histogram equalization or contrast-limited histogram equalization provides a process for deriving an F function. The histogram equalization process converts source luminance with an arbitrary distribution into luminance with a uniform histogram, allowing for more efficient encoding of contrast images. In embodiments using histogram equalization, F can be calculated as follows.

a)计算YR的直方图hist。直方图简单地表示在比值图像中遇到像素值i的实例的数量(例如,histi);a) Compute the histogram histogram of Y R. The histogram simply represents the number of instances where pixel value i is encountered in the ratio image (e.g., hist i );

b)计算hist的累积直方图c_hist。例如,可以将累积直方图计算为:b) Calculate the cumulative histogram c_hist of hist. For example, the cumulative histogram can be calculated as:

以及as well as

c)通过使c_hist规范化并缩放c_hist来确定F。例如:c) Determine F by normalizing and scaling c_hist. For example:

Fi=((c_histi-min(c_hist))/(max(c_hist)-min(c_hist))*scaleF i =((c_hist i -min(c_hist))/(max(c_hist)-min(c_hist))*scale

其中,变量scale确定F的最大值,例如,255。The variable scale determines the maximum value of F, for example, 255.

如上计算的编码函数F可以具有有着无限导数或斜率的区域,因此,F可能不能提供唯一映射,并且逆函数F-1不存在。限制F的斜率或导数使得实施例可以确认由F提供的映射的唯一性和F-1的存在性。The encoding function F calculated as above may have regions with infinite derivatives or slopes, and therefore, F may not provide a unique mapping, and the inverse function F −1 does not exist. Limiting the slope or derivative of F allows embodiments to confirm the uniqueness of the mapping provided by F and the existence of F −1 .

直方图均衡化方法使得编码精度与亮度值出现的频率成比例。因此,可以以较高误差对不那么频繁出现的亮度值进行量化,并且以较低误差对频繁出现的亮度值进行量化。The histogram equalization method makes the coding accuracy proportional to the frequency of occurrence of the luminance value. Therefore, less frequently occurring luminance values can be quantized with a higher error, while frequently occurring luminance values can be quantized with a lower error.

JPEG-HDR中的示例性自定义色域支持Example custom color gamut support in JPEG-HDR

典型的单个图像的文件格式可以使用ICC(国际色彩联盟)或 WCS(Windows颜色管理系统)配置文件来将颜色信息传送给绘制装置(例如,显示器)。ICC配置文件和WCS配置文件要求图像被绘制到特定颜色空间。作为绘制的一部分,应将在目标颜色空间中不可表示的所有颜色都色域映射到可表示颜色。作为该色域映射的结果,在绘制的图像中可能丢失一些颜色信息。The file format of a typical single image can use an ICC (International Color Consortium) or WCS (Windows Color Management System) profile to transmit color information to a rendering device (e.g., a display). ICC and WCS profiles require that images be rendered into a specific color space. As part of rendering, all colors that are not representable in the target color space should be gamut-mapped to representable colors. As a result of this gamut mapping, some color information may be lost in the rendered image.

例如,可以用高端的广色域的照相机捕捉图像,或者可以使用计算机图形(CG)软件来创建图像。然后可以将所得图像绘制到sRGB 颜色空间。sRGB颜色空间是最常见的颜色空间,并且受到大多数操作系统和显示装置的支持。然而,因为sRGB具有相对小的色域,所以需要将未被sRGB覆盖的所有图像颜色都映射到sRGB颜色。如果然后将sRGB图像发送到色域广得多的成像装置,则没有恢复原始的、较广色域映射颜色的可靠方式。因此,色域映射可以引起不可逆的信息丢失,并且可以导致次佳的颜色再现。For example, an image can be captured with a high-end camera with a wide color gamut, or an image can be created using computer graphics (CG) software. The resulting image can then be mapped to the sRGB color space. The sRGB color space is the most common color space and is supported by most operating systems and display devices. However, because sRGB has a relatively small color gamut, all image colors that are not covered by sRGB need to be mapped to sRGB colors. If the sRGB image is then sent to an imaging device with a much wider color gamut, there is no reliable way to restore the original, wider color gamut mapped colors. Therefore, color gamut mapping can cause irreversible information loss and can result in suboptimal color reproduction.

图像绘制的另一方面涉及指定观看条件。例如,家里和办公室观看条件通常不同于在颜色分级或颜色匹配环境下所使用的观看条件。 ICC工作流程指定精确的观看条件(VC),使得工作流程不灵活。 WCS允许一些VC灵活性,但是一旦图像被绘制,它实际上就不可能使改变逆转。Another aspect of image rendering involves specifying viewing conditions. For example, viewing conditions at home and in the office are often different from those used in a color grading or color matching environment. The ICC workflow specifies precise viewing conditions (VC), making the workflow inflexible. WCS allows some VC flexibility, but once an image is rendered, it is virtually impossible to reverse the changes.

色域映射和VC都基于关于图像将被如何观看的假定定义了内容创建者应做出的一套绘制决定。在现实生活中,不可能对于所有可能的情况和目标成像装置以及所有可能的目的做出最佳的绘制决定。Both gamut mapping and VC define a set of rendering decisions that content creators should make based on assumptions about how the image will be viewed. In real life, it is impossible to make the best rendering decisions for all possible situations and target imaging devices and all possible purposes.

在实施例中,JPEG-HDR文件格式考虑到不同的两组色域相关的元数据:一组与捕捉装置或原始HDR数据相关,另一组与使用彩色图像的目标老式工作流程相关。因此,具有标准色域和动态范围的老式成像装置仍可以基于常规的ICC和WCS工作流程来显示默认绘制图像以递送颜色精确的图像内容。同时,支持更广色域、更高动态范围和/或即时绘制的装置也可以能够恢复原始图像数据以用于考虑观看条件和装置性质两者来进行动态绘制。例如,应用程序可以恢复原始场景数据,并基于当前观看条件和目标显示装置的特性来绘制它。因此,基础图像可以提供与现有的颜色管理工作流程的向后兼容性,而JPEG-HDR元数据使得可以更精确地、灵活地进行即时的绘制。In an embodiment, the JPEG-HDR file format takes into account two different sets of color gamut-related metadata: one set related to the capture device or original HDR data, and the other set related to the target legacy workflow using color images. Therefore, legacy imaging devices with standard color gamut and dynamic range can still display default rendering images based on conventional ICC and WCS workflows to deliver color-accurate image content. At the same time, devices that support wider color gamut, higher dynamic range and/or real-time rendering may also be able to restore the original image data for dynamic rendering that takes into account both viewing conditions and device properties. For example, an application can restore the original scene data and render it based on the current viewing conditions and the characteristics of the target display device. Therefore, the base image can provide backward compatibility with existing color management workflows, while the JPEG-HDR metadata enables more accurate and flexible real-time rendering.

JPEG-HDR图像包含基础图像(例如,基准JPEG图像)和HDR 元数据(例如,比值图像和颜色残差数据)。基础图像是色调映射的且色域映射的绘制图像,其通常在sRGB颜色空间中绘制。JPEG容器可以指示基础图像的颜色空间,或者它可以包括使得能够在各种成像装置上进行一致的颜色再现的ICC/WCS颜色配置文件。A JPEG-HDR image contains a base image (e.g., a baseline JPEG image) and HDR metadata (e.g., a ratio image and color residual data). The base image is a tone-mapped and gamut-mapped rendered image, typically rendered in the sRGB color space. The JPEG container can indicate the color space of the base image, or it can include an ICC/WCS color profile that enables consistent color reproduction on various imaging devices.

HDR元数据还可以包括装置无关空间(诸如XYZ基元)中的颜色空间信息,或者附加的第二ICC/WCS颜色配置文件中的颜色空间信息。HDR元数据颜色空间可以不同于基础图像的颜色空间。元数据的色域通常大于基础图像的色域。例如,用于照相机的元数据颜色空间通常与照相机传感器的颜色空间匹配。对于CG图像,元数据颜色空间可以包括原始图像中存在的所有颜色。因此,实施例使用两个或更多个颜色空间描述符(例如,配置文件)来提供JPEG-HDR中的广色域的增强支持。一个配置文件定义基础图像的编码颜色空间,第二配置文件定义HDR元数据的编码颜色空间。HDR metadata may also include color space information in a device-independent space (such as XYZ primitives), or in an additional second ICC/WCS color profile. The HDR metadata color space may be different from the color space of the base image. The color gamut of the metadata is typically larger than the color gamut of the base image. For example, the metadata color space for a camera typically matches the color space of the camera sensor. For CG images, the metadata color space may include all colors present in the original image. Therefore, an embodiment uses two or more color space descriptors (e.g., profiles) to provide enhanced support for wide color gamuts in JPEG-HDR. One profile defines the encoding color space of the base image, and a second profile defines the encoding color space of the HDR metadata.

图8A描绘根据示例性实施例的支持双颜色空间的编码处理。如图8A中所描绘的,可以通过TMO处理810对在颜色空间B中捕捉的输入HDR图像805进行色调映射以在颜色空间B中产生色调映射图像815。色域变换处理820可以进一步对图像815进行处理以在颜色空间A中产生基础图像825。通过使用关于这两个颜色空间的信息,可以创建用于将图像从颜色空间A变换到颜色空间B的颜色变换TAB。可以在颜色变换步骤840中应用变换TAB来在颜色空间B中创建基础图像845。FIG8A depicts an encoding process supporting dual color spaces according to an exemplary embodiment. As depicted in FIG8A , an input HDR image 805 captured in color space B can be tone mapped by a TMO process 810 to produce a tone-mapped image 815 in color space B. A gamut transform process 820 can further process image 815 to produce a base image 825 in color space A. Using information about the two color spaces, a color transform T AB can be created to transform the image from color space A to color space B. Transform T AB can be applied in a color transform step 840 to create a base image 845 in color space B.

通过使用原始HDR图像805和基础图像845,处理830可以根据本发明中前面描述方法来产生HDR元数据835。最后,可以对图像 825(在颜色空间A中)和HDR元数据835(在颜色空间B中)进行编码和组合以产生JPEG-HDR图像(855)。JPEG-HDR图像855的文件格式可以包括关于这两个颜色空间的适当的颜色描述符。在一些实施例中,可以将处理步骤810和820组合为单个步骤,其中,给定颜色空间B中的HDR图像(805),它输出颜色空间A中的色调映射图像(825)。使用加性的颜色空间(诸如矩阵TRC(色调再现曲线)) 使得在编码期间可以组合步骤810和820,因为色域映射和色调映射都可以在原始颜色空间(例如,B)中进行。此外,颜色空间之间的颜色变换变得更加精确并且计算效率更高。Using the original HDR image 805 and the base image 845, process 830 can generate HDR metadata 835 according to the methods previously described herein. Finally, the image 825 (in color space A) and the HDR metadata 835 (in color space B) can be encoded and combined to produce a JPEG-HDR image (855). The file format of the JPEG-HDR image 855 can include appropriate color descriptors for both color spaces. In some embodiments, processing steps 810 and 820 can be combined into a single step, where, given the HDR image (805) in color space B, it outputs a tone-mapped image (825) in color space A. Using an additive color space, such as a matrix TRC (tone reproduction curve), allows steps 810 and 820 to be combined during encoding, as both gamut mapping and tone mapping can be performed in the original color space (e.g., B). In addition, color conversion between color spaces becomes more accurate and computationally efficient.

图8B描绘根据示例性实施例的支持双色域的解码处理。如图8B 中所描绘的,给定定义两个颜色空间中的数据(颜色空间A中的基础图像和颜色空间B中的HDR元数据)的输入JPEG-HDR图像,基础解码器在颜色空间A(即,sRGB)中提取基础图像865。可以使用图像865来在具有标准动态范围的老式显示装置中显示基础图像。FIG8B depicts a dual-color gamut decoding process according to an exemplary embodiment. As depicted in FIG8B , given an input JPEG-HDR image that defines data in two color spaces (a base image in color space A and HDR metadata in color space B), the base decoder extracts a base image 865 in color space A (i.e., sRGB). Image 865 can be used to display the base image on older display devices with standard dynamic range.

通过使用关于这两个颜色空间的信息,可以创建用于将图像从颜色空间A变换到颜色空间B的颜色变换TAB。可以在颜色变换步骤870 中应用变换TAB来在颜色空间B中创建基础图像875。给定输入855,元数据解码处理890在颜色空间B中提取HDR元数据895。最后,HDR解码器880可以组合基础图像875和元数据895以在颜色空间B 中产生HDR图像885。By using information about these two color spaces, a color transform T AB can be created to transform the image from color space A to color space B. Transform T AB can be applied in a color transform step 870 to create a base image 875 in color space B. Given input 855, a metadata decoding process 890 extracts HDR metadata 895 in color space B. Finally, an HDR decoder 880 can combine the base image 875 and the metadata 895 to produce an HDR image 885 in color space B.

如果HDR元数据居于封装图像的所有可能颜色的广颜色空间中,则编码的图像值将总是正的。正值使得可以在编码阶段和解码阶段期间对图像进行验证。也就是说,如果检测到负值,则可以将这些值归零,和/或可以发出错误消息。本文中所描述的方法还可以应用于具有比常规SDR图像广的色域的编码输入标准动态范围(SDR)图像。对于输入的SDR图像(例如,805),可以省略TMO处理步骤(810)。If the HDR metadata resides in a wide color space that encapsulates all possible colors of the image, the encoded image values will always be positive. Positive values allow the image to be validated during the encoding and decoding stages. That is, if negative values are detected, they can be zeroed and/or an error message can be issued. The methods described herein can also be applied to encoded input standard dynamic range (SDR) images that have a wider color gamut than conventional SDR images. For input SDR images (e.g., 805), the TMO processing step (810) can be omitted.

随后可以针对特定的当前观看条件将图像885绘制到目标成像装置。标准显示器、HDR显示器、广色域显示器和打印机是目标成像装置的例子。光线昏暗的中性色喷漆的房间、光线明亮的黄色喷漆的房间是不同观看条件的例子。The image 885 can then be rendered to a target imaging device for the specific current viewing conditions. A standard display, an HDR display, a wide color gamut display, and a printer are examples of target imaging devices. A dimly lit, neutral-painted room and a brightly lit, yellow-painted room are examples of different viewing conditions.

如此与对HDR图像进行编码相关地描述了本发明示例性实施例。使HDR输入图像中的对数亮度直方图化以产生色调映射,与该色调映射一起计算对数整体色调映射亮度图像。对对数整体色调映射亮度图像进行降尺度。对数亮度和对数整体色调映射亮度图像产生对数比值图像。对对数比值图像进行多尺度分辨率滤波产生对数多尺度比值图像。对数多尺度比值图像和对数亮度产生第二对数色调映射图像,其被规范化以基于降尺度的对数整体色调映射亮度图像和规范化的图像来输出色调映射图像。HDR输入图像和输出色调映射图像产生被量化的第二比值图像。可以将量化的基础图像和基础比值图像输出到例如JPEG编码器以用于按JPEG格式进行压缩。An exemplary embodiment of the present invention is thus described in relation to encoding an HDR image. Log luminance in an HDR input image is histogrammed to produce a tone map, and a log overall tone mapped luminance image is calculated together with the tone map. The log overall tone mapped luminance image is downscaled. The log luminance and the log overall tone mapped luminance image produce a log ratio image. The log ratio image is multi-scale resolution filtered to produce a log multi-scale ratio image. The log multi-scale ratio image and the log luminance produce a second log tone mapped image, which is normalized to output a tone mapped image based on the downscaled log overall tone mapped luminance image and the normalized image. The HDR input image and the output tone mapped image produce a quantized second ratio image. The quantized base image and the base ratio image can be output to, for example, a JPEG encoder for compression in JPEG format.

具有多尺度比值图像形成的示例性JPEG-HDR编码Exemplary JPEG-HDR encoding with multi-scale ratio image formation

在实施例中,附加图像元数据包括从原始HDR图像导出的局部多尺度灰阶比值图像。实施例使用色域(诸如本文中与图像格式一起发布的扩展YCC色域)来使得能够在原始HDR图像的HDR版本中在每个像素处完全恢复,所述HDR版本从色调映射图像和局部多尺度灰阶比值图像产生/恢复。在实施例中,如本文中所描述的技术使色调映射图像中的全黑色调映射值的低于阈值(例如,色调映射图像中的像素总数的0.01%、0.1%、1%、2%等)的数量最少,以使得能够在原始HDR图像的HDR版本中在每个像素处完全恢复。In an embodiment, the additional image metadata includes a local multi-scale grayscale ratio image derived from the original HDR image. An embodiment uses a color gamut (such as the extended YCC color gamut published with the image format herein) to enable full restoration at each pixel in an HDR version of the original HDR image, which is generated/restored from the tone mapped image and the local multi-scale grayscale ratio image. In an embodiment, the techniques as described herein minimize the number of full black tone map values in the tone mapped image that are below a threshold (e.g., 0.01%, 0.1%, 1%, 2%, etc. of the total number of pixels in the tone mapped image) to enable full restoration at each pixel in the HDR version of the original HDR image.

根据本文中的技术,不是使用整体色调映射(TM)算子(其对整体对比度进行压缩以便适应所需亮度值输出范围,并且丢失了对人类视觉感知很重要的局部对比度),而是可以使用局部多尺度色调映射处理来产生改进在整体TM算子中将受损的局部对比度的色调映射图像,同时照原样保留整体映射。在实施例中,局部多尺度TM处理使用整体曲线(例如,直方图调整TM曲线)来映射亮度值,而没有细节损失。在实施例中,高效率地执行局部多尺度TM处理,而在该处理中不产生/引入新的伪像(诸如晕圈)。在特定实施例中,实现高效率的递归处理来以高计算效率执行如本文中所描述的局部多尺度处理。在特定的可能的实施例中,局部多尺度处理仅花费比整体TM算子的TM处理长30%的时间。According to the techniques herein, rather than using a global tone mapping (TM) operator (which compresses global contrast to fit within a desired luminance value output range and loses local contrast that is important for human visual perception), a local multi-scale tone mapping process can be used to produce a tone-mapped image that improves local contrast that would be lost in a global TM operator, while preserving the global mapping intact. In an embodiment, the local multi-scale TM process uses a global curve (e.g., a histogram-adjusted TM curve) to map luminance values without loss of detail. In an embodiment, the local multi-scale TM process is performed efficiently without generating/introducing new artifacts (such as halos) in the process. In a specific embodiment, a highly efficient recursive process is implemented to perform the local multi-scale process as described herein with high computational efficiency. In a specific possible embodiment, the local multi-scale process takes only 30% longer than the TM process of the global TM operator.

根据本文中的技术,不是使用整体色调映射(TM)算子(其对整体对比度进行压缩以便适应所需亮度值输出范围,并且丢失了对人类视觉感知很重要的局部对比度),而是可以使用局部多尺度色调映射处理来产生改进在整体TM算子中将受损的局部对比度的色调映射图像,同时照原样保留整体映射。在实施例中,局部多尺度TM处理使用整体曲线(例如,直方图调整TM曲线)来映射亮度值,而没有细节损失。在实施例中,高效率地执行局部多尺度TM处理,而在该处理中不产生/引入新的伪像(诸如晕圈)。在特定实施例中,实现高效率的递归处理来以高计算效率执行如本文中所描述的局部多尺度处理。在特定的可能的实施例中,局部多尺度处理仅花费比整体TM算子的TM处理长30%的时间。According to the techniques herein, rather than using a global tone mapping (TM) operator (which compresses global contrast to fit within a desired luminance value output range and loses local contrast that is important for human visual perception), a local multi-scale tone mapping process can be used to produce a tone-mapped image that improves local contrast that would be lost in a global TM operator, while preserving the global mapping intact. In an embodiment, the local multi-scale TM process uses a global curve (e.g., a histogram-adjusted TM curve) to map luminance values without loss of detail. In an embodiment, the local multi-scale TM process is performed efficiently without generating/introducing new artifacts (such as halos) in the process. In a specific embodiment, a highly efficient recursive process is implemented to perform the local multi-scale process as described herein with high computational efficiency. In a specific possible embodiment, the local multi-scale process takes only 30% longer than the TM process of the global TM operator.

在实施例中,加载输入的HDR图像,并将其亮度值转换到对数域中。计算直方图调整TM曲线,并将该直方图调整TM曲线应用于亮度值,以便确定整体比值灰阶图像。如本文中所使用的,比值图像通常指的是包括色调映射前图像(例如,输入的HDR图像或其对数等同形式)中的亮度值与色调映射后图像(例如,色调映射图像或其对数等同形式)中的亮度值之间的比值的图像。在实施例中,比值图像在非对数域中在每个像素位置处被逻辑地表示为色调映射前图像除以色调映射后图像,或者在对数域中在每个像素位置处被等同地表示为色调映射前图像减去色调映射后图像。在某一其他的实施例中,比值图像在非对数域中在每个像素位置处被逻辑地表示为色调映射后图像除以色调映射前图像,或者在对数域中在每个像素位置处被等同地表示为色调映射后图像减去色调映射前图像。在所有这些实施例中,应注意,如果比值图像(例如,局部多尺度TM图像)和色调映射前图像(例如,输入的HDR图像)是已知的,则可以经由简单的代数运算(例如,在非对数域中,乘法/除法;在对数域中,加法减法)来获得色调映射前图像(例如,局部多尺度TM图像)。In an embodiment, an input HDR image is loaded and its luminance values are converted to a logarithmic domain. A histogram adjustment TM curve is calculated and applied to the luminance values to determine an overall ratio grayscale image. As used herein, a ratio image generally refers to an image comprising the ratio between the luminance values in a pre-tone mapped image (e.g., the input HDR image or its logarithmic equivalent) and the luminance values in a post-tone mapped image (e.g., the tone mapped image or its logarithmic equivalent). In an embodiment, the ratio image is logically represented at each pixel position in a non-logarithmic domain as the pre-tone mapped image divided by the post-tone mapped image, or equivalently represented at each pixel position in a logarithmic domain as the pre-tone mapped image minus the post-tone mapped image. In certain other embodiments, the ratio image is logically represented at each pixel position in a non-logarithmic domain as the post-tone mapped image divided by the pre-tone mapped image, or equivalently represented at each pixel position in a logarithmic domain as the post-tone mapped image minus the pre-tone mapped image. In all of these embodiments, it should be noted that if the ratio image (e.g., the local multi-scale TM image) and the pre-tone mapping image (e.g., the input HDR image) are known, the pre-tone mapping image (e.g., the local multi-scale TM image) can be obtained via simple algebraic operations (e.g., multiplication/division in the non-logarithmic domain; addition and subtraction in the logarithmic domain).

在实施例中,在对数域中,通过使用16位整型量的减法来高效率地计算用于产生将被合并到局部多尺度比率中的其他比值图像的整体比值图像。在实施例中,可以计算色调映射图像上的参考最大值,并且可以修改色调映射图像,以使得位于所支持的色域(例如,扩展YCC 色域)外部的像素不大于一个小的百分比。In an embodiment, an overall ratio image used to generate other ratio images to be incorporated into the local multi-scale ratio is efficiently computed in the logarithmic domain using subtraction of 16-bit integer quantities. In an embodiment, a reference maximum value on the tone-mapped image can be computed, and the tone-mapped image can be modified so that no more than a small percentage of pixels lie outside a supported color gamut (e.g., an extended YCC color gamut).

在实施例中,在对数域中,通过使用16位整型量的减法来高效率地计算用于产生将被合并到局部多尺度比率中的其他比值图像的整体比值图像。在实施例中,可以计算色调映射图像上的参考最大值,并且可以修改色调映射图像,以使得位于所支持的色域(例如,扩展YCC 色域)外部的像素不大于一个小的百分比。In an embodiment, an overall ratio image used to generate other ratio images to be incorporated into the local multi-scale ratio is efficiently computed in the logarithmic domain using subtraction of 16-bit integer quantities. In an embodiment, a reference maximum value on the tone-mapped image can be computed, and the tone-mapped image can be modified so that no more than a small percentage of pixels lie outside a supported color gamut (e.g., an extended YCC color gamut).

等同、扩展、替代和其他Equivalents, extensions, replacements and others

在前面的说明书中,已经参照在不同实现中可以变化的许多特定细节描述了本发明的实施例。因此,什么是本发明、申请人意图什么是本发明的唯一的独有的指示是从本申请发布的一组权利要求,这些权利要求具有这些权利要求按其发布的特定形式,包括任何后续修正。本文中对于这些权利要求中所包含的术语明确阐述的任何定义应决定这些术语在权利要求中所使用的意义。因此,在权利要求中没有明确地记载的限制、元素、性质、特征、优点或属性均不应以任何方式限制该权利要求的范围。因此,要从例示性、而非限制性的意义上来看待本说明书和附图。In the foregoing specification, embodiments of the invention have been described with reference to numerous specific details that may vary in different implementations. Thus, the sole and exclusive indicator of what is the invention, and what the applicants intend to be the invention, is the set of claims issuing from this application, in the specific form in which such claims issue, including any subsequent amendments. Any definitions expressly set forth herein for terms contained in such claims shall govern the meaning of such terms as used in the claims. Therefore, no limitation, element, property, feature, advantage, or attribute that is not expressly recited in a claim should in any way limit the scope of such claim. The specification and drawings are, therefore, to be regarded in an illustrative and not restrictive sense.

Claims (13)

1.一种用处理器对高动态范围HDR图像进行编码的方法,该方法包括:1. A method for encoding a high dynamic range (HDR) image using a processor, the method comprising: 接收具有第一动态范围的输入图像;Receive an input image having a first dynamic range; 基于输入图像生成色调映射图像,其中色调映射图像具有比第一动态范围低的动态范围;Generate a tone-mapped image based on the input image, wherein the tone-mapped image has a dynamic range lower than a first dynamic range; 生成比值图像(YR),该比值图像包括输入图像的如下亮度像素值,所述亮度像素值已逐个像素地除以色调映射图像中的对应亮度像素值;Generate a ratio image ( YR ) that includes the following luminance pixel values of the input image, which have been divided pixel by pixel by the corresponding luminance pixel values in the tone map image; 向比值图像应用可逆函数(F)以生成修改后的比值图像(F(YR));Apply an invertible function (F) to the ratio image to generate a modified ratio image (F(Y R )); 生成表示可逆函数的逆函数(F-1)的查找表,其中向修改后的比值图像应用查找表(F-1)生成比值图像的近似图像;以及Generate a lookup table representing the inverse function ( F⁻¹ ) of an invertible function, wherein the lookup table ( F⁻¹ ) is applied to the modified ratio graph to generate an approximate graph of the ratio graph; and 基于色调映射图像和修改后的比值图像生成编码HDR图像,Generate coded HDR images based on tone-mapped images and modified ratio images. 其中可逆函数被选择为使得当向修改后的比值图像应用可逆函数的逆函数时,在比值图像和比值图像的近似图像之间的距离根据预定度量被最小化,以及The invertible function is chosen such that when the inverse of the invertible function is applied to the modified ratio image, the distance between the ratio image and its approximate image is minimized according to a predetermined metric. 其中,所述方法还包括:The method further includes: 计算比值图像的像素值的直方图;Calculate a histogram of pixel values in the ratio image; 基于直方图计算累积直方图;以及Calculate the cumulative histogram based on the histogram; and 基于累积直方图生成可逆函数。Generate invertible functions based on cumulative histograms. 2.根据权利要求1所述的方法,其中在比值图像和比值图像的近似图像之间的距离根据均方误差准则被最小化。2. The method of claim 1, wherein the distance between the ratio image and an approximate image of the ratio image is minimized according to the mean square error criterion. 3.根据权利要求1所述的方法,其中预定度量包括在比值图像和比值图像的近似图像之间的信噪比。3. The method of claim 1, wherein the predetermined metric includes the signal-to-noise ratio between the ratio image and an approximate image of the ratio image. 4.根据权利要求1所述的方法,其中预定度量包括比值图像的近似图像的峰值信噪比。4. The method of claim 1, wherein the predetermined metric includes the peak signal-to-noise ratio of an approximate image of the ratio image. 5.根据权利要求1所述的方法,其中编码HDR图像的文件格式包括编码色调映射图像、修改后的比值图像的编码版本以及表示可逆函数的逆函数的查找表。5. The method of claim 1, wherein the file format for encoding the HDR image includes an encoded tone map image, an encoded version of the modified ratio image, and a lookup table representing the inverse function of the inverse function. 6.根据权利要求5所述的方法,其中,在解码器中对编码HDR图像进行解码包括:6. The method of claim 5, wherein decoding the encoded HDR image in the decoder comprises: 接收编码HDR图像;Receive encoded HDR images; 从编码HDR图像提取色调映射图像、修改后的比值图像、以及查找表;Extract tone-mapped images, modified ratio images, and lookup tables from coded HDR images; 向修改后的比值图像应用查找表以生成比值图像的近似图像;以及Apply a lookup table to the modified ratio image to generate an approximate image of the ratio image; and 基于色调映射图像和比值图像的近似图像生成输出HDR图像。An HDR image is generated from an approximate image based on a tone-mapped image and a ratio image. 7.根据权利要求1所述的方法,还包括对修改后的比值图像进行量化以生成量化后的比值图像。7. The method according to claim 1 further includes quantizing the modified ratio image to generate a quantized ratio image. 8.根据权利要求7所述的方法,其中对修改后的比值图像进行量化包括计算8. The method of claim 7, wherein quantizing the modified ratio image includes calculating... 其中YQ指代量化后的比值图像,YR指代比值图像,F(YR)指代修改后的比值图像,scale指代缩放因子,并且min(F(YR))和max(F(YR))指代修改后的比值图像的最小值和最大值。Where YQ refers to the quantized ratio image, YR refers to the ratio image, F( YR ) refers to the modified ratio image, scale refers to the scaling factor, and min(F( YR )) and max(F( YR )) refer to the minimum and maximum values of the modified ratio image. 9.根据权利要求8所述的方法,其中scale=2B-1,其中B指代用于表示量化后的比值图像的像素的位数。9. The method of claim 8, wherein scale = 2B - 1, where B refers to the number of bits used to represent the pixels of the quantized ratio image. 10.根据权利要求1所述的方法,其中生成可逆函数包括计算10. The method of claim 1, wherein generating the invertible function comprises calculating Fi=((c_histi-min(c_hist))/(max(c_hist)-min(c_hist))*scaleF i =((c_hist i -min(c_hist))/(max(c_hist)-min(c_hist))*scale 其中,c_histi指代比值图像的第i个像素值的累积直方图值,min(c_hist)和max(c_hist)指代累积直方图的最小值和最大值,且scale指代缩放因子。Where c_hist i refers to the cumulative histogram value of the i-th pixel in the ratio image, min(c_hist) and max(c_hist) refer to the minimum and maximum values of the cumulative histogram, and scale refers to the scaling factor. 11.根据权利要求10所述的方法,其中scale=2B-1,其中B指代用于表示修改后的比值图像的像素的位数。11. The method of claim 10, wherein scale = 2B - 1, where B refers to the number of bits used to represent the pixels of the modified ratio image. 12.一种非暂时性计算机可读存储介质,在该非暂时性计算机可读存储介质上存储有用于用处理器执行根据权利要求1-11中任一项所述的方法的计算机可执行指令。12. A non-transitory computer-readable storage medium storing computer-executable instructions for executing the method according to any one of claims 1-11 by a processor. 13.一种对编码高动态范围HDR图像进行解码的装置,该装置包括:13. An apparatus for decoding encoded high dynamic range (HDR) images, the apparatus comprising: 处理器;以及Processor; and 非暂时性计算机可读存储介质,在该非暂时性计算机可读存储介质上存储有用于用处理器执行根据权利要求1-11中任一项所述的方法的计算机可执行指令。A non-transitory computer-readable storage medium storing computer-executable instructions for executing the method according to any one of claims 1-11 by a processor.
HK16109656.8A 2012-08-08 2016-08-12 Image processing for hdr images HK1221544B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201261681061P 2012-08-08 2012-08-08
US61/681,061 2012-08-08

Publications (2)

Publication Number Publication Date
HK1221544A1 HK1221544A1 (en) 2017-06-02
HK1221544B true HK1221544B (en) 2020-04-03

Family

ID=

Similar Documents

Publication Publication Date Title
CN105787909B (en) Image procossing for high dynamic range images
CN102741883B (en) High dynamic range image generation and rendering
JP5180344B2 (en) Apparatus and method for decoding high dynamic range image data, viewer capable of processing display image, and display apparatus
TWI521973B (en) Encoding, decoding and representation of high dynamic range images
CN110770787B (en) Efficient end-to-end single-layer reverse display management coding
WO2017003525A1 (en) Real-time content-adaptive perceptual quantizer for high dynamic range images
CN115499632A (en) Image signal conversion processing method, device and terminal equipment
HK1221544B (en) Image processing for hdr images
EP4058976B1 (en) Device and method for pre-processing image data for a computer vision application
HK1194185A (en) Image processing for hdr images
HK1194185B (en) Image processing for hdr images
HK1195690B (en) Method for processing high dynamic range images