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!