15
Converting raster Converting raster images to XML and images to XML and SVG SVG The potential of XML - The potential of XML - encoded images and SVG encoded images and SVG image files in Geomatics image files in Geomatics

Converting raster images to XML and SVG

Embed Size (px)

DESCRIPTION

Converting raster images to XML and SVG. The potential of XML - encoded images and SVG image files in Geomatics. Contents. Problem Statement The conversion of raster images to XML code Converting raster images to SVG code The benefits to Geomatics Drawbacks Conclusions. - PowerPoint PPT Presentation

Citation preview

Page 1: Converting raster images to XML and SVG

Converting raster Converting raster images to XML and images to XML and

SVGSVGThe potential of XML - encoded The potential of XML - encoded images and SVG image files in images and SVG image files in

Geomatics Geomatics

Page 2: Converting raster images to XML and SVG

Contents Contents

Problem Statement Problem Statement

The conversion of raster images to The conversion of raster images to

XML code XML code

Converting raster images to SVG code Converting raster images to SVG code

The benefits to Geomatics The benefits to Geomatics

Drawbacks Drawbacks

Conclusions Conclusions

Page 3: Converting raster images to XML and SVG

Problem Statement Problem Statement

Image information is stored in a tabular way and Image information is stored in a tabular way and each pixel usually preserves three values in a each pixel usually preserves three values in a range between 0-255. range between 0-255.

In an aerial photo or a satellite image, each pixel In an aerial photo or a satellite image, each pixel represent the reflection of the earth.represent the reflection of the earth.

Each material reflects sun beams in its own wayEach material reflects sun beams in its own way..

There is a very precise photogrametric process There is a very precise photogrametric process which can register an image to real world which can register an image to real world coordinates.coordinates.

Page 4: Converting raster images to XML and SVG

Problem StatementProblem Statement

So, for Geomatics, what really matters in So, for Geomatics, what really matters in raster images are:raster images are:

a. Separate pixel values for every a. Separate pixel values for every recording bandrecording band

b. Geometric information for each pixelb. Geometric information for each pixel

Page 5: Converting raster images to XML and SVG

Problem Statement Problem Statement

normal color

color infrared

The football field has artificial turf with low near-infrared reflectance. That is why in normal color photo the whole region appears with green color and in the color infrared photo the real vegetation is red and the artificial black.

Page 6: Converting raster images to XML and SVG

The conversion of raster The conversion of raster images to XML code images to XML code

STEPS:STEPS: Use any programming language to Use any programming language to

segregate pixel values in their componentssegregate pixel values in their components

Create the XML file putting each value in a Create the XML file putting each value in a different XML element different XML element

Create the XML schema for the above XML Create the XML schema for the above XML file.file.

Page 7: Converting raster images to XML and SVG

The conversion of raster The conversion of raster images to XML code images to XML code <?xml version="1.0" encoding="UTF-<?xml version="1.0" encoding="UTF-

8"?> 8"?> <image> <image>

<pixel id="0" row="0" column="0"> <pixel id="0" row="0" column="0"> <r>201</r> <r>201</r> <g>171</g> <g>171</g> <b>81</b> <b>81</b>

</pixel> </pixel> <pixel id="1" row="0" column="1"> <pixel id="1" row="0" column="1">

<r>203</r> <r>203</r> <g>175</g> <g>175</g> <b>78</b> <b>78</b>

</pixel></pixel>............ ............

</image></image>

Page 8: Converting raster images to XML and SVG

Converting raster images to Converting raster images to SVG code SVG code

The tabular structure of the raster format is The tabular structure of the raster format is reproduced with an array of <rect> elementsreproduced with an array of <rect> elements

The size of each <rect> element is set to 1px. The size of each <rect> element is set to 1px.

The rendering of each rectangle is the same as The rendering of each rectangle is the same as the equivalent pixel in the raster image.the equivalent pixel in the raster image.

Geometric information relates to:Geometric information relates to: relative position of each rectangle inside the relative position of each rectangle inside the

array array absolute position of each rectangle in real absolute position of each rectangle in real

world coordinates.world coordinates.

Page 9: Converting raster images to XML and SVG

Converting raster images to Converting raster images to SVG code SVG code

A very important issue is the way that rendering A very important issue is the way that rendering information should be stored in an SVG image file.information should be stored in an SVG image file.

The size of each <rect> element is set to 1px. The size of each <rect> element is set to 1px.

The rendering of each rectangle is the same as The rendering of each rectangle is the same as the equivalent pixel in the raster image.the equivalent pixel in the raster image.

Geometric information relates to:Geometric information relates to: relative position of each rectangle inside the relative position of each rectangle inside the

array array absolute position of each rectangle in real absolute position of each rectangle in real

world coordinates.world coordinates.

Page 10: Converting raster images to XML and SVG

The benefits to The benefits to Geomatics Geomatics

XML - encoded images could serve the storage of all XML - encoded images could serve the storage of all kind of raster data :kind of raster data : three-band images.three-band images. multi-spectral images. multi-spectral images. satellite scenes. satellite scenes.

XSLT has all the necessary programming tools needed XSLT has all the necessary programming tools needed to carry out the manipulation of the XML-encoded to carry out the manipulation of the XML-encoded images such as:images such as: classification algorithms.classification algorithms. region growing algorithms.region growing algorithms.

Page 11: Converting raster images to XML and SVG

The benefits to The benefits to Geomatics Geomatics

The potential of XML based Images and SVG Image files in Geomatics, Step 1.

Page 12: Converting raster images to XML and SVG

The benefits to The benefits to Geomatics Geomatics

SVG image files have the advantage of the SVG image files have the advantage of the segregated pixel values along with the segregated pixel values along with the ability to display the result of every change ability to display the result of every change imposed on themimposed on them..

The use of XSLT in this case could be the The use of XSLT in this case could be the equivalent of applying either image equivalent of applying either image processing filters or geo-reference processing filters or geo-reference transformationstransformations

Page 13: Converting raster images to XML and SVG

The benefits to The benefits to Geomatics Geomatics

The potential of XML based Images and SVG Image files in Geomatics, Step 2

Page 14: Converting raster images to XML and SVG

Drawbacks Drawbacks Large files:Large files:

The method creates large files due to the The method creates large files due to the analytical recording of information. But the use of analytical recording of information. But the use of compressed XML and SVG files gives compressed XML and SVG files gives approximately 2,5 times larger files than the approximately 2,5 times larger files than the original raster datasets.original raster datasets.

Time:Time:There is considerable delay in the rendering of the There is considerable delay in the rendering of the SVG image files. Any SVG viewer should read a SVG image files. Any SVG viewer should read a CSS instruction for every <rect> element in the CSS instruction for every <rect> element in the file. file.

Page 15: Converting raster images to XML and SVG

Conclusions Conclusions The transformation of raster images into XML The transformation of raster images into XML

encoding, apart from changing the way files encoding, apart from changing the way files are stored, contributes substantially to the way are stored, contributes substantially to the way users interact with real data. users interact with real data.

The created files are enriched with qualitative The created files are enriched with qualitative information, which can be further exploited by information, which can be further exploited by the user.the user.

In the domain of Geomatics the knowledge of In the domain of Geomatics the knowledge of both geometry and attribute information is both geometry and attribute information is indispensable for further processing and indispensable for further processing and utilization of spatial data.utilization of spatial data.