I have tif image in 16 bit format.
Now I want to convert this data set to an 8 bit rgb image for export as jpg.
If I use
RGB8 = im2uint8(imageData);
then I have a matrix with only 255 values, which is wrong since the histogramm has only values around 0 to 16000 with the maximum at 700 (max value of 16 bit is about 65500)
Also I want to adjust the gamma level to 0.45, which means that I do not want a linear mapping of values to brighness in each color.
How would I do that with matlab?
I solved it now with the following code:
The resulting images have the same colors and brightness as he original camera images viewed with a special software which is what I wanted.