如何使用图像像素在对象的多个点上计算直径?
我试图使用计算机视觉来代替光学千分尺的使用,以在一定长度上在圆柱体的不同点上获取直径。
我如何在多个点(蓝线)上计算此对象的直径(气缸)如图像中所示的长度,使用OpenCV Python?
I am trying to get diameters on different points of a cylinder over a certain length using computer vision to replace the use of optical micrometer.
How can I calculate the diameter of this object (cylinder) on multiple points (blue lines) along its length as shown in the image using OpenCV python?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
OPENCV解决方案。主要想法是:
1.,2。和3。可以通过单个阈值步骤来简化。您的用例
SRC映像:
canny结果:
用白色填充轮廓:
countnonzero在每个列的最后一个图像上应用
An OpenCV solution. The main idea is to:
1., 2. and 3. could possibly be simplified by a single thresholding step depending on your use case
Src image:
Canny result:
After filling in contours with white color:
countNonZero is applied on this last image for each column