Friday, June 5, 2009

The End?


Over the past week I've begun to scratch the surface of how computer vision works. I vaguely understand how homographies work, and have now written code that effectively calculates the homography for us - of course, using OpenCV for the heavy lifting. The image above is a digital snapshot of our projection layout, with GIMP doing a Sobel edge detection routine. It does an amazingly good job of determining the outlines for me. I then pull the overall outline I want, the real corners of the whole projection, and the real corners of each individual projection together into a format and feed it through a couple of FindHomography() calls and some matrix math - some of which I understand, other bits I still find fuzzy. This has ultimately worked out to make a pretty good set of homographies for our distortion.


My code outputs some nice matricies, with the Z axis being the identity matrix, such as the following format:

0.999593 0.005707 0.000000 0.000021
0.006457 0.889109 0.000000 0.000035
0.000000 0.000000 1.000000 0.000000
5.278528 4.951293 0.000000 1.000413

0.931133 -0.005690 0.000000 -0.000004
-0.008387 0.845363 0.000000 -0.000004
0.000000 0.000000 1.000000 0.000000
98.365417 20.241795 0.000000 1.000408

0.832297 -0.006445 0.000000 -0.000033
-0.033426 0.804530 0.000000 -0.000009
0.000000 0.000000 1.000000 0.000000
191.126740 16.284946 0.000000 0.993720

0.915757 0.025370 0.000000 0.000020
-0.030621 0.760372 0.000000 -0.000041
0.000000 0.000000 1.000000 0.000000
75.373116 217.128815 0.000000 0.995069

0.945395 0.024405 0.000000 0.000015
-0.043237 0.795157 0.000000 -0.000028
0.000000 0.000000 1.000000 0.000000
102.483498 181.870300 0.000000 0.999334

0.971726 0.028967 0.000000 0.000015
-0.094872 0.790870 0.000000 -0.000042
0.000000 0.000000 1.000000 0.000000
97.195442 129.874069 0.000000 0.997895


Each 4x4 matrix corresponds to our perspective correction factor, at least so we hope. In practice this is good, but not perfect.

Now that the end is here, part of me doesn't feel like letting this project go. I wasn't really expecting to feel this way, the way stress was heaped on - but right at the end, the hooks finally got me. I wasn't doing a mechanical design anymore - I was doing what I know and enjoy, math and software. So it goes though.

Wednesday, June 3, 2009

Delayed

As delayed as this might be, it would appear the mechanical nature of the project is near completion. Mirrors are mounted, tilting is possible though unable to be stuck. The overall weight of the the tilt is a force to be reckoned with, unfortunately. With any luck though, our tilt mechanism should be here today for final work. This would be an exciting and important milestone for me. While everything has not turned out in a way that I would wish, it has turned out in a way that is acceptable for proof of concept, which is effectively what this is.