Last data update: 2014.03.03

R: First-local lag
lagIngrayR Documentation

First-local lag

Description

This function can compute the lag of the first local on the auto-correlation function (acf) of smoothed grays.

Usage

lagIngray(image, acf = FALSE, ...)

Arguments

image

character or matrix. Either path of an image section or an array representing a gray matrix.

acf

logical. If TRUE the output is extended with the acf.

...

arguments to be passed to imageTogray.

Value

constant value of the first local on the acf of the smoothed gray. If acf is TRUE then the computed acf is added to the output (see linearDetect, and graySmoothed).

Author(s)

Wilson Lara, Carlos Sierra, Felipe Bravo

Examples

## (not run) Read one image sample in folder of package measuRing:
image1 <- system.file("P105_a.tif", package="measuRing")
##(not run) First local in the acf of smoothed grays:       
local1 <- lagIngray(image1,acf = TRUE)        
##(not run) Plot of first local over the acf: 
Flocal <- local1[['local']]
Clocal <- ts(local1[['acf']][Flocal,],start=Flocal)
acf <- ts(local1[['acf']],start=1)    
{plot(acf,type='h',col='gray',xlab='Lag',main='First local lag')
points(Clocal,pch=19,cex=0.5)}

Results