Monday, December 30, 2013

New Method of Handling Video with RasperryPi and OpenCV

Mine and Albert's Most Recent Progress on the State of the RaspberryPi Vision

In our last post, we talked about our solution to working with video on the RaspberryPI. Since then, we ran into a serious obstacle and had to find a new method.

Our Error

With the original solution, we ran into a sudden error that we could find no solution for. When running our code, the only output was a black window, as apposed to the video stream we had originally received. The only possible explanation we could come up with was a change in our libraries. Instead of re installing, we opted to find a new method.

The New Method

Since the RaspberryPI camera is not a USB device, it is not native to OpenCV; therefore, steps must be taken to "trick" OpenCV into thinking the that the RPI camera is a USB device. (It is beneficial to use the RPI camera because of how little processing power it uses compared to other webcams) Since the tutorial we found on the web was not working, we switched to using another more mainstream tutorial. This tutorial was not our first pick since it involves programming in C, rather than C++. After 6 hours of us sitting at school, we finally made the source code compile and were able to run our program and stream video!

Results

By the time we got things working, we had gained quite a bit more experience with linux, such as with moving files using the command line and other similar things. We got the RaspberryPI to stream video for a specified number of seconds, and then got it to take a picture and store it. 


No comments:

Post a Comment