How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?

avadhut chaudhari
Hello All,
  I am using Opencv 2.3.1 on Beagle Board xM. I have ubuntu 11.04 running on beagle board xM. I want to improve my performance by reducing delay. I read about Enable Neon Option to achieve this. I got all material for Android. Is Anybody already enable Neon for Arm cortex A8 running ubuntu on it ? Can some body give me step wise procedure to achieve that ?

 
   Thanks, 
   Avadhut
" The Will of God will never take you where the Grace of God will not protect you."
Reply | Threaded
Open this post in threaded view
|

How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?

avadhut chaudhari




Hello All,
  I am using Opencv 2.3.1 on Beagle Board xM. I have ubuntu 11.04 running on beagle board xM. I want to improve my performance by reducing delay. I read about Enable Neon Option to achieve this. I got all material for Android. Is Anybody already enable Neon for Arm cortex A8 running ubuntu on it ? Can some body give me step wise procedure to achieve that ? If I am using gcc compiler, what do I need to type command prompt to run opencv code with Neon ?

 
   Thanks, 
   Avadhut
" The Will of God will never take you where the Grace of God will not protect you."
Reply | Threaded
Open this post in threaded view
|

Re: How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?

Shervin Emami
You can certainly try to figure out how to enable the NEON
optimizations, but right now it is still too early to say how you can
enable NEON optimizations properly in an official way.

Cheers,
Shervin Emami.
http://www.shervinemami.info/openCV.html


On Tue, May 1, 2012 at 12:44 PM, avadhut chaudhari
<[hidden email]> wrote:

>
>
> Hello All,
>   I am using Opencv 2.3.1 on Beagle Board xM. I have ubuntu 11.04 running on
> beagle board xM. I want to improve my performance by reducing delay. I read
> about Enable Neon Option to achieve this. I got all material for Android. Is
> Anybody already enable Neon for Arm cortex A8 running ubuntu on it ? Can
> some body give me step wise procedure to achieve that ? If I am using gcc
> compiler, what do I need to type command prompt to run opencv code with Neon
> ?
>
>    Thanks,
>    Avadhut
> " The Will of God will never take you where the Grace of God will not
> protect you."
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?

avadhut chaudhari
Shervin,
 I read in your blog  if we try  optimization level -O3 with gcc , we might have less chances of optimization.
Yes, same happened with me. I run code with and without -O3 optimization level using gcc, I am ended up with same fps.
I tried this on Ubuntu Intel core to duo.

This code is giving 19 fps on laptop & on Beagle board xM 10 fps.
If I want to increase my fps on Beagleboard xM, What I need to do?

1)As you said enable Neon Optimization, but I don't have any idea how to do that. Could you please share any link or give some pointers which explain procedure?

2) Can I achieve better performance, if I use DS-5 (RVDS is not available free) ?

Sure I am going to make some optimizations in code.

What else do you think can help to increase fps on Beagleboard xm ? Thanks

 
   Thanks, 
   Avadhut
" The Will of God will never take you where the Grace of God will not protect you."


________________________________
 From: Shervin Emami <[hidden email]>
To: avadhut chaudhari <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, 4 May 2012 12:07 PM
Subject: [OpenCV] Re: How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?
 

 
You can certainly try to figure out how to enable the NEON
optimizations, but right now it is still too early to say how you can
enable NEON optimizations properly in an official way.

Cheers,
Shervin Emami.
http://www.shervinemami.info/openCV.html

On Tue, May 1, 2012 at 12:44 PM, avadhut chaudhari
<[hidden email]> wrote:

>
>
> Hello All,
>   I am using Opencv 2.3.1 on Beagle Board xM. I have ubuntu 11.04 running on
> beagle board xM. I want to improve my performance by reducing delay. I read
> about Enable Neon Option to achieve this. I got all material for Android. Is
> Anybody already enable Neon for Arm cortex A8 running ubuntu on it ? Can
> some body give me step wise procedure to achieve that ? If I am using gcc
> compiler, what do I need to type command prompt to run opencv code with Neon
> ?
>
>    Thanks,
>    Avadhut
> " The Will of God will never take you where the Grace of God will not
> protect you."
>
>

 
Reply | Threaded
Open this post in threaded view
|

Re: How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?

Shervin Emami
What I said is that OpenCV doesn't officially support NEON yet (I don't
think). So either wait some months to see if it will eventually have enough
NEON support, or write NEON code yourself, such as using NEON C intrinsics,
or ARM Assembly code if you really need max performance and are willing to
become an expert at ARM / NEON Assembly language.

Like I mention on my ARM webpage, if you are using an ARM Cortex-A8 device
(such as Beagle Board xM), then NEON Assembly code should be much faster
(10x - 40x faster) than optimized C code, whereas if you use a newer
Cortex-A9 device then the CPU itself is advanced enough that you don't need
to use Assembly code to get full performance (NEON Assembly code might only
be 2x - 5x faster than optimized C code, because plain C code will be quite
fast).

And yes, RVDS should produce faster code than GCC, atleast on Cortex-A8
devices such as Beagle board xM.

Cheers,
Shervin Emami.
http://www.shervinemami.info/openCV.html


On Fri, May 4, 2012 at 1:52 PM, avadhut chaudhari <
[hidden email]> wrote:

> **
>
>
> Shervin,
>  I read in your blog  if we try  optimization level -O3 with gcc , we
> might have less chances of optimization.
> Yes, same happened with me. I run code with and without -O3 optimization
> level using gcc, I am ended up with same fps.
> I tried this on Ubuntu Intel core to duo.
>
> This code is giving 19 fps on laptop & on Beagle board xM 10 fps.
> If I want to increase my fps on Beagleboard xM, What I need to do?
>
> 1)As you said enable Neon Optimization, but I don't have any idea how to
> do that. Could you please share any link or give some pointers which
> explain procedure?
>
> 2) Can I achieve better performance, if I use DS-5 (RVDS is not available
> free) ?
>
> Sure I am going to make some optimizations in code.
>
> What else do you think can help to increase fps on Beagleboard xm ? Thanks
>
>    Thanks,
>    Avadhut
> " The Will of God will never take you where the Grace of God will not
> protect you."
>
>   ------------------------------
> *From:* Shervin Emami <[hidden email]>
> *To:* avadhut chaudhari <[hidden email]>
> *Cc:* "[hidden email]" <[hidden email]>
> *Sent:* Friday, 4 May 2012 12:07 PM
> *Subject:* [OpenCV] Re: How to build opencv on ARM cortex A8 with NEON
> option Enable on Ubuntu ?
>
>
> You can certainly try to figure out how to enable the NEON
> optimizations, but right now it is still too early to say how you can
> enable NEON optimizations properly in an official way.
>
> Cheers,
> Shervin Emami.
> http://www.shervinemami.info/openCV.html
>
> On Tue, May 1, 2012 at 12:44 PM, avadhut chaudhari
> <[hidden email]> wrote:
> >
> >
> > Hello All,
> >   I am using Opencv 2.3.1 on Beagle Board xM. I have ubuntu 11.04
> running on
> > beagle board xM. I want to improve my performance by reducing delay. I
> read
> > about Enable Neon Option to achieve this. I got all material for
> Android. Is
> > Anybody already enable Neon for Arm cortex A8 running ubuntu on it ? Can
> > some body give me step wise procedure to achieve that ? If I am using gcc
> > compiler, what do I need to type command prompt to run opencv code with
> Neon
> > ?
> >
> >    Thanks,
> >    Avadhut
> > " The Will of God will never take you where the Grace of God will not
> > protect you."
> >
> >
>
>
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?

avadhut chaudhari
I think I will go for assembly language. Thanks for input.

 
   Thanks, 
   Avadhut
" The Will of God will never take you where the Grace of God will not protect you."


________________________________
 From: Shervin Emami <[hidden email]>
To: [hidden email]
Sent: Monday, 7 May 2012 6:10 AM
Subject: Re: [OpenCV] Re: How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?
 

 
What I said is that OpenCV doesn't officially support NEON yet (I don't think). So either wait some months to see if it will eventually have enough NEON support, or write NEON code yourself, such as using NEON C intrinsics, or ARM Assembly code if you really need max performance and are willing to become an expert at ARM / NEON Assembly language.

Like I mention on my ARM webpage, if you are using an ARM Cortex-A8 device (such as Beagle Board xM), then NEON Assembly code should be much faster (10x - 40x faster) than optimized C code, whereas if you use a newer Cortex-A9 device then the CPU itself is advanced enough that you don't need to use Assembly code to get full performance (NEON Assembly code might only be 2x - 5x faster than optimized C code, because plain C code will be quite fast).

And yes, RVDS should produce faster code than GCC, atleast on Cortex-A8 devices such as Beagle board xM.

Cheers,
Shervin Emami.
http://www.shervinemami.info/openCV.html



On Fri, May 4, 2012 at 1:52 PM, avadhut chaudhari <[hidden email]> wrote:

 


>Shervin,
> I read in your blog  if we try  optimization level -O3 with gcc , we might have less chances of optimization.
>Yes, same happened with me. I run code with and without -O3 optimization level using gcc, I am ended up with same fps.
>I tried this on Ubuntu Intel core to duo.
>
>
>This code is giving 19 fps on laptop & on Beagle board xM 10 fps.
>If I want to increase my fps on Beagleboard xM, What I need to do?
>
>
>1)As you said enable Neon Optimization, but I don't have any idea how to do that. Could you please share any link or give some pointers which explain procedure?
>
>
>2) Can I achieve better performance, if I use DS-5 (RVDS is not available free) ?
>
>
>Sure I am going to make some optimizations in code.
>
>
>What else do you think can help to increase fps on Beagleboard xm ? Thanks

>   Thanks, 
>   Avadhut
>" The Will of God will never take you where the Grace of God will not protect you."
>
>
>
>________________________________
> From: Shervin Emami <[hidden email]>
>To: avadhut chaudhari <[hidden email]>
>Cc: "[hidden email]" <[hidden email]>
>Sent: Friday, 4 May 2012 12:07 PM
>Subject: [OpenCV] Re: How to build opencv on ARM cortex A8 with NEON option Enable on Ubuntu ?
>
>
>

>You can certainly try to figure out how to enable the NEON
>optimizations, but right now it is still too early to say how you can
>enable NEON optimizations properly in an official way.
>
>Cheers,
>Shervin Emami.
>http://www.shervinemami.info/openCV.html
>
>On Tue, May 1, 2012 at 12:44 PM, avadhut chaudhari
><[hidden email]> wrote:
>>
>>
>> Hello All,
>>   I am using Opencv 2.3.1 on Beagle Board xM. I have ubuntu 11.04 running on
>> beagle board xM. I want to improve my performance by reducing delay. I read
>> about Enable Neon Option to achieve this. I got all material for Android. Is
>> Anybody already enable Neon for Arm cortex A8 running ubuntu on it ? Can
>> some body give me step wise procedure to achieve that ? If I am using gcc
>> compiler, what do I need to type command prompt to run opencv code with Neon
>> ?
>>
>>    Thanks,
>>    Avadhut
>> " The Will of God will never take you where the Grace of God will not
>> protect you."
>>
>>
>
>
>