Image Labeler - Pixel Label from binary mask
Mostra commenti meno recenti
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
Risposte (1)
Githin George
il 10 Ott 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.
Categorie
Scopri di più su Image Segmentation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!