go away spammer

Author Topic: paralel camera  (Read 7758 times)

0 Members and 1 Guest are viewing this topic.

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
paralel camera
« on: November 02, 2006, 06:36:37 PM »
so i remember looking for one of these a while back.
i was interested in interfacing a camera to a microcontroller.
most of the cameras on the market were analogue devices making it quite a challenge to process an image in real time.
what i was looking for (but couldn't find) was something like this:
http://www.sparkfun.com/datasheets/Cellular%20Modules/TC5747.pdf
available from Spark Fun:
http://www.sparkfun.com/commerce/product_info.php?products_id=7906

the controll interface is i2c and the output is parallel. you can even select several different output speeds. nice and easy.

hope this helps someone avoid some of my video headaches.

dunk.

Offline Arislan

  • Full Member
  • ***
  • Posts: 70
  • Helpful? 0
Re: paralel camera
« Reply #1 on: November 02, 2006, 09:01:05 PM »
What kind of robot vision are you going for? Direct feed?

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: paralel camera
« Reply #2 on: November 02, 2006, 09:31:48 PM »
it's a problem i've looked into a few times.
so when i was first interested it was on a tele operated bot. i wanted to digitize video images and feed them back to the user using the same radio link as the output from the bot's sensors.
eventually i gave up and just installled a separate video transmitter on board. not that elegant a solution but simple and practical.

then more recently i hit the same hurdle again. this time i wanted vision based distance sensors. i again dug out my oscilloscope, some video decoder chips and an old camera, hoping to be able to digitize an image on a microcontroller which i could then export to a more powerfull processor for manipulation. essentially i wanted to build a video capture card with a i2c or rs232 output.
the main problems i ran in to are that video frequencies are pretty high, there for prone to interference and difficult to capture using A/D converters. also images are fairly large compaired to most microcontroller's memory size.
after playing with the idea for a while i again went with a more simple solution: i'm using a processor with built in USB host port so i can use an off the shelf webcam.

i know that one of the issues i ran into would be greatly simplified with this camera. namely the problem with converting analogue to digital signal at such high speeds.
you would still have to worry about how to store all that input in a limited microcontroller's memory but if it was easy we'd all be doing it right?

dunk.

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: paralel camera
« Reply #3 on: November 02, 2006, 09:54:21 PM »
The other problem with this camera is that it's a .jpg. Which means you need to unencode it to do any processing on it...wich you wouln't want to do on any thing that is too slow......but alteast it is a smaller file size (which works fine if you are just transporting it)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: paralel camera
« Reply #4 on: November 03, 2006, 08:50:53 AM »
what kind of algorithms do you want to do? what is required accuracy?

will the CMUcam do what you want?

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: paralel camera
« Reply #5 on: November 03, 2006, 05:07:58 PM »
jpeg processing is optional on this camera. it will output simple bitmaps as well meaning it would be relatively easy to do image processing on board a microcontroller. (storing the images may be a little more problematic....)

i'm not actually planning to use this camera at the moment as i have found other ways to solve my video input problems.
i was just pointing it out as an option for anyone else who is considering doing similar things.

the CMU cam was also an option that i looked at. it uses a parallel input camera not unsimilar to the Transchip one if i remember correctly.

to explain why i decided the CMU cam was not for me i should go into a little more detail as to what i am trying to do.
i want my bot to have a vision based distance sensor. i'm essentially building a laser ranging module. (so i was simplifying things in my earlier post when i said video digitizer.)
i have one of those DIY thingys that draws a straight line on your wall by passing a laser through a piece of curved glass.
i point the laser line thingy straight ahead about an inch above the ground.
i point my camera the same direction but higher up.
take a picture with the laser switched on. take a picture with the laser switched off. subtract one image from the other. you are left with an image of just the line.
you can then work out how far away things are by how high up the picture the laser appears.
i wanted to build a module with similar properties to the CMU cam but that did not transfer the whole image over the serial port, just the range information.
this would be far quicker, meaning the bot could do it's ranging in real time, rather than having to stop and think about it.
here's a link that explains the maths but i'm implementing it in quite a different way:
http://www.seattlerobotics.org/encoder/200110/vision.htm

i have abandoned the camera to microcontroller approach to this problem and am now going for a USB camera plugged into a little embedded processor meaning i can solve most of the problems in software rather than hardware and microcontroller code. (ok, some of that's software too but you get my point....)
while i'm confident the microcontroller route would work and i may go back to it one day, the way i'm doing it now is far quicker and easier.

on a modern processor, programming in C++ it's actually quite simple. (i'm using a Linksys NSLU2 http://www.nslu2-linux.org/ with a Logitech USB quick cam.)
i still have to fine tune some of the inaccuracies caused by the distorting effect of the camera but i'm confident i can fix that with a little maths.

dunk.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: paralel camera
« Reply #6 on: November 03, 2006, 06:23:39 PM »
yea, i agree that the microcontroller method wouldnt be best . . . just too slow and too much trouble. maybe best to just hook up a webcam and use source code already written.

now that your using a pc, why not do stereo vision? i think that laser idea wont work much better than a scanning sharp IR, and would be more trouble too . . .

or maybe do some 2D to 3D image modeling:
example video here:
http://www.youtube.com/watch?v=VuoljANz4EA&eurl
details here:
http://www.cmu.edu/PR/releases06/060613_3d.html
and the source code here:
http://www.cs.cmu.edu/~dhoiem/projects/popup/

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: paralel camera
« Reply #7 on: November 04, 2006, 05:46:05 AM »
the system i'm describing is *far* better than any of the sharp IR units.
you get very precise distance information for a 90 degree viewing field.
with the sharp units you get reasonable distance accuracy but no directional information.
on the down side, with this method, you only detect objects that exist at the same height as your laser line.
when i get back home i'll post some images of the camera output, the diffs and the map that is created. (i don't have them on my laptop and i don't have a laser level thing or webcam with me.)

the links Admin shows are not using stereo vision. (sorry Admin.) they use kalmon filters to detect horizontal and vertical lines on a single image.
they presume that most of these straight lines will be either horizontal or vertical and show planes based on this presumption. a safe assumption in most scenes but possibly not in my messy work shop....
pretty impressive stuff.
to be honest, i have not experimented with this approach but i have to presume it is fairly processor intensive.

i've been playing with stereo vision as well.
the problem with stereo vision is it's much more processor intensive than the method i described and much more error prone.
you also need 2 cameras.
admittedly it is way more cool.
there are good libraries allready existing for this: http://www710.univ-lyon1.fr/~ameyer/devel/opencv/docs/ref/opencvref_cv.htm

the NSLU2 is no where near powerfull enough to process stereo vision information in real time.
i had a mini ITX motherboard running on batteries for stereo vision. i'm just not sure i'm willing to waste that much power.
the best i could do was 4 hours of battery life running mini ITX platform. (any one else out there got recomendations for battery powered processor power?)
the NSLU2 can run for days on the same battery pack.

while i will definatley be palying with stereo vision in the future, for the bot i'm building, battery life is too critical a factor to waste on a power hungry prosessor.

dunk.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: paralel camera
« Reply #8 on: November 04, 2006, 11:58:33 AM »
Quote
with the sharp units you get reasonable distance accuracy but no directional information

What do you mean? If you put the sharp IR on a servo, you know both the angle and the distance away. Too slow you say? Put three on it scanning three times as fast. I did some really nice mapping and object avoidance algorithms this way.

Quote
on the down side, with this method, you only detect objects that exist at the same height as your laser line.
You could scan the laser vertically, or have several lasers that are different colors at different heights.

Quote
the links Admin shows are not using stereo vision.
Sorry for the confusion, those were two entirely seperate suggestions. I meant either use 2 cameras for stereo, or the idea would use the 2D to 3D analysis. but now that you mention it, probably is way too processor intensive for a mobile robot . . .

and the other question was the expected environment . . . i got my scanning IR to work in a workshop environment  ;D

this wont really work for what you are doing, but i did a cheap and dirty distance algorithm with a camera a few years ago. basically i told it objects of a certain color/shape were a specific size. so knowing the number of pixels that object took up in the cam image and the size of the object, the distance away can be calculated. i got my robot following things like red books at exactly two feet away at all times.

another method is having a floor color different than all the objects on the floor. the camera can calculate distance to any object just by measuring the number of pixels of floor color between the bot and the object. but this depends on your floor being some very different color, like concrete grey or dirty green like the workshop i used to build bots in  :P ever considered painting your floor red?  ;)

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: paralel camera
« Reply #9 on: November 04, 2006, 02:57:20 PM »
Quote
If you put the sharp IR on a servo, you know both the angle and the distance away.
interesting. when i played with this sort of module i never really got the sort of precision you are describing here. admittedly i haven't used them much.
what sort of beam width did you experience?
what sort of max range did you get?
http://www.acroname.com/robotics/info/articles/sharp/sharp.html suggests 80cm for maximum range with a beam width of approximately 16cm at 40cm out. would these results match your findings?

my bot will be about 30cm wide so the beam width would be fine (pointless telling the bot about gaps it can't fit through) but the maximum range of 80cm is definitely not an option. the room i plan to operate this robot in has some fairly big open spaces. if the bot is going to be able to keep track of it's position relative to it's map of the room it will need to be able to see at least 10 meters and using my current system i can reliably achieve accurate results well over this distance. (it works better in dim conditions than bright conditions. maybe i should give the bot a remote controlled light dimmer......)

i have thought about sonar as a backup sensor as it's better equipped to deal with the distances i'm looking at.
the problem with sonar is you generally get quite a wide beam width. (i know there are specialist units out there that use a narrower beam. anyone had any experience with these?)
this doesn't rule sonar's usefullness out when creating accurate maps. if a wide beam sonar unit gives you a reading you don't necessarily know exactly what direction the object it sensed is in. what you do know is that there is a cone in front of the sensor that is clear of objects out to that distance.

dunk.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: paralel camera
« Reply #10 on: November 04, 2006, 05:30:15 PM »
hmmm sonar sucks (~50 degree range) dont use it for precision stuff

so you want localization done with just a cam? sounds hard . . . can you cheat with colored beacons?

The Sharp GP2Y0A02YK IR Sensor can do up to 1.5 meters with the precision you want . . . but for cheap sensors thats the best you will get . . . I guess a cam is the only way to go . . . Or you can always buy a multi-thousand dollar SICK or Hokuyo URG laser range finder ;D

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: paralel camera
« Reply #11 on: November 04, 2006, 06:24:17 PM »
Quote
hmmm sonar sucks (~50 degree range) dont use it for precision stuff
yea, sonar's no good for telling you where stuff is. it's pretty good at telling you if an area is clear though so in conjunction with other sensors it can have it's uses.

Quote
can you cheat with colored beacons?
i'm going to put a beacon on it's battery charger but not in the rest of the room.

with just a cam it would be very hard.
with the addition of one of those laser line thingys it becomes a mathematical problem rather than a programming or hardware one. (now where did i leave my high school maths knowledge.....)
i'll keep you posted on my progress.

dunk.

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: paralel camera
« Reply #12 on: November 04, 2006, 07:05:51 PM »
This one is handy  :P
http://warrensburg.k12.mo.us/vw/hallar/student's%20webs/BShade/index.html

I'm working on my own scanning sensor that integrates IR and Sonar for various uses.....
I'll let you guys know how it works.
« Last Edit: November 04, 2006, 07:18:46 PM by JesseWelling »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: paralel camera
« Reply #13 on: November 04, 2006, 08:30:48 PM »
So according to that website, "So numbers help make right triangles which help make right triangles which help make the pyramids.  That all you needto know about this."

I did a sonar + sharp IR bot . . . but the sonar ended up not being used for anything but a bumper sensor . . . but now that I think about it, it could be used for the 6m rough ranging, and then use the scanning IR for much close range higher detail stuff . . .

sohcahtoa.

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: paralel camera
« Reply #14 on: November 05, 2006, 03:23:50 AM »
Yea I'm using a Max sonar. They are a little better than most from what I hear. Just on my desk it seems to get pretty good responce just movnig my hand above it and it only starts to get 'fuzzy' reading at about 3' out or so....still all the same I'm going to put an Sharp ir right beside it that will be able to do 10cm-80cm.

I'll see if I can't take some pictures soon so you guys can see what I'm up to.

Offline Arislan

  • Full Member
  • ***
  • Posts: 70
  • Helpful? 0
Re: paralel camera
« Reply #15 on: November 06, 2006, 11:42:25 AM »
You can buy parallel port quickcams on ebay for $20 each, sometimes with free shipping.

That's what this Walter guy used for his stereo vision:
http://www.intelligent-systems.com.ar/intsyst/robby.htm

At the moment Walter is powering his robot off the wall, it seems. It's a temporary arrangement. He's been working on that robot his whole life and he's 79 now! So he has definitely given things some thought.
It's my understanding he uses a mac Quadra motherboard for his robot. That would be interesting to learn more about.

I think you'd get good images with Quickcams, i used to have one.


Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: paralel camera
« Reply #16 on: November 06, 2006, 12:20:25 PM »
About a year ago that guy emailed the CMU Robotics Club and wrote this long half conscious letter about his biped robot . . . but we get weird emails all the time so we ignored it . . .

But he didnt send pics, so perhaps he has something going there after all . . . he needs videos up though . . .

Offline Arislan

  • Full Member
  • ***
  • Posts: 70
  • Helpful? 0
Re: paralel camera
« Reply #17 on: November 06, 2006, 01:43:22 PM »
Half conscious? lol....maybe he sounded that way because english is his third language. :P

I do hope he succeeds while he's still alive! 79 and still building robots must be a record somewhere.
What I don't like about his design is just the pneumatics thing. Everything else seems interesting, including the idea of a software brain. If you read his site, there's lots of interesting Kurzwei-like ideas in it.

Offline oelewapperke

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: paralel camera
« Reply #18 on: July 20, 2007, 04:20:39 AM »
or maybe do some 2D to 3D image modeling:
example video here:
http://www.youtube.com/watch?v=VuoljANz4EA&eurl
details here:
http://www.cmu.edu/PR/releases06/060613_3d.html
and the source code here:
http://www.cs.cmu.edu/~dhoiem/projects/popup/

Quote from the article "the processing from a 640x480 image is about 30 seconds using a 2Ghz athlon processor". Seems a bit much.

 


Get Your Ad Here

data_list