From: Jessica Baird on 18 Feb 2010 14:15 I am working with points from the bwtraceboundary function I used on a binary image. I want to remove some points from this data because we don't want to see this data when plotted back on the image. The values are the least position vertically (b) and the furthest position horizontally (a) which both create a straight line. Here is the code: bound = bwtraceboundary(newIm, [row, col], 'N'); a = max(bound(:,2)); b = min(bound(:,1)); count =1; while count<size(bound,1) count; if bound(count, 1) == b bound(count,:) = []; elseif bound(count, 2) == a bound(count,:) = []; end count = count +1; end This code is being ran on several images and will be saved. The code will only remove a few points but leave the rest. Can someone help me? Thanks!
|
Pages: 1 Prev: BIG PROBLEM! Input of APPLYCFORM is not finite Next: Rate Limiter issue with 2007b |