Several magicians have combined projections with slight of hand to great effect. Two examples are shown below.
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.
![]() | ![]() |
The three parts are described below.
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.
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.
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.
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.
Another library that may be of interest is the Mediapipe hand tracking framework from Google, which allows highly accurate hand tracking.
You should write a short (1-2 pages) report describing your implementation, problems that you encountered, and a description of your magic trick.
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.
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: