Building a Raspberry Pi camera stream app
Downloading one picture at a time is fine, but we need to do things with those pictures on our robot. We also need a handy way to see what the robot is doing with the camera data. For that, we will learn how to use a Flask web server to serve up our pictures so we can view the output on a phone or laptop. We can use the core of this app to make a few different behaviors. We'll keep the base app around for them.
A video or video stream is a sequence of images, usually known as frames.
Let's design our streaming server.
Designing the OpenCV camera server
The diagram in Figure 13.9 shows an image data pipeline, going from the camera, through the processing, and out to our web browser:
The image server app in Figure 13.9 starts with the camera. The camera feeds image data to a convert to OpenCV step, with the raw photo given. Image data needs some processing...