pro find_center,image,xc,yc ; This procedure calculates the centroid PIXEL position (xc,yc) ; for a circular image contain within a rectangular byte array. s = size(image) xdim = s(1) ydim = s(2) ;window,2,xsi=xdim,ysi=ydim ;tv,image centroid,rotate(image,1),ydim,xdim,xc centroid,image,xdim,ydim,yc xc = xc+2 yc = yc+2 ;image0 = image ;image0(*,yc)=255 ;image0(xc,*)=255 ;window,0,xsi=xdim,ysi=ydim ;tv,image0 end