필터 지우기
필터 지우기

How to read pixel labels in pixellabel datastore.

조회 수: 4 (최근 30일)
Sakshi Ahuja
Sakshi Ahuja 2021년 6월 8일
답변: Image Analyst 2021년 6월 12일
The prdefined pixel labels provided are:
ground-glass (mask value =1), consolidation (=2) and pleural effusion (=3).
But I am getting error while running the code:
Error: "Error using pixelLabelDatastore>parseInputs (line 265)
The value of 'classNames' is invalid. 'ground-glass' is not a valid class name. Class names must be valid MATLAB variable
names. See ISVARNAME for more details.
Error in pixelLabelDatastore (line 211)
[location, classes, values,params] = parseInputs(varargin{:});
"
pxDir = fullfile('C:\Users\Admin\Downloads\13521488\Mask');
classNames = ["Background","ground-glass" ];
pixelLabelID = [0 1]
pxds = pixelLabelDatastore(pxDir,classNames,pixelLabelID);

채택된 답변

Srivardhan Gadila
Srivardhan Gadila 2021년 6월 12일
As per the error message it seems that the value of classNames should be a valid MATLAB variable name and a valid variable name starts with a letter, followed by letters, digits, or underscores. Try changing the values in the classNames array by referring to the documentation of Variable Names and make use of the function isvarname.
This is known to the concerned staff and they might remove this condition in the future releases.

추가 답변 (1개)

Image Analyst
Image Analyst 2021년 6월 12일

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by