library(png) #get the file names of cover files lf=list.files(pattern=".png") #sort them in increasing order (initial sorting is lexicographic) indx=order(as.integer(sapply(lf,function(x){strsplit(x,"-",fixed=T)[[1]][1]}))) lf=lf[indx] A=array(0,dim = c(630,420,3)) for(f in lf){ tmp=readPNG(f) A=A+tmp } A=A/length(lf) writePNG(A,"average.png")
Labels: Visualization