circle.pars: Pupil parameters

View source: R/circle.pars.r

circle.parsR Documentation

Pupil parameters

Description

Automatically determine the center and radius of a circular interferogram image.

Usage

circle.pars(im, fw=2, qt=0.995, excl=5, 
    plots=TRUE, details=FALSE)

Arguments

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?

Details

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.

Value

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)

Note

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.

Author(s)

M.L. Peck mpeck1@ix.netcom.com

See Also

Many routines require the pupil parameters in the form returned by circle.pars. For example psifit, fftfit, pupil, etc.


mlpeck/zernike documentation built on April 19, 2024, 3:16 p.m.