In February, I saw Robert Lucian’s Raspberry Pi based license plate reader project on Hackaday. His project is different, in that he wrote his own license plate recognition algorithm, which runs in the cloud – the Pi feeds the images to the cloud for processing. He had great results – 30 frames per second, with 1 second of latency. This is awesome, but I want to process on the device – I want to avoid cellular data and cloud charges. Once I get this working, I’ll look at improving performance with a more capable processor, like the nVidia Jetson or the Intel Neural compute stick.
In any case, Robert was getting great images from his Pi – so I asked him how he did it. He wrote me back with a few suggestions – he is using the Pi camera in stream mode 5 at 30 fps.
I wondered if one of the issues was my Pi Camera (v1), so I ordered a version 2 camera (just weeks before the HQ camera came out!). The images I was getting still weren’t great. I’m using the pi-camera-connect package, here’s what I’ve learned so far:
- The best documentation I’ve seen for the Pi camera can be found at https://picamera.readthedocs.io/en/release-1.13/
- Some of the modes are capable of higher frames per second, but results may be poor. Start with 30 fps
- In stream mode, streamCamera.startCapture() must be called 2-3 seconds before streamCamera.takeImage()
- There are a number of parameters not exposed by the pi-camera-connect package, but ultimately, this package is just a front end for raspistill and raspivid. All the settings can be tweaked in the source. Specifically, increase the –timeout delay for still images. I also want to experiment with the –exposure sports setting.
I still have more tweaking to do with the Pi Camera 2. If after a few more runs, I don’t get the images I need, I’ll try the HQ camera or try interfacing with an action camera.
Finally, I’ve added GPS functionality. If you access the application with your phone while you’re riding, the application will associate your phone’s GPS coordinates with each capture.
Bicycle Dashcam Part 1