Virtual Piano
Tan Lai Chian Alan
Outline
Background
Piano
Barriers
Video
Smartphones
Smartphone Apps
Two types:
Problems
Problem
Example of existing problems
https://www.youtube.com/watch?v=4cq4V9LElpg
Google Play Store
Virtual Piano
Objectives
Objectives
Implementation
Setup
Camera Perspective
Top View
Front View
Piano Layout
Hand Drawn
Printed
Performance Issue
Main Components
Piano Detection
How to detect the white keys?
Color Segmentation
What makes up a digital image?
Color Spaces
Detection of White Keys
RGB
Grayscale
(Value: 0 - 255)
Binary thresholding
(White: 150 - 255, Black: 0 - 149)
Find contours using
Border-Following algorithm
Reduced contour points
using Douglas-Peucker algorithm
After elimination
by area and contour points
Piano Mask
Convex Hull
How to detect the black keys?
Detection of Black Keys
RGB
Grayscale
(Value: 0 - 255)
Binary threshold
(White: 150 - 255, Black: 0 - 149)
Apply morphological dilation
Invert image
Piano mask
After applying piano mask
Piano Keys
Result
(Video on piano detection)
Result
(Video on hand drawn piano detection)
Fingertip Detection
RGB
HSV
HSV thresholding
Find contours using
Border-Following algorithm
Get contour with largest area
Find lowest point of contour
Result
(Video on fingertip detection)
Touch/Keystroke Detection
Sound
Result
(Video)
Accidental Keystrokes
Before correction
(Video)
After correction
(Video)
Advance Functions
Multiple Fingers
(Video)
Multiple Hands
Dynamic Touch
Relative loudness determined by value of y-coordinate difference between 2 consecutive frames
piano: 3-10 pixels
mezzo-piano: 11-20 pixels
forte: 21-30 pixels
fortissimo: > 30 pixels
Dynamic Touch
Achieved
Future Improvements
Demo
Questions?
Questions?
How does your approach/results compare to those in your literature review?