Friday, December 1, 2006

I made a mistake four years ago

Be warned... this blog posting is not for the faint of heart. More specifically, if you weren't good in linear algebra, trigonometry, geometry, and all that really fun stuff, then this blog posting may not make a bit of sense to you.



Now that I live alone (well, I have since July), there is actually the potential for silence in my apartment. My thoughts are no longer determined by the endless chatter of an extravert that thinks out loud--nonstop (stamp out repetition and redundancy... unless repetition of the point emphasizes the idea, hence making the redundancy simply an emphasis). Yes, I finally get to think for myself. Wait, that didn't come out right. It was the other one that actually dictated what I could think... this time, my options were to listen intently, always thinking about what she was talking about, or ignoring her. Remember that I am now single.

Anyway, back to the point... so thanks to the silence, I got to thinking about something that I was working on four years ago: my senior project. This was the last time that me ignoring her didn't piss her off. I realized that one of my algorithms was sub-optimal, as I came up with a better algorithm.

For reference: http://homepage.mac.com/whschultz/modeler/Senior_Project_Writeup.pdf

Once your brain doesn't hurt anymore... page 14, second paragraph. The method I described of finding the distance relies heavily on your camera having been calibrated, which I had not implemented. The key detail that is required is a field-of-view angle, as this will allow us to calculate the angle mentioned in the paragraph. I thought of a better method that would actually yield the FOV angle instead of requiring it:

As long as the in-image lengths of the axes are different, we can search along the discovered direction and find a position where the *ratios* match. The reason is simply because the size of an object varies based on the inverse of the distance. This is not a linear relationship, so the ratios between the viewed sizes will vary as you approach the object in question, as long as the distance from the camera is not the same.

Due to the asymptotic nature of this attribute, this search algorithm may only work when the camera is relatively near the positioning object. We do not need many of these photos, however, as we will be able to get a good idea of the camera's actual FOV for a given magnification. If we actually know the FOV, we can revert to the original algorithm, as listed (and implemented) in my original senior project.



I've also been thinking about the issue of camera calibration. I've always thought that a photograph of a grid would be used to calibrate the camera, adjusting for whatever distortions may be caused by the lens itself. Since I never got around to implementing a user interface, I also never got around to designing and implementing an algorithm, though I came to realize recently that the multi-dimensional Lagrange Interpolation algorithm could easily be used to map points from where they are to where they should have been. The distortion is likely to vary depending on the magnification settings, so this would require a camera that stores current settings into the image itself.

This would be better in the long run, as a camera that stores exposure time for each photo will allow for better calculation of how much light was actually present when the photo was taken. Unfortunately, the whole concept of image-based modeling depends on multiple photos of a static object or multiple simultaneous photos, so we are generally assuming the light levels are not going to change.


Anyway, now I'm just spewing out ideas. The algorithm that spawned this entire blog posting has not been drawn up yet with pen and paper (no, I don't use a pencil), and as a result, I could be completely wrong about whether or not this algorithm is even plausible. Since the algorithm described in my senior project writeup was my fourth attempt (the three previous did not work at all), I will not be upset if this one doesn't work. It's just an idea.



Lastly, an off-topic rant... I've known people that have gotten really pissed off at me for thinking that I am smarter than most everyone else and that it makes me the least bit different from anyone else. The truth is that I am and it does. I am well aware that it does not make me better than anyone else, but this is one thing that validates my rant about online dating (I'm not sorry if that offended you). If you can't understand how this stuff works, you are not my equal. In my entire life, I have known four peers that I've sat down with and that have been able to keep up with me (one of those four well exceeded me). It is not unreasonable to desire to be understood. Everyone desires to be understood. I desire to be able to have conversations about my ideas. If you find that arrogant or offensive, then I don't particularly care. No, I do care. I care because you are selfishly expecting me to be something I am not, hence the rant.

No comments: