ossim application
TRANSCRIPT
-
8/12/2019 Ossim Application
1/31
Using OSSIM For Orthorectification
Stanislav Bobovych
University of Arkansas
December 20, 2011
Stanislav Bobovych (U of A) GIS December 20, 2011 1 / 31
-
8/12/2019 Ossim Application
2/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 2 / 31
-
8/12/2019 Ossim Application
3/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 3 / 31
-
8/12/2019 Ossim Application
4/31
Introduction
Goals
Compiling OSSIMBasic tools and usage
Parallel orthorectification
Stanislav Bobovych (U of A) GIS December 20, 2011 4 / 31
-
8/12/2019 Ossim Application
5/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 5 / 31
-
8/12/2019 Ossim Application
6/31
Background
Started in 1997 by ImageLinks Inc.
Team wanted to move away from expensive Sun and SGI workstationsand license software to cheap PCs and open source.
Evolved over the years.
Stanislav Bobovych (U of A) GIS December 20, 2011 6 / 31
-
8/12/2019 Ossim Application
7/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 7 / 31
-
8/12/2019 Ossim Application
8/31
System
Kernel
$ uname -r -s -iLinux 3.0.0-13-generic x86_64
OS
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
GCC
$ gcc --version
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Stanislav Bobovych (U of A) GIS December 20, 2011 8 / 31
-
8/12/2019 Ossim Application
9/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 9 / 31
-
8/12/2019 Ossim Application
10/31
Setup
OSSIM Trachttp://trac.osgeo.org/ossim/
OSSIM Dependencies
libjpeg, libtiff, libgeotiff, libopenthreads
$ sudo apt-get install \
libjpeg62-dev libtiff4-dev libgeotiff-dev libopenthreads-dev
Correcting libjpeg$ file /usr/lib/x86_64-linux-gnu/libjpeg.so
/usr/lib/x86_64-linux-gnu/libjpeg.so: symbolic link to libjpeg.so.62.0.0
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/libjpeg.so
Stanislav Bobovych (U of A) GIS December 20, 2011 10 / 31
http://trac.osgeo.org/ossim/http://trac.osgeo.org/ossim/ -
8/12/2019 Ossim Application
11/31
Setup cont.
$ wget http://download.osgeo.org/ossim/src/ossim-1.8.4.tgz$ tar zxf ossim-1.8.4.tgz
$ cd ossim-1.8.4/ossim
$ ./configure
$ make
$ sudo make install$ ossim-info --version
ossim-info: error while loading shared libraries:
libossim.so.1: cannot open shared object file:
No such file or directory
$ sudo ldconfig
$ ossim-info --version
OSSIM Version 1.8.4 (20111211)
Stanislav Bobovych (U of A) GIS December 20, 2011 11 / 31
-
8/12/2019 Ossim Application
12/31
Elevation setup
Resources
http://trac.osgeo.org/ossim/wiki/orthoigenhttp://trac.osgeo.org/ossim/wiki/ossimElevationSetup
http://trac.osgeo.org/ossim/wiki/ossimPreferenceFile
http://www.ossim.org/OSSIM/Articles/Entries/2007/3/6_
Elevation_Setup.html
http://dds.cr.usgs.gov/srtm/
We need...
Geoid gridsossim-1.8.4/ossim_package_support/geoids/geoid1996/egm96.grd
Elevation cells$ cd /home/sbobovyc/data/elevation/srtm/version1/South_America
$ wget -r -l 1 -A zip -nd http://dds.cr.usgs.gov/srtm/version1/South_America/$ for z in *.zip; do unzip $z; done
Stanislav Bobovych (U of A) GIS December 20, 2011 12 / 31
http://trac.osgeo.org/ossim/wiki/orthoigenhttp://trac.osgeo.org/ossim/wiki/ossimElevationSetuphttp://trac.osgeo.org/ossim/wiki/ossimPreferenceFilehttp://www.ossim.org/OSSIM/Articles/Entries/2007/3/6_Elevation_Setup.htmlhttp://www.ossim.org/OSSIM/Articles/Entries/2007/3/6_Elevation_Setup.htmlhttp://dds.cr.usgs.gov/srtm/http://dds.cr.usgs.gov/srtm/http://www.ossim.org/OSSIM/Articles/Entries/2007/3/6_Elevation_Setup.htmlhttp://www.ossim.org/OSSIM/Articles/Entries/2007/3/6_Elevation_Setup.htmlhttp://trac.osgeo.org/ossim/wiki/ossimPreferenceFilehttp://trac.osgeo.org/ossim/wiki/ossimElevationSetuphttp://trac.osgeo.org/ossim/wiki/orthoigen -
8/12/2019 Ossim Application
13/31
Preference file
Template
ossim-1.8.4-ossim/etc/templates/ossim_preferences_template
or http://trac.osgeo.org/ossim/browser/trunk/ossim/etc/
templates/ossim_preferences_template
elevation_manager.elevation_source1.connection_string:
/home/sbobovyc/data/elevation/srtm/version1/South_America
elevation_manager.elevation_source1.type: srtm_directory
elevation_manager.elevation_source1.geoid.type: geoid1996
elevation.enabled: true
elevation.auto_sort.enabled: truegeoid_egm_96_grid: /home/sbobovyc/ossim-1.8.4/ossim_package_support/geoids/geoid1996/egm96.grd
Stanislav Bobovych (U of A) GIS December 20, 2011 13 / 31
http://trac.osgeo.org/ossim/browser/trunk/ossim/etc/templates/ossim_preferences_templatehttp://trac.osgeo.org/ossim/browser/trunk/ossim/etc/templates/ossim_preferences_templatehttp://trac.osgeo.org/ossim/browser/trunk/ossim/etc/templates/ossim_preferences_templatehttp://trac.osgeo.org/ossim/browser/trunk/ossim/etc/templates/ossim_preferences_template -
8/12/2019 Ossim Application
14/31
Test elevation setup
$ ossim-height -P /home/sbobovyc/ossim_preferences 0 -52
Opened cell: /home/sbobovyc/data/elevation/srtm/version1/South_America/N00W052.hgt
MSL to ellipsoid delta: -24.1580009460449Height above MSL: 97
Height above ellipsoid: 72.8419990539551
Geoid value: -24.1580009460449
Stanislav Bobovych (U of A) GIS December 20, 2011 14 / 31
-
8/12/2019 Ossim Application
15/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 15 / 31
-
8/12/2019 Ossim Application
16/31
Binary list
ossim-adrg-dump ossim-dump-ocg ossim-mosaic
ossim-applanix2ogeom ossim-ecg2ocg ossim-ogeom2ogeom
ossim-band-merge ossim-extract-vertices ossim-orthoigen
ossim-btoa ossim-foo ossim-pixelflip
ossim-chgkwval ossim-height ossim-prune
ossim-cmm ossim-icp ossim-rejout
ossim-computeSrtmStats ossim-igen ossim-senint
ossim-correl ossim-img2md ossim-space-imaging
ossim-create-cg ossim-img2rr ossim-swapbytes
ossim-create-histo ossim-img2vrr ossim-tfw2ogeom
ossim-deg2dms ossim-infoossim-dms2deg ossim-modopt
Stanislav Bobovych (U of A) GIS December 20, 2011 16 / 31
I i f
-
8/12/2019 Ossim Application
17/31
Image info
$ ossim-info -i 06DEC05154503-P1BS-005650937010_01_P001.NTF
image0.band0.max_value: 2047
image0.band0.min_value: 1
image0.band0.null_value: 0
image0.entry: 0
image0.lr_x: 27551
image0.lr_y: 27503image0.number_decimation_levels: 1
image0.number_input_bands: 1
image0.number_lines: 27504
image0.number_output_bands: 1
image0.number_samples: 27552image0.radiometry: 11-bit
image0.ul_x: 0
image0.ul_y: 0
number_entries: 1
Stanislav Bobovych (U of A) GIS December 20, 2011 17 / 31
W ki h i
-
8/12/2019 Ossim Application
18/31
Working on the image
Scaling
$ ossim-orthoigen --geo -t 1024 \06DEC05154503-P1BS-005650937010_01_P001.NTF scaled.jpg
Stanislav Bobovych (U of A) GIS December 20, 2011 18 / 31
-
8/12/2019 Ossim Application
19/31
1021x1024
Stanislav Bobovych (U of A) GIS December 20, 2011 19 / 31
W ki th i
-
8/12/2019 Ossim Application
20/31
Working on the image
Orthorectification
$ ossim-orthoigen -P /home/sbobovyc/ossim_preferences \06DEC05154503-P1BS-005650937010_01_P001.NTF rect.jpg
Stanislav Bobovych (U of A) GIS December 20, 2011 20 / 31
-
8/12/2019 Ossim Application
21/31
1021x1024
Stanislav Bobovych (U of A) GIS December 20, 2011 21 / 31
Working?
-
8/12/2019 Ossim Application
22/31
Working?
$ compare scaled.jpg rect.jpg diff.jpg
Stanislav Bobovych (U of A) GIS December 20, 2011 22 / 31
Outline
-
8/12/2019 Ossim Application
23/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 23 / 31
Compiling OSSIM with MPI support
-
8/12/2019 Ossim Application
24/31
Compiling OSSIM with MPI support
MPI Dependencies
OpenMPI
$ sudo apt-get install mpi-default-dev
Setup
Same as previous examples, except:$ ./configure --with-mpi=1 --with-openmpi-flag=1
On razor, libraries are in non-standard locations, so:
./configure \--with-openthreads=/home/sbobovyc/OpenThreads \
--with-mpi=1 --with-openmpi-flag=1 \
--with-mpi-lib=/share/apps/mpi/openmpi-1.5.1/gcc-4.1.2/lib \
--with-mpi-inc=/share/apps/mpi/openmpi-1.5.1/gcc-4.1.2/includ
Stanislav Bobovych (U of A) GIS December 20, 2011 24 / 31
Outline
-
8/12/2019 Ossim Application
25/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 25 / 31
-
8/12/2019 Ossim Application
26/31
Data
06DEC05154503-P1BS-005650937010 01 P001.NTF
27552x27504
1 band, unsigned int (16 bits)1.5G
Stanislav Bobovych (U of A) GIS December 20, 2011 26 / 31
Outline
-
8/12/2019 Ossim Application
27/31
Outline
1 Introduction
2 Background
3 System
4 Setup
5 Tools
6 OSSIM + MPI
7 Performance
8 Razor PBS script
Stanislav Bobovych (U of A) GIS December 20, 2011 27 / 31
-
8/12/2019 Ossim Application
28/31
#PBS -N ossim-mpi.job
#PBS -q med
#PBS -o results/ossim-mpi.output.$PBS_JOBID#PBS -j oe#PBS -l nodes=1:ppn=12
#PBS -l walltime=10:00:00
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/sbobovyc/ossim-1.8.4-mpi/ossim/lib:/home/sbobovyc/OpenThreads/li
IN_IMG=/scratch/sbobovyc/ortho/img/005650937010_01_P001_PAN/06DEC05154503-P1BS-005650937010_01_P001.NTF
OUT_IMG=/scratch/sbobovyc/out-mpi.tifBIN_DIR=/home/sbobovyc/ossim-1.8.4-mpi/ossim/bin
PREFS=/home/sbobovyc/ossim_prefs
du -h $IN_IMG
f o r i i n 2 4 6 8 1 0 1 2do
mpirun -n $i -machinefile $PBS_NODEFILE $BIN_DIR/ossim-orthoigen -P $PREFS $IN_IMG $OUT_IMG
sleep 5done
Stanislav Bobovych (U of A) GIS December 20, 2011 28 / 31
Razor run times
-
8/12/2019 Ossim Application
29/31
Razor run times
Stanislav Bobovych (U of A) GIS December 20, 2011 29 / 31
Callgraph
-
8/12/2019 Ossim Application
30/31
Callgraph
$ kcachegrind ~/ossim-tests/callgrind.out.26179
Stanislav Bobovych (U of A) GIS December 20, 2011 30 / 31
-
8/12/2019 Ossim Application
31/31
Questions?
Stanislav Bobovych (U of A) GIS December 20, 2011 31 / 31