Calculating 6D Estimation (3 Translations and 3 Rotations) from Two Orthogonal Detectors Output ((X, Y, Thea, Roll)

110 views (last 30 days)
Hello everyone,
I am currently simulating a 2D-to-3D image registration pipeline to estimate 6D transformations (3D translations and 3 rotations) using two orthogonal X-ray detectors. From each detector, I can calculate the in-plane transformations (X, Y, Theta) and the out-of-plane rotations (Roll).
My question is whether it is possible to compute the full 6D transformation (3 translations and 3 rotations) using the information provided (X, Y, Theta, Roll).
I would greatly appreciate any insights or suggestions regarding this topic.
Thank you!
  2 Comments
Catalytic
Catalytic on 9 Jan 2026
Edited: Catalytic on 9 Jan 2026
What does "out-of-plane roll" mean? How can a 2D x-ray image "roll out" of the plane that it lives in? And what is the axis of rotation we are talking about? Is the roll a rotation about the pixel rows? The columns?
payam samadi
payam samadi on 9 Jan 2026
I have attached an image that I believe will help to understand the 3D coordinates and their relationship with the two 2D coordinates from the two detectors.
How can a 2D X-ray image "roll out" of the plane it resides in? When we have a 3D object and rotate it, both detectors can capture images (lte's called sets of DRRs references) for out-of-plane rotations. It's important to note that the direction of axis xA in the coordinates of projection A is opposite to that of axis x in the 3D coordinates. Meanwhile, the direction of axis xB in the coordinates of projection B aligns with the direction of axis x in the 3D coordinates.
I believe (though I’m not entirely certain) that this problem can be addressed by defining another 3D coordinate system to match the outputs of the two orthogonal detectors. This system would relate the parameters (X, Y, Theta, Roll) to the real 6D estimation, which includes 3 translations and 3 rotations.
To achieve this, the 2D in-plane transformation (X, Y, Theta) can be estimated through 2D–2D image comparison, while the out-of-plane rotations (Roll) can be determined by best matching the X-ray image to the set of DRR references.

Sign in to comment.

Accepted Answer

Catalytic
Catalytic on 9 Jan 2026
Edited: Catalytic on 9 Jan 2026
From each detector, I can calculate the in-plane transformations (X, Y, Theta) and the out-of-plane rotations (Roll)....My question is whether it is possible to compute the full 6D transformation (3 translations and 3 rotations) using the information provided (X, Y, Theta, Roll).
I don't know if it's possible mathematically, but if it is, you might be able to to do a quick iterative solve with fsolve or lsqnonlin, rather than seek some closed form algorithm.
The way I imagine that is sort of like what @Matt J said. Construct a fake 3D object with point markers. Then code a model function which takes a vector of unknown 6D pose parameters [p1,p2,..., p6] as input and maps it to the 4-tuplet (X,Y,Theta,Roll) expected from each of the detectors -
function F=forwardModel(p)
movedPoints3D = applyPose(Points3D,p) %move the points in 3D
movedPoints2D = projectToDetector(movedPoins3D); %project the points
[X1,Y1,Theta1,Roll1] = getInplaneMotion(movedPoints2D,___); %use your algorithm for detector 1
[X2,Y2,Theta2,Roll2] = getInplaneMotion(movedPoints2D,__); %use your algorithm for detector 2
F=[X1,Y1,Theta1,Roll1, X2,Y2,Theta2,Roll2];
end
This forwadModel() should be pretty fast since it just works with points, rather than full images. Now you solve for p with something like,
p = lsqnonlin(@(p) forwardModel(p) - Fmeas, p0) %p0 is the required initial guess
where Fmeas contains your prior calculations of [X1,Y1,Theta1,Roll1, X2,Y2,Theta2,Roll2] from the actual measured x-ray images.
  20 Comments
Matt J
Matt J on 24 Jan 2026 at 13:05
Edited: Matt J on 24 Jan 2026 at 13:06
Quoting your original post: "My question is whether it is possible to compute the full 6D transformation (3 translations and 3 rotations) using the information provided (X, Y, Theta, Roll)."
But now you say "I don't need to perform more iterations to map the (x, y, theta, roll) to the 6D position.I have written a function called "reconstructPose," which relates to the geometry of the mapping output from each detector to the 6D position."
If you already have a reconstructPose function which does the pose calculation to your satisfaction, is your original question still alive?
payam samadi
payam samadi on 24 Jan 2026 at 13:36
Edited: payam samadi on 24 Jan 2026 at 13:37
If you already have a reconstructPose function which does the pose calculation to your satisfaction, is your original question still alive? No.
First, I apologize for any confusion caused by my previous question. At that time (posting this question), I was trying to understand the relationship between the outputs of the orthogonal detectors (X, Y, Theta, Roll) and a full 6D transformation (three translations and three rotations).
Second, after further analysis, I developed a function called "reconstructPose", which models the geometric mapping between the outputs of each detector and the corresponding 6D pose.
Third, the attached code (new.zip) is functional and produces correct results in most cases; however, in some scenarios (for example, test 8), the accuracy is not satisfactory (I mentioned my problem, which is getting stuck in a local minimum, of course, in my opinion).

Sign in to comment.

More Answers (1)

Matt J
Matt J on 9 Jan 2026
Edited: Matt J on 9 Jan 2026
Spreaking for myself, the provided Fig1.png does not help me understand how a 6DOF 3D pose maps to a 4DOF projected pose (X, Y, Theta,Roll). In theory, it is possible to get the 6DOF pose from a single projection view (traditional 3D-2D registration algorithms do this all the time), so I don't know why the algorithm can't do better than the 4 parameters (X, Y, Theta,Roll) per projection.
However, here is an idea regardless:
Once you have the (X, Y, Theta,Roll) quadruplet for each projection, you can simulate the projection of a 3D arrangement of fiducials. In other words, start with a hypothetical fiducial phantom whose known 3D fiducial locations are Pstart. Then apply a 3D pose change to Pstart that matches the specific 4 parameters (X, Y, Theta, Roll) seen by one of the detectors. Example, if Theta=45 deg in-plane, then rotate Pstart in 3D by 45 deg about the detector plane axis. Then, project the rotated 3D fiducials onto the detector plane to obtain projected coordinates, pa.
Do this again for the second detector to obtain pb
Once you have pa and pb, you can use the triangulate command in the Computer Vision Toolbox to triangulate the 3D world coordinates of the fiducials that represents what both projection views see simultaneously as a result of the motion. Call this Pmoved. Once you have Pmoved, you can register it to Pstart with 3D-3D point registration techniques to determine the final 6DOF pose transformation.
NOTE: One way to implement the final 3D-to-3D point registration step is with absor, downloadable from,

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!