Tuesday, March 30, 2010

Variable lighting

This is an interesting talk about the Greek Atikythera mechanism, but it's also interesting because the surface shape recovery method being used is in principle quite similar to what I was trying to do in one of my previous jobs - before the recession brought that particular endeavor to an abrupt halt.



The problem I was facing was trying to detect datamatrix markings made on metal surfaces, and to take various geometric measurements from them to verify their quality. Some surfaces were very difficult to get a good image from, due to scratches, stray indentations, corrosion, distortions or just having been poorly marked in the first place, so the imager was also fitted with banks of LEDs to control the illumination and these were all programatically adjusted.

My initial strategy was just to take a lot of images under different illuminations and pick the best one, or to try running the detection and verification algorithms on every image. This worked in the majority of cases, but there were still some situations under which the codes remained unreadable, so I knew that the ultimate solution would be to create a composite image from multiple illuminations and exposures - which is essentially the same approach shown in the above video. The video demonstrates quite well how it's possible to pick out features more clearly from the synthetic image where surface normals have been calculated, which would have been hard to distinguish from a single conventional photograph or isolated photos under different lighting.

It's also apparent from the video that the illumination around the object should be from an even distance, using a stand which is approximately a hemisphere. The LEDs which I was using were mounted inside a housing shaped like a cube, so that probably wouldn't have helped. If I were tackling the same problem again I'd probably try making the imager illumination housing into a hemisphere so that the whole device resembles an old-fashioned sci-fi ray gun.

Also another possibility, suggested by the black snooker ball, is that perhaps I might be able to obtain light source directions using the omnidirectional stereo vision on GROK2. It wouldn't be as simple as looking at a black object, but might be something worth trying.

0 comments: