Go to Post We should also remember the fact that the FIRST Manual is not supposed to be enterpreted with lawyer speak. If so you could make it say many things. - Anthony [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-01-2016, 18:12
controls weenie's Avatar
controls weenie controls weenie is offline
Registered User
FRC #2973
Team Role: Mentor
 
Join Date: Oct 2014
Rookie Year: 2011
Location: United States
Posts: 23
controls weenie is an unknown quantity at this point
Pcduino8, camera and multiple cores

I want to share my opencv test results with everyone. I bought a pcduino8 uno that has 8 cores. I wanted opencv to easily utilize several cores. I downloaded the opencv src code to the pcduino8 and compiled it with the OpenMP compiler flag. Opencv is setup to use parallel processing but the OpenMP flag must be set on.

After several hours of compiling, I ran the code that billbo911 gave us several years ago. The results were amazing. I can watch the CPU monitor with' top' to see several cores crunching on pixels. My frame rate almost doubled.

I suggest anyone using C code on a pcduino to try the new 8 core device.


Here are my notes from the test:
1. There is no onboard flash for the PCDuino8 so the uSD card must stay in the carrier at all times.
2. OpenCV 2.4.8 is installed with apt-get but I downloaded 2.4.11 src.
3. Download the 2.4.11 src to any folder. I placed it in ~/Downloads/opencv-2.4.11.
4. install cmake: sudo apt-get install cmake cmake-gui
5. cd ~/Downloads/opencv-2.4.11/cmake and type cmake-gui.
6. Enter the opencv path at the top. /home/tim/Downloads/opencv-2.4.11/.
7. Enter the build path on the second line. /home/tim/Downloads/opencv-2.4.11/build
8. Press configure. You will see that the build directory is created at this step.
9. Go into the configure tree and make sure the WITH_OPENMP checkbox is on and make sure the WITH_TBB checkbox is off. Make sure the WITH_OPENCL is off.
10. Press Generate and wait until it finishes.
11. cd ~/Downloads/ opencv-2.4.11/build and type << sudo make install
12. The 'make install' takes about 3 hours.
13. Run your opencv code while gnome-system-monitor is running and watch multiple CPUs reach 100%.
14. Make sure you use the new opencv libraries by setting the LD_LIBRARY_PATH to the new directory. I placed the following in my ~/.bashrc
Export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

You can write a small openmp c file to prove that the openmp is working.

Last edited by controls weenie : 05-01-2016 at 08:40. Reason: I wanted to show the steps I used to build the library with OpenMP
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi