How to fix error:Unrecognized method, property, or field 'imageFilename' for class 'groundTruth'. ?
12 views (last 30 days)
Show older comments
I am new biggener in image processing, I used iamge labeler App and I export the labeled image, then I would like to calculate the similarity :
load('label7027_157.mat')
gTruth
ix=contains(gTruth.imageFilename,'LabelData');
A = logical(imread('7027-157.png'));% look up which is the desired file
BW_groundTruth=logical(imread(gTruth.imageFilename{ix})); % read that image file.
similarity = jaccard(squeeze(A(:,:,1)), BW_groundTruth)
gTruth =
groundTruth with properties:
DataSource: [1×1 groundTruthDataSource]
LabelDefinitions: [1×6 table]
LabelData: [1×1 table]
Unrecognized method, property, or field 'imageFilename' for class 'groundTruth'.
Error in trial2 (line 3)
ix=contains(gTruth.imageFilename,'LabelData');
How to fix this error?
0 Comments
Answers (1)
Steven Lord
on 13 Oct 2023
Nowhere on the documentation page for the groundTruth object does the identifier "imageFilename" appear (except in an example as one of the variables in the table array named stopSignsAndCars in the MAT-file stopSignsAndCars.mat.) It is not a property of groundTruth objects.
Is there something on a documentation page or in an example that led you to believe that object has such a property? If so please post a link to that documentation page or example so we can determine if that needs to be corrected or clarified.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!