Learn how to make your drawings come alive…  NEW COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms,

Slides:



Advertisements
Similar presentations
First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.
Advertisements

Heuristic Search techniques
Dimensioning Dimensioning Gateway To Technology®
Interpolating curves.
Conics. Parabolas Definition - a parabola is the set of all points equal distance from a point (called the focus) and a line (called the directrix). Parabolas.
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
Approximations of points and polygonal chains
Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
Freehand Drawing System based on Geometric Constraints Kaisuke Nakajima Joint work with Takeo Igarashi User Interface Research Group The University of.
CS 551 / 645: Introductory Computer Graphics Clipping Lines and Polygons.
Computer Graphics Viewing.
Copyright © Cengage Learning. All rights reserved. Conic Sections.
© University of Wisconsin, CS559 Spring 2004
Uncertainty Representation. Gaussian Distribution variance Standard deviation.
Learn how to make your drawings come alive…  Lecture 3: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms,
Learn how to make your drawings come alive…  NEW COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms,
1Ellen L. Walker Recognizing Objects in Computer Images Ellen L. Walker Mathematical Sciences Dept Hiram College Hiram, OH 44234
Copyright (c) Bani K. Mallick1 STAT 651 Lecture #18.
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 71 Chapter 1 Linear Equations and.
Foundation Knowledge Identify The Problem Explore Interpretations & Connections Prioritize Alternatives Envision Strategic Innovation Confused Fact Finder.
Foundation Knowledge Identify The Problem Explore Interpretations & Connections Prioritize Alternatives Envision Strategic Innovation Confused Fact Finder.
Learn how to make your drawings come alive…  NEW COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms,
Logo Lesson 3 TBE 540 Fall 2004 Farah Fisher. Prerequisites for Lesson 3 Before beginning this lesson, the student must be able to… Use simple Logo commands.
Learn how to make your drawings come alive…  NEW COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms,
Learn how to make your drawings come alive…  Lecture 2: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms,
Learn how to make your drawings come alive…  COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms, including.
Foundation Knowledge Identify The Problem Explore Interpretations & Connections Prioritize Alternatives Envision Strategic Innovation Confused Fact Finder.
Learn how to make your drawings come alive…  COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms, including.
Geometric Probing with Light Beacons on Multiple Mobile Robots Sarah Bergbreiter CS287 Project Presentation May 1, 2002.
Short Term Load Forecasting with Expert Fuzzy-Logic System
Spreadsheet Problem Solving
Part 1 Set 2: Straight Lines
Colleen Beaudoin February,  Review: The geometric definition relies on a cone and a plane intersecting it  Algebraic definition: a set of points.
Conics.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
CS 325 Introduction to Computer Graphics 03 / 03 / 2010 Instructor: Michael Eckmann.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
1 Three dimensional mosaics with variable- sized tiles Visual Comput 2008 報告者 : 丁琨桓.
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
CS 6825: Binary Image Processing – binary blob metrics
Drawing Curves Lecture 9 Mon, Sep 15, Drawing Functions If f(x) is a function, then thanks to the vertical-line test, for each value of x, there.
Curves.
CS433: Modeling and Simulation Dr. Anis Koubâa Al-Imam Mohammad bin Saud University 15 October 2010 Lecture 05: Statistical Analysis Tools.
Section 8.4.  The definition of a hyperbola is similar to that of an ellipse. However, this time it is the difference in the distances to the two foci,
CS 376 Introduction to Computer Graphics 04 / 20 / 2007 Instructor: Michael Eckmann.
Curves. First of all… You may ask yourselves “What did those papers have to do with computer graphics?” –Valid question Answer: I thought they were cool,
1 CS 430/536 Computer Graphics I Curve Drawing Algorithms Week 4, Lecture 8 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing.
Slide Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
Foundation Knowledge Identify The Problem Explore Interpretations & Connections Prioritize Alternatives Envision Strategic Innovation Confused Fact Finder.
10/19/04© University of Wisconsin, CS559 Fall 2004 Last Time Clipping –Why we care –Sutherland-Hodgman –Cohen-Sutherland –Intuition for Liang-Barsky Homework.
Topics in Algorithms 2007 Ramesh Hariharan. Tree Embeddings.
Course 8 Contours. Def: edge list ---- ordered set of edge point or fragments. Def: contour ---- an edge list or expression that is used to represent.
Feature Point Detection and Curve Approximation for Early Processing of Free-Hand Sketches Tevfik Metin Sezgin and Randall Davis MIT AI Laboratory.
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
First of all – lets look at the window’s you are going to use. At the top you have a toolbar, with all your various tools you can use when customising.
Functions. functions: a collection of lines of code with a name that one can call. Functions can have inputs and outputs.
Learn how to make your drawings come alive…  COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms, including.
The simple linear regression model and parameter estimation
Bitmap Image Vectorization using Potrace Algorithm
Statistical Quality Control, 7th Edition by Douglas C. Montgomery.
Haim Kaplan and Uri Zwick
Basic theory of curve and surface
Introduction to Graphing
Fitting Curve Models to Edges
Digital Media Dr. Jim Rowan ITEC 2110.
Section 2: Linear Regression.
Presentation transcript:

Learn how to make your drawings come alive…  NEW COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms, including feature-based, vision-based, geometry-based, and timing-based recognition algorithms; examination of methods to combine results from various algorithms to improve recognition using AI techniques, such as graphical models.

Sezgin Finds corners in a polygon or in a complex shape. First: Polygon

Direction Direction of each stroke segment = arctan2(dy,dx) Add check to make sure graph continuous (e.g., add 2pi)

Curvature Change in direction for each segment

Speed Speed of each segment (already computed in Rubine)

Threshold Curvature Threshold = mean curvature

Threshold Speed Threshold = 90% of mean

Select Vertices for Each Max of all sections above threshold Fd = curvature points

Select Vertices for Each Max of all sections above threshold Fs = speed points

Initial Fit Intersection of Fd and Fs (and of course the endpoints)

Local neighborhood: i-k, i+k Si is a stroke point k is number of stroke point on either side to search L e = Euclidian distance from S i-k to S i+k K not defined –Lets try k = 3 … AND –Variable k where min(L e > 6 pixels)

Curvature Certainty Metric for Fd di = curvature at point i l = stroke segment curve length from S i-k to S j+k Lets call it CCM(v i )

Speed Certainty Metric for Fs Lets call it SCM(v i )

Vertex Possibilities: Fd: Possibilities based on curvature Fs: Possibilities based on speed CCM(Fd) : Curvature Certainty Metric SCM(Fd) : Speed Certainty Metric H 0 = Initial Hybrid Fit = intersection of Fd and Fs (and endpoints)

Selecting new points to add Hi’ = H 0 + max(SCM(Fs – H 0 ) ) Hi’’ = H 0 + max(CCM(Fd – H 0 )) Pick highest scoring from each list Try to add it to the H 0

Make Line Segments for Hi’ and Hi’’ For each vertex v i in Hi – create a list of line segments between v i and v i+1 If there are n points in the vertex selection, there will be n-1 line segments

Calculate Error for Both Hi’ and Hi’’ S = total stroke length (not Euclidean distance) ODSQ = orthogonal distance squared ODSQ(s,Hi) = distance of stroke point s to appropriate line segment (previous slide)

Distance from point to line segment if isPointOnLine(point, line) theDistance = 0; else array1 = getLineAxByC(line); array2 = getAxByCPerpendicularLine(line, point); A = [array1(1), array1(2); array2(1), array2(2)]; b = [array1(3); array2(3)]; intersectsPoint = linsolve(A, b)'; if isPointOnLine(intersectsPoint, line) theDistance = getLineLength([intersectsPoint; point]); else dist(1) = getLineLength([line(1,:); point]); dist(2) = getLineLength([line(2,:); point]); theDistance = min(dist); end

Select either Hi’ or Hi’’ Pick the one with the lower error (in the paper this is also the one with the `higher score’ – score in this sense is just an internal ranking metric) H 1 = Hi’ or Hi’’ (the one with the lower error) We have added one vertex point.

Repeat Create new Hi’ and Hi’’ Hi’ = H 1 + max(SCM(Fs – H 1 ) ) Hi’’ = H 1 + max(CCM(Fd – H 1 )) (Note one of them will be the same as the previous time.) Recompute error and continue

When to Stop Stop when error is below the threshold. … what is threshold? Not in paper Lets –Compute the error for H 0 = e 0 –Compute the error for H all (all the chosen v) = e all – We want something in the middle: close to e all –.1*(e 0 -e all ) + e all –You will try other thresholds in your implementation

Implications Anything that you can describe geometrically you can build sketch system for

Curves Stroke between corners can be curve or line Is line if l2/l1 is close to 1. –Lets use.9 < l2/l1 *1.1 < 1 Else is curve

Sezgin Bezier Curve Fitting Want to replace with a Bezier curve –Bezier Demo 2 endpoints and 2 control points

Bezier curve equation mlhttp:// ml P0 (x0,y0) = p1, P1 = c1, P2 = c2, P3 = p2 x(t) = axt 3 + bxt 2 + cxt + x0 y(t) = ayt 3 + byt 2 + cyt + y0 cx = 3 (x1 - x0) bx = 3 (x2 - x1) - cx ax = x3 - x0 - cx - bx cy = 3 (y1 - y0) by = 3 (y2 - y1) - cy ay = y3 - y0 - cy - by

Sezgin Bezier Curve Fitting Control points Endpoints: u = p1, v = p2 T1= tangent vector – initial direction of stroke at point p1 T2 = tangent vector of p2 – initial direction of stroke at point p2 K = stroke length / 3 –3 is common approximation c1=k*t1 + v c2 = k*t2 + u

Want to Test our Approximation Perhaps this is really a very complex curve which can’t be fit with a simple Bezier curve –E.g., the treble clef of a musical staff Discretize the curve. (It doesn’t say into how many parts – I leave that up to you.) –Linear approximation for each part

If error too high Break our curve down the middle into two curves, and try again.

Matlab Curve Fitting function [estimates, model] = fitcurvedemo(xdata, ydata) % Call fminsearch with a random starting point. start_point = rand(1, 2); model estimates = fminsearch(model, start_point); % expfun accepts curve parameters as inputs, and outputs sse, % the sum of squares error for A * exp(-lambda * xdata) - ydata, % and the FittedCurve. FMINSEARCH only needs sse, but we want to % plot the FittedCurve at the end. function [sse, FittedCurve] = expfun(params) A = params(1); lambda = params(2); FittedCurve = A.* exp(-lambda * xdata); ErrorVector = FittedCurve - ydata; sse = sum(ErrorVector.^ 2); end

Circles and Ellipses Least squares fit Make a bounding box of stroke and form Oval is formed from that bounding box. Circle is easy: –Find out how far the circle is from the center = d, return (d-r)^2 –Ellipse more complicated

Project Suggestions Build a finite state machine recognizer for the computability class to easily draw and hand in their diagrams. Build a physics drawing program that attaches to a design simulator (we have interactive physics 2005) Build a fashion drawing program. You draw clothes on a person, and it puts them one the person.

Project Ideas Build a robot drawing and simulation program. You draw the robot and have a number of gestures to have it do different things Gesture Tetris

Project Suggestions Use both rubine and geometrical methods in recognition Develop new ways for editing. Build new low level recognizers

Projects! Proposal due: Sept 22 Visualization Contest –Ivc.tamu.edu/competition Smart Boards coming IAP (Industrial Affiliates Program) Demo

Projects! 2 types: –Cool application Sketch front end to your own research system Fun application to go on smart board/vis contest –Gesture Tetris –TAMU gesture-based map/directory info –Computability/Physics/EE/MechEng simulator –New recognition algorithm Significant change to old techniques to make a new application

Final Project Handin Implementation… Build it… In class Demonstration (5-10 minutes) Previous work –Find at least 3 relevant papers (not read inc class) –Assign one for class to read, you lead short discussion Test –Run your recognition system on data. –Find out what data you need (e.g., UML class diagrams) –Each student in class will supply others data –+ Find 6 more people outside (to give 15 different people) Paper –Introduction (why important) –Previous Work –Implementation –Results –Conclusion

Syllabus courses/SR/2006http:// courses/SR/2006