Add the metadata to the DJI image in order to have a single georeferenced image

42 views
Skip to first unread message

Alexandre Santos (ASANTOS)

unread,
Jan 2, 2023, 2:38:39 PM1/2/23
to FIELDimageR: A R package to analyze orthomosaic images from field trials.

Hi Everyone!

#In my example, I have a single dji image in *JPG:

library(terra) single.image <-stack("https://github.com/Leprechault/trash/raw/main/DJI_0274.JPG") plotRGB(single.image, r = 3, g = 2, b = 1, stretch = "lin") # class : RasterStack # dimensions : 3648, 4864, 17743872, 3 (nrow, ncol, ncell, nlayers) # resolution : 1, 1 (x, y) # extent : 0, 4864, 0, 3648 (xmin, xmax, ymin, ymax) # crs : NA # names : DJI_0274_1, DJI_0274_2, DJI_0274_3

#and the correspond Metadata in *jgw file:

single.image.mtd <- read.table("https://github.com/Leprechault/trash/raw/main/DJI_0274.jgw", header = FALSE) single.image.mtd # V1 # 1 -3.532000e-07 # 2 2.600000e-09 # 3 3.100000e-09 # 4 2.976000e-07 # 5 -5.170865e+01 # 6 -1.973617e+01

I'd like to know if is possible to add the metadata to the image in order to have a single georeferenced image
and save it in *tif format using FIELDimageR package?

Thanks in advance!

Alexandre

fmatias

unread,
May 13, 2023, 12:24:44 PM5/13/23
to FIELDimageR: A R package to analyze orthomosaic images from field trials.
Hey Alexandre,

What about using fieldPolygon() to create a shapefile with extend=T? In this case, you can build a data frame with all information that you want to connect with this polygon.shape that will be associated with your image.


Hope it helps,
Filipe

Reply all
Reply to author
Forward
0 new messages