Code covered by the BSD License  

Highlights from
Image segmentation using statistical region merging

image thumbnail

Image segmentation using statistical region merging

by

Sylvain Boltz (view profile)

 

20 Oct 2009 (Updated )

Very simple and fast image segmentation code using statistical region merging.

srm_getborders(map)
function borders = srm_getborders(map)

dx = conv2(map, [-1 1], 'same');
dy = conv2(map, [-1 1]', 'same');
dy(end,:) = 0; % ignore the last row of dy
dx(:,end) = 0; % and the last col of dx
borders = find(dx ~= 0 | dy ~= 0);

Contact us