简体   繁体   English

如何使用 skimage regionprops 获得不规则形状的中心?

[英]How to get center of irregular shape with skimage regionprops?

I'm using Skimage regionprops to find the center of objects, and then opencv to write text in the middle of the object.我正在使用 Skimage regionprops找到对象的中心,然后 opencv 在 object 中间写入文本。 However, some of the objects are irregular in shape and the centroid coordinates are outside of the object.但是,有些物体形状不规则,质心坐标在 object 之外。 How can I get the "center" of the object when it is irregular such that the center is inside the object?当 object 的“中心”不规则时,我怎样才能得到 object 内部的“中心”?

What you are after is called the medoid and currently doesn't exist in scikit-image , though we are interested in adding an implementation.您所追求的称为medoid目前在 scikit-image 中不存在,尽管我们有兴趣添加一个实现。

Note that as of v0.18, regionprops lets you add extra properties , so if you find a good implementation you can start using it straight away.请注意,从 v0.18 开始,regionprops 允许您添加额外的属性,因此如果您找到了一个好的实现,您可以立即开始使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在没有循环的情况下直接从 skimage 中的 regionprops 访问区域属性? - How to directly access region properties from regionprops in skimage without a loop? 如何使用skimage.measure.regionprops查询标签 - How to use skimage.measure.regionprops to query labels 向 skimage 中的 regionprops 添加额外的属性 - Add extra properties to regionprops in skimage 如何在 Python 中的二进制图像上使用 skimage.measure.regionprops 按面积或偏心率进行过滤 - How do I filter by area or eccentricity using skimage.measure.regionprops on a binary image in Python 为什么 skimage regionprops 为该区域返回 4 个值 - Why does skimage regionprops return 4 values for the area skimage.measure.regionprops 标签的相应测量值? - skimage.measure.regionprops labels' corresponding measurements? python:如何改变skimage输出形状的大小调整 - python: how to change shape of the output of skimage resize 使用 skimage regionprops 过滤区域并使用过滤组件创建掩码 - Filter regions using skimage regionprops and create a mask with filtered components 如何在蒸汽中创建一个不规则的圆形 - How to create an irregular round shape in vapory 如何通过不规则索引获取subtensor? - How to get subtensor by irregular index?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM