I was amazed at how cheap pinhole cameras are these days. I just ordered some off ebay and they are selling for $us 10 each, including all the power supplies, and wifi receiver.
All you need to do it hook them up to frame-capture cards and Bob's my uncle!
The pix from the units I have are only very low res at 300×300 pixels, but it's colour and you can tell what you're looking at. They're better than my older webcam…
So now I have an easy way to add vision to any of my projects, and have it beamed 30-60 m to my "big iron" for processing.
But I'm starting simple. Although I have done some "blow off" grad courses in robo vision, I think I'll revert to genetic type (check up on Pournelle&Niven's "Motie") and just invent what I need as I go along. Books are only needed when things blow up and burn down.
So here's the first 1/2 of my first attempt.
Basically, taking the images from a low-res camera, pass them through some sharpening and edge-detection to get a view of the ceiling in the room your bot is in. With some simple trig — knowing that the ceiling is (say) 2.5 m off the floor and your camera is X off the floor — you can decide how big the room is and how far away from each corner and wall the bot is.
The 2nd stage will do the calcs and spit out the measurements, but here's the results from the pre-processing (image massaging) I managed to cobble together after the "hot glue engineering" with Talrik last night.
(I kinda check in on ausrobotics every hr or 2 o'night and I know I'm not the only one that works until dawn
Here are the initial pix from the spycam. These are the 5 corners of my granny flat where most of the major des^H^H^Hconstruction around here gets done.
And now we pass the above through some magical piece of cobbled-together s/w and we have (hopefully) just the ceiling and wall join lines:
Pretty, to be sure.
Now comes the fun part — dredging into that mess of pixels and measuring some angles.
The problem may seem difficult at this stage, but is actually easy to solve. We can use some a priori knowlege such as rooms usually have square corners, and normally there are 4 of them (in my granny flat this rule fails), ceilings are about 2.5 m up, and — in my case — the camera is 78 cm off the floor. (Additional knowlege such as the room in question is 6 x 9 m can be used for checking — but is not needed to solve the basic questions).
The method I'll use involves simply generating a "wire frame" model of a room, and changing its parameters — length, width and position of the robot — so the angles in some selection of the observed ceiling-level lines match up. There will only be 1 or 2 possible answers, and the "correct" set should come out using the a priori knowlege.
OK. Sounds simple. I'll post some more tomorrow.