Hi everyone..i have problem on how to detect the glass bottle by using edge detection method.
As a result..i cant get clear line of the glass bottle mouth and body.. can someone help by checking my code?
this is my code:
I=imread('red5.jpg');
figure, imshow(I);
threshold = graythresh(I);
bw1 = im2bw(I,threshold);
figure, imshow(bw1);
bw2 = bwareaopen(bw1,30);
se = strel('disk',4);
bw3 = imtophat(bw2,se);
figure, imshow(bw3);
d = edge(bw3,'sobel');
figure, imshow(d);
i still new with matlab..any very greatful for those who are helping me..
Best Answer