Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a stack of images (about 180 of them) and there are 2 black dots on every single image. Hence, the position(x,y) of the two stars are provided initially. The dimensions of all these images are fixed and constant.

The radial 'distance' between the image is about 1o with the origin to be the center of every single 2D image. Since the images are radially aligned, the output would be a possible ring shape in 3D.

enter image description here

the dotted red circle and dotted purple circle are there to give a stronger scent of a 3D space and the arrangement of the 2D images(like a fan). It also indicates that each slice is about 1o apart and a legend that'd give you an idea where the z-axis should be.

Now my question is

With the provided (x,y) that appeared in the 2D image, how do you get the corresponding (x,y,z) in the 3d space knowing that each image is about 1o apart?

I know that every point on a sphere can be approximated by the following equations:

x = r sin (theta) cos (phi)
y = r sin (theta) sin (phi)
z = r cos (theta)

However, i don't know how to connect those equations to my problem as i am rather weak in math as you can see by now. :(

Thanks!!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If I understand the question correctly, your $180$ images are all taken in planes that contain one common axis and are rotated around that axis in increments of $1^\circ$. Your axis labeling is somewhat confusing because you use $x$ and $y$ both for the 2D coordinates and for the 3D coordinates, even though these stand in different relations to each other depending on the plane of the image. So I'll use a different, consistent labeling of the axes and I hope you can apply the results to your situation.

Let's say the image planes all contain the $z$ axis, and lets label the axes within the 2D images with $u$ and $v$, where the $v$ axis coincides with the $z$ axis and the $u$ axis is orthogonal to it. Then the orientation of the image plane can be described by the (signed) angle $\phi$ between the $u$ axis and the $x$ axis (which changes in increments of $1^\circ$ from one plane to the next), and the relationship between the 2D coordinates $u,v$ and the 3D coordinates $x,y,z$ is

$$ \begin{eqnarray} x&=&u\cos\phi\\ y&=&u\sin\phi\\ z&=&v\;. \end{eqnarray} $$

This only answers your question (as I understand it) about the relationship between the coordinates. How to reconstruct the ring from the set of points is another question; you could to do a least-squares fit for that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.