forked from OpenDroneMap/FIELDimageR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfieldShape.Rd
52 lines (52 loc) · 1.94 KB
/
fieldShape.Rd
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
\name{fieldShape}
\alias{fieldShape}
\title{
Building the plot shape file
}
\description{
The user should select the four experimental field corners and the shape file with plots will be automatcly built using a grid with the number of ranges and rows. Attention: The base of image should be parallel to axis X, please use first the function fieldRotate().
}
\usage{
fieldShape(mosaic,ncols=10,nrows=10,nPoint=4,fieldMap=NULL,fieldData=NULL,ID=NULL,plot=T,fast.plot=F)
}
\arguments{
\item{mosaic}{
object of class stack obtained from function fieldRotate() with the base of image parallel to axis X.
}
\item{ncols}{
number of ranges.
}
\item{nrows}{
number of rows.
}
\item{nPoint}{
number of points necessary to select field boundaries or area to remove (4 >= nPoint <= 50).
}
\item{fieldMap}{
matrix with plots ID identified by rows and ranges, please use first the funsction fieldMap().
}
\item{fieldData}{
data frame with plot ID and all attributes of each plot (Traits as columns and genotypes as rows).
}
\item{ID}{
name of plot ID in the fieldData file to combine with fieldShape.
}
\item{plot}{
if is TRUE the crop image and fieldShape will be plotted.
}
\item{fast.plot}{
if TRUE only the grey scale image will be plotted as reference (faster approach).
}
}
\details{
The function returns the fieldShape format SpatialPolygonsDataFrame with plots numbered from left to right and top to bottom, and a new reduced image with format stack. The fieldMap can be used to identify the plot ID.
}
\value{
List with fieldShape format SpatialPolygonsDataFrame and experimental field image with format stack.
}
\references{
Matias FI, Caraza-Harter MV, Endelman JB. FIELDimageR: An R package to analyze orthomosaic images from agricultural field trials. The Plant Phenome J. 2020;e20005. https://doi.org/10.1002/ppj2.20005
}
\examples{
##see Vignette at https://github.com/filipematias23/FIELDimageR
}