"Chenge Qu" wrote in message <firstname.lastname@example.org>... > > Okay, well, the real problem is this--I have a very large lattice (which may be square or skewed) which contains atoms in some of its cells, and also a camera that is not necessarily aligned with the lattice. I'd like to find the alignment of the camera with the lattice, as well as the skew of the lattice, from an image of a section of the lattice. The image contains roughly 100 cells of the lattice, of which roughly 5 are filled with atoms. I'm able to find find the (image) coordinates of the atoms present, but I don't actually know which sites they're in either coordinate system. > > What I'm currently trying is this: > > 1) Choose any known atom location as the origin. > 2) Using angles theta, alpha (rotation, skew), construct a lattice. > 3) Evaluate how close the other atoms are to the sites of this lattice (perhaps with some kind of least-squares estimator). > 4) Optimize this "closeness" wrt theta, alpha.