[RS-ecology] Fwd: Help on Image Merge Issues

Adebola Hassan hassanadebola89 at gmail.com
Wed Mar 13 13:50:07 CET 2019


Hello Forum,

I am trying to merge a few tiff images (each has 4 bands) in R and It was
partly successful.

However a look (in QGIS) at the merged output revealed some sort of
radiometric distortions in the output file.

The output/merged file has significant brightness in many portions of the
image.

I would appreciate help in this regard.

Please find below my source code in R.

I sent this request on 11/01/2019, perhaps the images i attached did not
allow for its approval to the forum.

I think images exceeded the accepted size for posting to the Forum, hence,
my not attaching it in this email.

Thank You.

Adebola Hassan

#Rcode
#list all tif files in working directory
all_tiff_list = list.files(".", pattern = "tif", full.names = T)

#plot first img only
all_tiff_imgs1 = stack(all_tiff_list[1])
plot(all_tiff_imgs1)

#merge and plot first and second tiff file
all_tiff_imgs2 = stack(all_tiff_list[2])
tiff_merge_1_2 = merge(all_tiff_imgs1, all_tiff_imgs2)
plot(tiff_merge_1_2)

#merge and plot all tiff files
img_list = list()
for (i in 1:length(all_tiff_list)) {
  img_list[i] = stack(all_tiff_list[i])
}

img_list$filename <- 'test.tif'
img_list$overwrite <- T
all_img_merge = do.call(merge, img_list)
plot(all_img_merge)
ggRGB(all_img_merge, r = 1, g = 2, b = 3)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-wuerzburg.de/pipermail/rs-ecology/attachments/20190313/61d7b9c5/attachment.html>


More information about the RS-ecology mailing list