Programming Assignment 3 CS 302 - Data Structures Dr. George Bebis.

Slides:



Advertisements
Similar presentations
Coordinatate systems are used to assign numeric values to locations with respect to a particular frame of reference commonly referred to as the origin.
Advertisements

Programming Assignment 2 CS 302 Data Structures Dr. George Bebis.
電腦視覺 Computer and Robot Vision I
Intensity Transformations (Chapter 3)
Programming Assignment 2 CS 308 Assignments 2&3: Build a Simple System to Recognize Coins labeled image original image quarters nickel pennies dime dollar.
Each pixel is 0 or 1, background or foreground Image processing to
MIPR Lecture 5 Copyright Oleh Tretiak, Medical Imaging and Pattern Recognition Lecture 5 Image Measurements and Operations Oleh Tretiak.
COMP322/S2000/L201 Recognition: Object Descriptor Example: A binary image, object is indicated by one’s Run Length.
Region labelling Giving a region a name. Image Processing and Computer Vision: 62 Introduction Region detection isolated regions Region description properties.
Programming Assignment 2 CS308 Fall Goals Improve your skills with using templates. Learn how to compile your code when using templates. Learn more.
Pattern Recognition Topic 1: Principle Component Analysis Shapiro chap
Feature extraction: Corners and blobs
Image representation using arrays Image processing examples
Lecture 3a: Feature detection and matching CS6670: Computer Vision Noah Snavely.
C++ Programming: Program Design Including Data Structures, Fifth Edition Chapter 17: Linked Lists.
CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection.
Programming Assignment 4 CS 308. Recognize Coins (Regions) labeled image original imagethresholded image quarters nickel pennies dime dollar $1.67.
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
Data Structures Using C++ 2E
VEHICLE NUMBER PLATE RECOGNITION SYSTEM. Information and constraints Character recognition using moments. Character recognition using OCR. Signature.
Entropy and some applications in image processing Neucimar J. Leite Institute of Computing
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Describing Data: Numerical
Machine Vision for Robots
Spatial Filtering: Basics
Chapter 5 Image Restoration.
Knowledge Systems Lab JN 9/10/2002 Computer Vision: Gesture Recognition from Images Joshua R. New Knowledge Systems Laboratory Jacksonville State University.
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
CPSC 601 Lecture Week 5 Hand Geometry. Outline: 1.Hand Geometry as Biometrics 2.Methods Used for Recognition 3.Illustrations and Examples 4.Some Useful.
OBJECT RECOGNITION. The next step in Robot Vision is the Object Recognition. This problem is accomplished using the extracted feature information. The.
Kumar Srijan ( ) Syed Ahsan( ). Problem Statement To create a Neural Networks based multiclass object classifier which can do rotation,
Digital Image Processing Lecture 20: Representation & Description
Recap CSC508.
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
CS 6825: Binary Image Processing – binary blob metrics
ENT 273 Object Recognition and Feature Detection Hema C.R.
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
1 Trees A tree is a data structure used to represent different kinds of data and help solve a number of algorithmic problems Game trees (i.e., chess ),
10.7 Moments of Inertia for an Area about Inclined Axes
Programming Assignment 4 CS 308 Fall Recognize Coins (Regions) labeled image original imagethresholded image quarters nickel pennies dime dollar.
Microsoft Outlook 2010 Chapter 3 Managing Contacts and Personal Contact Information with Outlook.
Chapter 4: Pattern Recognition. Classification is a process that assigns a label to an object according to some representation of the object’s properties.
Action as Space-Time Shapes
Fourier Descriptors For Shape Recognition Applied to Tree Leaf Identification By Tyler Karrels.
Ch5 Image Restoration CS446 Instructor: Nada ALZaben.
Levels of Image Data Representation 4.2. Traditional Image Data Structures 4.3. Hierarchical Data Structures Chapter 4 – Data structures for.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Feature extraction: Corners and blobs. Why extract features? Motivation: panorama stitching We have two images – how do we combine them?
Applied Quantitative Analysis and Practices LECTURE#07 By Dr. Osman Sadiq Paracha.
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
1 Overview representing region in 2 ways in terms of its external characteristics (its boundary)  focus on shape characteristics in terms of its internal.
Chapter 17: Linked Lists. Objectives In this chapter, you will: – Learn about linked lists – Learn the basic properties of linked lists – Explore insertion.
Robotics Chapter 6 – Machine Vision Dr. Amit Goradia.
Data Structure and Algorithms
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Course 3 Binary Image Binary Images have only two gray levels: “1” and “0”, i.e., black / white. —— save memory —— fast processing —— many features of.
Instructor: Mircea Nicolescu Lecture 10 CS 485 / 685 Computer Vision.
Lecture 22 Image Restoration. Image restoration Image restoration is the process of recovering the original scene from the observed scene which is degraded.
Coordinatate systems are used to assign numeric values to locations with respect to a particular frame of reference commonly referred to as the origin.
Lecture 10: Harris Corner Detector CS4670/5670: Computer Vision Kavita Bala.
Lecture 10 Chapter 5: Image Restoration. Image restoration Image restoration is the process of recovering the original scene from the observed scene which.
Image Enhancement Band Ratio Linear Contrast Enhancement
CPS120: Introduction to Computer Science Nell Dale John Lewis Abstract Data Types.
图像处理技术讲座(3) Digital Image Processing (3) Basic Image Operations
Digital Image Processing Lecture 20: Representation & Description
3D Vision Interest Points.
Mean Shift Segmentation
CS212: Object Oriented Analysis and Design
Programming Assignment 3
Number Summaries and Box Plots.
Presentation transcript:

Programming Assignment 3 CS Data Structures Dr. George Bebis

Goal: Represent image regions using lists and perform galaxy classification Builds on previous two programming assignments. (1) Represent image regions in a list for easier processing. (2) Compute region features.

Project Objectives Improve your skills with manipulating unsorted/sorted lists Improve your skills with using templates Learn about feature extraction and classification.

Region Features Image regions can be characterized using various features: –Geometric –Photometric

Geometric Features The geometry of a region can be characterized using: –Size –Position –Orientation –Shape (e.g., circular, elliptical) Many of these features could be computed using a family of functions called moments.

Moments The moments of order (p,q) of a region R are: (i,j) є R Note: moments have their roots in probability theory and are used to characterize probability density functions (pdfs). - Mean (i.e., first order moment) - Variance (i.e., second order central moments).

Region Area (i.e., size) The area of a region is defined by the number of pixels in the region (i.e., size). Can be computed using zero order moments (i.e., p=q=0) : (i,j) є R

Region Center (i.e., centroid) The centroid of a region (i.e., center coordinates) can be computed using first order moments (p=1 or q=1):

Central Moments To make region descriptors invariant with respect to location, moments can be calculated with respect to the centroid of the region (i.e., central moments):

Principal Axes The principal axes of a region can be used to characterize the shape and orientation of a region. A min and A max

Principal Axes (cont’d) The principal axes, A min and A max, of a region can be computed using the principal moments λ min, λ max : The principal moments involve first and second order central moments:

Region Orientation The direction of the largest principal axis can be used to specify the orientation of a region:

Region Eccentricity (i.e., Elongatedness) A useful measure of a region’s circularity is its eccentricity (i.e., elongatedness). Can be easily computed using the ratio between the principal axes:

Example

Photometric Properties Measures characterizing region intensity, for example: –Mean and median of the gray-levels. –Minimum and maximum intensity values.

Object Classification - Example Objects could be classified in different categories using various region properties, for example: –Large/Small/Medium –Elongated/Circular

Represent regions in a sorted list: listOfRegions Geometric properties Intensity properties List of pixels x,y Geometric properties Intensity properties List of pixels x,y Geometric properties Intensity properties List of pixels x,y … listOfRegion: sorted with respect to “size” listOfPixels: unsorted Nodes store info about each region (i.e., “RegionType”) Sub-lists store the coordinates of pixels in each region - i.e., “PixelType” -- unsorted

Extra credit: template lists template struct NodeType { ItemType info; NodeType * next; }; listOfRegions: ItemType should be “RegionType” listOfPixels: ItemType should be “PixelType” Geometric properties Intensity properties List of pixels x,y you need to define them! This is object composition !

Extend computeComponents int computeComponents(inputImage, outputImage, listOfRegions) computeComponents should return the following info: –the labeled image (same as before) –the number of regions (same as before) –a list of regions (new) Modify BFS or DFS –Use one of them in this assignment

int computeComponents(inputImage, outputImage, listOfRegions) outputImage --> white connComp=0; for (i=0; i<N; i++) for(j=0; j<M; j++) if(inputImage[i][j] == 255 && outputImage[i][j]==255) { ++connComp; label = connComp; region findComponentDFS(inputImage, outputImage, i, j, label, region); region // or findComponentBFS(inputImage, outputImage, i, j, label, region); INSERT region into “listOfRegions” } return connComp; (client function) type “RegionType”

findComponentDFS(inputImage, outputImage, i, j, label, region) Stack.MakeEmpty(); Stack.Push((i,j)); // initialize stack while(!Stack.IsEmpty()) { Stack.Pop((pi,pj)); INSERT (pi,pj) into “listOfPixels” of “region” INSERT (pi,pj) into “listOfPixels” of “region” outputImage[pi][pj] = label * 10; for each neighbor (ni,nj) of (pi,pj) // push neighbors if(inputImage[ni][nj] == 255 && outputImage[ni][nj] == 255) { outputImage[ni][nj] = -1; // mark this pixel Stack.Push((ni,nj)); } COMPUTE geometric and photometric properties and populate “region” type RegionType Geometric properties Intensity properties List of pixels x,y

void deleteSmallComponents(listOfRegions, threshold) Step through the list nodes and delete all the regions whose size is less than a user-specified threshold (e.g., pixels). (client function) Hint: You would not have to visit all the nodes since the list will be sorted from the smallest to the largest region! “deleteSmallComponents” will be useful for debugging your program (i.e., keep large regions only)

Classify regions Add a new option in the driver called “classify regions” Image Gallery 2 –Given an input image (i.e., from Image Gallery 2), your program should extract and represent the regions as described. –Prints a summary of the regions found and their properties (e.g., position, size, orientation, eccentricity, mean intensity etc.) –Prints min/max values of size, eccentricity, and mean intensity.

Classify regions (cont’d) Then, your program should print the following sub-menu: (1) display regions with size between values A and B (2) display regions with orientation between values A and B (3) display regions with eccentricity between A and B (4) display regions with mean intensity between A and B (5) back to the main menu

Display your results listOfRegionsTraverse listOfRegions Find the nodes satisfying the constraint chosen by the user listOfPixels –For each such node, traverse its listOfPixels –For each pixel, copy its original value in a new image Display the resulted image! original image output image Geometric properties Intensity properties List of pixels x,y Geometric properties Intensity properties List of pixels x,y Geometric properties Intensity properties List of pixels x,y … Example: