I have to implement a gamma correction code for Image processing course.
for(k=0;k<255;k++){g[k]=255*pow((double)k/255,1/gamma);}
Now i will get a black picture no matter what gamma i choose. The rest of the processing code is given by the tutor so the mistake have to be here.