You are on page 1of 15

EUROPEAN COMMISSION

DIRECTORATE GENERAL JRC


JOINT RESEARCH CENTRE - ISPRA
Institute for the Protection and Security of the Citizen
Agriculture and Fisheries Unit
JRC IPSC/G03/P/SKA/ska D(2005)(5217)

Technical documentation

Olicount v2

Author:
Co-author:
Approved:
Date:

Stefano Bagli (external consultant)


Simon Kay
19/12/2005

Status:
Circulation
:
Int. ref:

v1
Public
file://S:\FMPArchive\P\5217.doc

Contents

Introduction and Scope ..................................................................................... 2


TIFF and GEOTIFF 8/16 bits support ................................................................ 2
16 bits support for Olive Tree detection in OTCOUNT and OLICOUNT dll.... 3
Evaluation Test for OLICOUNT Version 2.0 ..................................................... 5
Test 1 Creta_site1_Parcels_1 .................................................................................................. 5
Test 2 Creta_site5_Parcels_60 ................................................................................................ 9

OLICOUNT ArcView Interface Upgrade Version 2.0 ...................................... 14


Installation Instructions ................................................................................... 14
Compilation Instructions ................................................................................. 15

Post: IPSC- AGRIFISH, TP 266, Joint Research Centre, I-21020 Ispra (VA), Italy
Telephone: direct line +39 0332 78 9702
Facsimile: +39 0332 78 5162
E-mail: simon.kay@jrc.it URL: http://agrifish.jrc.it/

EC-DG-JRC-IPSC-AGRIFISH Unit

1.

Technical documentation for Olicount v2

Introduction and Scope

This report describes the principal characteristics of the new and upgraded version of the OLICOUNT
software.
The scope of this new version consists in upgrading the existing software (version 1.0.1), to be able to
handle various types of image file formats, with various pixel size (8 bits or 16 bits) and resolutions.
More in detail, the following upgrades were implemented in the new version:

2.

TIFF file format support for 8/16 bits using LibTiff library
GEOTIFF file format support for 8/16 bits using LibGeoTiff library
16 bits support for Olive Tree detection in OTCOUNT and OTVALUES libraries
Upgrade ArcView OLICOUNT project in order to be able to display the 16 bits images;
Bugs revision and correction in ArcView OLICOUNT project

TIFF and GEOTIFF 8/16 bits support

In the previous version 1.0 of OTCOUNT and OTVALUES dlls the TIFF image support was implemented,
without any calls to LibTiff Libraries, by the CReadTiff class. This class was developed in order to read the
data only from 8 bits TIFF image file. For this reason, the OLICOUNT software tool was limited in olive tree
detection only from 8 bits images, without the possibility to use images collected from 16 bits sensors, such
as QuickBird satellite.

The new version of OTCOUNT and OTVALUES libraries were generated from a drastic operation of revision
and re-write of the original code (written in C++), in order to implement the I/O operations on TIFF files with
the

use

of

the

well

know

LibTIFF

(http://www.remotesensing.org/libtiff)

and

LibGeotiff

(http://www.remotesensing.org/geotiff) libraries.

In the following table are reported the principal characteristics between the old and new code version.

Metrics

Version 1.0

New Version 2.0

Classes

Files

54

14

Functions

96

31

Lines of Codes

4257

617

With the implementation of the GEOTiff file support, the OLICOUNT software could now read and elaborate
GEOTiff file formats without the necessity to read geographical data from external world files.
Internal ref: JRC IPSC/G03/P/SKA/ska
D(2005)(5217)

EC-DG-JRC-IPSC-AGRIFISH Unit

3.

Technical documentation for Olicount v2

16 bits support for Olive Tree detection in OTCOUNT and OLICOUNT dll

The OLICOUNT olive tree detection algorithm was updated in order to correctly process 16-bits images.
The 16-bits support was developed through an automatic rescaling algorithm that transforms, without
loosing significative spectral and spatial information, the 16 bits in a 8-bits images ready to be processed by
the detection algorithm.,
The choice to implement a rescale algorithm from 16 to 8 bits rather than develop a new detection algorithm
for the 16 bits image was justified due to the following considerations:

The Version 1.0 of olive tree detection algorithm developed for 8-bits image was widely tested and
produce good results;
The actual 16-bits TIFF images provided by current satellite sensors are non-real 16-bits. In fact
analyzing the DN pixel values distribution (histogram in Figure 1) of two test images representing
the same area but with different pixel resolution, respectively 8 and 16 bits, we could easily observe
that the 16 bits doesnt cover the entire range of values from 0 to 65535 (6.5E04). The 16-bits
images available now (Quickbird) are coded as real 12-bits, the range of values is from 0 to 212.
In order to obtain a similar histogram shape the 16 bits image could be rescaled in a 12-bits image
as reported in figure 3

Figure 1: creta_site1_g8bits.tif
Internal ref: JRC IPSC/G03/P/SKA/ska
D(2005)(5217)

Figure 2: creta_site1_g16bits.tif
3

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 3 creta_site1_g16bits.tif rescaled to 12 bits


In order to satisfy the correct rescale operation from a non real 16-bit format to a 8-bit format, was
implemented a dynamic rescale algorithm able in a first phase to automatically detect the real bit size and
subsequently rescale it. The rescaling procedure is developed in 2 steps:
Rescaling operation from non real 16-bits to a real-bits image
Determination of the real-bit size of the image with the following expression:

realbit = log 2 M
where

M = max[image( x, y ) | 0 x W ,0 y H ]
Rescale to a real bit size image format:

image _ realbit ( x, y ) = image( x, j )

216
2 realbit

Rescaling from real-bits size to a 8-bits image

image _ 8bits ( x, y ) = image _ realbit ( x, j )

1
28

The rescaling procedure from non real 16 bits to a 8 bits image produce the loosing of non sigificative data
that doesnt affect, as reported in the test chapter, the goodness of the olive tree detection results.

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

EC-DG-JRC-IPSC-AGRIFISH Unit

4.

Technical documentation for Olicount v2

Evaluation Test for OLICOUNT Version 2.0

In this chapter are described some tests executed on the new Version 2.0 of the OLICOUNT software. The
scope of these tests consists in the evaluation of results goodness for the 16-bits olive tree detection
algorithm respect the previous 8-bits version.
The tests were executed comparing the olive tree detection results obtained from different couple of images
covering the same area in 8 bit and 16 bits format.
The training circles for olive tree identification were maintained the same in each parcel in order to
guarantee a correct result comparison procedure.

4.1.

Test 1 Creta_site1_Parcels_1

Input Data 16 bits image


Creta_site1_g16bits.tiff GEOTiff Image file in 16 bits
Pacels ID number 1
Training Trees and Training Parameters:
The training parameters computed by OTVALUES dll and reported in the ArcView interface refers to the
pixel values computed on rescaled version of 16 bits image in the 8 bits version.

Figure 4 Training Parameters for Test 1 Parcel 1 on 16 bits image

Results from 16 bits image


Internal ref: JRC IPSC/G03/P/SKA/ska
D(2005)(5217)

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 5 Olive Tree Results for Test 1 Parcel 1 on 16 bits image


Input Data 8 bits image

Creta_site1_g8bits.tiff GEOTiff Image file in 8 bits


Pacels ID number 1
Training Trees and Training Parameters:

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 6 Training Parameters for Test 1 Parcel 1 on 8 bits image


Results from 8 bits image

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 7 Olive Tree Results for Test 1 Parcel 1 on 8 bits image


Comparing Results:
In the following figure were confronted the olive tree detection results coming respectively from 16-bist (red
point) and 8-bits (blue triangle) images.
The 16 bits results has an high correspondence with 8-bits outputs. The unique difference consist in a non
detected tree (see red circle) on the right side of the parcel by the 16-bits version. We point out as that non
detected tree is not a real tree but just a classification error of the 8 bits algorithm.

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 8 Comparison of Olive Tree Results for Test 1 Parcel 1 on 16 and 8 bits image

4.2.

Test 2 Creta_site5_Parcels_60

Input Data 16 bits image


Creta_test5_16bits.tiff GEOTiff Image file in 16 bits
Pacels ID number 60
Training Trees and Training Parameters:
The training parameters computed by OTVALUES dll and reported in the ArcView interface refers to the
pixel values computed on rescaled version of 16 bits image in the 8 bits version.

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 9 Training Parameters for Test 2 Parcel 60 on 16 bits image

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

10

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 10 Olive Tree Results for Test 2 Parcel 60 on 16 bits image

Input Data 8 bits image

Creta_test5_8bits.tiff GEOTiff Image file in 8 bits


Pacels ID number 60
Training Trees and Training Parameters:

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

11

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 11 Training Parameters for Test 2 Parcel 60 on 8 bits image

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

12

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 12 Olive Tree Results for Test 2 Parcel 60 on 8 bits image


Comparing Results:
The parcel 60 refers to an area characterized by the presence of very small olive tree and with a presence
of noise pixel values (grey soils). The olive trees detection results are influenced with presence of some
errors.
Comparing the two set of results from 8 and 1 bits images we find some differences in tree detection,
anyway we point out again how these inconsistencies refers to non correct olive tree pixel detection.

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

13

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

Figure 13 Comparison of Olive Tree Results for Test 2 Parcel 60 on 16 and 8 bits image

The tests conducted on 8 and 16 bits images indicate how the new 16 bit algorithm produce the same
results of the previous 8 bits version if the

5.

OLICOUNT ArcView Interface Upgrade Version 2.0

The ESRI ARCView OLICOUNT interface was modified in order to support the visualization of non-real 16bits images.
Inside the image uploading command was introduced an automatic test that evaluate the image type and
provide an automatic rescale of color legend if the images is a non-real 16 bits type.

6.

Installation Instructions

Download the OLICOUNT_V2.exe file in an elsewhere directory, then run it and install the software in the
C:\olicount directory.

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

14

EC-DG-JRC-IPSC-AGRIFISH Unit

Technical documentation for Olicount v2

For a correct installation all the libraries loaded in the C:\olicount have to be preserved without any
modifications.

7.

Compilation Instructions

The C++ source code for the OTCOUNT.dll and OTVALUES.dll is contained in the olicount_source.zip file.
For a correct recompilation, it must be recompiled using a Visual Studio .NET version.

(end document)

Internal ref: JRC IPSC/G03/P/SKA/ska


D(2005)(5217)

15

You might also like