Jump to content


Photo

OpenCV


  • Please log in to reply
6 replies to this topic

#1 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 07:40 PM

OK, I now have webcam(s) working on my PCDuino.
My next step in the process is to install OpenCV and start using it to identify objects and tracking them.

Does anyone have experience installing OpenCV and running it under Ubuntu?
Any tips, pointers or tutorials you can point me to?



#2 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 07:40 PM

I don't have any experience with OpenCV but I ran across this...

http://opencv.willow...troduction.html

It seems to me that since someone has posted python examples for PcDuino that trying the Python Opencv stuff may be the way to go. I seem to remember ROS being pretty strong and powerful with support for lots of cool stuff, including Opencv and Arduino. 

I too will be venturing into the Opencv land and I might start by getting ROS installed first then working with the Opencv functionality they have.

Let us know what works out for you.



#3 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 07:40 PM

did any of you have any luck by now? which framerates can i aspect?
 


#4 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 07:41 PM

I don't have any experience with OpenCV but I ran across this...

http://opencv.willow...troduction.html

It seems to me that since someone has posted python examples for PcDuino that trying the Python Opencv stuff may be the way to go. I seem to remember ROS being pretty strong and powerful with support for lots of cool stuff, including Opencv and Arduino. 

I too will be venturing into the Opencv land and I might start by getting ROS installed first then working with the Opencv functionality they have.

Let us know what works out for you.
 


Hi,

how go your project with opencv? I only asked because i work with Opencv and i go try pass to pcduino, so I would like to know if you had success.

Than You.



#5 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 07:41 PM

Sorry all, I hadn't checked back here in a while.

My project is working exactly as I hoped it would!

I am able to acquire images and locate targets in those images based on color and shape at approx. 20 fps.
I can selectively choose the color to track and generate target coordinates from the images.
I can then send those coordinates to the robot control system via ethernet at up to the frame rate I acquired the images.
Currently the sending of the coordinates occurs as a response to a request from the Robot control system.



#6 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 07:41 PM

Hi Billbo911,

I have been trying to get OpenCV running on a BeagleBone for a vision-based UAV formation flight control system for my Master's Thesis, but I have been struggling to capture images in 640x480 resolution.  I am finally ready to give up and move to a different board and am now looking into the pcDuino.  If you don't mind, I have a few questions for you before I move to a different board:

1)  What webcam(s) are you using, and what resolution?  I have been trying to use a PS3 Eye which uses the gspca ov534 driver, but even UVC compatible cameras cannot capture in 640x480 on the BeagleBone.

2)  Was OpenCV straightforward enough to install and get working on your board?  Are you running Ubuntu?  I imagine you just used the built-in package manager for installation (sudo apt-get install .....)?

3)  You quoted approximately 20fps.  It sounds like your vision algorithms are fairly minimal if you are just using color and shape to track an object -- is that correct?  My OpenCV code should be fairly lean as well, so I hope to have similar results.  I am doing basic thresholding on the red channel of an image to detect LEDs, then computing a 3-D pose estimate, which is actually pretty fast.  Acquiring the images seems to be the slowest part.

4)  Since you said you are sending things to a "robot control system" you might be able to answer this as well:  I plan to send the pose estimate solution (relative position and orientation of the lead aircraft relative to the follower carrying the onboard camera) to an ArduPilot Mega autopilot board via serial communication.  Since all of this is going on board an R/C airplane, it will need to be powered by a flight battery with a BEC voltage regulator.  Do you see  any reason either the serial communication or method of supplying power couldn't be done with the pcDuino?


Thanks in advance for your help!  I have been battling the BeagleBoard for months now, which has seriously slowed my thesis progress.  Best of luck to you on your project!
- Mike



#7 jim

jim

    Advanced Member

  • Administrators
  • 3,385 posts

Posted 13 February 2015 - 07:41 PM

Hi Mike,
Sounds like an amazing project! I wish you the best with it.

I have tested this with multiple webcams and am currently using a Microsoft LifeCam HD-3000. I chose it because it works under UVC and was fairly inexpensive. I have also been successful with various Logitech cameras. The key is to make sure they are compatible with UVC. I found a good list here. http://www.ideasonboard.org/uvc/
I have been able to get 15fps at 640 X 480 and 30fps at 320 X 240 using guvcview, but that does not include and real vision processing.

OpenCV wasn't too difficult to get running considering I'm a complete noob to Ubuntu and Linux. I would highly recommend you use the board with the latest uSD boot image, the 1Ghz clock patch, and a class 10 uSD. That way you will have room to install everything and the performance to do what you are looking for. I used a combination of the Synaptic package manager and command line to get it installed and running.

I am capturing at 320 X 240 to get the frame rate I mentioned previously. It can capture at 640 X 480, but the frame rate drops to <10 fps. The limitation appears as though it may be driver related. I'm not too worried about it for my application as 320 X 240 is sufficient.

As for powering the PCDuino and the ArduPilot via the BEC, as long as the BEC has sufficient regulation and can provide the current the two boards require, I see no reason to worry. That said, do your homework first and verify the BEC is capable of providing that level of current at a steady +5.0vdc. Do yourself a favor and give yourself 50% headroom on the requirements. That way you will not be stressing the BEC and risking in flight failure.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users