Re: Image analysis and ring identification [message #30343 is a reply to message #30311] |
Fri, 19 April 2002 00:14   |
Karsten Rodenacker
Messages: 98 Registered: July 1997
|
Member |
|
|
Without proposing completly ready written routines. Maybe you do:
1. Contour with path_xy on you (binary) image. You get pathes for the
outer and inner border (thers is a flag in path_info)
2. Take the outer border path say xy from one 'ring' and calculate a
normalized contour path, by:
nxy=fft_norcur(xy,centr=av,size=sz,perim=p)
as far as I remind me in av you will find the centroid coordinates, in
sz the radius and in p the perimeter.
FUNCTION sh_dist, xy
L = sqrt(sh_diff(reform(xy[0, *]))^2+ $
sh_diff(reform(xy[1, *]))^2)
return,L
end
FUNCTION fft_norcur, xy, CENTROID=cav, FACTOR=av, SIZE=sz, PERIMETER=p
dim=(size(xy))[1]
n=(size(xy))[2]
d=sh_dist(xy)
vd=fltarr(dim,n)
FOR i=0,dim-1 DO vd[i,*]=d
cav=total(xy*vd,2)/total(vd,2)
oxy=xy
oxy[0,*]=reform(xy[0,*])-cav[0]
oxy[1,*]=reform(xy[1,*])-cav[1]
p=total(d)
tt=oxy[0,*]^2+oxy[1,*]^2
sz=sqrt(total(tt))
av=total(sqrt(tt)*d)/p
return,oxy/av
END
Regards
Rachel Pepper wrote:
> I am a fairly new IDL user trying to use image analysis to determine
> particle positions in my images. After filtering the images, they
> appear to be bright rings around a dark center. I was wondering if
> anyone knew a routine to fit these sorts of images to a circle so that
> the center of the ring could be determined. Thanks for any help!
>
> Rachel
>
>
--
Karsten Rodenacker ()
------------------------------------------------------------ -------------:-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Tel: +49 89 31873401 | FAX: ...3369 | rodena@gsf.de |
Karsten@Rodenacker.de
http://www.gsf.de/ibb/homepages/rodenacker
|
|
|