clear all; clc; I = imread('2.png'); threshold = graythresh(I); originalImage = im2bw(I, threshold); i = bwareaopen(originalImage,70); TI = imfill(i, 'holes'); imshow(TI)
I want to detect only the strip which is on object.?
This code not works.
Is there any other method or modification..?
Don't use graythresh(). Pick your own threshold, perhaps using my interactive thresholding function http://www.mathworks.com/matlabcentral/fileexchange/29372-thresholding-an-image that's in my File Exchange.