[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
Plum Geek Forum • Spirit Machine Vision Discussion
Page 1 of 2

Spirit Machine Vision Discussion

Posted: Sat Dec 31, 2016 5:17 pm
by Kevin
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

Re: Spirit Machine Vision Discussion

Posted: Sat Dec 31, 2016 10:25 pm
by ihermit2
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

Posted: Sun Jan 01, 2017 3:25 am
by esba1ley

Re: Spirit Machine Vision Discussion

Posted: Mon Jan 02, 2017 2:23 am
by esba1ley

Re: Spirit Machine Vision Discussion

Posted: Fri Jan 06, 2017 6:05 pm
by Kevin
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.

Re: Spirit Machine Vision Discussion

Posted: Thu May 11, 2017 8:42 am
by 3dtech
thanks for this information.

Re: Spirit Machine Vision Discussion

Posted: Sun Oct 15, 2017 4:05 am
by odinshen
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

Re: Spirit Machine Vision Discussion

Posted: Mon Nov 27, 2017 1:40 am
by mgodiya
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.

Re: Spirit Machine Vision Discussion

Posted: Sun Jan 28, 2018 7:00 am
by esba1ley
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

Re: Spirit Machine Vision Discussion

Posted: Sun Jan 28, 2018 10:59 pm
by esba1ley
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.