maxpowel
Posts: 2
Joined: Wed Aug 10, 2011 10:34 pm

Re: Raspberry Pi + arduino + opencv

Thu Aug 11, 2011 12:00 am

Hi!
My history: I build small robots (rastreators, sumos, arms... basically like a hobby) but at the moment, my all devices are dummies and if I want a clever machine I need to connect them to a central computer (by wireless) wich is not allowed in contests. I think that raspperry pi could make my robots stand alone.

I use arduino (open hardware) to interact with the real world: move the robot, sensors to get information of the environment and a basic processing of this information.
When a I want more computational power (arduino is very limited in this respect) I use a computer.
In this computer, for artificial vision I use opencv (under c++) with a minimum of two cameras (through usb).
My intention is run this programs on a raspberry pi using it as the robot brain.

Do you think that is it feasible or I'm just dreaming?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6228
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Raspberry Pi + arduino + opencv

Thu Aug 11, 2011 12:10 am

Sounds like a great plan, keep us posted.

yopero
Posts: 1
Joined: Wed Aug 31, 2011 7:28 am
Contact: Website

Re: Raspberry Pi + arduino + opencv

Wed Aug 31, 2011 8:34 am

+1
Love Arduino but if we gather arduino and a computer it gets more powerful, having such a small pc opens a new world to small and powerfull devices to sense real world.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Raspberry Pi + arduino + opencv

Wed Aug 31, 2011 1:34 pm

The r-pi comes with (well I should say it is currently planned on coming with) 16 GPIOs. Once we get a good base drive for communicating with the GPIOs you should be able to use them just like you would with the arduino. Or in other words, if you needed the extra processing power, just use the r-pi by itself. :)
Dear forum: Play nice ;-)

DanielSilva
Posts: 71
Joined: Sun Aug 28, 2011 7:07 pm

Re: Raspberry Pi + arduino + opencv

Wed Aug 31, 2011 2:01 pm

Quote from maxpowel on August 11, 2011, 01:00

When a I want more computational power (arduino is very limited in this respect) I use a computer.
In this computer, for artificial vision I use opencv (under c++) with a minimum of two cameras (through usb).
My intention is run this programs on a raspberry pi using it as the robot brain.

Do you think that is it feasible or I'm just dreaming?

I don't see why not, the engineering dudes at my uni do something like you're describing but instead of raspi's they're using off-the-shelves mini-itx x86 boards.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Raspberry Pi + arduino + opencv

Wed Aug 31, 2011 3:22 pm

Quote from abishur on August 31, 2011, 14:34
The r-pi comes with (well I should say it is currently planned on coming with) 16 GPIOs. Once we get a good base drive for communicating with the GPIOs you should be able to use them just like you would with the arduino. Or in other words, if you needed the extra processing power, just use the r-pi by itself. :)

Indeed. If they expose the I2C bus as something you can hook into, then you get sensors through that or through a USB dongle.

patrickhwood
Posts: 27
Joined: Wed Aug 31, 2011 2:12 am

Re: Raspberry Pi + arduino + opencv

Wed Aug 31, 2011 11:44 pm

It's unclear whether a 700MHz ARM can run the OpenCV code fast enough for what you want to do. Most of this code is not optimized for any sort of GPU, even if you had access to the low level APIs for programming the Broadcom's GPU. Does anyone know whether there's any sort of SIMD support on the r-pi? Also, I recall that opencv uses a lot of floating point; I don't think the ARM's FPU is anything special.

maxpowel
Posts: 2
Joined: Wed Aug 10, 2011 10:34 pm

Re: Raspberry Pi + arduino + opencv

Mon Oct 24, 2011 4:03 pm

Quote from patrickhwood on September 1, 2011, 00:44
It's unclear whether a 700MHz ARM can run the OpenCV code fast enough for what you want to do. Most of this code is not optimized for any sort of GPU, even if you had access to the low level APIs for programming the Broadcom's GPU. Does anyone know whether there's any sort of SIMD support on the r-pi? Also, I recall that opencv uses a lot of floating point; I don't think the ARM's FPU is anything special.

Opencv runs fast enough under my samsung galaxy mini (600mhz)

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Raspberry Pi + arduino + opencv

Mon Oct 24, 2011 4:29 pm

Quote from patrickhwood on September 1, 2011, 00:44
I don't think the ARM's FPU is anything special.
It's stock VFP2, which can do 8 single-precision, or 4 double precision operations in parallel. From memory, there's a 20 cycle overhead on the transfers from CPU to VFP and back (which can be somewhat worked ameliorated by using hardfp linkage), but once you're in there it's pretty quick. For complex operations, it's best at multiply-accumulate (2 cycles, if memory serves) floating point divisions and square roots are slower (15 cycles or so, again if memory serves). Obviously it's best to have a pipeline of operations.

So no, it's nothing particularly special, but it's a helluva lot quicker than doing it in emulation.

Simon

Eriol-kun
Posts: 1
Joined: Tue Oct 25, 2011 2:21 am
Contact: Website

Re: Raspberry Pi + arduino + opencv

Tue Oct 25, 2011 5:31 am

I also work with the Arduino (ONE) architecture, and will definitely give R-Pi a shot as well. I'll try documenting my endeavors; right now I was planning to use an Android-powered phone as an interim brain for a project I'm building, but I just found out about r-pi and this also looks great and compact.

noonv
Posts: 2
Joined: Wed Nov 16, 2011 5:25 am
Contact: Website

Re: Raspberry Pi + arduino + opencv

Thu Nov 17, 2011 6:53 pm

im interesting in it too :)

asar_pi
Posts: 2
Joined: Mon Feb 13, 2012 6:35 pm

Re: Raspberry Pi + arduino + opencv

Mon Feb 13, 2012 11:18 pm

Here is my Arduino + opencv robot ASAR.

At the moment, he moves towards any face that is detected using a haar cascade in opencv.  The whole thing is stitched together with Python.



I am waiting patiently for the Raspberry Pi to be released so I can transplant his brain from my laptop to a Raspberry Pi so I can release him from his control and feedback tether!

I have plans to extend the facial recognition by changing mode once ASAR gets close enough to a subject, but this is someway off yet.

I am really keen to try this out on a Raspberry Pi, how much longer!!

Lynbarn
Posts: 464
Joined: Wed Jan 04, 2012 11:03 pm
Contact: Website

Re: Raspberry Pi + arduino + opencv

Mon Feb 13, 2012 11:24 pm

asar_pi said:


Here is my Arduino + opencv robot ASAR.

At the moment, he moves towards any face that is detected using a haar cascade in opencv.  The whole thing is stitched together with Python.


That's neat! If the face shuts its eyes - can ASAR still find it? My young daughters used to "hide" just by shutting their eyes. They couldn't see me, so I couldn't see them!

asar_pi
Posts: 2
Joined: Mon Feb 13, 2012 6:35 pm

Re: Raspberry Pi + arduino + opencv

Tue Feb 14, 2012 6:50 pm

I have not tested haar face detection with eyes closed, something to try I guess.

I am moving onto HoughCircle detection so it will chase a ball instead, the face detection was just to get started, as I built this robot with the Raspberry Pi brain in mind.

I hope to have it a bit more sophisticated with more sensors by the time I get the Raspberry Pi.

giancarlo.forum
Posts: 4
Joined: Sat Feb 18, 2012 8:08 pm

Re: Raspberry Pi + arduino + opencv

Sat Feb 18, 2012 8:35 pm

+ 1

maxpowel said:


...

In this computer, for artificial vision I use opencv (under c++) with a minimum of two cameras (through usb).

...


Maybe you would be able to connect 2 cameras, one by USB an other by CSI connector.

I will like to work in this project. I haven't worked in RaspberryPi yet, just Arduino + PC+ OpenCV.

Return to “Other projects”