Working with a Raspberry Pi
By Ryan Vega:
Raspberry Pi Detection: Starting from the Ground Up
The following is a walk-through on how I got started running CV on my RPi.
- First I bought my single board computer, for me that was a Raspberry Pi (3b+.)
This is a list of sponsored RPi vendors. I bought mine from Newegg.
2. Secondly I bought a MicroSD card, preferably one with more with more than 32gb, and preferrably one with read speeds above 100mbps and write speeds above 60mbps.
This is the one I bought.
Buy an RPi Camera.
3. Third step, load up the RPi with Raspbian OS, Buster with Desktop. The guide to install the OS found on the website is easy to follow.
4. Fourth, choose a CV library and install it onto the RPi. I chose OpenCV. You can follow the tutorial in the link below. There are better options, those are preferable, like TensorFlow–find a tutorial.
5. Fifth, get familiar with your CV library. I watched Open CV Python Tutorials on the following channel. I followed along with 21 videos on the playlist.
6. Download this folder, it contains the main python code, the detection code, 3DoT firmware, and object detection models (xml files).
The 3DoT firmware found in this file contains my code for detection, Roshandra’s code for the images to be displayed on the OLED, and contains absolutely no code to control the robot. It contains pre-designed material: the ArxRobot_Basic Code along with ArxRobot_Telecomm.
It receives a value from the RPi to determine what to display on the OLED. 0 represents detection is off, 1 is for detection is on, 2 is for stop sign, 3 is for yield, 4 is for right turn, 5 is for left turn, and 6 is for 60mph speed limit.
The other function it has is to relay the custom command from the ArxRobot app to the RPi to enable or disable object detection or to shut down the RPi.
Save all the files in this shared folder into a fold present on your desktop labeled “Detection.” Make sure the D is capitalized.
In order to run and modify the code you can use the pre-installed Thonny Python IDE found in the programming section of the applications menu on Raspbian.
Three of the xml files, stop, yield, speed limit sign, can be found here.
The left and right sign cascade classifiers, created by me using the training method found in the OpenCV tutorial, can be found on this website.
7. I developed my image detection software from this.
With the above information you will be able to run street sign image detection.
I hope I have provided a good base for you to design your own image detection software.