currently i am working on my demosiac converter project which convert RAW images , one step of converting image is the gamma correction .
this is my gamma correction function in 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
this function runs without errors but finally it gives me a wrong output
this is a screenshot of the output i get
any help ?