Filter löschen
Filter löschen

Image Labeler - Pixel Label from binary mask

13 Ansichten (letzte 30 Tage)
Turimo
Turimo am 24 Mai 2022
Beantwortet: Githin George am 10 Okt. 2023
Hello,
I've done some image segmentation with cluestering algorithm and the color tresholder app.
Is it possible to import these mask (from the segmentation) into pixel Label in the image Labeler app?
Thank you to anyone answering.
Best regards,
Turimo

Antworten (1)

Githin George
Githin George am 10 Okt. 2023
Hi Turimo,
I understand you have few image segmentations generated using clustering algorithm and the ‘Color Thresholder App’ and would like to import it as labels in the ‘Image Labeler App’. You could try the steps below to achieve the same.
  • Export the binary mask generated in ‘Color Thresholder App’ to MATLAB workspace and save it into an image.
imwrite(BW,'yourImageLabel.png')
  • Run the following script
dataSource = groundTruthDataSource({'sourceImg.jpg'});
ldc =labelDefinitionCreator();
addLabel(ldc,'LabelName',labelType.PixelLabel);
labelDefs = create(ldc);
dataFile = {'yourImageLabel.png'};
labelData = table(dataFile,'VariableNames',{'PixelLabelData'});
% groundTruth class is the supported object format to upload labels in image labeler app
gTruth = groundTruth(dataSource,labelDefs,labelData);
  • Open ‘Image Labeler App’. Click on Import->Labels->From Workspace. Select ‘gTruth’ from the table.
I hope this helps.

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by