Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

eBox 3350MX, Arduino and Processing

Based on DMP's Vortex processor / SoC this board is a full computer capable of running a standard Windows and Linux installation on the backpack of your robot.
8 postsPage 1 of 1
8 postsPage 1 of 1

eBox 3350MX, Arduino and Processing

Post by ozfiddler » Mon Oct 17, 2011 12:47 am

Post by ozfiddler
Mon Oct 17, 2011 12:47 am

Well I must say the eBox is very useful if you are feeling bored and need to fill in an hour, or two... or forty! It's proving to be a great little time-waster!!

I found a very nice project on the Sparkfun site for face tracking using a pan/tilt webcam setup. It uses OpenCV 1.0, Processing and Arduino. However getting Processing and Arduino to run on the eBox has proved to be a major headache.

I eventually discovered that if you use Processing-1.2.1 it is OK. However I have had no luck at all with Arduino and have tried arduino-011, arduino-014, arduino-016, arduino-018 and arduino-022. The earlier versions refuse to open, and the later ones open but always give a compilation error. Even on the most basic of programs I get:

C:\Documents and Settings\Alan\Desktop\arduino-0018\hardware\arduino\cores\arduino\wiring_pulse.c: In function 'pulseIn':

C:\Documents and Settings\Alan\Desktop\arduino-0018\hardware\arduino\cores\arduino\wiring_pulse.c:66: internal compiler error: Illegal instruction

By the way, this is the tutorial I am trying to follow:

http://www.sparkfun.com/tutorials/304

Anyone know why Arduino won't work on the eBox??
Well I must say the eBox is very useful if you are feeling bored and need to fill in an hour, or two... or forty! It's proving to be a great little time-waster!!

I found a very nice project on the Sparkfun site for face tracking using a pan/tilt webcam setup. It uses OpenCV 1.0, Processing and Arduino. However getting Processing and Arduino to run on the eBox has proved to be a major headache.

I eventually discovered that if you use Processing-1.2.1 it is OK. However I have had no luck at all with Arduino and have tried arduino-011, arduino-014, arduino-016, arduino-018 and arduino-022. The earlier versions refuse to open, and the later ones open but always give a compilation error. Even on the most basic of programs I get:

C:\Documents and Settings\Alan\Desktop\arduino-0018\hardware\arduino\cores\arduino\wiring_pulse.c: In function 'pulseIn':

C:\Documents and Settings\Alan\Desktop\arduino-0018\hardware\arduino\cores\arduino\wiring_pulse.c:66: internal compiler error: Illegal instruction

By the way, this is the tutorial I am trying to follow:

http://www.sparkfun.com/tutorials/304

Anyone know why Arduino won't work on the eBox??
ozfiddler
Savvy Roboteer
Savvy Roboteer
Posts: 93
Joined: Tue Oct 26, 2010 1:01 am

Post by PedroR » Mon Oct 17, 2011 10:51 am

Post by PedroR
Mon Oct 17, 2011 10:51 am

Hi ozzfiddler

The Arduino IDE is JAVA based. There has been a very recent conversation about JAVA on eBox and the absence of i686 specific instructions.

Therefore either the compiler is trying to use an i686 instruction to produce the assembled code or the Arduino IDE has an incompatible version of JAVA (btw the JAVA version used by Arduino is inside the Arduino folder; even if you have another version installed in program Files, Arduino will still use its own version).

In any case, if the Arduino complier does not "like" the eBox, you can always compile and download the Arduino Sketch (and all the Arduinp part of the Tutorial) using another PC. You don't have to do it on eBox at all.

The only thing that needs to be running on eBox is the OpenCV code.
The Arduino part, just needs to be done once (on any computer) and once you have the code downloaded tot he Arduino you can connect it to any computer.

You don't even need to have the Arduino IDE installed on eBox to run the SF sample.

Please let us know how it goes.
As I mentioned we have OpenCV 2.1 running on our 3350MX and doing face tracking as well (we just didn't pair it with a Pan & Tilt from DAGU and an Arduino to follow the face; we used a fixed camera).

Regards
Pedro.
Hi ozzfiddler

The Arduino IDE is JAVA based. There has been a very recent conversation about JAVA on eBox and the absence of i686 specific instructions.

Therefore either the compiler is trying to use an i686 instruction to produce the assembled code or the Arduino IDE has an incompatible version of JAVA (btw the JAVA version used by Arduino is inside the Arduino folder; even if you have another version installed in program Files, Arduino will still use its own version).

In any case, if the Arduino complier does not "like" the eBox, you can always compile and download the Arduino Sketch (and all the Arduinp part of the Tutorial) using another PC. You don't have to do it on eBox at all.

The only thing that needs to be running on eBox is the OpenCV code.
The Arduino part, just needs to be done once (on any computer) and once you have the code downloaded tot he Arduino you can connect it to any computer.

You don't even need to have the Arduino IDE installed on eBox to run the SF sample.

Please let us know how it goes.
As I mentioned we have OpenCV 2.1 running on our 3350MX and doing face tracking as well (we just didn't pair it with a Pan & Tilt from DAGU and an Arduino to follow the face; we used a fixed camera).

Regards
Pedro.
Last edited by PedroR on Mon Oct 17, 2011 11:05 am, edited 1 time in total.
PedroR
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm

Post by PedroR » Mon Oct 17, 2011 11:03 am

Post by PedroR
Mon Oct 17, 2011 11:03 am

FYI the face tracking sample is quite a cool one that you can easily reproduce.

Here is the video
phpBB [media]



The tuturial requires the following parts:

- A webcamera (any webcamera supported by windows or Linux (with UVC drivers) ) will work.

- DAGU Pan & Tilt - http://robosavvy.com/store/advanced_sea ... u+pan+tilt

- An Arduino: http://robosavvy.com/store/index.php/cPath/1195_1196
I believe SF's sample uses an Arduino UNO and a breadboard to power the servos.

In addition to the UNO we have other Arduinos in stock that are ready to connect to servos (ie come populated with 3 pin servo connectors so there's no need to use a breadboard ). These are the Romeo and the Redback Spider controller in case you'd like to look at an alternative.

Regards
Pedro.
FYI the face tracking sample is quite a cool one that you can easily reproduce.

Here is the video
phpBB [media]



The tuturial requires the following parts:

- A webcamera (any webcamera supported by windows or Linux (with UVC drivers) ) will work.

- DAGU Pan & Tilt - http://robosavvy.com/store/advanced_sea ... u+pan+tilt

- An Arduino: http://robosavvy.com/store/index.php/cPath/1195_1196
I believe SF's sample uses an Arduino UNO and a breadboard to power the servos.

In addition to the UNO we have other Arduinos in stock that are ready to connect to servos (ie come populated with 3 pin servo connectors so there's no need to use a breadboard ). These are the Romeo and the Redback Spider controller in case you'd like to look at an alternative.

Regards
Pedro.
PedroR
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm

Post by ozfiddler » Mon Oct 17, 2011 12:02 pm

Post by ozfiddler
Mon Oct 17, 2011 12:02 pm

PedroR wrote:Hi ozzfiddler

In any case, if the Arduino complier does not "like" the eBox, you can always compile and download the Arduino Sketch (and all the Arduinp part of the Tutorial) using another PC. You don't have to do it on eBox at all.

The only thing that needs to be running on eBox is the OpenCV code.
The Arduino part, just needs to be done once (on any computer) and once you have the code downloaded tot he Arduino you can connect it to any computer.

You don't even need to have the Arduino IDE installed on eBox to run the SF sample.



Great - thanks Pedro. I was hoping that might be the case. I've loaded the Arduino drivers OK and it is recognised by the computer so theoretically I can just load up the Arduino with the necessary program and it should do its job. I'll post a video if I can get it working.

It is a really cool project isn't it... exactly what I was hoping to achieve.
PedroR wrote:Hi ozzfiddler

In any case, if the Arduino complier does not "like" the eBox, you can always compile and download the Arduino Sketch (and all the Arduinp part of the Tutorial) using another PC. You don't have to do it on eBox at all.

The only thing that needs to be running on eBox is the OpenCV code.
The Arduino part, just needs to be done once (on any computer) and once you have the code downloaded tot he Arduino you can connect it to any computer.

You don't even need to have the Arduino IDE installed on eBox to run the SF sample.



Great - thanks Pedro. I was hoping that might be the case. I've loaded the Arduino drivers OK and it is recognised by the computer so theoretically I can just load up the Arduino with the necessary program and it should do its job. I'll post a video if I can get it working.

It is a really cool project isn't it... exactly what I was hoping to achieve.
ozfiddler
Savvy Roboteer
Savvy Roboteer
Posts: 93
Joined: Tue Oct 26, 2010 1:01 am

Post by ozfiddler » Thu Oct 20, 2011 7:26 am

Post by ozfiddler
Thu Oct 20, 2011 7:26 am

Well, I spent the day on this and still haven't managed to get it working properly. But from my results so far I think that the eBox MX3350 is just too slow to manage this sort of thing. The substantial time lag would seem to rule out anything as complex as face tracking.
Well, I spent the day on this and still haven't managed to get it working properly. But from my results so far I think that the eBox MX3350 is just too slow to manage this sort of thing. The substantial time lag would seem to rule out anything as complex as face tracking.
ozfiddler
Savvy Roboteer
Savvy Roboteer
Posts: 93
Joined: Tue Oct 26, 2010 1:01 am

Post by PedroR » Thu Oct 20, 2011 10:28 am

Post by PedroR
Thu Oct 20, 2011 10:28 am

Hi ozzfiddler

What resolution are you using? Have you tested using a lower resolution?

There's a lot of floating point going on when using OpenCV and usually lowering the camera resolution helps improve FPS.

Thanks
Pedro.
Hi ozzfiddler

What resolution are you using? Have you tested using a lower resolution?

There's a lot of floating point going on when using OpenCV and usually lowering the camera resolution helps improve FPS.

Thanks
Pedro.
PedroR
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm

Post by ozfiddler » Mon Oct 24, 2011 2:23 am

Post by ozfiddler
Mon Oct 24, 2011 2:23 am

I'm not sure where the camera resolution is set. I did change the pan/tilt servo stepping from 1 to 4 to make it follow faster and that seemed to help. Anyway, this is the result so far (sorry about the jerky video... had to hold the camera below my face!):

phpBB [media]


Works much better running on a big PC though. By the way, for anyone trying this with the eBox I had to use Processing 1.2.1, NOT later versions. You'll have to start it, wait 2 mins and eventually get an error message. But try again and it seems to work the second time.
I'm not sure where the camera resolution is set. I did change the pan/tilt servo stepping from 1 to 4 to make it follow faster and that seemed to help. Anyway, this is the result so far (sorry about the jerky video... had to hold the camera below my face!):

phpBB [media]


Works much better running on a big PC though. By the way, for anyone trying this with the eBox I had to use Processing 1.2.1, NOT later versions. You'll have to start it, wait 2 mins and eventually get an error message. But try again and it seems to work the second time.
ozfiddler
Savvy Roboteer
Savvy Roboteer
Posts: 93
Joined: Tue Oct 26, 2010 1:01 am

eBox 3350MX, OPENCV setup

Post by Robo Dude » Tue Jan 26, 2016 6:19 pm

Post by Robo Dude
Tue Jan 26, 2016 6:19 pm

Hi All,

I'm trying to setup opencv on an eBox 3350MX and get some simple camera capture (for now) in java.
I have tried opencv 1.0 and 2.1 as Pedro suggested. I tried even newer version with no luck.
The examples I've used are here:
opencv_java_api.zip: http://ubaa.net/shared/processing/opencv/download/01/
Everything runs well without compilation or run-time errors but I get a black screen instead of an image!

I have troubleshot my setup as follows:
1. Installed properly opencv and set the environmental variables
2. Tried all versions of FFMPEG static x86
3. Tried all versions of javacv bin. Apparently, the javacv bins are compatible with opencv 2.4.0 or newer
4. Installed Microsoft vcredist_x86
5. Tried java-jdk 5, 6, and 7
6. I have used a compatible to opencv camera with correctly installed drivers etc (the cam works well with other software on ebox)
7. Tried to use libraries from Processing 1.2.1 (followed the tutorial on http://ubaa.net/shared/processing/opencv/)

I really don't know what's wrong or if I am missing something.
Could you please provide an opencv setup guide for ebox and java, or at least tell me what should I do further?
An opencv setup guide for ebox would be very useful and help many people.
Also, is FFMPEG really needed?

Cheers
Hi All,

I'm trying to setup opencv on an eBox 3350MX and get some simple camera capture (for now) in java.
I have tried opencv 1.0 and 2.1 as Pedro suggested. I tried even newer version with no luck.
The examples I've used are here:
opencv_java_api.zip: http://ubaa.net/shared/processing/opencv/download/01/
Everything runs well without compilation or run-time errors but I get a black screen instead of an image!

I have troubleshot my setup as follows:
1. Installed properly opencv and set the environmental variables
2. Tried all versions of FFMPEG static x86
3. Tried all versions of javacv bin. Apparently, the javacv bins are compatible with opencv 2.4.0 or newer
4. Installed Microsoft vcredist_x86
5. Tried java-jdk 5, 6, and 7
6. I have used a compatible to opencv camera with correctly installed drivers etc (the cam works well with other software on ebox)
7. Tried to use libraries from Processing 1.2.1 (followed the tutorial on http://ubaa.net/shared/processing/opencv/)

I really don't know what's wrong or if I am missing something.
Could you please provide an opencv setup guide for ebox and java, or at least tell me what should I do further?
An opencv setup guide for ebox would be very useful and help many people.
Also, is FFMPEG really needed?

Cheers
Robo Dude
Newbie
Newbie
Posts: 1
Joined: Tue Jan 26, 2016 4:23 pm


8 postsPage 1 of 1
8 postsPage 1 of 1