\apiitem{"oiio:ColorSpace" : string}
  The name of the color space of the color channels. Values incude:
  \qkw{Linear}, \qkw{sRGB}, \qkw{GammaCorrected}, \qkw{AdobeRGB},
  \qkw{Rec709}, and \qkw{KodakLog}.
  \apiend
   
  \apiitem{"oiio:Gamma" : float}
  If the color space is \qkw{GammaCorrected}, this value is the gamma
  exponent.
  \apiend
The {\cf ImageSpec::extra_attribs} field may store metadata that reveals
  the color space the image file in the \qkw{oiio:ColorSpace}
  attribute, which may take on any of the following values:
   
  \begin{description}
  \item[\halfspc \rm \qkw{Linear}] indicates that the
  color pixel values are known to be linear.
  \item[\halfspc \rm \qkw{GammaCorrected}] indicates
  that the color pixel values (but not alpha or $z$) have
  already been gamma corrected (raised to the power $1/\gamma$), and
  that the gamma exponent may be found in the \qkw{oiio:Gamma} metadata.
  \item[\halfspc \rm \qkw{sRGB}] indicates that the
  color pixel values are in sRGB color space.
  \item[\halfspc \rm \qkw{AdobeRGB}] indicates that the
  color pixel values are in Adobe RGB color space.
  \item[\halfspc \rm \qkw{Rec709}] indicates that the
  color pixel values are in Rec709 color space.
  \item[\halfspc \rm \qkw{KodakLog}] indicates that the
  color pixel values are in Kodak logarithmic color space.
  \end{description}
   
  The \ImageInput sets the \qkw{oiio:ColorSpace} metadata in a
  purely advisory capacity --- the {\cf read} will not convert pixel
  values among color spaces. Many image file formats only support
  nonlinear color spaces (for example, JPEG/JFIF dictates use of sRGB).
  So your application should intelligently deal with gamma-corrected and
  sRGB input, at the very least.
   
  The color space hints only describe color channels. You should assume that
  alpha or depth ($z$) channels (designated by the {\cf alpha_channel} and
  {\cf z_channel} fields, respectively) always represent linear values and
  should never be transformed by your application.

spec.attribute("oiio::ColorSpace", "Linear");

spec.attribute("oiio::ColorSpace", "GammaCorrected");
spec.attribute("oiio::Gamma", (float)gamma);

spec.attribute("oiio::ColorSpace", "sRGB");
spec.attribute("oiio::ColorSpace", "Rec709");

----------------------------------------------------------------------------------------------------------

Applies an inverse gamma correction to texture lookups. For example, a value of 2.2 will linearize a texture that comes in with a gamma of 2.2. This is done for 8 and 16 bit images.

Arnold scans the contents of a texture (it does not rely on the extension) and anything that is not float is considered to have a gamma baked even if the image has a different color space embedded.

Tx texture format

You can convert your textures to linear space with the make tx tool. This way you can ensure that all of your textures are linear before rendering. For example:

maketx --colorconvert sRGB linear C:\solidangle\mtoadeploy\2014\bin\image.jpg

Gamma Correction of OIIO的更多相关文章

  1. 【图形学】我理解的伽马校正(Gamma Correction)

    http://blog.csdn.net/candycat1992/article/details/46228771/ 写在前面 我相信几乎所有做图像处理方面的人都听过伽马校正(Gamma Corre ...

  2. Gamma Correction

    [Gamma Correction] 磁盘上存储的纹理可分为Linear Texture.Gamma Texture. sRGB sampling allows the Unity Editor to ...

  3. Gamma correction 伽马校准及 matlab 实现

    matlab 内置实现:imadjust Gamma Correction gamma correction formula : .^(gamma) or .^(1/gamma)? 用以调整图像光照强 ...

  4. 【视频开发】伽马校正(gamma correction)学习笔记

    我相信几乎所有做图像处理方面的人都听过伽马校正(Gamma Correction)这一个名词,但真正明白它是什么.为什么要有它.以及怎么用它的人其实不多.我也不例外.  最初我查过一些资料,但很多文章 ...

  5. [笔记]dynamic gamma correction

    2014-03-17  14:37:04 周一 在设计过程中参考论文<一种改进的视频画质增强算法及VLSI设计>电子学报 在YUV色彩空间对输入图像的信息进行判断分类和对比度调整,然后对调 ...

  6. 【转】Using Gamma 2.2

    This is a detailed description of the work with Gamma 2.2. If you are only interested in exact instr ...

  7. gamma

    图:显卡(驱动程序)上的Gamma设置 图:ACDSEE中的曝光调节 二. 什么是Gamma? 2.1. 显示器Gamma曲线 Gamma可能源于CRT(显示器/电视机)的响应曲线,即其亮度与输入电压 ...

  8. 图像处理之gamma校正

    1 gamma校正背景 在电视和图形监视器中,显像管发生的电子束及其生成的图像亮度并不是随显像管的输入电压线性变化,电子流与输入电压相比是按照指数曲线变化的,输入电压的指数要大于电子束的指数.这说明暗 ...

  9. gamma校正

    1 gamma校正背景 在电视和图形监视器中,显像管发生的电子束及其生成的图像亮度并不是随显像管的输入电压线性变化,电子流与输入电压相比是按照指数曲线变化的,输入电压的指数要大于电子束的指数.这说明暗 ...

随机推荐

  1. [转载]用 FFMPEG 合并 MP4 视频

    因为 ffmpeg 是支持切分 mp4 视频的,所以我就理所当然的以为 ffmpeg 是支持视频合并.直到今天同事找我问方法,才发现一直以为的方法是错误的, mp4 不支持直接 concate(丢人了 ...

  2. UVALIVE 4556 The Next Permutation

    4556 The Next PermutationFor this problem, you will write a program that takes a (possibly long) str ...

  3. UGUI 自动布局的重叠BUG

    1,父级使用了verticalLayout(注意没有ContentSizeFilter),子级使用了ContentSizeFilter时,点击Apply常常发现,本来布局好的UI突然重叠到了一起,或位 ...

  4. keepalived + nginx实现高可用

    1. Keepalived介绍 Keepalived是一个基于VRRP协议来实现的服务高可用方案,可以利用其来避免IP单点故障,类似的工具还有heartbeat.corosync.pacemaker. ...

  5. margin+absolute布局:右栏固定主内容自适应 demo

    margin+absolute布局:右栏固定主内容自适应 demo 头部 Aside侧边栏区域 Main主内容区域 底部 #demo{width:80%;margin:auto;height:300p ...

  6. Java读取Unicode文件(UTF-8等)时碰到的BOM首字符问题

    在Windows下用文本编辑器创建的文本文件,如果选择以UTF-8等Unicode格式保存,会在文件头(第一个字符)加入一个BOM标识.   这个标识在Java读取文件的时候,不会被去掉,而且Stri ...

  7. 53-C++ CH08 01

     http://lx.lanqiao.cn/problem.page?gpid=T407 算法训练 C++ CH08 01   时间限制:1.0s   内存限制:256.0MB      问题描述 已 ...

  8. c# 类中使用ResolveUrl

    类中使用ResolveUrl 1>获取当前page然后调用ResolveUrl System.Web.UI.Page page = HttpContext.Current.CurrentHand ...

  9. 无需写try/catch,也能正常处理异常

    对于企业应用的开发者来说,异常处理是一件既简单又复杂的事情.说其简单,是因为相关的编程无外乎try/catch/finally+throw而已:说其复杂,是因为我们往往很难按照我们真正需要的策略来处理 ...

  10. idea升级maven工程jar包版本和解决jar包冲突

    原来用过eclipse的都知道,想要升级maven工程的jar包版本或者解决jar包冲突,直接在pom文件下的dependency hierarchy视图下右击冲突的jar包,将其exclude掉,然 ...