删除K的背景掩码-意味着Python或C++中的集群/
Removing background mask for K -Means clustering/ in Python or C++
我正在尝试使用K-Means聚类Python库对图像进行分类。然而,图像中包括一个黑色(蒙版(背景,我需要在聚类之前将其移除,因为它会影响输出结果。我希望使用k均值从图像输出中删除黑色背景类或聚类。我试着在网上寻找解决方案,但到目前为止,我还没有找到合适的解决方案。有人知道使用Python库或C++删除K-means集群算法中不需要的特定类/集群的任何解决方案吗。下面是我目前正在python中实现的K表示代码,并希望进行调整。
labels = _utils.clusterFeatureVectors(featureVectors, k_clusters)
_utils.printClassifiedImage(labels, k_clusters, img, outfile, greyOutput)
我错误地发现了这些代码,我认为它很有用。
root.overrideredirect(True)
root.wm_attributes("-transparentcolor", "#000000") #black color will be removed
有关更多信息,您可以查看此处:https://wiki.tcl-lang.org/page/wm+属性
相关文章:
- 这行代码在C++类中意味着什么
- 这对"With a stackless coroutine, only the top-level routine may be suspended."意味着什么
- 寻找地理和伤害意味着超载
- @CPPFLAGS@在 Makefile.in 中意味着什么?
- 在C++标准中做格式好意味着代码可以编译
- 生成文件"relink"意味着什么?
- 从二进制流中读取时,将双精度变量的地址转换为 char* 意味着什么?
- 在这种情况下,"typename..."意味着什么?
- C++评估顺序优化是否意味着对不同的操作数使用不同的内核?
- "in-situ without memory allocation" 字符串的愚蠢实现意味着什么?
- 使用typedef有什么用,它意味着什么
- GCC 的 -Wpsabi 选项究竟有什么作用?压制它意味着什么?
- 负指数是否必然意味着未定义的行为
- c++ 提升如果 .extension() == " "这意味着这个文件是一个文件夹?
- 这在C++ "It does not own the underlying data, and so is cheap to copy or assign"中意味着什么
- 删除K的背景掩码-意味着Python或C++中的集群/
- 聚合类型是否意味着它也是标准布局
- 这些问题都意味着同一件事吗
- 由于某种原因,我的代码中出现了 [json.exception.type_error.302]。我知道错误意味着什么,但我不知道哪里有故障
- 是否有任何版本的C++(甚至是试行标准)是"throw()"并不意味着"cannot throw, ever"?