Code covered by the BSD License  

Highlights from
Automata Engineer 2010 NITK

image thumbnail

Automata Engineer 2010 NITK

by

 

29 Oct 2010 (Updated )

This code solves the problem statement of Automata Engineer 2010 NITK.

get_prop( are )
function [ cenar ] = get_prop( are )
%returns the property matrix of the arena in terms of area and centroid of 
%various objects 
%input- the filtered bw image of the arena
im_eroded=imerode(are,strel('square',3));
are3=imrotate(im_eroded,3);
[wall_lab,test]=bwlabel(are3,4);
imtool(wall_lab)
cenar=regionprops(wall_lab,'Centroid','Area');
end

Contact us