:: AForge.NET Framework :: Articles :: Forums ::

## Pose estimation question

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

### Pose estimation question

Dear Andrew,

I have a question about the 3D pose estimation examples.

One of the example demonstrates the Pose estimation and another one introduces the 3D geometry.
When I set the Rotation: yaw, pitch, roll values to the Example: Pose estimation.exe, the rotated rectangle is not really looks like the rotated rectangle in Pose Estimation2. exe...

Could you give a little explanation about it?

durnek60

Posts: 21
Joined: Sat Feb 11, 2012 11:37 am

### Re: Pose estimation question

Hello,

I would say both sample applications have something in common in the way axes are shown. The only difference is that direction of Z axis (green one) is different. The first sample shows left-handed coordinate system (similar to the one used in XNA, for example), where Z axis goes towards viewer. In real life this system may look a bit confusing, because you would expect that if object has greater Z coordinate, then it would be further away from you. This is shown in the second sample and it is known as right-handed coordinate system, where Z axis goes away from viewer.

Orientation and handedness
With best regards,
Andrew

Interested in supporting AForge.NET Framework?

andrew.kirillov
Site Admin, AForge.NET Developer

Posts: 2568
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

### Re: Pose estimation question

You mean, example one (POSIT) Sample 1-2-3, and example two (Coplanar POSIT) Sample 4-5?
Please correct me if I'm wrong:

- Axes in order: blue - x, red - y, - green - z and,
On the Sample 1-2-3, the green axis (Z) is pointing directly to my face , ( or camera), and on Sample 3-4, the Green axis is pointing to the opposite direction, to the same direction of my view?

I've attached two images. With the same rotation... I don't understand... ((

Why don't they on the same orientation

Thanks,
Attachments
Second.jpg (139.78 KiB) Viewed 1205 times
FIrst.jpg (191.01 KiB) Viewed 1205 times

durnek60

Posts: 21
Joined: Sat Feb 11, 2012 11:37 am

### Re: Pose estimation question

durnek60 wrote:You mean, example one (POSIT) Sample 1-2-3, and example two (Coplanar POSIT) Sample 4-5?

I was talking before about POSIT. You did not say anything about Coplanar position in your original message, so how I was supposed to guess it ...

To make things comparable, you need to do few things first:
1) Use same model. As you can see in your seconds screen shot, model coordinates (like Point1 (-56.5, 0, 56.5)) are quite different from those in the first screen shot;
2) When you compare projections, you should not ignore translation. I see you use only estimated rotation, but not estimated translation.
3) And of course take care of different coordinate systems as I mentioned before.
With best regards,
Andrew

Interested in supporting AForge.NET Framework?

andrew.kirillov
Site Admin, AForge.NET Developer

Posts: 2568
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

### Re: Pose estimation question

Hello,

I've been thinking about the following...

On the picture, I have placed three similar paper, with size 10 cm on each side. The image resolution is 640x480, so the focal length is 640 also. My goal is the write the plane equation of the table.
The transition vector is a vector that shifts the camera coordSys origin to the object center.
For every three paper, I have the transition vectors so, if I am right, I can write the plane equation from normal vector of the plane. I did it, if did not miss anything.
The equation is -0.14x + 5.25y + 1236 = z. It is fine, but I have a little problem with that.
The camera optical axis is intersect the table plane in the real, but on the graph, the Z axis will never intersect the plane.

If is multiply the y value by (-1), the graph seems to valid...

Do you have idea why do I got this or any remark?

Attachments
Plane_.jpg (189.11 KiB) Viewed 1195 times
Test Image
Test.jpg (154.76 KiB) Viewed 1195 times

durnek60

Posts: 21
Joined: Sat Feb 11, 2012 11:37 am