Last data update: 2014.03.03

R: High throughput phenotyping using scanCRAN
scanCRANR Documentation

High throughput phenotyping using scanCRAN

Description

This function is the core of the GiNA package which is in charge of reading the pictures find in the folder provided and perform the image segmentation in order to find the objects in the picture (i.e. fruits) and measure parameters such as area, perimeter, shape, volume, gray color, red, green and blue color.

Usage

scanCRAN(folder, cutoffvalue=NULL, minArea = NULL, 
        cores = 1, gray = TRUE, stand = c(0, 0), 
        fact = 0.25)

Arguments

folder

A path where the pictures are located

cutoffvalue

A scalar value (0-1) where the fruits are distinguishable from the background in the color scale handled by R which is 0-1. if not passed the function will determine the color of the background and assign the value of 0.08 if black and 0.6 if white. We highly recommend to use the cutoff function to find the optimum segmentation value which will determine the success of your experiment.

minArea

A scalar number indicating the minimum size in pixels for a real object in the picture to avoid the program to confuse some little trash with an object. The function cutoff can provide an idea of the sizes of real objects and noise. If not passed the argument uses minArea=(length/40)*(width/40), where length and width refers to the dimensions of the picture

cores

A scalar value indicating the number of cores that you want to use for parallelizing the function

gray

a TRUE/FALSE value indicating if the user want the color to bereturned in grayscale besides the RGB color

stand

a vector with 2 scalar values for width and length of your references

fact

a scalar value between 0-1 indicating at what extent the picture should be reduced in size in order to make computations faster, by default the pictures are sized at the 25 percent of their original size. If no reduction is required the user should set the argument to 1.

Details

In order to exploit the advantages of this function we highly recommend the users to determine the best cutoff value with the use of the cutoff function to achieve a good segmentation of the objects. The package is sensitive to the prescense of shades in the picture, for that reason we highly recommend the use of black background and reference circles in a clear color (i.e. white).

This is a rough idea of how you should take the pictures, where the circles are your references and the dots are your fruits. Your fruits shouldn't block the references and YOUR REFERENCES SHOULD BE ALWAYS ON THE SIDES OF YOUR PICTURE.

O . . . . O

O . . . . . O

O . . . . . O

For additional information such as tutorials and most recent releases please visit our website http://cggl.horticulture.wisc.edu/software/.

Value

If parameters are indicated correctly the function returns:

$x3

a list of dataframes, one for each picture provided. The dataframe contains the measurements for each object (rows) found in the puncture for the variables (columns) area, perimeter, length, width, shape (ratio of length/width), volume and red, green, blue, grey color.

References

We have spent valuable time developing this package, please cite it in your publication:

Diaz-Garcia L, Covarrubias-Pazaran G, Schlautman B, Zalapa J. GiNA: A flexible high throughput phenotyping tool. http://horticulture.wisc.edu/cggl/ZalapaLab/People.html. 2015.

Examples


library(GiNA)
data(GINA.sample) # RUN
writeImage(GINA.sample, "gina_cran.JPG") # RUN
folder <- getwd()
mydata <- scanCRAN(folder,cutoffvalue=0.5,cores=1, fact = 1) # RUN!!!

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GiNA)
Loading required package: EBImage
Loading required package: png
Loading required package: parallel
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GiNA/scanCRAN.Rd_%03d_medium.png", width=480, height=480)
> ### Name: scanCRAN
> ### Title: High throughput phenotyping using scanCRAN
> ### Aliases: scanCRAN
> 
> ### ** Examples
> 
> 
> library(GiNA)
> data(GINA.sample) # RUN
> writeImage(GINA.sample, "gina_cran.JPG") # RUN
> folder <- getwd()
> mydata <- scanCRAN(folder,cutoffvalue=0.5,cores=1, fact = 1) # RUN!!!

You are using 1 core(s) out of 4 available

Please monitor the progress of pictures analyzed at the folder:
    /home/ddbj/DataUpdator-rgm3/target/Pictures_analyzed 

> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>