Itseez/opencv — pull request #2806 by marvins (2014-05-29 16:07:59+00:00)
Title: Add GDAL Raster support to OpenCV imread

This pull request is in conjunction with [issue 3725](http://code.opencv.org/issues/3725 "issue 3725"). I have added an ImageDecoder to support loading GDAL raster images, integrated the CMake configuration flags, and wrote a tutorial on how to use it. In the process, I started adding comments inside the highgui module in hopes that I can also add a tutorial on how to create custom ImageEncoder and Decoder drivers for OpenCV. This is not implemented yet, but I am working on it.

To install GDAL on Ubuntu, install the "libgdal-dev" package. On Fedora, install the "gdal-devel" package. I am a little naive with building OpenCV on Windows, so I am not sure if it would work. I have tested the driver with the following formats...

Digital Elevation Models
* DTED
* SRTM

Rasters
* NITF (2.0/2.1)
* GeoTiff
* JPEG
* Tiff
* J2K

If there is interest in supporting GDAL, I would be more than happy to dig into the ImageEncoder driver. In addition, GDAL can load the image Metadata as well as do coordinate conversions. I can add that capability if desired. Also, if there are any bugs, improvements, or fixes in my code that you would like me to make, just let me know. Finally, I find git rebase a little scary, so I have not squashed the commits down yet. I would prefer a little advice from an expert before revising the history.

Thanks,
Marvin