doMask: Do a mask for hemispherical photographs given angle...

Description Usage Arguments Details Value Methods (by class) References See Also Examples

Description

Do a mask for hemispherical photographs given angle restrictions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
doMask(x, z, previousMask = NULL, a = makeAimage(x), zlim = NULL, alim = NULL)

## S4 method for signature 'ZenithImage'
doMask(x, previousMask, a, zlim, alim)

## S4 method for signature 'CanopyPhoto'
doMask(x, z)

## S4 method for signature 'RelativeRadiusImage'
doMask(x)

Arguments

x

ZenithImage or CanopyPhoto.

previousMask

BinImage. Default is NULL.

a

AzimuthImage.

zlim

Angle. Set the zenith angle range with inclusive limits.

alim

Angle. Set the azimuth angle range with inclusive limits.

y

todo

Details

The intervals are closed on the right and on the left.

Todo: explain previousMask behavior.

Value

BinImage.

Methods (by class)

References

Schneider, D., Schwalbe, E., Maas, H.-G., 2009. Validation of geometric models for fisheye lenses. ISPRS J. Photogramm. Remote Sens. 64, 259-266.

See Also

makeZimage, makeAimage.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
x <- loadPhoto()
z <- makeZimage(ncol(x), lensPolyCoef(c(0.9192, -0.1792, -0.000443)))
m <- doMask(z, zlim = asAngle(c(30, 60)))
plot(m)

m <- doMask(z, zlim = asAngle(c(30, 60)), alim = asAngle(c(0, 90)))
plot(m)

plot(x[m, drop = FALSE])

# for fullframe hemispherical photos
path <- system.file("external/DSC_2881.jpg", package="caiman")
x <- loadPhoto(path)
### declaring it as a fullframe
fisheye(x) <- newFishEye(TRUE, TRUE, TRUE)

m <- doMask(x, z)
plot(m)

m <- doMask(z, previousMask = m, zlim = asAngle(c(30, 60)),
                                                    alim = asAngle(c(0, 90)))
plot(m)

GastonMauroDiaz/caiman documentation built on Jan. 22, 2022, 4:43 a.m.