#library(ExpImage)
#library(EBImage)
#Carregar imagem de exemplo
im=read_image(example_image(2),plot=FALSE)
im=resize_image(im,w = 300,plot = FALSE)
plot_image(im)
#Representado imagens em escalas de cinza
im2 = gray_scale(im,"r")
plot_image(im2)
if (FALSE) {
# Not run: Depende da interacao com uma interface grafica
#(It depends on interaction with a graphical interface).
#Utilizando uma paleta de cores para a melhor visualizacao
plot_image(im2,col=2)
plot_image(im2,col=3,axis=TRUE)
#########################################################
#########################################################
#' #' ########################################################
###' Abrindo o endereco de bandas de imagens de satelite
########################################################
end1=example_image(14) #Banda de azul
end2=example_image(15) #Banda de verde
end3=example_image(16) #Banda de vermelho
end4=example_image(17) #Banda de IR
end5=example_image(18) #Banda de SWIR
########################################################
###' Abrindo bandas de imagens de satelite
########################################################
B1=read_image(end1,plot=TRUE)
B2=read_image(end2,plot=TRUE)
B3=read_image(end3,plot=TRUE)
B4=read_image(end4,plot=TRUE)
B5=read_image(end5,plot=TRUE)
########################################################
###' Juntando as bandas em uma imagem
########################################################
im=join_bands(imgs = list(B1,B2,B3,B4,B5))
tif_info(im)
plot_image(im,r=3,g=2,b=1,rasterRGB=TRUE)
}
Run the code above in your browser using DataLab