## Not run:
# samplePics <- c('fruits', 'pastel_color', 'sample1', 'TurnColorsGrayImage1', 'TurnColorsGrayImage2')
# for (pics in samplePics)
# {
# fname<-paste(system.file(package='CVD'),'/extdata/',pics,'.png',sep='')
# imgTest<-loadPNG(fname)
# g1<-greyscale.avg(imgTest)
# png::writePNG(g1, paste(pics, '.greyscale.avg.png',sep=''))
# }
#
# imgTest<-loadPNG(fname)
# g1<-greyscale.avg(imgTest)
# png::writePNG(g1, paste(pics, '.greyscale.avg.png',sep=''))
# g1<-greyscale.BT709(imgTest)
# png::writePNG(g1, paste(pics, '.BT709.png',sep=''))
# g1<-greyscale.Linear(imgTest)
# png::writePNG(g1, paste(pics, '.Linear.png',sep=''))
# g1<-greyscale.Luminosity(imgTest)
# png::writePNG(g1, paste(pics, '.Luminosity.png',sep=''))
# g1<-greyscale.RMY(imgTest)
# png::writePNG(g1, paste(pics, '.RMY.png',sep=''))
# g1<-greyscale.Y(imgTest)
# png::writePNG(g1, paste(pics, '.Y.png',sep=''))
#
# ## End(Not run)
Run the code above in your browser using DataLab