Assignment - Edge and Corner Detectors (Version 2)

25th October 2023 - 23:59

Updates

  1. Page opened 4th October 2023. Deleted page by mistake, so I had to make another one.

Introduction

Several magicians have combined projections with slight of hand to great effect. Two examples are shown below.

Methodology

We will try and do similar magic to the one shown in the videos above. In the final system, we combine a projector with a vision system, but for now we will focus on the vision part only.

We will use three different parts in our magic trick (coins, cards, and dice).

Some sample images of those items when viewed from the camera in a laptop are shown below.

CoinsCardsDice

The three parts are described below.

Coins

In the first part, we make coins appear, disappear, and move them. Take images of coins on the background and cut them out without the background. You can then paste those fake coins into the image. Make sure that the scales of the coins match the position where you want to place the coin during your trick. You wave your hands over the playing field and coins will appear or disappear. You can also use cards to block parts of the playing field like shown in the video above.

A little bit harder is to project coins into the palm of your hand, when you open your hand.

Cards

Next, track the orientation and position of a white playing card and project a playing card (e.g., the Queen of Hearts) onto the white card.

Dice

Lastly, track the position and orientation of somce dice and project different number of pips onto the dice. You can then predict what number you roll before throwing the dice.

OpenCV

The OpenCV library is a powerful computer vision library with language bindings for python, java, javascript, and C++. The library includes many high performance implementation of simple and advanced vision algorithms. You can use this library when implementing a solution to This assignment.

Mediapipe

Another library that may be of interest is the Mediapipe hand tracking framework from Google, which allows highly accurate hand tracking.

Report

You should write a short (1-2 pages) report describing your implementation, problems that you encountered, and a description of your magic trick.

Honesty declaration

By submitting an assignment, you claim that your submission is only your own work. This means that you have developed the design, implemented the code, run the experiments, and all other work necessary to complete the assignment by yourself.

If you discussed your work with other students or used sources on the Internet, then you must say so clearly at the beginning of the assignment.

You can discuss parts of the assignment with others, but these discussions must be limited to sharing ideas on a whiteboard or notepad. If you exchange code/programs/designs or exchange any material via the Internet, then you must say so in your honesty declaration.

Fill out the Honesty Declaration and add any external sources that you used during the assignment.

Submissions

This assignment must be done individually.

If you use information or code that is not your own (e.g., sample code from the Internet, ideas for new features from a classmate, etc.), then you must specify this in your assignment write-up. Failure to disclose that you used external sources will lead to disciplinary actions.

To hand in your assignment:

  1. Create a directory to hold all of your data. The directory name should be <student id>_a<number>, where <student id> is your student id and <number> is the number of the assignment,
  2. Create a directory source inside of the directory <student id>_a<number>.
  3. Put the source code, which may contain of multiple files, for your assignment’s solution into the directory source.
  4. Your program must compile by just running the command make in the source directory or a similar step for your programming language of choice.
  5. Write a README file to explain anything you feel is necessary or important about your submission. This may include special features/bugs of your program. Describe what parts of the assignment you implemented. It is in your interest to simplify the job of the marker.