How to solve the error: Expected input number 2, B, to be one of these types: logical, double, categorical Instead its type was uint8?
조회 수: 28 (최근 30일)
이전 댓글 표시
I used jaccard method as following:
A = imread('R7001-60.png');
I = im2gray(A);
figure
imshow(I)
title('OutPut Image')
mask = false(size(I));
mask(25:end-25,25:end-25) = true;
BW = activecontour(I, mask, 300);
BW_groundTruth = imread('gT7001_60.png');
similarity = jaccard(BW, BW_groundTruth);
and I got the following error:
Error using jaccard
Expected input number 2, B, to be one of these types:
logical, double, categorical
Instead its type was uint8.
Error in
jaccard>@(x,name,pos)validateattributes(x,{'logical','double','categorical'},{'real','nonempty','nonsparse'},mfilename,name,pos)
(line 118)
validateInput = @(x,name,pos) validateattributes(x, ...
Error in jaccard (line 124)
validateInput(B,'B',2);
Error in Gtruth3 (line 37)
similarity = jaccard(BW, BW_groundTruth);
can anyone help me to fix it?
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!