<p>I have some photos of 3D cube. I also know the 3D pose of the cube in each photo (yaw, pitch, roll).</p>

<p>I want to estimate the new pose (yaw, pitch, roll) of the cube after performing 2D rotation to the photo (like 2D camera rotation).</p>

<p>I don't care its new position but the pose only.</p>

<p>So, how can I calculate the new pose of 3D object after 2D rotation?</p>

<p>For example:<br>
<strong>Original</strong><br>
<a href="https://i.sstatic.net/y8EFh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/y8EFh.png" alt="enter image description here"></a></p>

<p><strong>After image rotation (-45 deg) - Yaw, Pitch &amp; Roll are different</strong> 
<a href="https://i.sstatic.net/FFhYq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FFhYq.png" alt="enter image description here"></a></p>

CC BY-SA 4.0
2020-01-07T11:46:31.520Z
If its isometric you can use the area of the sides and their centroids for starters?
beyond
CC BY-SA 4.0
2020-01-07T13:58:27.573Z
I don't have the cube shape (area, edges, surface, etc). The image is just 3D cube that tagged with yaw, pitch & roll and I need to know what are the new yaw, pitch & roll after camera rotation.
nrofis
CC BY-SA 4.0
2020-01-08T11:47:41.780Z
I see that I misunderstoof you partly. First, find the rotation of the image (this should be fairly easy). Second, convert from YPR to a rotation matrix, multiply this with the rotation, convert back to YPR (well covered, google it :) ).
beyond
CC BY-SA 4.0
2020-01-08T14:16:01.037Z
I tough about it. But `multiply this with the rotation` is the part that I think I have troubles with. `YPR to a rotation matrix` - fair, so I have 3x3 matrix. But how can I rotate it like camera rotation?
nrofis
CC BY-SA 4.0
2020-01-08T15:06:04.593Z
Rotating a 2D image would be a rotation about only one axis.
beyond
CC BY-SA 4.0
2020-01-09T09:58:41.150Z
But which one? Yaw, Pitch, Roll? Can you please write an answer with more details of how to do that mathematically, and I'll accept it?
nrofis
CC BY-SA 4.0
2020-01-09T10:24:17.963Z
One axis in the rotation matrix
beyond
CC BY-SA 4.0
2020-01-09T20:02:02.487Z
Yaw, pitch or roll? Can you please post an answer with more details? I will really appreciate that
nrofis
CC BY-SA 4.0
2020-01-09T20:08:39.170Z
What is this for? It sounds like a CS assignment.
beyond
CC BY-SA 4.0
2020-01-09T21:16:44.057Z
Does it matter? Actually it is not a CS assignment, I'm building a personal project (CV project)... I'm trying to get cube pose from an image with RaspberryPi. I have a predictor that can read the cube pose from the image, but the problem is that the camera is rotated. So I'm getting the pose relatively to the camera which is rotated. I try to transfer the predicted pose to the real pose by rotating the image in the opposite direction. The problem is, I didn't succeed to calculate the new pose after the rotation
nrofis
CC BY-SA 4.0
2020-01-09T21:18:05.287Z
I tired to multiply the rotation matrix with another rotation matrix of one axis: yaw/pitch/roll. but it perform 3D rotation and not 2D rotation (camera rotation)
nrofis
<3d><transformations>
Estimate 3D cube pose after camera rotation
nrofis
# Estimate 3D cube pose after camera rotation

(Asked by: username_0 on 2020-01-04)

I have some photos of 3D cube. I also know the 3D pose of the cube in each photo (yaw, pitch, roll).

I want to estimate the new pose (yaw, pitch, roll) of the cube after performing 2D rotation to the photo (like 2D camera rotation).

I don't care its new position but the pose only.

So, how can I calculate the new pose of 3D object after 2D rotation?

For example:  
**Original**  
[![enter image description here](https://i.sstatic.net/y8EFh.png)](https://i.sstatic.net/y8EFh.png)

**After image rotation (-45 deg) - Yaw, Pitch & Roll are different**
[![enter image description here](https://i.sstatic.net/FFhYq.png)](https://i.sstatic.net/FFhYq.png)

**Tags:** 3d, transformations

> **Comments:**
> **username_1**: If its isometric you can use the area of the sides and their centroids for starters?  
> **username_0**: I don't have the cube shape (area, edges, surface, etc). The image is just 3D cube that tagged with yaw, pitch & roll and I need to know what are the new yaw, pitch & roll after camera rotation.  
> **username_1**: I see that I misunderstoof you partly. First, find the rotation of the image (this should be fairly easy). Second, convert from YPR to a rotation matrix, multiply this with the rotation, convert back to YPR (well covered, google it :) ).  
> **username_0**: I tough about it. But `multiply this with the rotation` is the part that I think I have troubles with. `YPR to a rotation matrix` - fair, so I have 3x3 matrix. But how can I rotate it like camera rotation?  
> **username_1**: Rotating a 2D image would be a rotation about only one axis.  
> **username_0**: But which one? Yaw, Pitch, Roll? Can you please write an answer with more details of how to do that mathematically, and I'll accept it?  
> **username_1**: One axis in the rotation matrix  
> **username_0**: Yaw, pitch or roll? Can you please post an answer with more details? I will really appreciate that  
> **username_1**: What is this for? It sounds like a CS assignment.  
> **username_0**: Does it matter? Actually it is not a CS assignment, I'm building a personal project (CV project)... I'm trying to get cube pose from an image with RaspberryPi. I have a predictor that can read the cube pose from the image, but the problem is that the camera is rotated. So I'm getting the pose relatively to the camera which is rotated. I try to transfer the predicted pose to the real pose by rotating the image in the opposite direction. The problem is, I didn't succeed to calculate the new pose after the rotation  
> **username_0**: I tired to multiply the rotation matrix with another rotation matrix of one axis: yaw/pitch/roll. but it perform 3D rotation and not 2D rotation (camera rotation)  

---

## 0 answers

