Using openCV for shape recognition

Hello!
I’m attempting to do something similar to this in TD: Real Working Harry Potter Wand Using Computer Vision : 8 Steps (with Pictures) - Instructables

Currently I have a webcam video which creates a trail from the wands light source. The tail of the trail disappears after 3 seconds. Ive got the tutorial above working for PC after some debugging, but now need to bring that in TD so when a shape is recognized it will trigger some video elements. Example: someone makes a circle with the wand, the circle will be recognized and trigger a video to play. Is this doable? Is it possible to analyze a TOP this way using openCV?