Programming Assignment 4 CS 308. Recognize Coins (Regions) labeled image original imagethresholded image quarters nickel pennies dime dollar $1.67.

Slides:



Advertisements
Similar presentations
Automatic Color Gamut Calibration Cristobal Alvarez-Russell Michael Novitzky Phillip Marks.
Advertisements

Programming Assignment 2 CS 302 Data Structures Dr. George Bebis.
Lecture 07 Segmentation Lecture 07 Segmentation Mata kuliah: T Computer Vision Tahun: 2010.
Programming Assignment 2 CS 308 Assignments 2&3: Build a Simple System to Recognize Coins labeled image original image quarters nickel pennies dime dollar.
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
Image Indexing and Retrieval using Moment Invariants Imran Ahmad School of Computer Science University of Windsor – Canada.
Searching Kruse and Ryba Ch and 9.6. Problem: Search We are given a list of records. Each record has an associated key. Give efficient algorithm.
CS292 Computational Vision and Language Pattern Recognition and Classification.
Programming Assignment 2 CS308 Fall Goals Improve your skills with using templates. Learn how to compile your code when using templates. Learn more.
Iterators T.J. Niglio Computer & Systems Engineering Fall 2003 Software Design & Documentation Object Behavioral.
Processing Digital Images. Filtering Analysis –Recognition Transmission.
Programming Assignment 3 CS Data Structures Dr. George Bebis.
In Class Exercises. TV  Think about your television as an object.  You send messages to it using the remote control. What messages can you send?  What.
Smart Traveller with Visual Translator. What is Smart Traveller? Mobile Device which is convenience for a traveller to carry Mobile Device which is convenience.
A Novel 2D To 3D Image Technique Based On Object- Oriented Conversion.
Pattern Recognition. Introduction. Definitions.. Recognition process. Recognition process relates input signal to the stored concepts about the object.
Facial Recognition CSE 391 Kris Lord.
Value of a Coin Unit of Study 7: Money and Time Global Concept Guide: 1 of 4.
Knowledge Systems Lab JN 8/24/2015 A Method for Temporal Hand Gesture Recognition Joshua R. New Knowledge Systems Laboratory Jacksonville State University.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
1 Template-Based Classification Method for Chinese Character Recognition Presenter: Tienwei Tsai Department of Informaiton Management, Chihlee Institute.
Review Binary Tree Binary Tree Representation Array Representation Link List Representation Operations on Binary Trees Traversing Binary Trees Pre-Order.
Machine Vision for Robots
Presented by Tienwei Tsai July, 2005
Recap CSC508.
1Ellen L. Walker Segmentation Separating “content” from background Separating image into parts corresponding to “real” objects Complete segmentation Each.
CAP 5415 Computer Vision Fall 2004
CS 6825: Binary Image Processing – binary blob metrics
TECH Computer Science Data Abstraction and Basic Data Structures Improving efficiency by building better  Data Structure Object IN  Abstract Data Type.
1 CSE 980: Data Mining Lecture 17: Density-based and Other Clustering Algorithms.
Recursion CS 302 – Data Structures Chapter 7. What is recursion? smaller A technique that solves problem by solving smaller versions of the same problem!
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Visual Inspection Product reliability is of maximum importance in most mass-production facilities.  100% inspection of all parts, subassemblies, and.
Feature-Based Classification & Principle Component Analysis.
Pointers OVERVIEW.
Penny Nickel Dime Penny Nickel Dime Quarter Half Dollar.
Programming Assignment 4 CS 308 Fall Recognize Coins (Regions) labeled image original imagethresholded image quarters nickel pennies dime dollar.
Counting Coins. The Basics Quarter 25 cents Dime 10 cents.
Pattern Recognition April 19, 2007 Suggested Reading: Horn Chapter 14.
1 Pattern Recognition Pattern recognition is: 1. A research area in which patterns in data are found, recognized, discovered, …whatever. 2. A catchall.
Visual Information Systems Recognition and Classification.
Chapter 4: Pattern Recognition. Classification is a process that assigns a label to an object according to some representation of the object’s properties.
CS654: Digital Image Analysis Lecture 25: Hough Transform Slide credits: Guillermo Sapiro, Mubarak Shah, Derek Hoiem.
Name the United States Coins Count the Pennies 10 ¢
Human pose recognition from depth image MS Research Cambridge.
CSE 185 Introduction to Computer Vision Face Recognition.
1 Linked-list, stack and queue. 2 Outline Abstract Data Type (ADT)‏ Linked list Stack Queue.
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
Levels of Image Data Representation 4.2. Traditional Image Data Structures 4.3. Hierarchical Data Structures Chapter 4 – Data structures for.
Decision Trees Binary output – easily extendible to multiple output classes. Takes a set of attributes for a given situation or object and outputs a yes/no.
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Where’s the title? You gotta search for it!. PotW Solution String s = new Scanner(System.in).next(); int[] prev = new int[s.length() * 2 + 2]; Arrays.fill(prev,
October 1, 2013Computer Vision Lecture 9: From Edges to Contours 1 Canny Edge Detector However, usually there will still be noise in the array E[i, j],
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
CS Machine Learning Instance Based Learning (Adapted from various sources)
Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,
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.
Morphological Image Processing
1 A Statistical Matching Method in Wavelet Domain for Handwritten Character Recognition Presented by Te-Wei Chiang July, 2005.
Face Detection – EE368 Group 10 May 30, Face Detection EE 368 Group 10 Waqar Mohsin Noman Ahmed Chung-Tse Mar.
Examples (D. Schmidt et al)
Programming Languages Translator
PRESENTED BY Yang Jiao Timo Ahonen, Matti Pietikainen
Warm-Up Ch.3 #2B Gr 6.
Computer Vision Lecture 5: Binary Image Processing
Machine Vision Acquisition of image data, followed by the processing and interpretation of these data by computer for some useful application like inspection,
A New Approach to Track Multiple Vehicles With the Combination of Robust Detection and Two Classifiers Weidong Min , Mengdan Fan, Xiaoguang Guo, and Qing.
Name the United States Coins
Programming Assignment 3
Presentation transcript:

Programming Assignment 4 CS 308

Recognize Coins (Regions) labeled image original imagethresholded image quarters nickel pennies dime dollar $1.67

Project Objectives Improve your skills with manipulating linked-lists. Improve your skills with using templates. Learn about object recognition. Learn to document and describe your programs

How to choose a good threshold? a good threshold corresponds to the bottom of the valley

Extend Connected Components Algorithm Find the connected components in an image Assign a unique label to all the points in the same component. Store info about each component (region) in a linked-list

Modify computeComponents() int ComputeComponents(inputImage, outputImage, listOfRegions) ComputeComponents should return the following: –the labeled image –the number of components –a list of regions Modify BFS or DFS (not the recursive version).

listofRegions centroid: sorted by size (from the smallest to the largest region)

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; // new label // non-recursive functions region // findComponentDFS(inputImage, outputImage, i, j, label, region); region // findComponentBFS(inputImage, outputImage, i, j, label, region); // INSERT region ONTO THE LIST of THE REGIONS } return connComp; (client function)

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) ONTO the PixelType LIST of the current region outputImage[pi][pj] = label; for each neighbor (ni,nj) of (pi,pj) // push neighbors if(inputImage[ni][nj] == inputImage[pi][pj] && outputImage[ni][nj] == 255) { outputImage[ni][nj] = -1; // mark this pixel Stack.Push((ni,nj)); } // SET “size” and “centroid” for the current region }

void DeleteSmallComponents(listOfRegions, threshold) Eliminate small regions due to noise. Step through the list nodes and delete all the regions whose size is less than a threshold (e.g., pixels). You do not have to visit all the nodes since the list will be sorted from the smallest to the largest region.

Object Recognition (1) Feature extraction/selection - e.g., size, perimeter, circularity - Reliable and robust feature extraction is very important (2) Training - Process sample images containing instances of the objects to be recognized - Collect evidence regarding the variation of the feature values per object class. - Derive rules for recognition based on the feature values. (3) Recognition - Extract regions (objects) and their features - Apply recognition rules.

An Example Recognize the characters a,b,c and d. Assume we have decided to use features f1, f2, f3. f1 f2 f3 Character a c d b a d c b Some rules: Some rules: (i) find closest match (ii) use individual features or combinations of features Take my Pattern Recognition class if you are interested in this !

Coin Recognition We will use the size of the coins for recognition. Enough information since the camera is assumed to be at a fixed position and orientation. Factors that might affect the size of the coins: –noise (yields holes in the regions) –distortions due to the imaging process

Training Step Process several instances of coins from each category. Image Gallery 2Compute the average size and standard deviation for each category (use Image Gallery 2)

Training Step(cont’d) p_avg p_std n_avg n_std di_avg di_std q_avg q_std do_avg do_std ( i.e., size)

Recognition Step Extract the coins (regions) and compute their sizes Recognize the coins Print the total amountRecognition Extract the coins (regions) and compute their sizes Recognize the coins Print the total amountRecognition (1) Find closet match (2) Accept match if error within some threshold (to avoid false positives) e.g., suppose closest match is for quarters: if |s-q_avg|<const*q_std accept else unknown coin $1.67

Recognition Step(cont’d)

train.cpp Creates the table of features. Prints the following menu. Stores the table in a file upon choosing option (6) (1) pennies (2) nickels (3) dimes (4) quarters (5) dollars (6) done with training use Image Gallery 2

recognize.cpp Reads the table of features from the file. Image Gallery 1Given an input image (e.g., Image Gallery 1) it extracts the regions and recognizes the coins. Assigns the ID value in the nodes of the listOfRegions. Prints the following menu: (1) display the pennies only (2) display the nickels only (3) display the dimes only (4) display the quarters only (5) display the dollars only (6) print the total amount (7) done with recognition

Example: display the quarters only listOfRegionsTraverse the listOfRegions Find the nodes corresponding to quarters listOfPixelsTraverse the listOfPixels for each quarter Draw the pixels of each pixel in a new image Copy the pixel values from the original gray-scale image create new image original image