Image Process in R