【发布时间】:2017-11-05 09:36:06
【问题描述】:
我试图从一些图像中获取一些静态数据,当我尝试执行直方图均衡时,我感到困惑。
因为我试过这个:
img = io.imread(file);
img = exposure.equalize_hist(img);
我收到警告warn("This might be a color image. The histogram will be "
然后我尝试像这样在每个通道中执行均衡:
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);
我得到了错误
AttributeError: 'list' object has no attribute 'shape'
那么我应该如何在带有颜色的图像中进行直方图均衡,如果我想在 HSV 或 CIELAB 中的图像中进行,是不是也一样?! histogram equalization
【问题讨论】:
标签: python image-processing rgb scikit-image