Even not required, the average value area in pixels for the objects analyzed is a parameter of interest when the objects to be analyzed are particularly small such as seeds or extremely small fruits. Therefore, the use of this function provides a plot of the are in pixels for all the objects in the picture for a given cutoff value provided. Once the value has determined this can be provided to the scanCRAN function in the argument 'minArea' to make the function perform faster.
A scalar value where the fruits are distinguishable from the background in the color scale handled by R which is 0-1
A scalar value indicating the number of cores that you want to use for parallelizing the function
size of the square to brush smaller objects from the picture
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.
If parameters are indicated correctly the function returns:
a plot showing the size of different objects in the picture in number of pixels.
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.
data(GINA.sample) # RUN
writeImage(GINA.sample, "gina_cran.JPG") # RUN
folder <- getwd() # RUN
area <- pixArea(folder,cutoffvalue=0.5,cores=1) # RUN!!!
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.
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/pixArea.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pixArea
> ### Title: Finding the average area in pixels for objects
> ### Aliases: pixArea
> ### ** Examples
> data(GINA.sample) # RUN
> writeImage(GINA.sample, "gina_cran.JPG") # RUN
> folder <- getwd() # RUN
> area <- pixArea(folder,cutoffvalue=0.5,cores=1) # RUN!!!
You are using 1 core(s) out of 4 available
Minimum values were found at 52 pixels (see the plot).
Please use an approximate value as a minimum area when using the scancran function.
Created & Maintained by Osamu Ogasawara (firstname.lastname@example.org) and