I have a series of images that were taken with MicaSense RedEdge sensor attached to a UAV. My final goal is to input these images into mapping software (ArcMap, ENVI or QGIS) and be able to do stuff with it. However, the problem that I am facing is that in my work flow, I am not accounting for the true orientation of the image, so when importing any of these images into ArcMap, ENVI or QGIS, they don't correspond to the base map.

enter image description here

Here is my work flow -

  1. The raw images that I get from my sensor are only georeference at the true centroid. For that reason, using the fields of views, image dimension (width and height), elevation of my mission and true centroid coordinates I have calculated the Top Center, Top Bottom, Right Center and Left Center coordinates.

Here is the metadata that is recorded in each image:

FileName <chr>, 
Directory <chr>,
FileSize <int>,
FileModifyDate <chr>,
FileAccessDate <chr>,
FileInodeChangeDate <chr>,
FilePermissions <int>,
FileType <chr>, 
FileTypeExtension <chr>,
MIMEType <chr>, 
ExifByteOrder <chr>, 
SubfileType <int>, 
ImageWidth <int>, 
ImageHeight <int>, 
BitsPerSample <int>,
Compression <int>, 
PhotometricInterpretation <int>, 
Make <chr>, 
Model <chr>, 
StripOffsets <chr>, 
Orientation <int>, 
SamplesPerPixel <int>,
RowsPerStrip <int>, 
StripByteCounts <chr>, 
PlanarConfiguration <int>,
Software <chr>, 
ModifyDate <chr>, 
XMPToolkit <chr>,
About <chr>, 
CentralWavelength <int>, 
BandName <chr>,
WavelengthFWHM <int>, 
BandSensitivity <dbl>, 
RigCameraIndex <int>, 
Yaw <dbl>, 
Pitch <dbl>, 
Roll <dbl>, 
ExposureTime <dbl>, 
FNumber <dbl>, 
ExposureProgram <int>, 
ISOSpeed <int>, 
ExifVersion <chr>,
DateTimeOriginal <chr>, 
CreateDate <chr>, 
MeteringMode <int>, 
FocalLength <dbl>, 
FocalPlaneXResolution <dbl>,
FocalPlaneYResolution <dbl>, 
FocalPlaneResolutionUnit <int>, 
SerialNumber <int>, 
GPSVersionID <chr>, 
GPSLatitudeRef <chr>, 
GPSLongitudeRef <chr>, 
GPSAltitudeRef <int>, 
GPSDOP <int>, 
BlackLevelRepeatDim <chr>,
BlackLevel <chr>, 
Aperture <dbl>, 
GPSAltitude <dbl>, 
GPSLatitude <dbl>, 
GPSLongitude <dbl>, 
GPSPosition <chr>,
ImageSize <chr>, 
Megapixels <dbl>, 
ScaleFactor35efl <dbl>, 
ShutterSpeed <dbl>, 
CircleOfConfusion <chr>, 
FOV <dbl>,
FocalLength35efl <dbl>, 
HyperfocalDistance <dbl>
  1. Once all the coordinates were calculated, I wrote all of those coordinates in each image and assign them a projection (the projection that I am using is +proj=utm +zone=15 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0).

Here is my code for this portion:

coordinate.one.Image<-read.csv("...", header = TRUE)

list.pics <- list.files(path = "...", pattern = "*.tif", full.names = TRUE)

Img.Raster <- list()
for (k in 1:length(list.pics)){
  Img.Raster[[k]] <- raster(list.pics[k])
  extent(Img.Raster[[k]])=c(coordinate.one.Image$CenterLeftx[[k]], coordinate.one.Image$CenterRightx[[k]],
                            coordinate.one.Image$CenterBottomy[[k]], coordinate.one.Image$CenterTopy[[k]])
  proj4string(Img.Raster[[k]]) <- "+proj=utm +zone=15 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
  writeRaster(Img.Raster[[k]],filename =paste0("..", "Img_",stringr::str_pad(string = k,width = 4,side = "left",pad=0)),

Output head(coordiante.one.Image,3)

> head(coordinate.one.Image, 2)
  X meta.df.FileName meta.df.FileInodeChangeDate meta.df.BandName coorMetric.lon coorMetric.lat ImageWidth ImageHeight
1 1   IMG_0000_1.tif   2018:07:11 14:16:48-05:00             Blue       329877.6        4057023   88.83669    66.72505
2 2   IMG_0000_2.tif   2018:08:27 08:50:22-05:00            Green       329877.6        4057023   88.83669    66.72505
  TopLeftx TopLefty TopRightx TopRighty BottomLeftx BottomLefty BottomRightx BottomRighty CenterTopy CenterBottomy
1 329833.2  4057056    329922   4057056    329833.2     4056989       329922      4056989    4057056       4056989
2 329833.2  4057056    329922   4057056    329833.2     4056989       329922      4056989    4057056       4056989
  CenterLeftx CenterRightx
1    329833.2       329922
2    329833.2       329922 

In order to do all of this, I am using R.

Based on the above, my question is, I know I am missing something in my work flow; however, I don't know what it is, so I was wondering if someone knows what is that I am missing in order to properly orient my images?

  • How are you writing the corner coordinates into the image? Can you give us some examples?
    – Spacedman
    Dec 10 '18 at 21:37
  • @Spacedman Absolutely. I have added the info to my original post. Please let me know your comments and thoughts.
    – Perro
    Dec 10 '18 at 22:20
  • 1
    What software was recommended when you purchased your camera? It is possible that it's storing the information in nonstandard tags. It might also help to disclose the brand and model of your camera as someone else may have solved this already. Is there some sort of trajectory file for the GPS stored? Dec 10 '18 at 23:26
  • @MichaelStimson the camera that I am using is a MicaSense RedEdge Camera. At the time the software suggested by the manufacture was atlas; but, they merge with pix4d. Pix4d works; however, I am interested on this because I am looking at images over water.
    – Perro
    Dec 11 '18 at 1:58
  • I am not surprised that you're having difficulty with R, no doubt the information is stored in a nonstandard tag or separate file that only Pix4d can work with... this ties you to using that software with your camera and nothing else; it wouldn't be the first time I've seen a sensor/software pair that only works together. Open Drone Map may work and be worth a try, I suggest leave R until you have a mosaic of your drone images or at least orthorectified scenes. Dec 11 '18 at 2:13

You can't. It looks like your camera is not recording the GPS Image Direction tag to the EXIF header. http://www.exiv2.org/tags.html

  • thank you for your response; however, proprietary software such as Pix4D has the capability to do it, so I am assuming that there must be a way.
    – Perro
    Dec 11 '18 at 2:00
  • I see there is an XMP tag in a Parrot Sequoia image for yaw. Maybe the Red Edge has the same.
    – GBG
    Feb 21 '19 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.