close all; clear all; clc;

id = 20;
filename = ['IMAGES/IM_', num2str(id), '.png'];
M = imread(filename);
figure, image(M);
B = im2bw(M);
figure, imagesc(B);
B_1 = bwmorph(B, 'skeletonize');
figure, imagesc(B_1);
