[英]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.