Image contrast when using labeloverlay
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I have setup an image datastore and a pixel label datastore for some semantic image segmentation I'd like to do and I used some code in an example to show some overlays from some images within my image/pixel lists:
for i=81:85
im=readimage(imds,i);
C=readimage(pxds,i);
B=labeloverlay(im,C,'transparency',0.5);
figure,imshow(B);
end
However, when I do this, I find that the display range for the image is too wide:
Is there a way to change display range of the background image? It's an int16 image with a [min max] range of [0 4741]
Thanks for your help,
Matt
0 个评论
采纳的回答
DGM
2022-3-7
编辑:DGM
2022-3-7
Try putting your images on a common scale.
im = mat2gray(im);
C = mat2gray(C);
This will put both images in the range [0 1].
2 个评论
DGM
2022-3-10
I ... really don't know what to say about the categorical array part. I almost never use categoricals for anything, and I never use datastore stuff so I'm not sure what to expect. At least it seems to be working.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!