Matlab改变了imcontour
的行为,我无法弄清楚如何获得图像中每个轮廓的个体xy。
如果在2014a,代码为:
[~,g] = imcontour(img,1);
pgons=arrayfun(@(x) get(x,'Vertices'),get(g,'children'),'uni',false);
2015年,g
是轮廓对象,我无法从中提取个体轮廓。
答案 0 :(得分:0)
通过以下任一方式获得矩阵:
[contourMat,g] = imcontour(img,1);
其中,您正在寻找的是contourMap,或者
g.ContourMatrix