function particles = find_particles(obj, img)
	% find particles in an image, using detection parameters defined in
	% obj.opts
	% 
	% Input:
	%	img			n_i x n_j array,
	%		image to search
	%	mask		n_i x n_j logical array
	%		optional: boolean image mask
	%		exclude regions where mask is true
	%
	% Output:	
	%	particles	1 x n_p structure array
	%	has the following minimum fields
	%		centroid - image space coordinate of particle centroid
	%	with additional optional fields
	%		intens  - brightness/intensity of particle (a.u.)
	%		radius  - radius of spherical particle
	%		dx		- orientation/length of rod-like particle
	%		length  - length of rod like particle

	

	%% extract relevant parameters
	% camera coordinate system
	camera = obj.setup.camera;
	i_axis = camera(1).i_axis;
	j_axis = camera(1).j_axis;
	% particle matching options
	mopts  = obj.opts.matching;
	n_i	   = length(i_axis);
	n_j	   = length(j_axis);

	%% detection based on different algorithms
	if strcmp(mopts.algorithm, 'hough')
		% circle detection based on Hough transform
		particles = find_circles(i_axis, j_axis, img, mopts.circle);
	elseif strcmp(mopts.algorithm, 'template')
		% particle detection based on template matching
		mask	  = mopts.template.mask_fun(img);
		particles = find_template(i_axis, j_axis, img, mopts.template.kernel, mopts.template.threshold, mask);
	elseif strcmp(mopts.algorithm, 'steerable')
		% rod-like particle detection using steerable filter
		particles = find_rods(i_axis, j_axis, img, mopts.steerable);
	else
		error('unrecognised particle finding algorithm');
	end
