Top Banner
Quadtrees, Quadtrees, Octrees and Octrees and their their Applications Applications in Digital in Digital Image Image
53

Quadtrees, Octrees and their Applications in Digital Image Processing.

Dec 18, 2015

Download

Documents

Andrea Parrish
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Quadtrees, Octrees and their Applications in Digital Image Processing.

Quadtrees, Quadtrees, Octrees and their Octrees and their Applications in Applications in Digital Image Digital Image ProcessingProcessing

Page 2: Quadtrees, Octrees and their Applications in Digital Image Processing.

Hierarchical Data Structures for Hierarchical Data Structures for Computer Vision and Image Computer Vision and Image

ProcessingProcessing

Definition of pyramids

Explanation of Quadtrees and Octrees

Techniques used for generation

Applications

Page 3: Quadtrees, Octrees and their Applications in Digital Image Processing.

What is a pyramid?What is a pyramid?

A(0)

A(1)

A(2)2 2 * 2 2

2 1 * 2 1

Pyramid is a sequence of arrays

Page 4: Quadtrees, Octrees and their Applications in Digital Image Processing.

2 2 * 2 2

2 1 * 2 1

2 0 * 2 0

Example of a four layer Example of a four layer pyramidpyramid

Page 5: Quadtrees, Octrees and their Applications in Digital Image Processing.

2 3 * 2 3

Layer 3

Example of a four layer Example of a four layer pyramidpyramid

Page 6: Quadtrees, Octrees and their Applications in Digital Image Processing.

How partitioning is done?How partitioning is done?

1 partitioned to 2 2 = 4

Page 7: Quadtrees, Octrees and their Applications in Digital Image Processing.

How pyramid is build?How pyramid is build?

•From top to bottom

•From bottom to top

•Always recursively

•Good exercise in recursion and arrays

•Treat image as a Boolean or discrete function, what is the counterpart of these type of recursions?

Page 8: Quadtrees, Octrees and their Applications in Digital Image Processing.

We will build a pyramid from topWe will build a pyramid from top

For simplicity, dimension = 2

Partitioning at any level i from i-1 can be done by defining a two-dimensional array A(i) for the i-th level

Page 9: Quadtrees, Octrees and their Applications in Digital Image Processing.

The partitioning The partitioning AlgorithmAlgorithm

Cell (j,k) at level i-1

Page 10: Quadtrees, Octrees and their Applications in Digital Image Processing.

The partitioning The partitioning AlgorithmAlgorithm

Page 11: Quadtrees, Octrees and their Applications in Digital Image Processing.

Pyramids are interlinked (for instance by indices) sequences of arrays with hierarchy.

Similarly we can create trees to define this hierarchy

Trees can be more convenient for processing

Pyramids versus treesPyramids versus trees

Page 12: Quadtrees, Octrees and their Applications in Digital Image Processing.

Types of pyramids: Types of pyramids: quadtree and octreequadtree and octree

Page 13: Quadtrees, Octrees and their Applications in Digital Image Processing.

Recursive Tree DecompositionRecursive Tree Decomposition

Think how to write this software in Lisp

Page 14: Quadtrees, Octrees and their Applications in Digital Image Processing.

Construction of the quadtreeConstruction of the quadtree

We get an image represented by a quadtree

Page 15: Quadtrees, Octrees and their Applications in Digital Image Processing.

Trees can be well manipulated in software, for instance in Lisp

Advantages of the Advantages of the quadtreequadtree

Page 16: Quadtrees, Octrees and their Applications in Digital Image Processing.

Disadvantages of the Disadvantages of the quadtreequadtree

Page 17: Quadtrees, Octrees and their Applications in Digital Image Processing.

Structure of an OctreeStructure of an Octree

Octrees are to represent three-dimensional robot environments

Page 18: Quadtrees, Octrees and their Applications in Digital Image Processing.

Structure of an Structure of an OctreeOctree

Page 19: Quadtrees, Octrees and their Applications in Digital Image Processing.

Advantages of the Advantages of the OctreesOctrees

Page 20: Quadtrees, Octrees and their Applications in Digital Image Processing.

Applications of these data structuresApplications of these data structures

•The quadtree, octree and binary tree decomposition methods are widely used in two and three dimension image processing and computer graphics

•Some of the application areas involve:

• the image data structure,

• region representation,

• picture segmentation,

• component labeling,

• image smoothing,

• image enhancement,

• data compression

Page 21: Quadtrees, Octrees and their Applications in Digital Image Processing.

• Pattern recognition

• Shape analysis

• Image segmentation

• Region matching

• Images can be represented with pyramids and thus, both local and global feature extraction is possible

Applications of these data structuresApplications of these data structures

Page 22: Quadtrees, Octrees and their Applications in Digital Image Processing.

Application to pattern Application to pattern recognitionrecognition

Page 23: Quadtrees, Octrees and their Applications in Digital Image Processing.

We want to know where is B located structurally in our image

Page 24: Quadtrees, Octrees and their Applications in Digital Image Processing.
Page 25: Quadtrees, Octrees and their Applications in Digital Image Processing.
Page 26: Quadtrees, Octrees and their Applications in Digital Image Processing.

We got here the structure of our environment

Page 27: Quadtrees, Octrees and their Applications in Digital Image Processing.

Tree Decomposition in Pattern Tree Decomposition in Pattern ClassificationClassification

Tree decomposition can be used not only in image space but in transform space or feature space

Page 28: Quadtrees, Octrees and their Applications in Digital Image Processing.

Tree Decomposition in Pattern Tree Decomposition in Pattern ClassificationClassification

Page 29: Quadtrees, Octrees and their Applications in Digital Image Processing.

Tree Decomposition in Tree Decomposition in Pattern ClassificationPattern Classification

Page 30: Quadtrees, Octrees and their Applications in Digital Image Processing.

Application of trees to Edge DetectionApplication of trees to Edge Detection•The edge detection task can be accomplished by applying a point-neighborhood operator or the edge detector to every point of a large matrix

•The algorithm for this works as follows:

•An edge detector is applied at each point in the starting level

•At each point, if the value exceeds a threshold, the operation is applied to the descendants of the point in the next finer level.

Starting Starting from topfrom top

Page 31: Quadtrees, Octrees and their Applications in Digital Image Processing.

Application of trees to Feature DetectionApplication of trees to Feature Detection

Pyramides are used for feature detection

Pyramides are used for feature extraction

Pyramides limit scope of the search

Page 32: Quadtrees, Octrees and their Applications in Digital Image Processing.

The disadvantage of this method is that the reduction of resolution will affect the visual appearance of edges and small objects

•In particular, at a coarser level of resolution:

• edges tend to get smeared and

•region separation may disappear

Application of trees to Feature Application of trees to Feature DetectionDetection

Page 33: Quadtrees, Octrees and their Applications in Digital Image Processing.

Extracting compact objects Extracting compact objects using treesusing trees

• Many image analysis tasks require the extraction of compact objects from a background, where

• the shapes of the desired objects are not known,

• except for the fact that they are compactcompact

• Image segmentation using pyramids can be applied to extract such objects.

• “Spot detectors” are applied to image at each level of the pyramid:

• this is equivalent to applying spot detectors of many sizes to full-resolution image

Page 34: Quadtrees, Octrees and their Applications in Digital Image Processing.

Extracting compact Extracting compact objects using treesobjects using trees

Page 35: Quadtrees, Octrees and their Applications in Digital Image Processing.

•Three sets of information are represented in the pyramid structure

•1. Gray level

•2. Edge magnitude and direction

•3. Surroundedness

•The interaction between the different types of information at each level of the pyramid leads to the final segmentation

Extracting compact objects using Extracting compact objects using treestrees

Page 36: Quadtrees, Octrees and their Applications in Digital Image Processing.

Using Quadtrees to Smooth ImagesUsing Quadtrees to Smooth Images

• Digital images usually contain noise of various kindsnoise of various kinds.

• Most image processing tasks are simplified if noise is removed

•A general approach to noise removal is to smooth the image

• SmoothingSmoothing is done by replacing each pixel value by a new value which is a function of the values in some neighborhood of the pixel.

Page 37: Quadtrees, Octrees and their Applications in Digital Image Processing.

Using Quadtrees to Smooth Using Quadtrees to Smooth ImagesImages

Method 1

Method 2See next slides

Page 38: Quadtrees, Octrees and their Applications in Digital Image Processing.

Using Quadtrees to Smooth Using Quadtrees to Smooth ImagesImages

Page 39: Quadtrees, Octrees and their Applications in Digital Image Processing.

Using Quadtrees to Smooth ImagesUsing Quadtrees to Smooth Images

Page 40: Quadtrees, Octrees and their Applications in Digital Image Processing.

Using Quadtrees to Smooth ImagesUsing Quadtrees to Smooth ImagesUsing Quadtrees to Smooth Images

Smoothing becomes hierarchical in trees

Page 41: Quadtrees, Octrees and their Applications in Digital Image Processing.

Using Quadtrees to Smooth Images

Method 2Method 21. Constructs a quadtree from an image

2. Replaces each pixel by the gray level of the leaf to which each corresponds

Using Quadtrees to Smooth Using Quadtrees to Smooth ImagesImages

Page 42: Quadtrees, Octrees and their Applications in Digital Image Processing.

Hierarchical Coding of Binary Images Hierarchical Coding of Binary Images using treesusing trees

Hierarchical Coding = to segment a picture into the largest possible uniform areas and to transmit a hierarchical representation of these areas.

Quadtrees can be used for coding

Pictures with large uniform areas can be highly compressed

Page 43: Quadtrees, Octrees and their Applications in Digital Image Processing.

The transmission result can be recreated by the receiver as soon as sufficient information about transmitted picture has been gathered

Hierarchical Coding of Binary Images Hierarchical Coding of Binary Images using treesusing trees

Page 44: Quadtrees, Octrees and their Applications in Digital Image Processing.

Quadtree CompressionQuadtree Compression

1 2

3 4

Page 45: Quadtrees, Octrees and their Applications in Digital Image Processing.

w w

W=white

B=black

G = goto ground

Second level

Page 46: Quadtrees, Octrees and their Applications in Digital Image Processing.

Hierarchical Coding of Hierarchical Coding of Binary ImagesBinary Images

GGGWWBBWBWGWGWWWBBWWW

Page 47: Quadtrees, Octrees and their Applications in Digital Image Processing.

•A bit assignment can be selected for the symbols

•The coding can also be extended to three dimensions with the use of octrees

Hierarchical Coding of Hierarchical Coding of Binary ImagesBinary Images

Page 48: Quadtrees, Octrees and their Applications in Digital Image Processing.

Problems to solve:Problems to solve:•Use pyramide for edge detection

•Treat a large (12 variables) Karnaugh Map as an image. What is the counterpart of Shannon Decomposition in terms of binary trees?

•Generalize to 4-valued logic and show link to quadtrees

•Generalize to 8-valued logic and show link to octrees

•Disscuss general links between discrete functions, images and compression methods.

Page 49: Quadtrees, Octrees and their Applications in Digital Image Processing.

•Use octree to represent the space for robot manipulator

•Use this space description to plan precise assembling operations.

Problems to solve:Problems to solve:

Page 50: Quadtrees, Octrees and their Applications in Digital Image Processing.

ReferencesReferences

Page 51: Quadtrees, Octrees and their Applications in Digital Image Processing.

ReferencesReferences

Page 52: Quadtrees, Octrees and their Applications in Digital Image Processing.

ReferencesReferences

Page 53: Quadtrees, Octrees and their Applications in Digital Image Processing.

ReferencesReferences