0% found this document useful (0 votes)
211 views31 pages

Leica ADSL1SDK UserManual v1.1.0-11 en

Uploaded by

Johanna C.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
211 views31 pages

Leica ADSL1SDK UserManual v1.1.0-11 en

Uploaded by

Johanna C.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Leica ADS L1 SDK

User Manual

Version 1.1
English
Copyright and Remarks
Copyright Without prior permission in writing by Leica Geosystems AG (Switzerland), this docu-
ment shall not be reproduced as a whole or in part, by mechanical, photographic, elec-
tronic, or other means (including into or transmission in machine-readable form);
stored in any retrieval system; used for any purpose other than that/those for which
it is intended; nor made accessible or communicated in any form to any third party not
expressly authorized by Leica Geosystems AG to have access thereto.
Symbols The symbols used in our manuals have the following meanings.
Type Description

 Warning: Indicates a potentially hazardous situation or an unin-


tended use which, if not avoided, could result in death or serious
injury.

 Important paragraphs which must be adhered to in practice as they


enable the product to be used in a technically correct and efficient
manner.

Trademarks All trademarks are the property of their respective owners.


International The International Warranty can be downloaded from the Leica Geosystems home page
Warranty at http://www.leica-geosystems.com/internationalwarranty or received from your
Leica Geosystems dealer.
Software License Our products contains software that is pre-installed on the product, or that is supplied
Agreement to you on a data carrier medium, or that can be downloaded by you online pursuant
to prior authorization from Leica Geosystems. Such software is protected by copyright
and other laws and its use is defined and regulated by the Leica Geosystems Software
License Agreement, which covers aspects such as, but not limited to, Scope of the
License, Warranty, Intellectual Property Rights, Limitation of Liability, Exclusion of
other Assurances, Governing Law and Place of Jurisdiction. Please make sure, that at
any time you fully comply with the terms and conditions of the Leica Geosystems Soft-
ware License Agreement.

Such agreement is provided together with all products and can also be found at the
Leica Geosystems home page at http://www.leica-geosystems.com/swlicense or your
Leica Geosystems dealer.

You must not install or use the software unless you have read and accepted the terms
and conditions of the Leica Geosystems Software License Agreement. Installation or
use of the software or any part thereof, is deemed to be an acceptance of all the
terms and conditions of such license agreement. If you do not agree to all or some of
the terms of such license agreement, you may not download, install or use the soft-
ware and you must return the unused software together with its accompanying docu-
mentation and the purchase receipt to the dealer from whom you purchased the
product within ten (10) days of purchase to obtain a full refund of the purchase price.
Available
Name of docu-
documentation
mentation Description
Leica ADS L1 All instructions required in order to operate the product to a basic
SDK level are contained in this User Manual. Provides an overview of the
User Manual system together with technical data and safety directions.

2
Table of Contents
1 About Leica ADS L1 SDK 5
2 Leica ADS L1 SDK Introduction 7
2.1 What's New 8
2.2 Naming Conventions 9
3 Installation 11
4 Leica ADS L1 Sensor Model 13
4.1 Math Model 13
4.1.1 Image to Ground Transformation for Level 0 Imagery 13
4.1.2 Image to Ground (LSR) Transformation for Level 1 Imagery 13
4.2 Interior Orientation 14
4.2.1 Camera Calibration 14
4.2.2 IMU Misalignment 14
4.3 Exterior Orientation 15
4.4 Rectification 15
5 Selected Ground Processing supplied by Leica Geosystems 17
5.1 Downloading 17
5.2 Positioning Post-Processing 17
5.3 Level 1 Creation 18
6 Meta Data Information 19
6.1 Support File 19
6.2 Image 20
6.3 Camera Calibration 21
6.4 Orientation Data 23
7 Coordinate Systems 25
7.1 Image Coordinate System 25
7.2 Focal Coordinate System 26
7.3 Ground Coordinate System LSR 26
8 Usage of the SDK 27
8.1 Getting Data 27
8.2 Usage of the SDK for native 64-bit Software 28
8.3 Usage of the SDK for native 32-bit Software 30

Leica ADS L1 SDK, Table of Contents 3


4 Leica ADS L1 SDK, Table of Contents
1 About Leica ADS L1 SDK
This info kit is provided by Leica Geosystems AG on an "as is" basis. Leica Geosystems
AG makes no representations or warranties of any kind, express or implied, as to the
operation of this CD or the information, content, materials, or products included on
this site.

To the full extent permissible by applicable law, Leica Geosystems AG disclaims all
warranties, express or implied, including, but not limited to, implied warranties of
merchantability and fitness for a particular purpose.

Leica Geosystems AG will not be liable for any damages of any kind arising from the
use of this software development kit (SDK), including, but not limited to direct, indi-
rect, incidental, punitive, and consequential damages.

References Tempelmann U., Börner A., Chaplin B., Hinsken L., Mykhalevych B., Miller S., Recke U.,
Reulke R., Uebbing R., 2000. Photogrammetric Software for the LH Systems ADS40
Airborne Digital Sensor, XIXth ISPRS Congress, Amsterdam.
Internet For more information visit our websites:

http://www.leica-geosystems.com
http://www.ziimaging.com

Contact Leica Geosystems AG


Geospatial Imaging Division
Heinrich-Wild-Strasse
9435 Heerbrugg
Switzerland

Email: [email protected]

Phone: + 41 71 727 3131


Fax: + 41 71 727 4674

Support
Region Contact e-mail
Americas [email protected]
U.S.A., Canada, Central & South America
Asia / Pacific [email protected]
(including Australia, China, Japan and Korea)
Europe, Middle East & Africa [email protected]

Leica ADS L1 SDK, About Leica ADS L1 SDK 5


6 Leica ADS L1 SDK, About Leica ADS L1 SDK
2 Leica ADS L1 SDK Introduction
Description This document is intended to enable users and developers understanding the process
workflow of the Leica ADS Digital Line Sensor. It describes the file formats and struc-
tures, used in the data processing. Additionally, it details the math model, so devel-
opers can create software which handles Leica ADS L1 imagery correctly, specifically
image to ground and ground to image transformations.
Workflow Figure 1 - Three line digital sensor principal

The Leica ADS is a multiple Digital Line Sensor, built on the three-line principle,
recording continuously as the aircraft moves, Figure 1. The produced imagery can be
viewed in stereo and used for all further photogrammetric processes, for example DTM
generation, orthophoto production, feature extraction and image analysis. For a more
detailed discussion of the characteristics of the sensor and the ground processing
software, please refer to Tempelmann et al, 2000. For an overview of the ground
processing flow see Figure 2.

Figure 2 - Leica ADS workflow

Leica ADS L1 SDK, Leica ADS L1 SDK Introduction 7


2.1 What's New
In the context of a pushbroom sensor, local variations in pitch produce local variations
in parallax that can disturb stereo impression as well as calculated a high dense digital
elevation model. This effect can be increased if the rectification plane of L1 images
differs significantly from the digital elevation model (DEM).

Leica XPro 6.3 correct this by smoothing the external orientation parameters (EOP)
and using a DEM for the processing of L1 images instead of a flat surface. These
changes results in a new SDK and also a new plugin for Socet Set 5.6.

To get the full performance a global elevation model is needed. It is necessary to use
the same elevation source in the SDK as it was used for generating the Leica ADS L1
image with the product generator. For example you can use the 30 m "SRTM" data, for
example:

http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/

8 Leica ADS L1 SDK, Leica ADS L1 SDK Introduction


2.2 Naming Conventions
Anchor Point
Origin of the LSR in geographic coordinate system, reference ellipsoid is WGS84
[radians]
CCD Line
A Line of Charge-coupled Device (CCD, Photosensitive hardware device)
DEM
Digital Elevation Model represents a 3D surface or terrain model. It is not defined if
buildings or trees are included or not.
DSM
Digital Surface Model represents a 3D model (grid) of the elevation with objects on
surface like buildings and trees.
DSNU
Dark Signal Non Uniformity. Each pixel "delivers" a gray value even no light falls on it.
For corrections non exposed images are used, so called dark images.
DTM
Digital Terrain Model represents a 3D surface model without objects like buildings and
trees.
ECEF
Space rectangular coordinate system, Earth-Centered, Earth-Fixed coordinate system
EOP
Exterior Orientation Parameter, mainly x, y, z and omega, phi, kappa. Describing sensor
position and orientation in a 3D Coordinates system.
L0
Raw data corrected by radiometric calibration, no geometric calibration at all. Not
accessible via SDK.
L1
Geometrically corrected L0 image, rectified to a given plane.
L1 with DEM correction
Smoothed EOPs and using DEM for rectification.
L2
Orthophoto
Latitude φ
Measured from the equator, positive to the north
Longitude λ
Measured from 0 Meridian (Greenwich), positive to east
LSR
Local Space rectangular coordinate system, see also ECEF
Number of Lines
Number of Lines in flight direction
Number of Samples
Number of Pixel across flight line or image in image coordinate system
PRNU
Photo Response Non Uniformity. Different sensitivity of single pixel on a chip. Will be
corrected normally by "bright images".
Scan Line
Captured lines during flight

Leica ADS L1 SDK, Leica ADS L1 SDK Introduction 9


10 Leica ADS L1 SDK, Leica ADS L1 SDK Introduction
3 Installation
Description The Leica ADS L1 SDK Installer contains all necessary files to access Leica XPro features
from own software products to process Leica ADS L1. Also example source code for
Microsoft Visual Studio 2010 projects is delivered. Additionally the installer delivers
also an extension for Socet Set 5.6 (Sensor Model plugin).
Installation During the installation the destination directory of the SDK can be set.

Set installation folder for the SDK:

Installation starts right after confirmation by clicking the "Install" button.

Leica ADS L1 SDK, Installation 11


The main part of the installation is done.

It might be necessary to update the xpro.ini file from Leica XPro (bin\xpro.ini):

• The mapping section should contain:


"<Location of you installation>/runtime_data/geodetic".

• The GTopo section should contain:


"<Location of you installation>/runtime_data/dem/gtopoDem_ell.jptf"

The following table shows the areas where changes might be necessary, especially for
setting path to SRTM data which is not done automatically:

[GTopo]

; location and filename for the GTopo global elevation database file

; default is $etc_folder/dem/gtopoDem_ell.jptf

datafile = T:/testdata/runtime_data/dem/gtopoDem_ell.jptf

[SRTM]

datapath = U:/corelibs/dsmtools/SRTM3_unittests

[Persistence]

; location and filename for the schema file

; default is $etc_folder/schemas/persschema.xml

; commented out by default

; schemafile = $etc_folder/schemas/persschema.xml

 Note: Use slash "/" instead backslash "\". Otherwise the path will not be set correctly.

12 Leica ADS L1 SDK, Installation


4 Leica ADS L1 Sensor Model
Description The Leica ADS is a line scanner which records multiple lines simultaneously and creates
digital images built from sequential lines. To reconstruct the line of sight for each
image point, the exterior orientation need to be known for each scan line of the image
to apply collinearity equation for the given line. In the case of the Leica ADS, the orien-
tation is recorded continuously together with the actual image data. Thus, for each
scan line - with a well-defined set of orientation data - ground to image and image to
ground (with a fixed ground height) transformations can be accessed after some
ground pre-processing steps. Unfortunately, the (raw) orientation data is not
recorded in the coordinate system that is later used in the photogrammetric
processing nor synchronized with the image. This lack is resolved by utilizing the Leica
IPAS post-processing software to convert the attitude data to a local frame system
with its origin at each GPS recording time. The output is then synchronized with the
actual image data and the position and attitude information is transformed to a local
space rectangular (LSR) system that is used for photogrammetric processing.

Both, the digital frame sensor model and the Leica ADS sensor model, are based on
the collinearity equations, there are significant differences in handling the data and
performing image matching (required for triangulation). The following table gives an
overview of the differences between the digital frame sensor and Leica ADS sensor
models:

Leica ADS Digital Frame Sensor


Camera Calibration Position in the focal plane is known Usually distortion parame-
for each pixel ters and principal point
offsets are known
Orientation Is given for each scan line Is computed (or given) for a
single image
Matching Image must usually be rectified for No rectification necessary
matching
Triangulation Strip or block triangulation - solved Strip or block triangulation -
for orientation and IMU misalign- solved for orientation
ment [optional: self calibration] [optional: self calibration]

4.1 Math Model


Description This chapter gives an overview of the used math model. All calculations are done inside
the SDK.

4.1.1 Image to Ground Transformation for Level 0 Imagery


As in traditional photogrammetry the image to ground transformation for ADS imagery
is based on the collinearity equations. The main difference is that each scan line must
be treated as an individual image with its own exterior orientation. During the pre-
processing steps the orientation for each scan line in the imagery is defined. The
transformation is conducted in two steps and uses the focal plane coordinates as an
intermediary.

4.1.2 Image to Ground (LSR) Transformation for Level 1 Imagery


The transformation of a Level 1 (L1) image into an "object space L1" (a L1 image in
the position and orientation to which it was projected) is fairly trivial. In this case, only
the image coordinate system needs to be considered. The origin pixel is defined as mid
of the upper left pixel (see chapter 7.1 "Image Coordinate System"):

Leica ADS L1 SDK, Leica ADS L1 Sensor Model 13


1 1 1
PX  ( ps  xoffset ) cos( )  (lines  pl1  yoffset ) sin( )
m m
1 1
PY   ( p1s  xoffset ) sin( )  (lines  pl1  yoffset ) cos( )
m m
PZ  height

The inverse transformation is defined as:

p s  m  ( PX cos( )  PY sin( ))  xoffset


pl  lines  (m( PX sin( )  PY cos( ))  yoffset )

Where

m is the rectification scale (keyword RECT_SCALE)
xoffset is the rectification offset in x (RECT_XOFFSET)
yoffset is the rectification offset in y (RECT_YOFFSET)
α is the rectification rotation angle (RECT_ROTATION
height is the rectification height (RECT_HEIGHT)
p1s image coordinate in image width/sample direction, origin of the 
coordinate system is mid of upper left pixel, unit is [Pixel]
pl1 image coordinate in image height/line direction, origin of the coordinate 
system is mid of upper left pixel, unit is [Pixel]
lines Number of lines / rows of L1 image

4.2 Interior Orientation


Description This chapter gives a short overview about parameters of the interior orientation where
the IMU misalignment is playing an important role.

4.2.1 Camera Calibration


During calibration a set of pixels are measured, which represent the scan line. Each
measured pixel is represented through its number (position in the scan line) and its x,
y coordinates in the focal plane. The actual measurement is done by observing a pair
of orientation angles for a selected set of pixels per line, dense enough to ensure far
subpixel. Additionally, the nominal focal length, which is used to convert from angles
into x-y coordinates, is given for the sensor. For each scan line a separate file is
created and stored as an ASCII text file. The format of the ASCII file is described in
chapter 6.3 "Camera Calibration". For Leica ADS 100 sensor systems a new format is
used, containing equal information.

4.2.2 IMU Misalignment


Since the inertial measurement unit (IMU) must be mounted on the sensor and that
the physical axes of the IMU can only be determined approximately, a mounting
misalignment will remain as a small error. Opposed to the error remaining from the
offset measurement between GPS antenna and IMU center (that is smaller than GPS
measurement itself), this misalignment will have an influence on the image orientation
accuracy.

14 Leica ADS L1 SDK, Leica ADS L1 Sensor Model


4.3 Exterior Orientation
The position and attitude of the sensor together with the time are each recorded at
a constant frequency and stored in the Mass Memory (MM) during the flight. As the
image data itself are also recorded together with the time, the imagery can be later
synchronized with the orientation data. To convert from the data on the MMs to the
orientation, which can be used later, two processing steps are necessary.

1. Convert the raw attitude data into the local frame system used by Leica IPAS. This
step is performed by standard Leica IPAS Pro software. The output is the attitude
given as raw, pitch and yaw angles.
2. Transformation of the local frame system into LSR systems. The LSR systems are
the object spaces used for photogrammetric processing. To define this system an
anchor point in WGS84 must be established. Also the time synchronization is done
in this step. The output is a set of orientation data (X, Y, Z, omega, phi, kappa) for
each scan line of the image.

4.4 Rectification
Owing to the movements of the aircraft the resulting level 0 image (L0) will be not
matched. Also, stereo viewing and feature extraction are usually not possible with L0
imagery. To generate (rectified imagery that fulfils the requirements for data
processing mentioned above, L1 rectifiers (disk-to-disk or disk-to-viewer "on the fly")
are included in the Leica ADS ground processing packages. This program rectifies the
image content on the horizontal plane in object space by usage of orientation data,
camera calibration and L0 image. The resulting images can be viewed in stereo (any
combination of two lines), assuming the user has access to an adequate system. Also,
image matching could be applied afterwards.

Leica ADS L1 SDK, Leica ADS L1 Sensor Model 15


16 Leica ADS L1 SDK, Leica ADS L1 Sensor Model
5 Selected Ground Processing supplied by Leica Geosystems
Description The following describes the different software components for basic processing of the
Leica ADS data. The ground processing can be split up into the three parts, namely
Downloading, Positioning post-processing and L1 creation. Each color presents a
different significance:

= Software supplied by Leica Geosystems

= File interface specified in the document

= External input (not coming from the MMS)

5.1 Downloading
To provide the files described in detail below it is necessary to run low-level software
that reads out the Leica ADS Mass Memory (MM) and separates the data stream into
readable files (download step in Figure 2). These files can be categorized into meta-
files (session, take, image information), image data files and positioning data files.

Figure 4 - Downloading

5.2 Positioning Post-Processing


At this point L0 imagery can be displayed plus the corresponding meta information
gets interpreted. The files are somewhat worthless for further data processing
without a time-tagged exterior orientation. To create these orientation files, two
further processing steps are necessary. The positioning files as part of the output files
from the Downloader and GPS reference files from the GNSS Ground Reference
Station must be post-processed with the Inertial Explorer software. Afterward those
need to be time-tagged and converted into the appropriate coordinate system, see
Figure 5. The resulting orientation files allow easy retrieval of the exterior orientation
at any position in the image. Images which have exterior and interior orientation are
called L0 images.

Figure 5 - L0 creation

Leica ADS L1 SDK, Selected Ground Processing supplied by Leica Geosystems 17


5.3 Level 1 Creation
Together with the images and the camera calibration, the orientation files are the
basis for generating L1 images. The L1 rectification is done by projecting each pixel of
the L0 image onto a horizontal plane, rigorously applying the interior and exterior
orientation. Besides an "on the fly" rectifier in Leica XPro, there are two different
types of disk-to-disk rectifiers in Leica GPro (direct resampling) and Leica XPro (indi-
rect resampling).

Figure 6 - L1 creation

18 Leica ADS L1 SDK, Selected Ground Processing supplied by Leica Geosystems


6 Meta Data Information
Description This chapter describes the different files and meta information used by the SDK. More
details about generating these files can be found in chapter 8.1 "Getting Data".

6.1 Support File


The meta data information for an image is stored in a standard SOCET SET support file.
The support file is an ASCII file containing keywords. Each keyword may have one or
more parameter sets. The following table shows the general keywords and their
descriptions.

Keyword Description
Support_file Version number of the support file. Currently set to d.
IMAGE_ID Base name of the image, do not contain any extensions or other
information.
IMAGE_FILE_NAME x Concrete file name of an image with a given minification level (overviews)
The x value starts with one and doubles always for the next minification
LINES
levels (2,4,8,16,32,…). If the overviews are included, only one file is given.
SAMPLES If external overviews are used, several files will be set. This parameter
comes always with LINES and SAMPLES showing the size of the image.
IMAGE_LEVEL Indicates the image level. The SDK can handle only L1 images. Therefore
this parameter must be set to 1.
MEAN_TERRAIN_HEIGHT Mean terrain height of the project given in project units.
LINE_STAGGERED Indicates whether the output is in high res mode (staggered lines) or not
(True/False).
VIEW_OF_LINE Indicates the view of the CCD-line, could be NADIR, FORWARD, BACKWARD
RADIOMETRIC_PROPERTY Indicates the bands used for this image. Depending on the sensor system it
could be RGB, PANCHROMATIC, RED, GREEN, BLUE,
NEAR_INFRARED,FAR_INFRARED.
IMAGE_DATE Date of image recording
ANCHOR_LATITUDE Latitude of anchor point using WGS84, geographical coordinate system
units in radians Latitude is measured from the equator, positive to the
north.
ANCHOR_LONGITUDE Longitude of anchor point using WGS84,. Longitude is measured from
Greenwich Meridian to the east, Unit is radians.
NUMBER_SCAN_LINES Number of original scan lines, is normally not equal with image width of the
L1 image.
SENSOR_ROTATON Flag to indicate whether sensor has rotated at installation, normally FALSE
otherwise TRUE.
ORIGINAL_ORIENTATION Name of the original orientation file (ODF-Format). Not given for ADS100
L1 images with DEM correction. Here the files recorded by the sensor
system (EOP Files) are used.
ADJUSTED_ORIENTATION Name of the orientation file after bundle adjustment (ODF-Format). Not
given for ADS100 L1 images with DEM correction. Here the adjusted EOP
files are used.
CALIBRATION For all none L1 images with DEM the file is given in CAM-Format. For L1
images with DEM a calibration folder is given only. While for ADS100 the
folder has XML files for all other systems the CAM format is used.
ADJUSTED_CALIBRATION Same as for calibration, but containing corrected calibration parameter
after bundle adjustment (“Self-Calibration”).
SENSOR_TYPE Showing the used Sensor Type. The new SDK is listening to:

- ADS: All L1 images without DEM


- ADS_L1: L1 images with DEM
For all other sensor types the software will quit work with the error
message “Unknown Sensor Type”.

Leica ADS L1 SDK, Meta Data Information 19


Beside the general keywords there are some more specific ones for the L1 ADS
images, especially for the new sensor model. For mapping data between image and
ground the rectification parameters are internally used, too.

Keyword Description
RECT_SCALE Rectification Scale, (inverse GSD)
RECT_ROTATION Rotation angle used for rectification, given in radians
RECT_XOFFSET X offset between coordinate origin of LSR and origin of Level 1 image
RECT_YOFFSET Y offset between coordinate origin of LSR and origin of Level 1 image
RECT_HEIGHT Height of the rectification plane, given in project units. Calling Function
image2ground of the SDK will use this height if no other height is given.

The next few entries are only visible for L1 images with DEM corrections:

Keyword Description
MODEL_INFORMATION Path to information to calculate the mapping between L1 image and ground.
Use only for ADS100 L1 images with DEM corrections.
REFERENCE_BAND Master band of multispectral image (e.g. RGB image). The calibration of this
band is used. Only available for L1 images with DEM corrections.
MODEL_METHOD Showing used method, available only for L1 images with DEM corrections.
Should be STEREO_DSM.
ELEVATION_SOURCE DEM to correct L1 images. Currently only global DSM (parameter: GlobalDEM)
with SRTM (parameter SRTMElevationSource) or GTopo (parameter
GTopoElevationSource) is used. In general:

GlobalDEM SRTMElevationSource or GlobalDEM GTopoElevationSource

6.2 Image
Description Imagery can be stored and read with either 8-bit or 16-bit pixel depth. The actual
image format depends on the option set by the user at processing time. A variety of
formats are supported by Leica XPro. Cause of compatible reasons with as many
systems as possible, it is recommended to use TIFF tiled format for 8 and 16-bit
imagery (optionally JPEG compressed for 8-bit imagery). Downloaded raw images are
normally stored in proprietary formats, which use hardware compression method.

Due to the nature of the Leica ADS imagery, typically spanning over multiple gigabytes
for output products, a Leica ADS file format was developed. This format is discussed
in detail below.
Leica ADS file Due to the limitations of popular formats, such as TIFF (4GB), it was necessary to
format define a new format to extend them. The aim was to retain the underlying format, but
to allow limitless image file sizes. The notion of sub-blocking was introduced where
the format would define a number of images that were butt matched.

The Leica ADS file is a simple ASCII header that describes the sub-image blocks sizes
and how the images are arranged. The image handling software has to be coded to
handle the butt matched sub-image blocks. In the example dataset the RGB L1 image
was created with 3 sub-blocks with a maximal sub-block size of 2GB. This size is
selectable in.

Keyword Description Value (or example value)


ADS_HEADER Notification that this is the ADS header 1
BANDS Number of bands in the image 3
DEPTH Image depth 2
BITS Number of bits (DEPTH * 8) 16
LINES Total number of lines in the image 12640
SAMPLES Total number of samples in the image 57008

20 Leica ADS L1 SDK, Meta Data Information


TILE_Y Number of pixels in the TILE in the Y 400
direction
TILE_X Number of pixels in the TILE in the X 400
direction
HARDWARE_COMPRESSED Is the image hardware compressed? 0
0 for No and 1 for Yes
LINES_PER_BLOCK Number of lines in each block 12640
SAMPLES_PER_BLOCK Number of samples in each block 24400
BLOCK_DATA Three parameters indicating the line 0 0 L106260944RGBF16A_0_0.tif
and sample position and the file name.
Note: The line and sample positions are
also defined in the file name.

The following is the full listing of the Leica ADS file for the RGB L1 image. Note, it
consists of six sub images.

ADS_HEADER 1
BANDS 3
DEPTH 2
BITS 16
LINES 12640
SAMPLES 57008
TILE_Y 400
TILE_X 400
HARDWARE_COMPRESSED 0
LINES_PER_BLOCK 12640
SAMPLES_PER_BLOCK 24400
BLOCK_DATA 0 0 L106260944RGBF16A_0_0.tif
BLOCK_DATA 0 1 L106260944RGBF16A_0_1.tif
BLOCK_DATA 0 2 L106260944RGBF16A_0_2.tif

6.3 Camera Calibration


A strict hierarchy exists for the calibration file within the project due to the possible
calibration of the sensor from within a project. The versioning of the calibration is
manifested in the folder naming, i.e. v001 and v002.

The camera calibration is stored in an ASCII text file or XML File for Leica ADS100 L1
images with DEM correction. The next section gives an overview of the format.
CAM-Format The file contains a header with exactly 9 lines and shows the following:

Keyword Description
ADS_CALIBRATION_FILE Version number of the calibration file
CALIBRATION_SOURCE Name of the calibration source
CAMERA_NAME Name of the camera
SENSOR_LINE Line identifier
CALIBRATION_DATE Date of calibration
FOCAL_LENGTH_MM Focal length in mm
NUM_PIXELS Number of calibrated pixel
PIXEL_SIZE Pixel size in mm
PAV_Z_OFFSET Offset from the PAV to the lens node (m)
RADIOMETRIC_GAIN Radiometric gain
IRRADIANCE_GAIN Irradiance gain
LEFTSIDE_GAIN Left side gain
START_XY Indicator that the following is calibration data
END_XY End of the calibration data

Leica ADS L1 SDK, Meta Data Information 21


The doublet, in x and y order, that follows the START_XY tag is a series of double values
representing the calibration for each sample in the CCD.

 Note: The order of lines 2 through 8 is not fixed. Although the above order is written
in the order above, the reader should never rely on this order.

The coordinate system of the sensor focal plane is defined as the x axis in the direction
of the flight, the z axis pointing to the earth and the y axis complementing a right-
handed system. The first pixel of a scan line is the point with the smallest Y value and
corresponds to the left edge of the L0 image. So, the first pixel of the first scan line
will correspond to the upper left pixel of the image.
XML-Format For compatibility reasons with old SDK implementation, the XML format is used only
for Leica ADS100 L1 images with DEM correction. The calibration folder contains
corrections for PRNU and DSNU as well as for the geometric correction. The next figure
shows an excerpt.

Example geometric calibration, example contains only data of one sensor. Normally
data for all sensors are given.

<?xml version="1.0" encoding="UTF-8"?>


<DigitalSensorHeadInteriorOrientation Version="1.0.0">
<!--Leica Geosystems ADS camera calibration file-->
<System Type="ADS100">
<SystemInfo Component="SensorHead" SerialNo="10517" Revision="-" ArticleNo="795360"/>
<SystemInfo Component="LensSystem" SerialNo="0021" Revision="-" ArticleNo="773612"/>
<SystemInfo Component="BeamSplitter" SerialNo="2014-0031" Revision="-"
ArticleNo="797541"/>
<SystemInfo Component="FocalPlate" SerialNo="15092013-012" Revision="-"
ArticleNo="795225"/>
<SystemInfo Component="IMU" SerialNo="56063801" Revision="-" ArticleNo="747070"/>
</System>
<Creation Name="From lens system data" Location="&quot;ORIMA&quot;"
Environment="Laboratory" Remark="Initial">
<DateTime Type="UTC" Date="20141217" Time="101945"/>
</Creation>
<LensSystem PrincipalDistance_mm="62.7000" SigmaPrincipalDistance_mm="0.0010"/>
<Misalignment_deg Omega="0.00601" SigmaOmega="0.00011" Phi="0.01404" SigmaPhi="0.00012"
Kappa="-0.05140" SigmaKappa="0.00026"/>
<Sensors>
<Sensor i="0">
<Sensor Type="LineCCD" Structure="Mono" PixelSize_mm="0.0050" Rows="1"
Columns="20064"/>
<DistortionGrid Channel="NIRF26A" Columns="20064">
<GridRow i="0">
<Row_mm> … <\Row_mm>
<Column_mm>
<SigmaRow_mm
<SigmaColumn_mm>
</GridRow
</DistortionGrid
</Sensor>
</Sensors>
</DigitalSensorHeadInteriorOrientation>

22 Leica ADS L1 SDK, Meta Data Information


6.4 Orientation Data
Description The system delivers two different formats. While L1 images the orientation of a single
line is given in the ODF Format, for L1 images with DEM correction taken with Leica
ADS100 the EOP Format is used. The data itself is given in respect to L0 image.
ODF-Format The orientation file is a binary file that stores a set of orientation (X, Y, Z - position;
and omega, phi, kappa - attitude) for each scan line of the L1 image. In additional, the
time and the standard deviations of the positions and angles stored in this file. To
keep the files within a reasonable size the information is compressed by storing base
numbers of the values in the header of the file and storing the single values as integer
offsets from the base numbers.

The coordinate system is an LSR system. Its origin is a specified latitude and longitude
in WGS84 with a height of 0 (anchor point). The direction of the X axis is East, the Y
axis points towards North, and the Z axis is perpendicular to the plane defined by X
and Y complementing a right handed coordinate system.

The orientation file holds the exterior orientation for each scanned image line from
the Leica ADS. The orientation file has exactly one set of orientation per image line in
the L0 image. Additionally to the actual orientation (x, y, z, omega, phi, kappa) also
the GPS time and the standard deviations for the positions and angles are stored in
this file.

The orientation is crucial for geo-referencing any kind of Leica ADS imagery and plays
a central role in the triangulation process. The orientation data is stored in a binary
file with an ASCII header and has an "ODF" (orientation data file) extension. Its header
has a size of 512 Byte:

Parameter Example Size Offset


[Bytes] [Bytes]
File Identifier + Version number ODF 1.2 16 0
Data source GPro 3.0 32 16
Project Name and ID 30018_20040626093146_20040626072409 64 48
_UNPLANNED
Strip Name and ID 12 64 112
Number of orientation data sets 119480 16 176
Units position 0 (meters) 2 192
Precision position 1000 14 194
Units angles 3 (radian) 2 208
Precision angles 1000000 14 210
Rotation sequence 0 (OPK) 16 224
Absolute time 152409600 16 240
Comments 96 256
Anchor Latitude 0.8539992993 16 352
Anchor Longitude 0.1561354580 16 368
Base time 553572 12 384
Precision time 10000 20 396
Base X (Easting) 17 12 416
Precision std. dev. Position 100000 20 428
Base Y (Northing) -6 12 448
Precision std. dev. Angles 10000000 20 460
Base Z 1883 32 480

All entries are terminated with a CR ("\r") character.

The binary part of the file contains the actual orientation data. The amount of orien-
tation sets and scan lines are exactly the same within one image. Each orientation set
has a size of 40 bytes and contains the following binary structure:

Leica ADS L1 SDK, Meta Data Information 23


Type Contents
int GPS time
int X
int Y
int Z
int Omega
int Phi
int Kappa
unsigned short Standard deviation X
unsigned short Standard deviation Y
unsigned short Standard deviation Z
unsigned short Standard deviation omega
unsigned short Standard deviation phi
unsigned short Standard deviation kappa

EOP Format The EOP file can be found in the folder /strips after Leica ADS100 L1 images with DEM
correction have been calculated.

Compared to the ODF it is not directly synchronized with the L1 image. Therefor an
interpolation with the data is needed getting the correct orientation for each scan line
of L1 images.

24 Leica ADS L1 SDK, Meta Data Information


7 Coordinate Systems
Description This chapter describes the different coordinate systems used in the SDK. In general
the image coordinate system is used in the SDK for images base on Socet Set defini-
tion while the ground system is a local space coordinate system (LSR).
7.1 Image Coordinate System
All image coordinates are given in the Socet Set Coordinate System. This chapter
describes the system in respect to a standard image coordinate system.

• Origin is in the mid of the upper left pixel


• X-Axis directs to the right and is named also "samples" or "width", unit in [Pixel]
• Y-Axis directs down and is named "lines" or "height", unit in [Pixel]

In general the origin of the Socet Set Coordinate system is shifted by ½ pixel in x- and
y-direction in respect to the image mid. x-axis and y-axis have the same direction as
the image coordinate system.

Transformation between both systems:

Socet set to Image Image to Socet Set


numSample numSample
x image  xsocet  x socet  ximage 
2 2
numLines numLines
yimage  ysocet  ysocet  yimage 
2 2

Leica ADS L1 SDK, Coordinate Systems 25


7.2 Focal Coordinate System

In the focal plane each pixel gets a physical location expressed in a coordinate system
defined by the nadir line. The y-axis is defined by the nadir scan line and the x axis is
perpendicular to the y axis going through the center of the scan line. Positive x follows
the flight direction and y complements a right-handed system.

 Note: The sensor might be rotated by 180 degrees. This can be checked by the
keyword "SENSOR_ROTATION". See chapter 6.1 "Support File".

7.3 Ground Coordinate System LSR


The ground coordinate system is given in a local space rectangular system. The LSR is
anchored to the WGS84 ellipsoid. The x-axis points east, the y-axis points to north and
the z-axis complements a right-handed system.

More details about transformation between geographical coordinates systems,


geocentric coordinates systems and local coordinate systems can be found for
example in "Manual of Photogrammetry, Fifth Edition, page 188ff".

26 Leica ADS L1 SDK, Coordinate Systems


8 Usage of the SDK
Description The Leica ADS L1 SDK is usable with native 32-bit or native 64-bit software. The oper-
ating system should be 64-bit based Windows. That is because Leica XPro is a 64-bit
software which leads us to a 64-bit SDK environment. The 32-bit version of the SDK
maps data between 32-bit and 64-bit processes. More details can be found in chapter
8.3 "Usage of the SDK for native 32-bit Software". General description of the SDK can
be found in the chapter 8.2 "Usage of the SDK for native 64-bit Software".

The SDK comes also with Microsoft Visual Studio project (VS 2010). The software is
only tested and verified with this compiler.

8.1 Getting Data


The SDK can work only with L1 images. Therefore it is necessary to process such
images with Leica XPro 6.3 or later. In general it is possible to write so called L1 images
with DEM correction and image without this correction. The SDK recognized the
different sensor models by different settings in the support file. More details about
the support file can be found in chapter 6 "Meta Data Information".

The figure below in Leica XPro shows a typical data set where a DEM is used. Only with
this settings L1 images with DEM correction will be calculated. Setting "Minifications"
to External Overviews (Socet Set Format) is also recommended if you want to use the
Socet Set 5.6 plugin (optional).

Typical setting to use Leica ADS L1 images in Socet Set:

The output is split into two views of processed stereo images. Folders like "Backward"
and "Nadir" contain all necessary information about image sets. The first level contains
the image data (including overviews) as well as the support file. Two sub folders, one
(SHxx_yyyyy) contains the calibration data and the other one ("strips") is having infor-
mation about the flight parameters like exterior orientation.

All given paths in the support file are relative paths in respect to the location of the
support file for the output. Because of this, the whole folder structure can be moved
to any location without changing paths inside the support file.

Leica ADS L1 SDK, Usage of the SDK 27


If only the support file needs to be moved to another location (e.g. putting it in Socet
Set Project Folder), the following paths need to be changed follow:

Keyword in Parameter New with absolute path


Support File
Image File Name x "001_20130822_0944_RGB T:\Project\L1_RGB\Backward\001_20130822_09
(x=1…n) B16L1USER.ads" 44_RGBB16L1USER.ads

ORIGINAL_CALIBRATION SH82_30030/v001 T:\Project\L1_RGB\Backward\SH82_30030/v001

MODEL_INFORMATION strips/001_20130822_0944 T:\Project\L1_RGB\Backward\strips/001_201308


_/001_20130822_0944.stp 22_0944_/001_20130822_0944.stp

8.2 Usage of the SDK for native 64-bit Software


To use the SDK in your software you have to include the header file "L1SensorAds.h"
as well as the library "adsl1sdk.lib". You have to make sure that the system will find all
DLLs which are delivered within the SDK installer.

std::auto_ptr<L1SensorAds> sensorModel;
try {
sensorModel.reset(L1SensorAds::create(parseCmd.supportFile.c_str()));

}
catch (std::exception& e)
{
std::cerr << "Error during sensor model init: " << e.what() << std::endl;
return -1;
}

The code fragment above gets the support file name from a parser of the command
line (std::string) and creates a new sensor model (see also delivered project example).
In case of failure an exception will be thrown showing up the reason.

Afterwards the SDK can be used for example to map an image coordinate, given in
Socet Set Coordinate System (see chapter 7 "Coordinate Systems") to a ground given
in LSR:

double image[] = {0,0};


double ground[3];

try {
sensorModel->imageToGround(image[0], image[1],ground[0],ground[1],ground[2]);
dataOut.Add(data,3);
}
catch (std::exception& e) {
std::cerr << "Point : " << image[0] << "/" << image[1] << ": " << e.what() << std::endl;
}

The example above maps the image coordinate {0,0} to LSR, where the height is set
to the rectification height automatically. The following section is describing all func-
tions in detail:

28 Leica ADS L1 SDK, Usage of the SDK


/// Create sensor model. The only input parameter is a SUP file.
/// It recognize automatically which sensor model should be used
/// errors will be returned via exceptions
/// @param full path name to support file.
static L1SensorAds* create(const char* filename);

//! virtual public destructor for the derived classes to extend


virtual ~L1SensorAds() {}

/// Destroy the SDK


/// This becomes only important for the 32 bit implementation
/// otherwise the 64 bit process won't be destroyed
virtual void destroy() = 0;

/// Maps image Socet Set coordinates to LSR Ground on a given height
/// @param xIm coordinate [Pixel], origin image mid, x-direction (=image col,sample)
/// from left to right (image width)
/// @param yIm coordinate [Pixel], origin image mid, y-direction (=image row,lines)
/// from top to bottom (image height)
/// @param z [m] ground height to map image coordinates
/// @param x [m] x value on ground, mapped to Ground LSR
/// @param y [m] y value on ground, mapped to Ground LSR
virtual void imageToGround(const double xIm, const double yIm, const double height,
double &x, double &y, double &z) const = 0;

/// Maps image Socet Set coordinates to LSR Ground using rectification height
/// @param xIm coordinate [Pixel], origin image mid, x-direction (=image col,sample)
/// from left to right (image width)
/// @param yIm coordinate [Pixel], origin image mid, y-direction (=image row,lines)
/// from top to bottom (image height
/// @param x [m] x value on ground, mapped to Ground LSR
/// @param y [m] y value on ground, mapped to Ground LSR
virtual void imageToGround(const double xIm, const double yIm,
double &x, double &y, double &z) const = 0;

/// Maps LSR ground coordinates to image Socet Set coordinate


/// @param x x-Value of the LSR Ground coordinate [m]
/// @param y y-Value of the LSR Ground coordinate [m]
/// @param z z-Value of the LSR Ground coordinate [m]
/// @param xIM Output, coordinate [Pixel], origin image mid, x-direction (=image col,sample)
/// from left to right (image width)
/// @param yIM Output, coordinate [Pixel], origin image mid, y-direction (=image row,lines)
/// from top to bottom (image height)
virtual void groundToImage(const double x, const double y, const double z,
double &xIm, double &yIm) const = 0;

/// Returns the image height of the image


/// @return image height [Pixel]
virtual int imageLines() const = 0;

/// Returns the image width of the image


/// @return image width [Pixel]
virtual int imageSamples() const = 0;

/// Returns Latitude of the anchor point [radians]


/// @return Latitude of the anchor point [radians]
virtual double anchorLat() const = 0;

/// Returns Longitude of the anchor point [radians]


/// @return Longitude of the anchor point [radians]
virtual double anchorLon() const = 0;

/// Returns height of anchor point [m], normally 0


/// @return Returns height of anchor point [m]
virtual double anchorAlt() const = 0;

Leica ADS L1 SDK, Usage of the SDK 29


8.3 Usage of the SDK for native 32-bit Software
In general there is no difference of the usage between the 32- and 64-bit version of
the SDK. Only the linked library differs, since for 32-bit "adsl1sdk32.lib" and for 64-bit
"adslsdk.lib" is dedicated.

While native 64-bit calls get directly interpreted by Leica XPro functions, 32-bit calls
will be mapped to the 64-bit environment. This is done by the 32-bit SDK through calls
via "adsl-sharedmem.exe". Such mapping cost processing time if 32-bit application
uses the SDK.

30 Leica ADS L1 SDK, Usage of the SDK


About Leica Geosystems' Airborne Solutions
With over 80 years of experience, Leica Geosystems is a global leader in the design, delivery
and support of airborne digital and LIDAR sensors for the geospatial marketplace. Along with
the well-known Leica RC30, Leica Geosystems' airborne sensor portfolio today includes a
wide range of innovative technologies and products such as the Leica RCD30 series of
medium format digital frame sensors, the Leica ADS pushbroom sensors, the Leica ALS LIDAR
series, and the Leica IPAS GNSS/IMU solutions.

Following the acquisition of Intergraph by Hexagon in 2010, the newly formed Geospatial
Solutions Division has brought together Leica Geosystems Airborne Sensors and Z/I Imaging.
Committed to continued innovation on all major product lines, the combined airborne sensor
portfolio includes the widest range of medium and large format imaging as well as LIDAR
technologies and offers a choice of sensor for every application. A full suite of software from
flight planning to post-processing provides end-to-end workflow for high accuracy
orthophoto generation, feature extraction and map production. In addition, Hexagon
Geosystems operates a global network of customer service and support centers to ensure
highest productivity around the clock.

When it has to be right.

Illustrations, descriptions and technical specifications are not binding and may change.
Printed in Switzerland - Copyright Leica Geosystems AG, Heerbrugg, Switzerland, 2015.
Version 1.1.0en - 1.11

Leica Geosystems AG
Heinrich-Wild-Strasse
CH-9435 Heerbrugg
Switzerland
Phone +41 71 727 31 31
www.leica-geosystems.com 31

You might also like