Closed yang3kui closed 7 years ago
I haven't used psmove-ue4 in a long time. Can you take a look at the psmoveservice algorithms instead? here. The second one is the better one. Please post in PSMoveService issues if you have any suggestions for those algorithms.
All right, i'll post it in PSMoveService issues.
Should i close this one or leave it open?
Hi,
Great work you have done!
Recently, i was working on a similar project, and had got a lot of inspiration from your codes and comments.
Meanwhile, I found an error in your tracker algorithm described here.
When you project a sphere to a plane perspectively, you get an ellipse. That is correct.
However, the center of the ellipse may not correspond to the center of the sphere.
So, here
You compute theta as
theta = atan2(L_px, f_px)
Theta is actually the angle to the center of the ellipse. However, i think you intended to compute the angle to the center of the sphere. These two angles are different.
In my opnion the correct way to compute the angle to the center of the sphere should be
double theta = (atan2(L_px - a_px, f_px)+ atan2(L_px + a_px, f_px)) / 2;
The difference is not negligible especially when you use a tracking camera with large FOV.