Image Labeler - Pixel Label from binary mask
이전 댓글 표시
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
답변 (1개)
Githin George
2023년 10월 10일
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.
카테고리
도움말 센터 및 File Exchange에서 Image Segmentation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!