I'm tryng to get some statics from some images, and when I tryed to perform histogram equalization I get confused.
Because I tryed this:
img = io.imread(file);
img = exposure.equalize_hist(img);
And I get the warning warn("This might be a color image. The histogram will be "
Then I tryed to perform the equalization in each channel like this:
img = io.imread(file);
#img = exposure.equalize_hist(img);
height, width = len(img), len(img[0]);
r1 = [];
g1 = [];
b1 = [];
for i in range(height):
for j in range(width):
pixel = img[i, j];
r1.append(pixel[0]);
g1.append(pixel[1]);
b1.append(pixel[2]);
r = exposure.equalize_hist(r1);
g = exposure.equalize_hist(g1);
b = exposure.equalize_hist(b1);
And I get the error
AttributeError: 'list' object has no attribute 'shape'
So how should I do histogram equalization in an image with color, and if I wanna do it in an image in HSV, or CIELAB, is it the same way?! histogram equalization