I was trying to use the above code segment for performing Contrast Limited Adaptive Histogram Equalization (CLAHE).
def clahe_equalized(imgs):
imgs_equalized = np.empty(imgs.shape)
for i in range(imgs.shape[0]):
print('imgs[i,0] ',imgs[i,0].dtype)
print('imgs[i,0] ',imgs[i,0].max())
print('imgs[i,0] ',imgs[i,0].min())
imgs_equalized[i,0] = exposure.equalize_adapthist(imgs[i,0],clip_limit=0.03)
return imgs_equalized
Running the program generates the following error message ( I only keep the related ones)