Error in image processing.
3 次查看(过去 30 天)
显示 更早的评论
Hello, I made a program with the following code:
I = imread('ppc.png');
corners = detectFASTFeatures(I,'MinContrast',0.1);
J = insertMarker(I,corners,'circle');
imshow(J);
and shows me the following error
Error using vision.internal.detector.fast.parseInputs (line 4)
Expected I to be of size MxN when it is actually size 255x559x3.
Error in detectFASTFeatures>parseInputs (line 97)
params = vision.internal.detector.fast.parseInputs(I, varargin{:});
Error in detectFASTFeatures (line 63)
params = parseInputs(I, varargin{:});
Error in zz (line 2)
corners = detectFASTFeatures(I,'MinContrast',0.1);
0 个评论
回答(3 个)
Walter Roberson
2015-5-25
points = detectFASTFeatures(I) returns a cornerPoints object, points. The object contains information about the feature points detected in a 2-D grayscale input image, I.
You are not passing in a grayscale image, you are passing in a color image.
0 个评论
Dima Lisin
2015-5-26
编辑:Dima Lisin
2015-5-26
Hi Massimo,
As Walter pointed out, detectFASTFeatures takes a grayscale image. Please use rgb2gray to convert I to grayscale.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!