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
Self-Reference - Induction Cmput Lecture 7 Department of Computing Science University of Alberta ©Duane Szafron 1999 Some code in this lecture is.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
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
CSC201 Analysis and Design of Algorithms Asst.Proof.Dr.Surasak Mungsing Oct-151 Lecture 2: Definition of algorithm and Mathematical.
Overview of Programming and Problem Solving Textbook Chapter 1 1.
CSIS 123A Lecture 9 Recursion Glenn Stevenson CSIS 113A MSJC.
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.
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
Programming Fundamentals. Today’s Lecture Array Fundamentals Arrays as Class Member Data Arrays of Objects C-Strings The Standard C++ string Class.
Recursion. Definitions I A recursive definition is a definition in which the thing being defined occurs as part of its own definition Example: A list.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
Loops. About the Midterm Exam.. Exam on March 12 Monday (tentatively) Review on March 5.
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
Think What will be the output?
©2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
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.
Recursion 12-Nov-18.
Iteration with While You can say that again.
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
Recursion 2-Dec-18.
Recursion 2-Dec-18.
EEC-693/793 Applied Computer Vision with Depth Cameras
Recursion 29-Dec-18.
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
Recursion 23-Apr-19.
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
More Loops Topics Counter-Controlled (Definite) Repetition
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
Presentation transcript:

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

Outline Repetition Count Finite state machine Must dynamically determine the local maximum/minimum for the variable we use Joint angle Joint distance

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