Calculating Fractal Dimension from Vector Images Kelly Ran FIGURE 1. Examples of fractals (a) Vector graphics image (b) Sierpinski Carpet D ≈ 1.89 FIGURE.

Slides:



Advertisements
Similar presentations
Pixels and Digital Images Yrd. Doc. Dr. Ahmet Sayar Kocaeli Universitesi Bilgisayar Muhendisligi Ileri Bilgisayar Grafikleri.
Advertisements

© 2011 Delmar, Cengage Learning Chapter 7 Importing and Modifying Graphics.
Importing and Modifying Graphics
© 2010 Delmar, Cengage Learning Chapter 7: Importing and Modifying Graphics.
L.Ghadah R. Hadba CT1514-L1.  Computer Graphics :refers to processing of creating a new image from Geometry, Lighting parameters, Materials and Textures.Using.
Experiments and Variables
Raster Graphics vs. Vector Graphics
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
1 King ABDUL AZIZ University Faculty Of Computing and Information Technology CS 454 Computer graphicsIntroduction Dr. Eng. Farag Elnagahy
Introduction to Computer Graphics
DIGITAL GRAPHICS & ANIMATION
Modelling and Simulation 2008 A brief introduction to self-similar fractals.
1. 2  A computer is a device capable of storing data  in a format suited to the computer,  which is then processed by mathematical manipulation and.
Working with Graphics. Objectives Understand bitmap and vector graphics Place a graphic into a frame Work with the content indicator Transform frame contents.
Minard Saladino By:. Introduction: Illustrator is a vector-based imaging program. Unlike PhotoShop, which deals in pixels (raster images), this one deals.
Adobe InDesign CS5 – Illustrated Unit D: Working with Graphics.
Graphics: Creating Images Chapter 8, Exploring the Digital Domain.
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - GRAPHICS. In this chapter how the computer creates, stores, and displays graphic images how the computer creates,
1 Bitmap Graphics It is represented by a dot pattern in which each dot is called a pixel. Each pixel can be in any one of the colors available and the.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Introduction to MATLAB for Engineers, Third Edition Chapter 6 Model Building and Regression PowerPoint to accompany Copyright © The McGraw-Hill Companies,
Module Code: CU0001NI Technical Information on Digital Images Week -2.
Map Scale, Resolution and Data Models. Components of a GIS Map Maps can be displayed at various scales –Scale - the relationship between the size of features.
Chapter 13 Statistics © 2008 Pearson Addison-Wesley. All rights reserved.
Objective Understand concepts used to create digital graphics. Course Weight : 15% Part Three : Concepts of Digital Graphics.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
Tutorial 1 Introducing Adobe Flash CS3 Professional
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
© 2011 Delmar, Cengage Learning Chapter 1 Getting to Know Illustrator.
CGMB214: Introduction to Computer Graphics
Graphics. Graphic is the important media used to show the appearance of integrative media applications. According to DBP dictionary, graphics mean drawing.
Designing Your Clock Face. Objectives STUDENTS WILL BE ABLE TO: 1.Explain the differences between RASTER and VECTOR graphics. 2.List at least two examples.
Calculating Fractal Dimension from Vector Images Kelly Ran.
I MPORTING AND M ODIFYING G RAPHICS. 1. Understand and import graphics 2. Break apart bitmaps and use bitmap fills 3. Trace bitmap graphics Objectives.
Quiz # 1 Chapters 1,2, & 3.
Illustrator I I450 Technology Seminar. Bitmap vs. Vector Photoshop = Bitmap Illustrator = Vector Bitmap images are resolution dependent Vector images.
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
Chapter 3 Image Files © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
CISC 110 Day 3 Introduction to Computer Graphics.
Introduction to Images & Graphics JMA260. Objectives Images introduction Photoshop.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
CAG – (Auto)CAD Commands
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Calculating Fractal Dimension from Vector Images Kelly Ran.
OUTPUT PRIMITIVES A.Aruna/Faculty of Information technology/SNSCE13/19/2016.
Development of a Fractal Dimension Calculator Kelly Ran.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Computer Graphics Lesson 2 July 12, 2005 Image Formats What are some formats you are familiar with? There are 4 basic image format types: Uncompressed.
Mohammed AM Dwikat CIS Department Digital Image.
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Digital Basics Quiz Preparation. Basic Digital Image Concepts Aliasing & Anti‐aliasing Resolution Compression Raster & Vector Color mode & Image mode.
Chapter 7 Vector Editing © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Graphical User Interface on Analysis of Mechanics and Dynamics of Biopolymers in Living Cells Peter Russel, Biomedical Engineering Shubham Agrawal, Computer.
Graphics Basic Concepts 1.  A graphic is an image or visual representation of an object.  A visual representation such as a photo, illustration or diagram.
Main characteristics of Vector graphics  Vector graphics provide an elegant way of constructing digital images (diagrams, technical illustration and.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
The Space-Filling Efficiency of Urban Form in Izmir: A Historical Perspective Using GIS and Fractal Dimension April 29th – 30th, th Meeting of AESOP.
Chapter 3 Image Files © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Binary Representation in Audio and Images
Bitmap Image Vectorization using Potrace Algorithm
Flash Interface, Commands and Functions
Dr. Jim Rowan ITEC 2110 Wednesday, September 12
Chapter 3:- Graphics Eyad Alshareef Eyad Alshareef.
Chapter 7 Vector Editing
Digital Media Dr. Jim Rowan ITEC 2110.
Presentation transcript:

Calculating Fractal Dimension from Vector Images Kelly Ran FIGURE 1. Examples of fractals (a) Vector graphics image (b) Sierpinski Carpet D ≈ 1.89 FIGURE 2. Zooming in: a comparison of vector and raster graphics FIGURE 3. Screenshots of calculating the fractal dimension of a Sierpinski Carpet sN(s)‏log(1/s)‏log(N(s))‏ FIGURE 4. Graph of data from Table 1. The slope of the linear regression line is equal to calculated fractal dimension. Percent error is 4.238%. TABLE 1. Grid size s and number of grid boxes N(s), calculated from the Sierpinski Carpet in Figure 3 (a) Sierpinski Gasket D ≈ 1.59 (b) Raster graphics image All figures and tables by Kelly Ran sN(s)‏log(1/s)‏log(N(s))‏ sN(s)‏log(1/s)‏log(N(s))‏ (a) s = 12(b) s = 3 TABLE 2. Data calculated from a rectangle TABLE 3. Data calculated from a line Sierpinski Carpet Linear regression Slope = R 2 = Error = 4.238% Rectangle Linear regression Slope = R 2 = Error = 6.300% Line Linear regression Slope = R 2 = Error = 6.100% INTRODUCTION Fractal dimension is a quantity that can be used as an index of complexity for fractals. In most research applications, fractal dimension is calculated using the raster graphics representation of images. This project investigates an alternative method by calculating fractal dimension from vector graphics. The goal of this project is to demonstrate the viability of vector graphics calculations, to compare vector graphics calculations with raster graphics calculations, and to display a user interface that shows the calculations, step-by-step. BACKGROUND Fractals and fractal dimension. Fractals, geometric figures that exhibit self-similarity, are used in myriad applications. They accurately model many natural objects and phenomena, like tree branches, jagged coastlines, and particle motion. Every fractal has a numeric fractal dimension that can be calculated using several methods. Researchers use fractal dimension as an index of complexity: it is used for texture classification in computer vision, protein molecule analysis in medicine, and plant growth analysis in botany. Box dimension. To calculate fractal dimension using the box- counting method, a square grid of size s is superimposed over a black-and-white image of a fractal object. N(s), the number of grid boxes that cover the object, is counted. Box dimension D is calculated using the formula. D = log(N(s)) / log(1/s) (1)‏ It can be seen that fractal dimension is an index of complexity by examining formula 1: as the scale of measurement s decreases, one can assess how the measurement N(s) changes. Graphics representation. Raster graphics is way of representing images. In raster graphics, images are collections of pixels, and numeric color values are stored for each pixel. Bitmap (BMP) is a raster graphics format. Vector graphics is a way of representing images by using primitives like paths (lines and curves) and points. Scalable Vector Graphics (SVG) is a format for creating and displaying vector graphics. Raster graphics have poor resolution when they are examined on small scales. Vector graphics, on the other hand, retain clarity (Figure 2). In this project, only path primitives were used. Paths consist of lines and curves. Path data is usually stored in a single attribute, and consists of commands and coordinates: d ="M 200,66 L 266,66 L 266,133 L 200,133 L 200,66 z “ Commands such as M, L, C, and z indicate what kind of line or curve should be drawn. Research applications of fractal dimension use raster graphics formats. Researchers take digital images (in raster format) and apply the box-counting method, using many grids of variable size on the same image. Their data are plotted on an x-y plane, with log(N(s)) on the y-axis and log(1/s) on the x-axis. Using a linear regression, they find the line of best fit for the data, and D is the slope of that line. METHODS This presentation uses an example of a Sierpinski Carpet to demonstrate the methods of the fractal dimension calculator. Creation of Scalable Vector Graphics (SVG). SVG images of fractals and non-fractals were created using Inkscape, an open source vector graphics editor. To make the Sierpinski Carpet fractal, a black square was cloned 9 times using the “Tiled Clones” option. The original square and the fifth cloned square were deleted. The remaining eight squares were grouped together and treated like the original square. Finally, all of the squares were transformed from object types to path types. SVG images were black-and-white, with black representing the object whose fractal dimension was to be calculated. METHODS Calculation of fractal dimension. The Processing language and environment were used to calculate fractal dimension. The SVG data file was loaded and parsed into an array of strings (each line of the file was an element of the array). Using methods from the Candy library, the SVG image was displayed onscreen. The functions split(String s), trim(), and indexOf(String s) were used to process the SVG data file. Information for each path in the file was stored as an array of Coordinates, paths. A global integer was created to keep track of s, grid size. A nested for-loop created an array, grid, that stored the Coordinates of each grid box’s upper-left hand corner. Every element in grid was tested to see if it covered any part of the black object (in the SVG image). Two methods were used: case1 and case2. The number of elements in grid that covered the object was N(s). S and N(s) were stored in an array called data. Whenever the button step was pressed, the grid size was decreased and the counting process was repeated. D, fractal dimension, was calculated using the 2 most recent additions to data : D = [log(N(s 2 )) – log(N(s 1 ))] / [log(1/s 2 ) – log(1/s 1 )](2)‏ In the example in Figure 3, error was able to be calculated, because there is an actual value for the Sierpinski Carpet’s fractal dimension. Percent error = |D - D actual | * 100 / D actual (3)‏ Showing the box method. To show the process of box-counting, red rectangles were superimposed over the SVG image on the screen (Figure 3). For every unique s, data were shown, along with calculated D and percent error. CONCLUSION Results. This project demonstrated that it is feasible to calculate fractal dimension from vector images. In the Sierpinski Carpet example, the calculated fractal dimension had 4.238% error, using all data points. A rectangle had a calculated dimension of 1.874, and a line had a calculated dimension of The box-counting method of calculating fractal dimension was shown onscreen. Applications. In the future, this vector graphics method of calculating fractal dimension may be shown to be more efficient than the raster graphics method. In that case, researchers may be able to save time by converting their raster images to vector images and using the vector graphics method. The properties of vector graphics allow minute image details to be shown. Researchers may want to find the fractal dimension of objects that have such minute detail, and using the vector graphics method may yield the best results in terms of accuracy. Researchers who use computer models of fractals may choose to use the vector graphics representation of their models. Improvements and extensions of the fractal dimension calculator. The fractal dimension calculator program will be improved. In this phase, the program can process straight-line paths from SVG files. In the next phase, it will be able to process SVG paths that contain Bézier curves as well as straight lines. The program will also be able to calculate fractal dimension from raster graphics, for the purpose of comparing raster graphics calculations with vector graphics calculations. The accuracy and efficiency (in terms of time) of both methods will be analyzed. A verification procedure will be designed to test if the calculator works properly. A useful extension of the calculator program will upload many SVG files at once and calculate fractal dimension without visually showing the box-counting method.