Can't view binary image
Afficher commentaires plus anciens
Dear all, I couldn't view the binary image after runing this code
fab_img = imread('fabric.png');
Img = rgb2gray(fab_img);
BW1 = edge(Img,'sobel');
figure (500)
fig500 = gcf;
ax2 = subplot(1,1,1, 'Parent', fig500);
image(ax2, (BW1));
Any idea how to solve it without using imshow function?
Meshoo
Réponse acceptée
Plus de réponses (1)
Praveen Reddy
le 14 Avr 2023
Modifié(e) : Praveen Reddy
le 14 Avr 2023
Hi Mustafa,
I understand that you want to display binary image in a figure. You can use "imshow" method to display binary image.Refer to the following modified code.
fab_img = imread('fabric.png');
Img = rgb2gray(fab_img);
BW1 = edge(Img,'sobel');
figure (500)
fig500 = gcf;
ax2 = subplot(1,1,1, 'Parent', fig500);
imshow(BW1);
To know more about "imshow" method, please refer to the following MATLAB documentation
1 commentaire
Mesho
le 14 Avr 2023
Catégories
En savoir plus sur Images dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
