Description Usage Arguments Details Value Author(s) Examples
View source: R/calculateMeanStdTarget.R
Mean and SD calculation
1 | calculateMeanStdTarget(imgT)
|
imgT |
the Image to calculate. |
Mean and SD
Vector with mean and standard deviation.
Henrik Failmezger, failmezger@cip.ifi.lmu.de
1 2 3 4 5 6 7 8 9 10 11 12 | #read the target image
f1= system.file("extdata", "exImg2.jpg", package="CRImage")
targetImage=readImage(f1)
#read the image whose color values should be adapted
f2= system.file("extdata", "exImg3.jpg", package="CRImage")
imgToConvert=readImage(f2)
#calculate mean and standard deviation of target color channels
mst=calculateMeanStdTarget(targetImage)
# create a white pixel mask
whitePixelMask=imgToConvert[,,1]>0.85 & imgToConvert[,,2]>0.85 & imgToConvert[,,3]>0.85
#adapt color channels of image
imgCorrected=colorCorrection(imgToConvert,mst,whitePixelMask)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.