필터 지우기
필터 지우기

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

조회 수: 32 (최근 30일)
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?

답변 (1개)

Steven Lord
Steven Lord 2023년 10월 13일
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.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by