I wrote the following code to work normalize an image using NORM_L1 in OpenCV. But the output image was just black.How to solve this ?
import cv2 import numpy as
If you want to change the range to [0, 1], make sure the output data type is float.
float
image = cv2.imread("lenacolor512.tiff", cv2.IMREAD_COLOR) # uint8 image norm_image = cv2.normalize(image, None, alpha=0, beta=1, norm_type=cv2.NORM_MINMAX, dtype=cv2.CV_32F)