Can't view binary image
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Praveen Reddy
am 14 Apr. 2023
Bearbeitet: Praveen Reddy
am 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 Kommentar
Mesho
am 14 Apr. 2023
Kategorien
Mehr zu Images finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
