a 30 minutes level beginner project to implement visual object detection on a stock raspberry pi.
My project is a veryeasy implementation of computer vision on raspberry pi.
Most people who had buy a Raspberry Pi camera module or similar (from here and thereafter Raspicam) is somehow thinking about computer vision, but the complexity of the implementation of layers and layers of software and code in the examples is a strong entry barrier.
I hope this project will help with that; if you have a raspberry and a raspicam you should try it... it only take 30 minutes ;)
(the newest the best)
Raspberry Pi Camera Module
SD, keyboard, mouse and power source
we have a raspicam, a data ribbon and the raspberry with a keyboard/mouse dongle.
You should connect and re check connections between the camera and the pi. almost all the problems to get the camera working is about three connections; the connector between the black camera and the pcb, the ribbon on the back of the camera and the ribbon on the camera port of the pi. check them all and put them in a case if you have one. if questions arise follow the documentation on hardware connection :
Now, if we connect the pi to the power source we can start the OS and configure an internet connection. The pi starts in a graphical environment with a setup mode, everything is mouse and click =D
After the configuration we should have a rebooted raspberry logged with user pi and your new password and connected to the internet, nothing out of the ordinary in the pi setup.
Next we should setup the raspicam; in
Preferences>Raspberry Pi Configuration>Interfaces
we put it in enable state and click Ok, then reboot the pi to start using the camera module.
Now the Picture!!!!
Create a new folder in the desktop named picamtest, then right-click it and click "open in terminal". now type
raspistill -v -o test.jpg
and you should have something like this on your terminal window
and a picture named test.jpg in your picamtest folder
if the camera is not detected re-re-check the connections as is described in the first step and test again, it should solve it.
Check the lightning and take a few pictures to get a nice and clean framing for the objects.
Mathematica (not the science, the Wolfram software) and computer vision
Now it's time to recognize things!!!
First, a few words on Mathematica from the Wikipedia;
Wolfram Mathematica (usually termed Mathematica) is a modern technical computing system spanning most areas of technical computing — including neural networks, machine learning, image processing, geometry, data science, visualizations, and others. The Wolfram Language is the programming language used in Mathematica.
Now in my words:
Mathematica is an insanely powerful engine and the Wolfram Language is the easiest in earth. and it came installed and free for use in the raspberry pi.
Now that we know everything we need to know about Mathematica, we can open it on
It opens a blank notebook, now we will take a picture from Mathematica; type