Last night I've just built version 3.0.0-beta on the B version. It should be the same in a B+.
Below are the steps that I've done to build it from the source (adapted from: http://robertcastle.com/2014/02/installing-opencv-on-a-raspberry-pi/). Hope it helps.
Make sure your system is up-to-date. Run:
sudo apt-get update
sudo apt-get upgrade
I'm running on a raspbian buster with Python 3.7.3. I ran into the same issue, "ERROR...no activation script". I tried @Lombax answer but it didn't work.
However, I noticed that the version of virtualenvwrapper I had installed was 5.0.0. I checked on PyPi and it's still at version 4.8.4. So I uninstalled virtualenv and virtualenvwrapper: sudo pip3 uninstall ...
You will be able to access to the raspi camera like other V4L2 device using :
the official kernel V4L2 driver bcm2835-v4l2
sudo modprobe bcm2835-v4l2
the unofficial userspace V4L2 driver for the Raspberry Pi Camera Module
uv4l --driver raspicam --auto-video_nr
I was doubtful too about virtualenv, and quite happy to live without it :)
Here are the commands I took from both tutorial you provided, for OpenCV 3.1.0
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential git cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev ...
When compiling according to Miguel's answer, do it with a
>> make -j4
On the raspberry pi 2-B / B-2 model this may speed up the compilation significantly as use of all cores is made.
NOTE: If you get an error while compiling with this option, just use
to fix it.
This error was resolved when I disconnected and reconnected my camera module.
Somehow my camera module must have been wiggled loose when I was working with it and the Pi was not able to detect the camera. I ran the command:
vcgencmd get_camera and got Returned supported=1 detected=0
Once the camera was reconnected, I was able to run
raspistill -o image....
I am also facing the same error. You must add these lines on ~/.profile
There is NO NEED to do anything before a reboot.
If you issue a sudo reboot command Linux will manage an orderly shutdown of the software.
This is, however, a poor way of ensuring a reliable 24/7 system. If it crashes there is no guarantee the reboot itself would happen.
The normal solution would be to use a watchdog timer. The Pi has an inbuilt hardware ...
It says "Cannot open shared object".
ImportError:libQTtest.so.4:cannot open shared object file:no such file or directory
Yes, but it does not say this is because "the library isnt shared with it". What it says is, "no such file or directory".
As far as I can tell, libQTtest.so.4 is not actually part of openCV, although it is part of a GUI framework ...
I will add to what @Technico.top has suggested. There's another method of installing OpenCV using emulation software to compile the software on your PC that doesn't require cross-complication.
This means that you'll install the target debian/ubuntu distro on an SD card, expand the filesystem, boot it once to check whether everything works or not, then mount ...
Precompiled wheels of opencv-python and opencv-contrib-python for arm / python 3 are available from piwheels (www.piwheels.org). On current Raspbian Stretch this already pre-configured.
On other distros (such as Raspbian Jessie) it can easily be added by creating the file '/etc/pip.conf' containing:
The pigpio library lets you control the GPIO of one or more networked Pis from a laptop. The laptop may be Windows, Mac, Android, or Linux based - in fact it can run any operating system as long as it can run Python. The pigpio Python module allows control of the remote GPIO.
pigpio will let you properly control servos. It provides hardware timed PWM (...
You should use OpenCV from the default Raspbian Repository. It is tested and fits best into the Raspbian distribution without errors (I hope :). On Buster you will find with:
rpi ~$ apt list python*opencv*
python-opencv-apps/testing 1.12.0-2 all
python-opencv/testing 3.2.0+dfsg-6 armhf
python3-opencv-apps/testing 1.12.0-2 all
OpenCV 2.4.* does not work on the Raspberry Pi. The latest stable version that works on the Raspberry Pi is OpenCV 2.3.1, which is what your second website links to. The reason for this is the lack of an official V4L driver.
The reason you can't find those packages is because they are out of date. Substitute
libavcodec53 and libavformat53 for ...
Have you tried:
modprobe uvcvideo nodrop=1 timeout=5000 quirks=0x80
Also try to remove all "auto" settings through guvcview
It worked perfectly for me. It has been running för 24 hours straight with a steady 15fps @ 320x240.
Please check this for details.
I was able to successfully build and test tbb following the thread below:
I built version tbb43_20150209oss and used the following flags to make:
While libtbb is not necessary for RPB1 owners, the Raspberry Pi B 2 has a quadcore processor and ...
Sounds like a fascinating project!
I'm going to ignore the second script for now as it's a bit confused; but there's plenty that can be done to speed up your first script, and it's probably more useful to concentrate on improving that as you've obviously had it working before (albeit too slowly). So, first things first:
If I weren't sure where the script ...
 @Ghanima's answer is way better than this one, go check it !
You could use cron and add an @reboot task:
Running crontab -e as root or sudo crontab -e will allow you to edit your cron.
will execute that script once your computer boots up.
Following these directions from PyImageSearch fixes the problem. Those directions lack an easy copy-paste and have a lot of interspersed text, so I copy them here. I assume you already have Python3 and pip3 installed.
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential cmake unzip pkg-config
sudo apt-get -y install libjpeg-...
libtbb isn't available on wheezy under armhf but Raspberry Pi version 1 is single core and TBB is unecessary. You can skip over TBB via a cmake option:
Raspberry Pi 2 however has four cores and TBB is beneficial. Here are @danielchalef's steps in a bit more detail - substitute the latest tbb version as required:
# Download and ...
You can use the terminal to install OpenCV, here is a link with information on how to install OpenCV on your RaspberryPi.
And here is how to install eclipse:
sudo apt-get update
sudo apt-get install eclipse
Hope it helped.
A good starting point would be pam-face-authentication. From there site:
PAM Face Authentication is a pluggable authentication module designed for facial authentication. You can use this module for any service that requires authentication, internally handled by the PAM library.
To get started you would need to compile from source as it is not available ...
Until recently this wasn't possible - it requires a V4L2 driver for the camera which was previously absent. This is now available, just follow the instructions here to set up the driver and cv2 videocapture should work fine.
cv2.so should be someplace within the build directory. You can use find <build folder> -name cv2.so to locate it.
In order to get ./First image.jpg to run sucessfully you'll need to ensure that the binary knows where it can find the library file. You can do this two ways:
Any binary under linux automatically looks in the current directory for its ...
Look at this link:
Resolution (as per that website)
RPi> su – root
RPi> xauth list
10-111-11-11/unix:10 MIT-MAGIC-COOKIE-1 cf4967d5a6c0e6d5f33285aa0e483643
RPi> su – <user> (probably "pi")
RPi> xauth add 10-111-11-11/unix:10 MIT-MAGIC-COOKIE-1 ...
You should check out the multiprocessing library. If you have parts of you program that you can run in parallel, like processing multiple images and detecting a faces, you can simply define a process Pool. By default a pool will start as many processes simultaneously as you have processors. You can also define the pool size and fix it to 4.
If you compile the OpenCV library with the OpenMP option active in the cmake file (it is off by default), many algorithms will use multiple cores automatically, without you needing to change anything in your source code. In my case I managed to achieve an up to 4.5x increase in performance. Yes, the Raspberry Pi 2 only has 4 cores, but if you do heavy number-...
some of the errors here, and I hope someone can help explain why these errors occur
That's literally just the tip of an iceberg. By "literally", I mean system log messages are classified into 8 levels of priority (see man logger or man 3 syslog), and, depending on configuration (see /etc/rsyslog.conf; it might also just be syslog.conf), the highest one or ...