Welcome to RepRap, Darkpaw.
Thank you for telling us about CamRap. The 2D encoder technique using a 2D barcode looks really clever. I hope you don't mind me adding links to the bottom of that page to places where we discussed using camera positioning before. Alas, as far as I can tell, all those previous discussions never made it past the "hot air" stage.
I see that both you and Jon Howell use a trinary system with 3 different kinds of squares (he uses black, white, and grey tiles).
Is there anything I can do to help get CamRap working?
Again, welcome. --DavidCary 21:15, 30 April 2012 (UTC)
Hassling me about it is probably a good start in helping to progress development. =)
I have it working quite well at reporting position, but have been playing with cartesian robot hardware to suit it lately. A friend recently got a Prusa Mendel up and running so I think I will abandon my efforts with FIMO and balsa wood.
The limiting factor for resolution (with a standard webcam) at the moment is printing quality for the grid. It reports position in grid units, so the smaller the actual grid is, the better the precision.
The latest tests have been done using a 4mm grid spacing produced with an "office" 1200dpi laser printer.
If I had linux drivers for my USB microscope I would have tested a grid on 35mm negative, but I have tried a 1mm grid from stills.
I have thought about the sources of error in the measurements, but I think I need some advice on this.
The camera distorts the image in a "pin-cushion" type effect, so this may bias readings in one direction or the other depending on whether the grid is centred. To avoid this I am only taking readings from the two centre lines.
Laser printing leaves a slight "smudge" in the direction of paper travel which biases sub-pixel line detection. This at least is fairly consistent and can be ignored for purposes of "repeatability".
The printed grid itself may be distorted by the software toolchain and the printer. Print quality should be very good in the "paper width" direction though as I understand that the laser print heads are made with "silicon chip" style lithography. I have tried a Fuji digital photo lab and a very large "professional" A0 laser printer, which looked promising, if it wasn't for operator error. ("What's Postscript?")
Thanks for the pointer to Jon Howell's work, I hadn't seen it.
The reason I settled on diagonal lines (after trying colours, greyscales, hexagonal grids, dots) is that they are ignored by the horizontal/vertical line detection as they only average out to "sort of grey" along a column/row of pixels.
Currently I use a 70x70 grid, in in which each 4x3 trinary pattern is unique. Larger areas are possible by going to 5x4 etc, but maximising the number of camera pixels per grid unit is also important, and 4x3 fits nicely in a non-HD camera frame. 70x70 at 4mm fits nicely on A3 paper also.
I'll post some data and images later today. And I should do some code clean-up I suppose too.
Darkpaw 23:51, 30 April 2012 (UTC)