Sometimes multiplication max_val and (depth - depth_min) causes overflow when bits=1 because of ndarray dtype np.float16.
To deal with this issue, I changed the order of multiplication. (Or we can use np.float32)
This change has small impact on the output value.
Sometimes multiplication
max_val
and(depth - depth_min)
causes overflow when bits=1 because of ndarray dtypenp.float16
. To deal with this issue, I changed the order of multiplication. (Or we can usenp.float32
) This change has small impact on the output value.