why threshold is 2? I'd expect it to be 1 for 8U (and less or equal for 32F)