Marcos, This looks like a nice clean implementation and it's very well commented.
In looking over your past e-mails, it looks like what you are doing is very similar to how they digitize actors for CGI effects in movies. So there might be some relevant literature in that field. As you are probably aware, there are lots of references for photogrammetry that might be useful. A particular problem is identifying corresponding points in images for determining the 3D coordinates, which is often referred as the ³stereo correspondence² problem. One technique is to take advantage of the fact that for any point in one image, the corresponding point in the other image(s) will lie along a line. (The point in the first image and two camera foci define a plane which intersects the second image.) Good luck and thanks for providing the calibration and reconstruction code. Larry On 12/4/08 12:40 PM, "Marcos Duarte" <[EMAIL PROTECTED]> wrote: > Hi everybody > > Here is an implementation of camera calibration and point > reconstruction using direct linear transformation (DLT) in python. I > intend to use that in my application with FloatCanvas. > After Larry Meyn's suggestion, the code uses Numpy and SVD for solving > the problem. > The code works for both 2 and 3 dimensional camera calibration and for > any number of views (cameras). > At the end of the code I show some simple examples (just run the code) > and I tried to comment it as much as possible. I know the code works > but probably it is not very pythonic and efficient. So, I'd appreciate > any comments and corrections to the code. > > In relation to FC (actually to FC2), I will integrate this code in FC2 > to find the world coordinates of points in an image after the camera > calibration step. > For a 2D case with only one view (camera), this transformation from > image projection to world (2D) coordinates (x, y) is just a 3x3 > transformation (M) applied to the image coordinates (u, v) followed by > a scaling (see lines 153-158), so it would be easy to make this simple > use of DLT native in FC2. > Maybe FC2 could include the whole DLT calibration in its library; to > ensure it is correctly implemented and easy to use (I agree with Bob > Cunningham), or at least we could add it as an example in FC. > > best > > Marcos Duarte > http://lob.iv.fapesp.br/ > University of Sao Paulo, Brazil > _______________________________________________ > FloatCanvas mailing list > [email protected] > http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
