EEC-693/793 Applied Computer Vision with Depth Cameras

Slides:



Advertisements
Similar presentations
Vector Calculus Mengxia Zhu Fall Objective Review vector arithmetic Distinguish points and vectors Relate geometric concepts to their algebraic.
Advertisements

EEC-492/592 Kinect Application Development Lecture 15 Wenbing Zhao
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Recursion.
Self-Reference - Induction Cmput Lecture 7 Department of Computing Science University of Alberta ©Duane Szafron 1999 Some code in this lecture is.
14-Jun-15 State Machines. 2 What is a state machine? A state machine is a different way of thinking about computation A state machine has some number.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
25-Jun-15 State Machines. 2 What is a state machine? A state machine is a different way of thinking about computation A state machine has some number.
29-Jun-15 Recursion. 2 Definitions I A recursive definition is a definition in which the thing being defined occurs as part of its own definition Example:
EEC-492/592 Kinect Application Development Lecture 10 Wenbing Zhao
Overview of Programming and Problem Solving Textbook Chapter 1 1.
CSIS 123A Lecture 9 Recursion Glenn Stevenson CSIS 113A MSJC.
 Wednesday, 9/18/02, Slide #1 CS106 Introduction to CS1 Wednesday, 9/18/02  QUESTIONS?? HW #1 due today at 5!!  Today: Loops, and two new data types.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 7 Clicker Questions September 22, 2009.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 8 Fault.
Lecture 4: Calculating by Iterating. The while Repetition Statement Repetition structure Programmer specifies an action to be repeated while some condition.
Recursion Review: A recursive function calls itself, but with a smaller problem – at least one of the parameters must decrease. The function uses the results.
Week 6.  Lab 1 and 2 results  Common mistakes in Style  Lab 1 common mistakes in Design  Lab 2 common mistakes in Design  Tips on PE preparation.
CSC 107 – Programming For Science. Today’s Goal  Discuss writing functions that return values  return statement’s meaning and how it works  When and.
Lexical Analysis - Scanner- Contd Computer Science Rensselaer Polytechnic Compiler Design Lecture 3(01/21/98)
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 8 Wenbing Zhao
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
3/3/2016 EEC492/693/793 - iPhone Application Development 1 EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 4 Wenbing Zhao
C++ Programming Lecture 12 Functions – Part IV
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
Problem of the Day  On the next slide I wrote today’s problem of the day. It has 3 possible answers. Can you guess which 1 of the following is the solution?
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 9 Wenbing Zhao
Chapter 13 Recursion Copyright © 2016 Pearson, Inc. All rights reserved.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
2008/10/22: Lecture 12 CMSC 104, Section 0101 John Y. Park
Recursive Thinking Chapter 9 introduces the technique of recursive programming. As you have seen, recursive programming involves spotting smaller occurrences.
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
Recursive Thinking Chapter 9 introduces the technique of recursive programming. As you have seen, recursive programming involves spotting smaller occurrences.
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
2008/10/22: Lecture 12 CMSC 104, Section 0101 John Y. Park
C# Basics These slides are designed for Game Design Class
EEC-484/584 Computer Networks
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-492/592 Kinect Application Development
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
Lecture Notes – Week 4 Chapter 5 (Loops).
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
Week 4 Lecture-2 Chapter 6 (Methods).
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
Ch. 2: Getting Started.
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
Machine epsilon eps returns the distance from 1.0 to the next largest floating point number. When eps is machine epsilon, the logic 1+eps>1 is TRUE.
Chap 7. Advanced Control Statements in Java
EEC-693/793 Applied Computer Vision with Depth Cameras
Chapter 13 Recursion Copyright © 2010 Pearson Addison-Wesley. All rights reserved.
More Loops Topics Counter-Controlled (Definite) Repetition
EEC-693/793 Applied Computer Vision with Depth Cameras
Chapter 4: Loops and Iteration
Presentation transcript:

EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 18 Wenbing Zhao wenbing@ieee.org

Outline Repetition Count Finite state machine Tolerate measurement errors

Repetition Count All repetition activities can be described in term a sequence of monotonic segments of one or more features, such as a joint angle, or displacement of a joint (or distance between two joints) Each monotonic segment is delineated by two key poses, which I call them configurations What is the monotonic segment? Angle or displacement keeps increasing or decreasing Finite state machine can be used to identify the key poses and therefore monotonic segments, and the transition between different monotonic segments 3

Toe Touch Exercise Consists of two monotonic segments Hands go down => distance between ankle and hand getting smaller Hands go up => distance between ankle and hand getting larger Hence, we use a single feature Initial pose: we have to start from some pose We use an additional feature for defining the initial pose Unity project: add repetition count to the last Unity app you built for replay You will need to log a few repetition of the toe touch first Modify BackScript.cs 4

BackScript.cs: add more member variables     float MIN_2_HIP = 0.3f;     float MIN_2_ANKLE = 0.3f;     float MAX_THD = 0.5f;     float min2hip = 2.0f;     float min2ankle = 2.0f;     float max2ankle = 0f;     float maxthd = 0.0f;     int correctCount = 0; 5

BackScript.cs: call assessToetouch() in DisplayNextFrame() vid DisplayNextFrame() { // original code …... // before you return, call assessToetouch(); } 6

BackScript.cs void assessToetouch() { Vector3 seg1 = new Vector3();      Vector3 seg2 = new Vector3();      seg1.x = Hand_Left.transform.localPosition.x - Hip_Left.transform.localPosition.x;      seg1.y = Hand_Left.transform.localPosition.y - Hip_Left.transform.localPosition.y;      seg1.z = Hand_Left.transform.localPosition.z - Hip_Left.transform.localPosition.z;      seg2.x = (Hand_Left.transform.localPosition.x - Ankle_Left.transform.localPosition.x);      seg2.y = (Hand_Left.transform.localPosition.y - Ankle_Left.transform.localPosition.y);      seg2.z = (Hand_Left.transform.localPosition.z - Ankle_Left.transform.localPosition.z);               float hand2hip = seg1.magnitude;      float hand2ankle = seg2.magnitude; 7

BackScript.cs switch(state) {     case -1:     if(hand2hip < MIN_2_HIP && hand2ankle > MAX_THD)     {          this.state = 0;          min2ankle = hand2ankle;     }    break;    8

BackScript.cs case 0:        // hand2ankle should become smaller        if(hand2ankle < min2ankle)            min2ankle = hand2ankle;        if(hand2ankle > min2ankle && hand2ankle-min2ankle > 0.2)        {             if(min2ankle < MIN_2_ANKLE)             {                   // since we reached a min2ANKLE, we have to advanced our state anyway                   // one bad iteration should not make it impossible to continue with a correct iteration later                   this.state = 1;                   max2ankle = hand2ankle;                   min2hip = hand2hip;             }             else             {                  Debug.Log ("rule0 violated: min2ankle wrong: "+min2ankle);                  rule0violated = true;                  this.state = -1;             }        }        break; 9

BackScript.cs case 1:             if(hand2ankle > max2ankle)                 max2ankle = hand2ankle;             if(hand2hip < min2hip)                 min2hip = hand2hip;                          if(hand2ankle < max2ankle && max2ankle-hand2ankle > 0.2)  {                 if(max2ankle > MAX_THD && min2hip < MIN_2_HIP) {                     this.state = 0;                     min2ankle = hand2ankle;                                          this.correctCount++;                     counterDisplay.text = "Correct Iteration Count: "+this.correctCount;                     Debug.Log ("Good iteration to: "+this.correctCount);                 }                 else                 {                     Debug.Log ("rule1 violated: min2ankle wrong: "+min2ankle);                     rule0violated = true;                     this.state = -1;                 }             }             break;        } } 10