foosballraw matlab,Apply gamma correction to linear RGB values

本文介绍了如何处理和显示一个包含原始线性RGB强度的图像文件。首先,通过demosaic函数插值重建颜色,然后应用sRGB标准进行伽马校正,使图像看起来更明亮。这个过程展示了线性RGB图像与经过伽马校正的sRGB图像之间的差异。
摘要由CSDN通过智能技术生成

Open an image file containing minimally processed linear RGB intensities.

A = imread('foosballraw.tiff');

The image data is the raw sensor data after correcting the black level and scaling to 16 bits per pixel. Interpolate the intensities to reconstruct color by using the demosaic function. The color filter array pattern is RGGB.

A_demosaiced = demosaic(A,'rggb');

Display the image. To shrink the image so that it appears fully on the screen, set the optional initial magnification to a value less than 100.

figure

imshow(A_demosaiced,'InitialMagnification',25)

title('Sensor Data Without sRGB Gamma Correction')

632da76b0d7f1bf2c7949fe3ae2798fc.png

The image appears dark because it is in the linear RGB color space. Apply gamma correction to the image according to the sRGB standard, storing the values in double precision.

A_sRGB = lin2rgb(A_demosaiced,'OutputType','double');

Display the gamma-corrected image, setting the optional magnification.

figure

imshow(A_sRGB,'InitialMagnification',25)

title('Sensor Data With sRGB Gamma Correction');

3d83a4dac5bc608a954f906eac203b7f.png

The gamma-corrected image looks brighter than the linear image, as expected.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值