color ball tracking with opencv on BBB

242 views
Skip to first unread message

janszyma...@gmail.com

unread,
Sep 8, 2014, 9:03:58 PM9/8/14
to beagl...@googlegroups.com
Hi,

 I need to implement tracking of color ball with opencv on BBB.
I have a rev.C BBB with latest (default Debian) including opencv 2.3.1
On my desktop Ubuntu I have installed opencv 2.4.9
To check the initial performance I used the example webcam program from the book "Practical OpenCV" listing 4-4 p.34 playing
the video from USB camera (Logitech C920)
I need a resolution of 640x480.
The problem is with a speed on BBB, having a significant delay. It's good on a desktop PC.

I would like to ask for advice how to improve the performance on BBB if possible.

Jan

Brandon I

unread,
Sep 9, 2014, 3:43:31 PM9/9/14
to beagl...@googlegroups.com, janszyma...@gmail.com
You're desktop PC is > 10 times faster than the Beaglebone processor.

This may help:  How to Achieve 30 fps with BeagleBone Black

janszyma...@gmail.com

unread,
Sep 9, 2014, 8:56:46 PM9/9/14
to beagl...@googlegroups.com, janszyma...@gmail.com
Thanks for that link, it is very usefull.
In a meantime my attempt to install a newer version of opencv (following the instructions from here http://robertcastle.com/2014/02/installing-opencv-on-a-raspberry-pi/0) has failed firstly with cmake-curses-gui not working (empty database?)  and after that (using command line cmake) the building stopped with a error message of not enough memory.
Jan

Brandon I

unread,
Sep 9, 2014, 10:17:37 PM9/9/14
to beagleboard
I'm not sure that newer open cv can be compiled on the raspberry or beaglebone due to the limited ram. You'll probably have to cross compile.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/fTan4VKv1no/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
Sep 9, 2014, 10:38:33 PM9/9/14
to beagl...@googlegroups.com
IN case this information is useful. Derek Molloy on youtube did a video on this several months ago. He used the Logitec C920 i think it was.

You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Brandon I

unread,
Sep 9, 2014, 10:52:11 PM9/9/14
to beagleboard

On Tue, Sep 9, 2014 at 7:16 PM, Brandon I <brando...@gmail.com> wrote:

janszyma...@gmail.com

unread,
Sep 11, 2014, 6:35:57 PM9/11/14
to beagl...@googlegroups.com
I was able to build and install the same version of openCV (2.4.9) on BBB debian as on my desktop Ubuntu by using an external USB memory stick.
Now I have a problem with changing CPU frequency (as I would like to increase it from 300MHz to 1GHz)

debian@beaglebone:~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpu...@vger.kernel.org, please.
analyzing CPU 0:
  driver: generic_cpu0
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 300 us.
  hardware limits: 300 MHz - 1000 MHz
  available frequency steps: 300 MHz, 600 MHz, 800 MHz, 1000 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 300 MHz and 1000 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 300 MHz.
  cpufreq stats: 300 MHz:97.20%, 600 MHz:0.20%, 800 MHz:0.06%, 1000 MHz:2.55%  (35)

debian@beaglebone:~$ sudo cpufreq-set -g GOV
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
   for example because of hardware which cannot be set to a specific frequency
   or because the userspace governor isn't loaded?
debian@beaglebone:~$

What am I doing wrong?

Jan

John Syn

unread,
Sep 11, 2014, 6:48:08 PM9/11/14
to beagl...@googlegroups.com

From: <janszyma...@gmail.com>
Reply-To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Date: Thursday, September 11, 2014 at 3:35 PM
To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Subject: Re: [beagleboard] Re: color ball tracking with opencv on BBB
William just explained how to do this earlier today:

sudo cpufreq-set -g performance

Regards,
John
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Sep 11, 2014, 7:26:57 PM9/11/14
to beagl...@googlegroups.com
$ cpufreq-set --help. You may need to set you profile limits/ performance is default 300MHz to 1Ghz just like ondemand, but for some reason it is always 1GHz whenever I look.

William Hermans

unread,
Sep 11, 2014, 7:35:06 PM9/11/14
to beagl...@googlegroups.com
From memory setting profile limits would be like this

You change to a profile via
$ sudo cpufreq-set -g <govenor_name>
Check profile limits
$ sudo cpufreq-info -p
Change minimum profile range
$ cpufreq-set -d 1000000 /*set minimum processor freq for active profile to 1 GHz */

I do not know if these setting persist across reboots, but I think not. At least it did not see that was for me. Also settings seem to be a bit quirky. On one of my Linux support system for instance, manually changing anything did not work as expected. I could change profiles, governors etc, but actual frequency always stayed the same. Then with BBB when you set minimum ondemand profile to 1Ghz, it does not take. But when changing to performance profile, minimum freq is 300Mhz, but when you check actual processor freq it is 1Ghz . . .

So yeah, anyhow the program is quirky.

William Hermans

unread,
Sep 11, 2014, 7:40:19 PM9/11/14
to beagl...@googlegroups.com
Oh, and for the uninitiated . . . setting your governor to performance / 1Ghz _all_the_time_ may not be a very good idea. For instance it has been in the mid to upper 80's F outdoor ambient here, and I've noticed my BBB getting pretty warm.

Brandon I

unread,
Sep 11, 2014, 10:45:15 PM9/11/14
to beagleboard
Or, cpufreq-set -f 1GHz

janszyma...@gmail.com

unread,
Sep 12, 2014, 12:23:11 AM9/12/14
to beagl...@googlegroups.com
That works.
Another question is how to clone or replicate BBBs  eMMC? How to move it into microSD card and vice versa?
If I need to have exactly the same image on another BBB as the one I am currently working on (when it's finished) what is the procedure then?

Lingesh Waran

unread,
Oct 30, 2014, 2:47:30 AM10/30/14
to beagl...@googlegroups.com, janszyma...@gmail.com
Hi all...I want to perform Image processing tasks in BBB which runs Debian Linux... so I need to install OpenCV on BBB.. It seems i should install cmake  in prior... I dont have direct internet connection to my BBB.. I tried to download OpenCV from github.com as a ZIP file and i copied it to BBB using pendrive....Can anyone please guide me how to install cmake on BBB?? i tried to download cmake and ended up in incomplete build.... please help me .... your ideas will be really appreciated 

Thanks in advance :)

Brandon I

unread,
Oct 30, 2014, 3:20:27 PM10/30/14
to beagleboard, janszyma...@gmail.com
Seems like a lot of work! Use an indirect internet connection to your beaglebone using the USB to your computer, then set up a bridge between your internet and the USB connection.

On Wed, Oct 29, 2014 at 11:47 PM, Lingesh Waran <radhal...@gmail.com> wrote:
Hi all...I want to perform Image processing tasks in BBB which runs Debian Linux... so I need to install OpenCV on BBB.. It seems i should install cmake  in prior... I dont have direct internet connection to my BBB.. I tried to download OpenCV from github.com as a ZIP file and i copied it to BBB using pendrive....Can anyone please guide me how to install cmake on BBB?? i tried to download cmake and ended up in incomplete build.... please help me .... your ideas will be really appreciated 

Thanks in advance :)

--

Jason Kridner

unread,
Oct 30, 2014, 4:24:26 PM10/30/14
to beagl...@googlegroups.com
On Fri, Sep 12, 2014 at 12:23 AM, <janszyma...@gmail.com> wrote:
That works.
Another question is how to clone or replicate BBBs  eMMC? How to move it into microSD card and vice versa?
If I need to have exactly the same image on another BBB as the one I am currently working on (when it's finished) what is the procedure then?

Reply all
Reply to author
Forward
0 new messages