Given a surface matrix, estimates and filters any pixels within the estimated firing pin impression circle

preProcess_removeFPCircle(
x3p,
aggregationFunction = mean,
smootherSize = 2 * round((0.1 * nrow(surfaceMat)/2)) + 1,
gridSize = 40,
gridGranularity = 1,
houghScoreQuant = 0.9
)

## Arguments

x3p

an x3p object containing a surface matrix

aggregationFunction

smootherSize

size of average smoother (to be passed to zoo::roll_mean)

gridSize

size of grid, centered on the initial radius estimate, to be used to determine the best fitting circle to the surface matrix via the Hough transform method

gridGranularity

granularity of radius grid used to determine the best fitting circle to the surface matrix via the Hough transform method

houghScoreQuant

quantile cut-off to be used when determining a final radius estimate using the score values returned by the imager::hough_circle

## Value

An x3p object containing a surface matrix with the estimated firing pin circle pixels replaced with NAs.

## Note

imager treats a matrix as its transpose (i.e., x and y axes are swapped). As such, relative to the original surface matrix, the x and y columns in the data frame fpImpressionCircle actually correspond to the row and column indices at which the center of the firing pin impression circle is estiamted to be.

## Examples

if (FALSE) {

preProcess_crop(region = "exterior",
preProcess_crop(region = "interior",
preProcess_removeTrend(statistic = "quantile",
tau = .5,
method = "fn")