Azzera filtri
Azzera filtri

How to fix error:Unrecognized method, property, or field 'imageFilename' for class 'groundTruth'. ?

32 visualizzazioni (ultimi 30 giorni)
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?

Risposte (1)

Steven Lord
Steven Lord il 13 Ott 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.

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by