On Thu, Nov 20, 2008 at 2:27 AM, Nitro <[EMAIL PROTECTED]> wrote: > Can you tell me a bit more about your spatial transformation? Is it > something like a mercator projection? Or more involved? If it's a linear > one, then fc2 can transform also the image for you. > FC2 also offers you to plugin custom transforms instead of the matrix ones > as well, but these will most likely only work on the lowest level of the > transform chain right now. >
I want to find the real coordinates (2D or 3D) of an object (point) shown in a single image (2D coordinate) or two or more images from different angles of view of the object (3D coordinate). This problem is known in computer vision (where they care about the image itself, I don't) as camera calibration, which is the process of finding the true parameters of the camera that produced a given photograph or video (http://en.wikipedia.org/wiki/Camera_resectioning). Once we have these parameters of the camera we can use them to find the real coordinates of an object in an image. For the case of a pinhole camera, the relationship between the coordinates of a 3D point and its projection onto the image plane can be described as a linear transformation. The most employed method to find this linear transformation is a method known as direct linear transformation (DLT), see http://en.wikipedia.org/wiki/Direct_linear_transformation or http://www.kwon3d.com/theory/dlt/dlt.html. For a 2D case, the DLT produces a set of four linear equations (with 7 or 8 independent parameters, I don't remember) that can be used to calibrate the camera and find the real coordinates of an object. For the 3D case, 11 parameters are produced by the DLT method. The DLT method consists of two steps: First, it is used a set of control points (at least 4 for 2D and at least 6 for 3D) whose object coordinates are already known and the camera parameters are found. Second, in a later stage, these parameters are used to find the unknown coordinates of other objects. Doing this math in python is easy (there are many implementations for that and I have the dlt in matlab, so it's just a matter of translation and a good way for me to learn python). There are also open source softwares, like OpenCV which also runs in python, that perform camera calibration. With respect to FC, for a 2D case this means that the user will have to click in at least four points on an image he/she knows the real coordinates; these real coordinates have to be informed by the user to FC; FC calculates the parameters of this transformation (between the object and the image), and this transformation is used to calculate the real coordinates of any point when the user clicks on the image. Right now FC does not do that, but I am sure I can do that using FC... 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
