Home
914 PC Bots Forum  


GRUNT
User

Platinum Boarder
Posts: 86
graphgraph
Karma: 5  
914 Head Project Part 1 - 2007/09/19 11:43 This thread discusses the Content article: 914 Head Project Part 1

Rather impressive stuff once again Chris.
  | | The administrator has disabled public write access.
lilytherobot
User

Platinum Boarder
Posts: 189
graphgraph
Karma: 4  
Re:914 Head Project Part 1 - 2007/09/19 12:07 Hi Chris,

Great stuff! I read the paper and one thing jumped out at me - you mention "I came across a problem that you couldn’t connect two webcams to the same computer and have it access them simultaneously"...

Do you recall what the issue was?

I currently have two web cams (US connected to my PC and I use them both at the same time... was it a C++ / API issue? or some other problem?

Dave...
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:914 Head Project Part 1 - 2007/09/19 17:28 I dont know if Motters has anything to add but I think in our separate projects we might have run into the same problem.

I bought loads of cameras over the years and once in a while bought pairs of cameras to see whether I could get them working together to program stereo vision. The last pair of cameras I bought was a pair of CamMaestro USB webcams (they came free with a skype microphone headset bundle).

I found that when programming my computer in C/C++ for visual studio 6.0 I could happily access live video using the VFW api. The framerates were really low, but for basic processing this was okay. That API was written in C so I thought that the obvious way to get stereo was ot use object orientation and plug in another camera.

It wasnt my program as such that wouldnt let me do stereo it was my computer. Everytime I plugged two of the same camera in Windows would not let me access feeds from two cameras together. Even viewing the preview in windows explorer kept crashing the computer. The only way to get two video feeds in was to do it with different camera types (unnaceptable) or just do it the old fashioned way with analog.

Im now familiar with IP cameras and C# and can see I would have had stereo in 5 minutes flat if I had gone down this path, but they are just too expensive. It turns out that MSRS has a tutorial that allows you to get distance from only one camera using pinhole assumptions. I'll probably be exploring this at some point.
  | | The administrator has disabled public write access.
motters
User

Platinum Boarder
Posts: 132
graphgraph
Karma: 1  
Re:914 Head Project Part 1 - 2007/09/21 04:28 This looks quite interesting. Is the frame capture fully synchronised?

Like you guys I started off trying to use VFW to capture images from two webcams, but encountered exactly the same problems. This was some years ago and at that time it looked as if nobody had ever attempted to do stereo vision using webcams. There was hardly any information available on this topic, so it took me about a year of experimentation before I found out how to do it.

Firstly, I found that VFW is a heap of junk, and was written at a time when even getting a single camera to run on a computer was an achievement. To run two identical cameras at the same time you have to use something called DirectShow. To see how I'm using it have a look at this part of the sentience code.

http://sentience.googlecode.com/svn/trunk/applications/RTstereo/

Stereo vision is a complex subject, and to really make maximum use of it requires some fancy coding. Firstly you need to calibrate the cameras, and I've devised a simple mathod for doing this using some markings on a piece of cardboard.

http://code.google.com/p/sentience/wiki/CameraCalibration

Without calibration the ranging results are usually worthless. Even with precision engineering there is nearly always some slight relative missalignment of the cameras, and you also need to take account of the spherical distortion of the lens.

Then, to do something useful you need to compute probabilistic sensor models for each possible disparity value, and insert these into a grid map. Doing SLAM within a grid map is also quite a complex piece of coding (I've used a method called distributed particle SLAM).

http://code.google.com/p/sentience/wiki/StereoUncertainty
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:914 Head Project Part 1 - 2007/09/21 18:25 Motters has lots of experience in this area so I am sure his coments are absolutely correct. Like he said VFW was bad, watching a TV show with my earlier programs I had framerates like 7fps.

As for the multiplexer its all time synchonised and the picture quality is quite aceptable. Ive used Directshow to handle video content from multiple IP cameras so if I dont use MSRS for the vision processing I would probably end up using this.

As for the camera calibration, its absolutely true. Ive seen at least three alternative methods of getting distance from either one or two cameras.

http://www.dis.uniroma1.it/~iocchi/stereo/
http://msdn2.microsoft.com/en-gb/library/bb727252.aspx

Before I was thinking of MSRS I would have gone down the route of the first link
  | | The administrator has disabled public write access.
motters
User

Platinum Boarder
Posts: 132
graphgraph
Karma: 1  
Re:914 Head Project Part 1 - 2007/09/21 18:54 One thing which could be a show stopper using this kind of method is the amount of horizontal resolution which you can get. For stereo vision vertical resolution isn't all that important but good horizontal resolution is essential to get reasonable ranging accuracy. If the image is being split into four then you're probably only getting half the horizontal resolution, and the resolution of analogue TV quality imagers can be quite poor to begin with.

I think for indoor navigation 320 pixels across is ok. For navigation in more open spaces such as outdoors 640 pixels across is probably the minimum. This is based upon a stereo setup where the cameras are spaced 10cm apart.

Another question is whether you can get analogue cameras with wide angle lenses (70-90 degrees FOV).
  | | The administrator has disabled public write access.