Description Usage Arguments Details Value Methods (by class) See Also Examples
Helper function to generate a new
CanopyPhoto
. Only support JPEG and TIFF format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | loadPhoto(
x,
upperLeft = NULL,
width = NULL,
height = NULL,
equipment = NULL,
fisheye = NULL,
datetime = NULL,
geoLocation = NULL,
bearing = NULL,
elevation = NULL,
slope = NULL,
exposureTime = NULL,
fNumber = NULL,
isoSpeed = NULL
)
## S4 method for signature 'character'
loadPhoto(
x,
upperLeft = NULL,
width = NULL,
height = NULL,
equipment = NULL,
fisheye = NULL,
datetime = NULL,
geoLocation = NULL,
bearing = NULL,
elevation = NULL,
slope = NULL,
exposureTime = NULL,
fNumber = NULL,
isoSpeed = NULL
)
## S4 method for signature 'missing'
loadPhoto(x)
|
x |
character or missing. |
upperLeft |
numeric of length |
width |
integer. Default is |
height |
integer. Default is |
equipment |
one-length character. Default is |
fisheye |
|
datetime |
one-length character. Default is |
geoLocation |
|
bearing |
|
elevation |
|
slope |
|
exposureTime |
numeric. Default is |
fNumber |
numeric. Default is |
isoSpeed |
numeric. Default is |
To make a photograph ready to process with caiman
package,
use loadPhoto
with a path to the file as argument, this
creates a new CanopyPhoto
. To load only a region of
the file use upperLeft
, width
and height
, both in
pixels (these must be equals if you are loading a hemispherical photograph).
To get the upperLeft corner of your region of interest, I recommend use
ImageJ or
IrfanView.
To get an example of a CanopyPhoto
, run
loadPhoto()
. This data-example is an hemispherical photograph taken
in a Nothofagus pumilio forest, in Argentina. To know what equipment
was used to take it, use equipment
. To know when it was
taken, use datetime
. To know where it was taken, use
geoLocation
. To know how the camera was physically oriented use
bearing
, slope
and fisheye
.
To know the exposure use exposureTime
,
fNumber
and isoSpeed
. The metadata of a new
CanopyPhoto could be provided as arguments for loadPhoto
, but also
can be set for an existing object using replacement methods (see examples).
CanopyPhoto
.
character
: You need to provide the path to a file. For a file stored in the
working directory, just provide filename. Always include file extension.
missing
: Return a data-example (see details).
cloneSlots
, doMask
, calcExposure
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | x <- loadPhoto() # or use a path to a file on your disk
x
plot(x)
path <- system.file("external/UnFavAutoE3.jpg", package="caiman")
# You can also set all or any slots
x <- loadPhoto(path, equipment = "some string", fisheye = newFishEye(),
datetime = "2000/01/01 12:00:00",
geocode = SpatialPoints(cbind(-43, -71)),
bearing = asAngle(0), elevation = asAngle(90))
x
plot(x)
path <- system.file("external/Black_caiman_Macrofotografie_2.jpg",
package="caiman")
x <- loadPhoto(path)
x
plot(x)
x <- loadPhoto(path, upperLeft = c(49, 29), width = 140, height = 81)
x
plot(x)
# this is what upperLeft means in hemispherical photographs:
x <- extend(makeRimage(200), extent(-50, 250, -20, 220))
extent(x) <- extent(0, ncol(x), 0 , nrow(x))
e <- extent(50, 250, 20, 220)
plot(is.na(x), legend = FALSE, axes = FALSE, box = FALSE,
xlab = "240 px", ylab = "300 px")
plot(e, add = TRUE)
text(sp::SpatialPoints(cbind(50, 220)), "upperLeft = c(20, 50)", col = "white")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.