how to add or embed numbers (e.g 1 2 3 ...) into a binary image?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a binary image of a blood cell, I want to insert numbering into that binary image. For color or gray image we can use inserttext command, but its not working on binary image. Please help
0 Kommentare
Antworten (1)
Jonas
am 6 Jul. 2021
what exactly is your goal? do you want to insert binary numbers into the binary image or are you ok with a binary image as base and insertion of a truecolor numbering like
im=zeros(100,100);
im(:,35)=1; im(:, 46)=1; im(46,:)=1;
im=im==1;
imshow(insertText(double(im),[50 50],'hello'));
if you really need a binary image you can insert a white (or black) text without a colored box and do some conversion
im=rgb2gray(insertText(double(im),[50 50],'hello','BoxOpacity',0,'TextColor','white'));
im=im>0.6 % to sharpen the the blury inserted text
imshow(im);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!