目前我正在研究我的 Demosiac 转换器项目,它可以转换 RAW 图像,转换图像的一个步骤是伽玛校正。
这是我在 matlab 中的伽马校正函数:
function [res] = gamma_correct(I, value)
% res = gamma_correct(I, value)
%
% This function performs gamma correction
% on image 'I' where 'value' is the gamma
res = I;
X = 255 * (I/255).^(1/value);
imshow(X);
end
这个函数运行没有错误,但最后它给了我一个错误的输出
有什么帮助吗?