Description Usage Value Author(s) Examples
Input data must be in matrix where the length of the matrix is 3 (rows, columns, three arrays) each of the three arrays is the R, G and B values Returns RDS data of the input
1 | apply_threshold(raw_data)
|
Return matrix with applied threshold
Ibrahim Bello, ibb4u2006@yahoo.com
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 | ## To process raw image
raw_image <- readJPEG('path to image')
## Apply threshold to the raw image data
apply_threshold(raw_data = raw_image)
## To find the distribution of blues
threshold_data <- apply_threshold(raw_data = raw_image)
blue_distribution(thresh_data = threshold_data)
## To plot the fractions of blue (all, dark blue, medium blue or light blue)
## color accross the depth of the raw image
threshold_data <- apply_threshold(raw_data = raw_image)
By default blue_selections = 'all' for all blue fractions
blue_selections = 'dark blue' for dark blue fractions
blue_selections = 'medium blue' for medium blue fractions
blue_selections = 'light blue' for ligth blue fractions
Export the plot to your local disk
my_plot <- file.path("path to save the plotted image")
depth_blue_fractions(thresh_data = threshold_data, blue_selections = 'all', plot_path = my_plot)
#' ## To plot the fractions of blue (all, dark blue, medium blue or light blue)
## color accross the length of the raw image
threshold_data <- apply_threshold(raw_data = raw_image)
By default blue_selections = 'all' for all blue fractions
blue_selections = 'dark blue' for dark blue fractions
blue_selections = 'medium blue' for medium blue fractions
blue_selections = 'light blue' for ligth blue fractions
Export the plot to your local disk
my_plot <- file.path("path to save the plotted image")
length_blue_fractions(thresh_data = threshold_data, blue_selections = 'all', plot_path = my_plot)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.