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.