Inspiration

The idea for this project occurred when we observed that we can track the position of the mbed in 3d space. We thought that we can store the points it passes through and create a surface using this set of points. This makes the mbed into a pen that can draw in three dimensions.

What it does

The mbed tracks its x, y and z coordinates and then sends it to a central PC, where the set of points is analyzed and a surface encapsulating them is generated. The result is then plotted.

How I built it

We used the distance sensor of the Mbed cloud connect device to record the z coordinate of the mbed and a computer vision python script that tracks a colored spot on the mbed, to calculate the x and y coordinates. The z coordinate was then sent to the python script and all three coordinates where logged as points in a file. After the termination of the program, another python script using matplotlib was used to generate the surface around the points using a convex hull algorithm, and then the result was plotted.

Challenges I ran into

The HTTP server proved to be harder to implement, because the configuration needed much time and we encountered many bugs in the process. The X and Y coordinates had to be scaled, something that needed extra calibration. Real time plotting proved to be very slow, so it was replaced by offline plotting. The distance sensor sometimes was giving inconsistent values, therefore some filtering had to be done.

Accomplishments that I'm proud of

Successfully tracking an object in 3 dimensions and generating a 3d shape using this data.

What I learned

How to use computer vision to track objects, how to create convex hull, how to communicate data between mbed and a computer.

What's next for The Cloud Pen

Enabling the creation of non-convex shapes, real-time and faster feedback of the pointer position, more robust tracking and smoother surface generation.

Built With

Share this project:

Updates