gpt4 book ai didi

scikit-image - 使用 scikit-image 从 png 中提取一个特定的 channel

转载 作者:行者123 更新时间:2023-12-01 11:35:02 25 4
gpt4 key购买 nike

我正在评估 scikit-image 并寻找一种方法来从我的图像中只读取绿色 channel 。图像存储为 RGBA,只有绿色 channel 具有值。

有没有类似 OpenCV 中的 CvSplit 的东西?

最佳答案

图像存储为 MxNxd 数组,在您的例子中,d == 4。因此,使用标准 NumPy 切片来获取绿色:

green = image[..., 1]

关于scikit-image - 使用 scikit-image 从 png 中提取一个特定的 channel ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27920961/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com