15
EUROPEAN COMMISSION DIRECTORATE GENERAL JRC JOINT RESEARCH CENTRE - ISPRA Institute for the Protection and Security of the Citizen Agriculture and Fisheries Unit 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: [email protected] URL: http://agrifish.jrc.it/ JRC IPSC/G03/P/SKA/ska D(2005)(5217) / Technical documentation Olicount v2 Author: Stefano Bagli (external consultant) Status: v1 Co-author: Approved: Simon Kay Circulation : Public Date: 19/12/2005 Int. ref: 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

Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

Embed Size (px)

Citation preview

Page 1: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EUROPEAN COMMISSION DIRECTORATE GENERAL JRC JOINT RESEARCH CENTRE - ISPRA Institute for the Protection and Security of the Citizen Agriculture and Fisheries Unit

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: [email protected] URL: http://agrifish.jrc.it/

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

Technical documentation

Olicount v2

Author: Stefano Bagli (external consultant) Status: v1 Co-author: Approved:

Simon Kay

Circulation:

Public

Date: 19/12/2005 Int. ref: 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

Page 2: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 2

1. 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:

• 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

2. 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 5 7

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.

Page 3: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 3

3. 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 doesn’t 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 Figure 2: creta_site1_g16bits.tif

Page 4: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 4

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:

⎡ ⎤Mrealbit 2log=

where

]0,0|),(max[ HyWxyximageM ≤≤≤≤=

Rescale to a real bit size image format:

realbitjximageyxrealbitimage2

2),(),(_16

⋅=

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

821),(_),(8_ ⋅= jxrealbitimageyxbitsimage

The rescaling procedure from non real 16 bits to a 8 bits image produce the loosing of non sigificative data

that doesn’t affect, as reported in the test chapter, the goodness of the olive tree detection results.

Page 5: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 5

4. 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

Page 6: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 6

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:

Page 7: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 7

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

Results from 8 bits image

Page 8: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 8

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.

Page 9: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 9

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.

Page 10: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 10

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

Page 11: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 11

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:

Page 12: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 12

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

Page 13: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 13

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.

Page 14: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 14

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 16-

bits 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.

Page 15: Olicount v2 - EU Science Hubies-webarchive-ext.jrc.it/mars/mars/content/download/1232/7145/file/... · EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2 Internal

EC-DG-JRC-IPSC-AGRIFISH Unit Technical documentation for Olicount v2

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

D(2005)(5217) 15

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)