Commit d728cf1c authored by jbferet's avatar jbferet
Browse files

- updated Rd files

- import check_data into perform_radiometric_filtering and perform_PCA
parent 99cec653
Meta
doc
.Rproj.user
.Rbuildignore
.Rhistory
......
......@@ -208,7 +208,7 @@ check_data <- function(Raster_Path, Mask = FALSE) {
if ((HDR$`wavelength units` == "nanometers") | (HDR$`wavelength units` == "Nanometers")) {
message("")
message("*********************************************************")
message(" All information seem OK for image processing ")
message(" Raster format OK for processing ")
message("*********************************************************")
message("")
}
......
......@@ -25,6 +25,9 @@
#' @return ImPathShade = updated shademask file
#' @export
perform_radiometric_filtering <- function(Image_Path, Mask_Path, Output_Dir, TypePCA = "SPCA", NDVI_Thresh = 0.5, Blue_Thresh = 500, NIR_Thresh = 1500, Blue = 480, Red = 700, NIR = 835) {
# check if format of raster data is as expected
check_data(Image_Path)
check_data(Mask_Path)
# define full output directory
Output_Dir_Full <- define_output_directory(Output_Dir, Image_Path, TypePCA)
# define dimensions of the image
......
......@@ -25,6 +25,9 @@
#' @return list of paths corresponding to resulting PCA files
#' @export
perform_PCA <- function(ImPath, ImPathShade, Output_Dir, Continuum_Removal = TRUE, TypePCA = "SPCA", FilterPCA = FALSE, Excluded_WL = FALSE, nb_partitions = 20, nbCPU = 1, MaxRAM = 0.25) {
# check if format of raster data is as expected
check_data(ImPath)
check_data(ImPathShade)
# define the path corresponding to image, mask and output directory
ImNames <- list()
ImNames$Input.Image <- ImPath
......
......@@ -7,9 +7,9 @@
check_data(Raster_Path, Mask = FALSE)
}
\arguments{
\item{Raster_Path}{full path for the raster to be converted}
\item{Raster_Path}{character. full path for the raster to be converted}
\item{Mask}{is the raster a mask?}
\item{Mask}{boolean. Set true if the raster is a mask}
}
\description{
Checks if the data to be processed has the format type expected
......
......@@ -9,19 +9,19 @@ map_spectral_species(Input_Image_File, Output_Dir, PCA_Files, ImPathShade,
nbCPU = 1, MaxRAM = FALSE)
}
\arguments{
\item{Input_Image_File}{Path and name of the image to be processed}
\item{Input_Image_File}{character. Path of the image to be processed}
\item{Output_Dir}{output directory}
\item{Output_Dir}{character. Path for output directory}
\item{PCA_Files}{path for PCA file}
\item{PCA_Files}{character. Path of the PCA image}
\item{ImPathShade}{path for shade file (= mask)}
\item{ImPathShade}{character. Path of the mask corresponding to the image}
\item{Pix_Per_Partition}{number of pixels for each partition}
\item{nb_partitions}{number of partition}
\item{TypePCA}{Type of PCA: "PCA" or "SPCA"}
\item{TypePCA}{character. Type of PCA: choose either "PCA" or "SPCA"}
\item{nbclusters}{number of clusters defined in k-Means}
......
......@@ -9,19 +9,19 @@ perform_PCA(ImPath, ImPathShade, Output_Dir, Continuum_Removal = TRUE,
nb_partitions = 20, nbCPU = 1, MaxRAM = 0.25)
}
\arguments{
\item{ImPath}{Path and name of the image to be processed}
\item{ImPath}{character. Path of the image to be processed}
\item{ImPathShade}{correponding shade mask}
\item{ImPathShade}{character. Path of the mask corresponding to the image}
\item{Output_Dir}{output directory}
\item{Output_Dir}{character. Path for output directory}
\item{Continuum_Removal}{boolean: should continuum removal be applied?}
\item{Continuum_Removal}{boolean. Set to TRUE if continuum removal should be applied}
\item{TypePCA}{Type of PCA: "PCA" or "SPCA"}
\item{TypePCA}{character. Type of PCA: choose either "PCA" or "SPCA"}
\item{FilterPCA}{boolean. If TRUE 2nd filtering based on PCA}
\item{FilterPCA}{boolean. Set to TRUE if 2nd filtering based on PCA is required}
\item{Excluded_WL}{boolean. Water Vapor Absorption domains (in nanometers). Can also be used to exclude spectific domains}
\item{Excluded_WL}{numeric. Water Vapor Absorption domains (in nanometers, min and max WL). Can also be used to exclude spectific domains. dims = N x 2 (N = number of domains to be eliminated)}
\item{nb_partitions}{numeric. Number of repetitions to estimate diversity from the raster (averaging repetitions).}
......
......@@ -9,25 +9,25 @@ perform_radiometric_filtering(Image_Path, Mask_Path, Output_Dir,
NIR_Thresh = 1500, Blue = 480, Red = 700, NIR = 835)
}
\arguments{
\item{Image_Path}{Path of the image to be processed}
\item{Image_Path}{character. Path of the image to be processed}
\item{Mask_Path}{Path of the mask corresponding to the image}
\item{Mask_Path}{character. Path of the mask corresponding to the image}
\item{Output_Dir}{output directory}
\item{Output_Dir}{character. Path for output directory}
\item{TypePCA}{Type of PCA: "PCA" or "SPCA"}
\item{TypePCA}{character. Type of PCA: choose either "PCA" or "SPCA"}
\item{NDVI_Thresh}{NDVI threshold applied to produce a mask (select pixels with NDVI>NDVI_Thresh)}
\item{NDVI_Thresh}{numeric. NDVI threshold applied to produce a mask (select pixels with NDVI>NDVI_Thresh)}
\item{Blue_Thresh}{Blue threshold applied to produce a mask (select pixels with Blue refl < Blue_Thresh --> filter clouds) refl expected between 0 and 10000}
\item{Blue_Thresh}{numeric. Blue threshold applied to produce a mask (select pixels with Blue refl < Blue_Thresh --> filter clouds) refl expected between 0 and 10000}
\item{NIR_Thresh}{NIR threshold applied to produce a mask (select pixels with NIR refl < NIR_Thresh) refl expected between 0 and 10000}
\item{NIR_Thresh}{numeric. NIR threshold applied to produce a mask (select pixels with NIR refl < NIR_Thresh) refl expected between 0 and 10000}
\item{Blue}{central wavelength corresponding to the blue spectral band (in nanometers)}
\item{Blue}{numeric. central wavelength corresponding to the blue spectral band (in nanometers)}
\item{Red}{central wavelength corresponding to the red spectral band (in nanometers)}
\item{Red}{numeric. central wavelength corresponding to the red spectral band (in nanometers)}
\item{NIR}{central wavelength corresponding to the NIR spectral band (in nanometers)}
\item{NIR}{numeric. central wavelength corresponding to the NIR spectral band (in nanometers)}
}
\value{
ImPathShade = updated shademask file
......
......@@ -11,7 +11,7 @@ raster2BIL(Raster_Path, Sensor = "unknown", Output_Dir = FALSE,
\arguments{
\item{Raster_Path}{character. Full path for the raster to be converted}
\item{Sensor}{character. Name of the sensor}
\item{Sensor}{character. Name of the sensor. a .hdr template for the sensor should be provided in extdata/HDR}
\item{Output_Dir}{character. Path to output directory.}
......
......@@ -8,15 +8,15 @@ select_PCA_components(Input_Image_File, Output_Dir, PCA_Files,
TypePCA = "SPCA", File_Open = FALSE)
}
\arguments{
\item{Input_Image_File}{path for image to be processed}
\item{Input_Image_File}{character. Path of the image to be processed}
\item{Output_Dir}{output directory}
\item{Output_Dir}{character. Path for output directory}
\item{PCA_Files}{path of PCA files}
\item{PCA_Files}{character. Path of the PCA image}
\item{TypePCA}{Type of PCA: "PCA" or "SPCA"}
\item{TypePCA}{character. Type of PCA: choose either "PCA" or "SPCA"}
\item{File_Open}{Boolean. automatically opens file if TRUE}
\item{File_Open}{Boolean. Set to TRUE for file to open automatically}
}
\value{
nothing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment