2013-01-10 57 views
1

我有一块平板材料已经看到件(凸片),我想有什么是它的向量化。Opencv斑点检测和矢量化

例如这张照片http://www.laser-cutting.com/images/Coreplast_med.jpg

在此图像中的情况下,我想圆的斑点,并确定为不是材料的一部分了,它们的轮廓和矢量作为图像的轮廓的明星是只剩下剩下的材料(忘记手写)。获得轮廓对于cvCanny来说没有问题,但是我怎样才能将轮廓矢量化?有没有方法来识别斑点?

关于如何进行的任何想法?我读过很多与blob有关的问题,但没有人帮助我。

感谢

+0

“凸块”,明星绝对不凸。 – ybungalobill

+0

我敢肯定['cvFindContours'](http://docs.opencv.org/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html#int%20cvFindContours%28CvArr*%20image,%20CvMemStorage*%20storage,%20CvSeq* *%20first_contour,%20int%20header_size,%20int%20mode,%20int%20method,%20CvPoint%20offset%29)做你想要的...? –

+0

简而言之,你想找到图像中的对象吗?或者,“矢量化”它们是什么意思? –

回答

0

如果你知道你的形状看起来像什么,你可以试试这个: How to detect simple geometric shapes using OpenCV

而且cvFindContours塞缪尔Audet说的应该是良好的矢量: http://docs.opencv.org/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=findcontours#findcontours

轮廓 - 检测到的轮廓。每个轮廓存储为点的向量

从那里你可以玩你的观点,并做出任何你想要的2D表示/处理。