You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Given (x,y,z) coordinates, converts that point into its x pixel number in the 2D image.intxPixelFromCoords(double x, double y, double z)
{
return (int) (156.8584456124928 + 0.0976862095248 * x - 0.0006444357104 * y + 0.0015715946682 * z);
}
// Given (x,y,z) coordinates, converts that point into its y pixel number in the 2D image.intyPixelFromCoords(double x, double y, double z)
{
return (int) (125.5357201011431 + 0.0002153447766 * x - 0.1184874093530 * y - 0.0022134485957 * z);
}
These purport to go from the joint's 3d coordinates to 2d coordinates, but they do not seem to work. I visualized the 2d joint locations after this projection, and they are significantly off; furthermore, it seems odd that you could project from 3d to 2d with a linear dot product (since projections should be scaled by z).
I'm however not sure if this function serves a different purpose, so I am not submitting a pull request. Further, this translation from 3d to 2d is not documented in CAD120 anywhere; it would be nice to incorporate the formula from that post into the README for the skeleton format to make 2d visualizations, among other things, easier.
The text was updated successfully, but these errors were encountered:
The original projection formulas were incorrect. The updated ones are the ones used in OpenNI for projections, with two hardcoded constants that rely on sensor values; their derivation is described on the linked page.
I've been trying to use these projection formulas: https://github.com/jysung100/activity_detection/blob/master/FeatureExtractor/featuresRGBD.cpp#L26
These purport to go from the joint's 3d coordinates to 2d coordinates, but they do not seem to work. I visualized the 2d joint locations after this projection, and they are significantly off; furthermore, it seems odd that you could project from 3d to 2d with a linear dot product (since projections should be scaled by z).
The correct formula should be as per OpenNI's formula, which is discussed by a developer here: https://groups.google.com/d/msg/unitykinect/1ZFCHO9PpjA/1KdxUTdq90gJ (Note that there is a minor mistake in the algebra, as I showed here: https://groups.google.com/d/msg/unitykinect/1ZFCHO9PpjA/0B2eHjrywj4J).
I'm however not sure if this function serves a different purpose, so I am not submitting a pull request. Further, this translation from 3d to 2d is not documented in CAD120 anywhere; it would be nice to incorporate the formula from that post into the README for the skeleton format to make 2d visualizations, among other things, easier.
The text was updated successfully, but these errors were encountered: