circle.pars | R Documentation |
Automatically determine the center and radius of a circular interferogram image.
circle.pars(im, fw=2, qt=0.995, excl=5,
plots=TRUE, details=FALSE)
im |
A matrix containing an image of a circular disk |
fw |
Amount to smooth image |
qt |
Threshold to accept an edge point, expressed as a quantile |
excl |
number of pixels around border of frame to exclude |
plots |
Plot edge candidates and fit? |
obstructed |
Logical: is there a central obstruction? |
This routine partially implements the Canny algorithm for edge detection. After optionally smoothing the input image the gradient is calculated using a Sobel filter, and edge pixels are identified by locating local maxima in the magnitude of the gradient.
The edge pixels with qt
percentile largest gradients
are passed to nlsrob
in package robustbase
lqs
in package MASS
to determine
robustly the best fit circle.
A list with the following components:
xc |
X coordinate of the center of the pupil |
yc |
Y coordinate of the center of the pupil |
rx |
Horizontal radius of the pupil |
ry |
Vertical radius of the pupil = rx |
obstruct |
Obstruction fraction (always = 0) |
This routine is only effective on modulation estimates, and will almost
certainly fail on interferogram images. Since data quality varies widely
considerable experimentation may be needed on any given image. Increasing
the smoothing parameter fw
helps to suppress artifacts. Depending
on how strong the actual edge is compared to artifacts qt
may need
to be either increased or decreased from the default value.
if details==TRUE
several more pieces of data are returned. This is
mostly for debugging purposes and may be eliminated in the future.
M.L. Peck mpeck1@ix.netcom.com
Many routines require the pupil parameters in the form returned by
circle.pars
. For example psifit
,
fftfit
, pupil
, etc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.