简体   繁体   中英

Unable to get SimpleCV working on Raspberry PI3 B+

I'm trying to capture images and then take measurements based on objects in the image. I got a brand new Raspberry Pi3 B+ and the Pi camera. I have the Pi up and running on Raspbian and I installed SimpleCV and I am getting this error:

"ImportError: Cannot load OpenCV library which is required by SimpleCV"

...when I run:

simplecv

The book I'm reading (Practical Computer Vision with SimpleCV) tells me to type the following in response to errors related to OpenCV:

sudo add-apt-repository ppa:gijzelaar/opencv2.3

...which yields the following error:

"Error: could not find a distribution template for Raspbian/buster"

The reading I did about this error is above my current level of understanding. One source I was able to decipher suggested getting OpenCV 2.4 instead of 2.3. I changed the 2.3 to 2.4 in the previous line of code but got the same error.

This feels like a dead end from my noob perspective.

I tried another route with these two lines of code I found here :

sudo apt-get install ipython python-opencv python-scipy python-numpy python-setuptools python-pip

sudo pip install https://github.com/sightmachine/SimpleCV/zipball/master

a lot happened, and I got a long list of red text below an "Exception: " heading, but ultimately when it stopped and I tried to start SimpleCV, I got the same error related to not being able to load the OpenCV library.

Anyone able to explain what is going on in beginner terms? Anyone able to give a line of code or two to get me past this installation phase and started on SimpleCV?

I think you're having a library conflict here. The reason maybe because you're using a newer version of raspbian.

The following command will install opencv2.3 from this respo : https://launchpad.net/~gijzelaar/+archive/ubuntu/opencv2.3 . By accessing into that respo, you can see that it only work with 11.10.

sudo add-apt-repository ppa:gijzelaar/opencv2.3

The followng command will install the lastest version of python opencv for your current raspbian version . You can check a list of available version at : https://pypi.org/project/opencv-python/#history

sudo apt-get install ipython python-opencv python-scipy python-numpy python-setuptools python-pip

sudo pip install https://github.com/sightmachine/SimpleCV/zipball/master

So the installed opencv won't match with version required by simpleCV

Ok so how to fix this ? You could try the following command first

  1. Get your current raspbian version

    lsb_release -a

  2. then switch your raspbian into wheezy (2012 version). Just download the image at: http://ftp.jaist.ac.jp/pub/raspberrypi/raspbian/images/2012-07-15-wheezy-raspbian/ and write into your sd card

  3. Worst choice: if the 2 approach do not work, you should gave up of simplecv and switch to opencv. As in your link, simpleCV's lastest update is in 2012, So it's a dead library. And simpleCV is just a wrapper of OpenCV.

Hope that help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM