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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
yasmin ismail
am 6 Okt. 2023
Kommentiert: Matt J
am 6 Okt. 2023
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing and Computer Vision finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!