Computer vision 边缘检测,Matlab视觉系统工具箱

Computer vision 边缘检测,Matlab视觉系统工具箱,computer-vision,matlab-cvst,edge-detection,Computer Vision,Matlab Cvst,Edge Detection,我有几个图像,我需要找到一个边缘。我已尝试在matlab中使用vision.EdgeDetector系统对象,并在此处给出了示例: 他们举了一个例子 hedge = vision.EdgeDetector; hcsc = vision.ColorSpaceConverter('Conversion','RBG to intensity') hidtypeconv = vision.ImageDataTypeConverter('OutputDataType',single

我有几个图像,我需要找到一个边缘。我已尝试在matlab中使用vision.EdgeDetector系统对象,并在此处给出了示例:

他们举了一个例子

    hedge = vision.EdgeDetector;
    hcsc = vision.ColorSpaceConverter('Conversion','RBG to intensity')
    hidtypeconv = vision.ImageDataTypeConverter('OutputDataType',single');
    img = step(hcsc, imread('picture.png'))
    img1 = step(hidtypeconv, ing);
    edge = step(hedge,img1);
    imshow(edges);
我在代码中完全遵循了这一点


然而,这段代码并没有生成我想要的所有边缘,似乎Matlab只能拾取整个图像中大约一半的边缘。有没有一种不同的方法可以找到所有的边,或者一种改进Matlab中vision.EdgeDetector对象的方法

默认情况下,hedge=vision.EdgeDetector的阈值为20。尝试将其更改为hedge=vision.EdgeDetector('Threshold',Value),然后使用Value查看哪个值最适合您。

尝试:

imgGray = rgb2gray(imgRGB);
imgEdge = edge(imgGray,'canny');
这将为您提供大多数边缘点,如果没有,则相应地更改参数THRESH和SIGMA。还应检查以下其他方法:

help edge
您不必使用vision.EdgeDetector系统,没有它们,有些事情会变得更容易!;)