Can't view binary image
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Praveen Reddy
el 14 de Abr. de 2023
Editada: Praveen Reddy
el 14 de Abr. de 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 comentario
Mesho
el 14 de Abr. de 2023
Categorías
Más información sobre Images en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
