Learn R Programming

measuRing (version 0.5.1)

lagIngray: 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, 
    ...)

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).

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.

Author

Wilson Lara <wilarhen@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-3527-1380>), Carlos Sierra [aut] (<https://orcid.org/0000-0003-0009-4169>), Felipe Bravo [aut] (<https://orcid.org/0000-0001-7348-6695>)

Examples

Run this code
## (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)}

Run the code above in your browser using DataLab