MATLAB Answers

How to count each pixel with new semantic image

조회 수: 2(최근 30일)
Benjamin Currie
Benjamin Currie 2021년 3월 30일
I now want to count each pixel for when an image goes through the network and produces semantic data. How do i do this? when the tutorial does count each pixel in the tutorial it does this for one image and uses PXDs.
To perform the semantic segmentation for a random image te following code is used:
I = read(imdsTest);
C = semanticseg(I, net);
B = labeloverlay(I,C,'Colormap',cmap,'Transparency',0.4);
imshow(B)
pixelLabelColorbar(cmap, classes);
How can i use this data to count the pixels in this outputted image for the labels?
The code used at the start to coun each pixel is:
labelDir = fullfile(outputFolder,'labels');
pxds = pixelLabelDatastore(labelDir,classes,labelIDs);

답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by