Skynet w/ Raspberry Pi: PiCamera

This is the fifth part in a multiple part series on adding some object detection to my Raspberry Pi.

Part 1: Introduction
Part 2: SD Card Setup
Part 3: Pi Install
Part 4: Software
Part 5: Raspberry Pi Camera
Part 6: Installing TensorFlow
Part 7: MobileNetV2
Part 8: Conclusion

Introduction

In this section I will cover getting your camera all set up and running. I will be following this guide.

Camera Connection

After connecting the cable I had to go into the ‘Preferences’ and then ‘Raspberry Pi Configuration’ menu. At that point, go to the ‘Interfaces’ tab and make sure ‘Camera’ is Enabled.

After a reboot, I was able to use the command lines raspistill and raspivid to take pictures/videos of my daughter I knew everything was hooked up right.

Python Integration

Testing the code in Python is as simple as importing the camera using from picamera import PiCamera. Using that we can call camera.start_preview() and .stop_preview(). One thing to note is that since I am on VNC I won’t actually see the preview. But, I am still able to call camera.capture to validate that I can save an image.

Conclusion

Well, that is another short post about getting everything ready. I am sure I will have more changes once I get the model picked out and see what I need to change in order to feed in the input.

Code: https://github.com/ehennis/Blog/tree/master/ImageDetection

7 thoughts on “Skynet w/ Raspberry Pi: PiCamera”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s