Improve contrast of a 16U image
Hello, I'm very new to OpenCV. My question is: I need to enhance contrast of an IR image. I tried to use the cvEqualizeHist
C function and the equalizeHist
C++ function, but I understood they both work on 8 bit data, whilst my pixel data (one channel) are 16 bit (CV_16UC1
).
Is it possible to improve contrast in my image in some other way?
Thanks a lot
Andrea
Update:
Thanks a lot, I followed the suggestion but still I've some problems. The source matrix had all values in a very small interval (so the results was an almost gray image). I expected that after applying the normalize
function, the values were scaled between the min and max, but the result was similar to the source matrix: the values are still in a very small interval (shifted at a higher value respect the original matrix); the result is a similar image but a little bit brighter.
Where am I wrong?