Hello all!
In the recent Kickstarter updates, we've been discussing various options for running the machine vision system on Spirit. I built the prototype using SimpleCV, which works, but it's certainly not ideal. Much better solutions exist but as I'm not much of a software guy, I'm hoping for some help from the rest of you.
A few options I've had a quick look at:
OpenCV: This appears to be the go-to standard for this kind of work, though at first glance, it looks complicated.
OpenMV: This looks like a possibly great solution, but I haven't dug into it yet.
https://openmv.io/
Pixy from Charmed Labs: Not sure what software this device runs, but from the looks of it, they've got the vision aspect dialed in.
http://charmedlabs.com/default/pixy-cmucam5/
Requirements:
We would really like a solution that runs on Python 2.7. As far as I can tell, the latest OpenCV only runs on Python 3.0, but we have a few other things running on the robot requiring 2.7. I tried to move those to 3.0 a while back and it was a huge mess so if we can stick with 2.7 for the vision, so much the better.
The second big requirement is that it can be made easy. All of these bits of software appear quite complex, but if I can understand it well enough and I can write some simple functions that are "user friendly for the masses" then it'll work.
The production hardware will be a Raspberry Pi B3 with the original Rev1 Raspberry Pi camera (the 5MP design), though we will eventually move to the new Rev2 (8MP) Pi Camera, so if we could create a vision solution that is easy to swap between cameras, this would also be a huge plus. Eventually we will need to run it on the Rev2 8MP camera one way or the other as the Rev01 cams are harder to find these days.
So I'll open it up for discussion below. If you have a Pi and a camera module, and you have more advanced understanding of how all this stuff works, we would really appreciate your help. Share your thoughts on the different options, discuss between yourselves, play with some demo code, etc.
Thanks in advance for the help!!!
Cheers!
-Kevin
Spirit Machine Vision Discussion
-
- Posts: 1
- Joined: Sat Dec 31, 2016 10:23 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Spirit Machine Vision Discussion
I'd be happy to help if you want packages moved to 3.0 from 2.7 if they're open source. how long is the list that would need to be brought forward?
Re: Spirit Machine Vision Discussion
Last edited by esba1ley on Mon Jan 02, 2017 2:29 am, edited 1 time in total.
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Re: Spirit Machine Vision Discussion
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
-
- Posts: 180
- Joined: Tue Jul 28, 2015 12:56 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Spirit Machine Vision Discussion
Thanks guys.
As far as making things simple, I'm not trying to teach the underlying theory of computer vision (at least not to start). I'm looking to create some simple python functions that do simple things, like find the biggest blue blob and return its center coordinates. That's what I'm doing with SimpleCV right now, though it's slow and difficult to tune.
I'll check into the links. The book looks like a good reference as well.
When writing code I always ask myself if I can make the functions simple enough that a 3rd grader can understand and use them.
I think we'll loose a lot of people if we jump straight into vectors.
Does OpenCV 3.0 have significant benefits over the previous versions?
Have you guys looked at OpenMV? I'm all about using whatever software is most easy for a novice and some of the other options out there seem to advertise great performance and ease of use.
As far as making things simple, I'm not trying to teach the underlying theory of computer vision (at least not to start). I'm looking to create some simple python functions that do simple things, like find the biggest blue blob and return its center coordinates. That's what I'm doing with SimpleCV right now, though it's slow and difficult to tune.
I'll check into the links. The book looks like a good reference as well.
When writing code I always ask myself if I can make the functions simple enough that a 3rd grader can understand and use them.
![Smile :)](./images/smilies/icon_e_smile.gif)
Does OpenCV 3.0 have significant benefits over the previous versions?
Have you guys looked at OpenMV? I'm all about using whatever software is most easy for a novice and some of the other options out there seem to advertise great performance and ease of use.
-
- Posts: 1
- Joined: Thu May 11, 2017 7:16 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Spirit Machine Vision Discussion
thanks for this information.
-
- Posts: 3
- Joined: Sat Oct 14, 2017 5:40 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Spirit Machine Vision Discussion
Hi,
Here is some stuff you guys may interesting which about apply AI/ML on Pi3, I will try it on my spirit rover and update here.
Odin
Here is some stuff you guys may interesting which about apply AI/ML on Pi3, I will try it on my spirit rover and update here.
Odin
-
- Posts: 5
- Joined: Tue Oct 31, 2017 3:45 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Spirit Machine Vision Discussion
Kevin, I have been a fan of OpenCV for a while. Despite its long and a little complicated setup, its a nifty little program.
is a url for the post I have used to setup Opencv on my pi. That website also hosts tutorials on how to setup on other platforms and distros.
I do understand that you would like to make this simple for 3rd graders to run, we can build scripts, programs and libraries as you did for Arduino. TO begin with, it does have quite a lot of examples to work with and learn using both python and C languages.
I have Ubuntu 16.04 LTS on my laptop with successfully installed Opencv. I am running programs on both and comparing results between the pi and my laptop. So far so good, but my main concern is with virtualenv used and recommended by the author of the post. Will virtualenv work the same as it would work normally with SPI and I2C between the two boards? I havent got to that part yet as I am making myself familiar with OpenCV. Please refer to his posts if you wish to read more on virtualenv.
I will make up a post if I happen to discover something useful or interesting. I also wrote a small python program to run on the RPi that turns the buzzer on and off and moves the servos.
is a url for the post I have used to setup Opencv on my pi. That website also hosts tutorials on how to setup on other platforms and distros.
I do understand that you would like to make this simple for 3rd graders to run, we can build scripts, programs and libraries as you did for Arduino. TO begin with, it does have quite a lot of examples to work with and learn using both python and C languages.
I have Ubuntu 16.04 LTS on my laptop with successfully installed Opencv. I am running programs on both and comparing results between the pi and my laptop. So far so good, but my main concern is with virtualenv used and recommended by the author of the post. Will virtualenv work the same as it would work normally with SPI and I2C between the two boards? I havent got to that part yet as I am making myself familiar with OpenCV. Please refer to his posts if you wish to read more on virtualenv.
I will make up a post if I happen to discover something useful or interesting. I also wrote a small python program to run on the RPi that turns the buzzer on and off and moves the servos.
Re: Spirit Machine Vision Discussion
Hey mgodiya,
Maybe we can help Kevin out with some OpenCV stuff using the python3 interface... I think we can make it simple enough for 3rd graders to do basic functionality through the Python interface, and since it's based on OpenCV, if some whiz kid wants to "dive deep", OpenCV is pretty limitless going down to the lowest level.
Thoughts?
-Erik
Maybe we can help Kevin out with some OpenCV stuff using the python3 interface... I think we can make it simple enough for 3rd graders to do basic functionality through the Python interface, and since it's based on OpenCV, if some whiz kid wants to "dive deep", OpenCV is pretty limitless going down to the lowest level.
Thoughts?
-Erik
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Re: Spirit Machine Vision Discussion
Hey all. I got OpenCV tag 3.4.0 running on Raspbian Stretch, accessible through python bindings for both Python 2.7 or Python 3.5.
See my blog post at for what I did.
See my blog post at for what I did.
Last edited by esba1ley on Wed Jan 31, 2018 8:51 am, edited 2 times in total.
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Who is online
Users browsing this forum: No registered users and 40 guests