The goal is to take frames captured from both my video streams, stitch them together, and then perform motion detection in the panorama image.Ĭonstructing a panorama, rather than using multiple cameras and performing motion detection independently in each stream ensures that I don’t have any “blind spots” in my field of view. The setup is pointing towards my front door, kitchen, and hallway, giving me a full view of what’s going on inside my apartment: Figure 3: Getting ready for real-time panorama construction. Here is another angle looking up at the setup: Figure 2: Placing my setup on top of a bookcase so it has a good viewing angle of my apartment. Again, if you decide to use your laptop/desktop system, you can simply hook-up multiple webcams to your machine - the same concepts discussed in this post still apply.īelow you can see my setup: Figure 1: My the Raspberry Pi 2 + USB webcam + Pi camera module setup. I’ll also be using my Logitech C920 webcam (that is plug-and-play compatible with the Raspberry Pi) along with the Raspberry Pi camera module. I simply went with the Pi 2 for it’s small form factor and ease of maneuvering in space constrained places. Hardware setupįor this project, I’ll be using my Raspberry Pi 2, although you could certainly use your laptop or desktop system instead. Perform motion detection in the panorama image.Īgain, the benefit of performing motion detection in the panorama image versus two separate frames is that we won’t have any “blind spots” in our field of view. Apply image stitching and panorama construction to the frames from these video streams.Access multiple camera streams at once.Use our improved FPS processing rate Python classes to access our builtin/USB webcams and/or the Raspberry Pi camera module.Keep reading to learn more… Real-time panorama and image stitching with OpenCVĪs I mentioned in the introduction to this post, we’ll be linking together concepts we have learned in the previous 1.5 months of PyImageSearch posts and: Looking for the source code to this post? Jump Right To The Downloads Section This solution is especially useful in situations where you want to survey a wide area for motion, but don’t want “blind spots” in your camera view. Our solution will be able to run on both laptop/desktops systems, along with the Raspberry Pi.įurthermore, we’ll also apply our basic motion detection implementation from last week’s post to perform motion detection on the panorama image. Today we are going to link together the past 1.5 months worth of posts and use them to perform real-time panorama and image stitching using Python and OpenCV. We also learned how to unify access to both USB webcams and the Raspberry Pi camera into a single class, making all video processing and examples on the PyImageSearch blog capable of running on both USB and Pi camera setups without having to modify a single line of code.Īnd just to weeks ago, we discussed how keypoint detection, local invariant descriptors, keypoint matching, and homography matrix estimation can be used to construct panoramas and stitch images together. Over the past month and a half, we’ve learned how to increase the FPS processing rate of builtin/USB webcams and the Raspberry Pi camera module. One of my favorite parts of running the PyImageSearch blog is a being able to link together previous blog posts and create a solution to a particular problem - in this case, real-time panorama and image stitching with Python and OpenCV.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |