

One easy method to find the corner coordinates of an image is to use the command-line tool gdalinfo. A better coordinate system would be Universal Transverse Mercator. This demo uses them to increase the readability and is accurate enough to make the point. The Geographic Coordinate System is a spherical coordinate system, meaning that using them with Cartesian mathematics is technically incorrect. Notes Lat/Lon (Geographic) Coordinates should normally be avoided The major types, SRTM and DTED, are both signed shorts. NASA or DOD specification documents can provide the input types for various elevation models. If you know beforehand the type of DEM model you are loading, then it may be a safe bet to test the Mat::type() or Mat::depth() using an assert or other mechanism. CodeĬv::Mat dem = cv::imread(argv, cv::IMREAD_LOAD_GDAL | cv::IMREAD_ANYDEPTH ) The image and DEM data is processed and generates a terrain heat map of the image as well as labels areas of the city which would be affected should the water level of the bay rise 10, 50, and 100 meters. To implement these goals, the following code takes a Digital Elevation Model as well as a GeoTiff image of San Francisco as input. Show a basic use of DEM data coupled with ortho-rectified imagery.Show a basic, easy-to-implement example of a terrain heat map.Given the corner coordinates of both the image and DEM, correlate the elevation data to the image to find elevations for each pixel.How to use OpenCV imread to load SRTM Digital Elevation Models.How to use OpenCV imread to load satellite imagery.The primary objectives for this tutorial: In addition, we will show some an example of how OpenCV can use this data for novel and interesting purposes. In this example, we will show techniques for loading GIS raster formats using native OpenCV functions. The standard library for loading GIS imagery is the Geographic Data Abstraction Library (GDAL). Raster data typically can represent imagery and Digital Elevation Models (DEM). Geospatial raster data is a heavily used product in Geographic Information Systems and Photogrammetry. Next Tutorial: Video Input with OpenCV and similarity measurement Prev Tutorial: Adding a Trackbar to our applications!
