Coder Social home page Coder Social logo

abhitronix / opencv_raspberry_pi_tbb Goto Github PK

View Code? Open in Web Editor NEW
47.0 5.0 6.0 16.06 MB

Latest pre-compiled binary of Pre-released & Stable OpenCV (4.0.0) along with TBB (2018-Update 6) for Raspberry Pi.

License: Other

tbb raspberry-pi opencv threading deb neon python raspberrypi optimization fastest

opencv_raspberry_pi_tbb's Introduction

Latest pre-compiled binary of Pre-released & Stable OpenCV (4.0.0) along with TBB (2018-Update 6) for the Raspberry Pi (Tested on Rpi version 2/3 Model B/B+ with Stretch)

Head over to https://github.com/abhiTronix/TBB_Raspberry_pi for TBB installation.

OpenCV [TBB + VFVP3 + NEON] (Update: December, 2018): Unleashed The Power of Multi-Threading in OpenCV 🔥🔥

Github
Github
Github GitHub

Inspiration from amazing tutorial from Adrian (https://www.pyimagesearch.com/2017/10/09/optimizing-opencv-on-the-raspberry-pi/)

Inside this tutorial, there are three possible ways of optimizing OpenCV:

  1. NEON
  2. VFPV3
  3. Threading Building Blocks©️ (TBB)

TBB is already successfully installed on my Rpi and made available precompiled here . Hence i created this Latest pre-compiled set of binary: Pre-released & Stable OpenCV (4.0.0) compiled along with Latest (2018 Update 6) of TBB for the Raspberry Pi. It is made available in a ".deb" package and will save you countless hours not having to compile it yourself plus avoid worst looking compiling errors. This may or may not stay updated as I have to manually compile this version. I will try to make available most major versions. This is compiled for Raspberry Pi 3/2 Model B/B+(compatible with both python2/python3 versions) running Latest raspbian Stretch. This is enabled with TBB Support which helps multithreading in many OpenCV algorithms and significant 3x~5x increase in performance along with 'NEON' and 'VFVP3' support and other major compilation flags without any whatsoever change in your program. For Files Look Down below.

TBB ( Intel(R) Threading Building Blocks )

TBB is a library that helps you leverage multi-core processor performance without having to be a threading expert. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanism for performance and scalability. More info. at https://www.threadingbuildingblocks.org/

Proof:

1. OpenCV (version: 4.0.0 pre) successfully compiled with TBB (version: 2018 - Update 4)] on Python 2.7.13/3.6.0 on my Raspberry Pi 3B.

2. OpenCV(version: 4.0.0 pre/dev [TBB + VFVP3 + NEON] Supported) Files on my machine.

3. OpenCV (version: 4.0.0 pre) along with 'NEON' and 'VFVP3' Support enabled(Demo-file Output).

Installation Instructions :(5~10sec)

(Tested on Raspberry pi 3 with Raspbian Stretch [Latest])

Simple (but straight forward):

sudo dpkg -i <path to *.deb file[e.g OpenCV_release_fp_tbb_armhf.deb]>
sudo ldconfig

Files📂:

Tryout Demo OpenCV(No TBB Supported) .deb file is available here: opencv_4.0.0-pre-demo_armhf.deb (Refer Wiki & #1 first)

But if you want the latest & max optimized OpenCV([TBB + VFVP3 + NEON] Fully Supported) precompiled .deb files with installation support associated, it is only provided through email ([email protected]). Also consider supporting my countless hours of hardwork and helping me out by making small Donation for my ongoing Independent A.I. Research in return. Thankyou

Huge thanks to:

https://www.pyimagesearch.com/2017/10/09/optimizing-opencv-on-the-raspberry-pi/ & https://www.theimpossiblecode.com/blog/build-faster-opencv-raspberry-pi3/ for guiding me through.
https://github.com/opencv for Latest OpenCV binaries.
https://github.com/01org/tbb for TBB binaries.

opencv_raspberry_pi_tbb's People

Contributors

abhitronix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

opencv_raspberry_pi_tbb's Issues

TBB+NEON+VFVP3 vs NEON+VFVP3

Hey abhi i finally managed to install neon on an older version of opencv

i would like to ask you if you have measured the performance difference with and without TBB? also i saw in your youtube channel that you have installed OPENCL for the gpu , is it really usable?

OpenCV_Raspberry_pi_TBB For Python3

Hi @abhiTronix Thanks to share the great project
I am Installing optimized opencv for python3.7.3
sudo dpkg -i opencv_4.0.0-pre-demo_armhf.deb

but it's working with python2.7 not for python3.7.3
I am also trying to create link but failled
i.e
sudo ln -sv /usr/local/lib/python2.7/dist-packages/cv2/python-2.7/cv2.so
Kindly suggest me to changes to resolve this issue.
Thanks

libtesseract.so.4 not found error in demo file

Solution:

install Leptonica(install from source)

wget http://www.leptonica.com/source/leptonica-1.76.0.tar.gz
tar xvf leptonica-1.76.0.tar.gz
cd leptonica-1.76.0/
./configure
make -j2
sudo make install
sudo ldconfig

then

install Tesseract(install from source)

wget https://github.com/tesseract-ocr/tesseract/archive/4.0.0.zip -O tesseract-4.0.0.zip
unzip tesseract-4.0.0.zip && mv tesseract-4.0.0 tesseract
cd tesseract
./autogen.sh
./configure
make -j2
sudo make install
sudo ldconfig

Problem Solved 👍

I think I installed everything correctly in Raspberry Pi Stretch

Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import cv2
Traceback (most recent call last):
File "", line 1, in
ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.