filter to get sharp edges with bwboundaries

1 view (last 30 days)
Justin
Justin on 21 Mar 2012
I have double image of optical densities. I want to create boundaries around areas of greater optical density.
Basically straight from MATLAB help:
opticalDensity=.1; BW = Img>opticalDensity; BW_filled = imfill(BW,'holes'); boundaries = bwboundaries(BW_filled);
for k=1:length(boundaries) b = boundaries{k}; plot(b(:,2),b(:,1),color,'LineWidth',1); end
I get sharp edges right on the boundaries of the region but then fades off to scattered individual pixels as you get farther away.
I am thinking of creating a "rule" where the boundary only exists where there are at least X amount (maybe 3) of pixels together that meet the criteria.
Any suggestions?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!