any suggestion how to enhace the image edges clearly?
I = imread('317.jpg');
% A = rgb2gray(I2);
figure;
imshow(I)
title('Original Image')
%%
%Gaussian LPF
F = fspecial('gaussian');
G = imfilter(I,F);
figure(5),imshow(G);title('G Image');
%%
bw = im2bw(G,0.35);
figure(4),imshow(bw)
kernel = -1*ones(1);
kernel(2,2) = 4;
enhancedImage = imfilter(bw, kernel);
figure(6),imshow(enhancedImage);title('enhancedImage Image');
D = im2uint8(enhancedImage);
I2 = imcrop(D,[50 68 130 112]);
figure;
imshow(I2)
r = drawrectangle;
mask = createMask(r);
bw2 = activecontour(I2,mask,30,'Chan-Vese');
hold on;
visboundaries(bw2,'Color','r');
figure
imshow(labeloverlay(I2,bw2));
imshow(bw2);