
To the flash project! A lot of people have a webcam these days so I thought it might be cool to try something similar. Nothing too complicated at first.
Now the experiment requires a few green shapes, so it might be a good idea to print out the following, or if you are the owner of a mobile phone with a large screen just load up the images onto that, and that should work as well! The three shapes the camera can detect are below. A circle, a triangle and a rectangle. I chose these as virtually every other shape we see can be made up of some combination of these.



Once you have printed these images out and ideally separated them, we can begin. Below is the flash movie:
click here to launch it
Obviously this is no Asimo; firstly it is colour blind and anyone wearing a green jumper then being accused of being a rectangle should be aware of this by now, secondly it can't actually learn the shapes, it simply uses an algorithm to determine the shape by calculating the number of corners it has, or in the case of the circle by colour subtraction.
Having said that its not a bad shot. A nice little feature I've added is that the program can determine when you hold up too many green shapes resulting in a rather disgruntled tone saying: "Please only show me one shape at a time". In order to have a fully functional shape detector however an algorithm would have to be determined to find co-ordinates for all the lines and vertices in an image, calculate all colour bounding shapes and so on. Not so easy in flash, but it might be doable.
Oh and the voice is recorded from textEdit's speech function on my computer and isn't my own.
Enjoy!
This is cool. Any chance you'll share the source? :)
ReplyDeleteCheers,
Andre
hi we are also doing a project more likely like this..can you teach us on how to code this?? or can you share the source code? :D thanks
ReplyDeleteHey guys, the source is in an fla. Just follow this link to download it www.experimentalized.com/experimentalized_blog/flsh/ShapeRecognition2.fla.zip :) Enjoy and let me know what you come up with!
ReplyDelete