Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Improve contrast

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

Improve contrast

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

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?

click to hide/show revision 3
No.3 Revision

Improve contrast

Hello, I'm very new to openCV. OpenCV. My question is: I need to enhance contrast of an IR image. I tried to use the cvEqualizeHist cvEqualizeHist C function and the equalizeHist equalizeHist C++ function, but I understood they both work on 8 bit data, whilst my pixel data (one channel) are 16 bit (CV_16UC1). (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 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?

click to hide/show revision 4
No.4 Revision

Improve contrastcontrast 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?