Can't view binary image
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Praveen Reddy
il 14 Apr 2023
Modificato: Praveen Reddy
il 14 Apr 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 Commento
Mesho
il 14 Apr 2023
Categorie
Scopri di più su Images in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
