Mat::convertTo() float to uchar broken when all values are negative (Bug #1218)
Description
When all values in a floating point matrix are negative, the resulting uchar matrix is all zero.
History
Updated by Vadim Pisarevsky over 13 years ago
uchar can only represent values from 0 to 255. Negative values are converted to the closest representable value, i.e. 0. Try converting floats to signed char (CV_8S) or use convertScaleAbs().
- Status changed from Open to Done
- (deleted custom field) set to invalid