|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Code for beaglebone and network camera
Thought I might as well share our team's starting code for the beaglebone and the network camera.
It is not quite done yet, we still have to deal with multiple targets, add in more filters, correct the measurements of the targets, etc. But it should provide a base to those who want to get started. Some gotchas to the beaglebone: 1. If your model is A4, then you will have to remove a resistor in order to get the ethernet to work. Here is a video randomly found on the internet showing you how to remove the resistor: http://www.youtube.com/watch?v=Ak30G-shiYY 2. Sometimes the file system gets a tad corrupted and the beaglebone will neither connect to a network or pop up as a usb drive when connected to the computer. The solution is simple, plug the microsd into a desktop computer and run fsck on it. 3. Opencv did not seem to work with the network camera on our beaglebone. We ended up just going directly with ffmpeg. 4. Ffmpeg was claiming that it did not have the mjpeg codec (even though it had mjpeg). Building ffmpeg from scratch fixed this. 5. We compiled everything on the beaglebone. Cross compiling was too much of a pain. This is how we are finding the angle to the target. 1. Use findContours to find the contours. 2. Use approxpolydp to find the points of the rectangles. 3. Use a filter that tosses out misshapen rectangles. 4. Use solvePnP to obtain the location of the target. 5. Use atan2 to obtain our angle to the target in the x-z plane. As for controlling the beaglebone we are going to have the beaglebone act as a TCP server and send messages back and forth with boost::asio. Hope that this is useful for some teams. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|