Skip to content
Advertisement

Normalizing images in OpenCV produces black image?

I wrote the following code to normalize an image using NORM_L1 in OpenCV. But the output image was just black. How to solve this?

JavaScript

Advertisement

Answer

If you want to change the range to [0, 1], make sure the output data type is float.

JavaScript
Advertisement