Georeferencing ImageJ output files with GDAL
I’ve been using ImageJ (aka FIJI) to create an NDVI floating point image from some aerial imagery of a heathland in Nidderdale. In order to import the NDVI output image into a GIS package or image processing software like eCognition the NDVI TIFF needs to be georeferenced.
The original aerial imagery from which the NDVI image was created has already been georeferenced so we can grab the coordinates of it’s corners and copy them over to the new NDVI GeoTIFF. The steps below go through this process.
- First install gdal. If you are using homebrew on a mac, the install process is as simple as
brew install gdal
- Get the CRS and coordinate information from the already georeferenced GeoTIFF with the gdalinfo command
- Now we can take those values and create a GeoTIFF from the NDVI TIFF image with the following command
gdal_translate -of GTiff -a_srs WGS84 -a_ullr -1.6811175 54.0748652 -1.6754438 54.0713020 GeoTiff\ ndvi-input-image.tif ndvi-georeferenced-geotiff.tif
You will see a status bar as below as the image is tagged by GDAL.
- Now we can import the NDVI GeoTIFF image into whatever GIS or image processing software we want. Below you can see the georeferenced NDVI GeoTIFF perfectly overlaid on the NGB aerial image that the georeferencing information was taken from. The GIS software in use here is QGIS.
- Now we can go ahead and use the NDVI image to aid in vegetation classification and we can export classified objects as georeferenced *.shp files and use them in our GIS software