function adjust_im= Gamma_c(im, y, c) rows = size(im,1); cols = size(im,2); mat= zeros(rows,cols,class(im)); for r=1: rows for co=1: cols pixel = im(r,co); p1 = double(pixel/255); p2 = double(c*((double(p1))^y)); p3 = double(p2*255); mat(r,co) = round(p3); end endadjust_im= mat;
MATLAB: I am trying to write a function for the Gamma Correction, this is what I have so far. the problem is the intensities of the output image is either 0 or 255. what am I doing wrong
functiongamma
Related Question
- Error using image Error using image TrueColor – How to plot images created by joining arrays instead of using imread
- Hello, how to write code for the expression shown in image in matlab to divide two images by calculating 24000
- How can i extract numerical intensity values from an image
- Divide one image by another image
Best Answer