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
I couldn't get a proper alignment by setting true to the function initDepthstream so I did some changes.
I think the mapping routine in the update method might be wrong and the result of the method INuiCoordinateMapper::MapDepthFrameToColorFrame might have been misunderstood as the comment // if mapping depth to color, upscale depth point it. The result argument pColorPoints(cf doc) map a depth image index with a color image position and not a depth image index with a depth image position.
Should be : int colorImageIndex = pts[i].y * depthFormat.dwWidth + pts[i].x; depthPixels[colorImageIndex] = depthLookupTable[ofClamp(depthPixelsRaw[i] >> 4, 0, depthLookupTable.size() - 1)];
If I do not mistake, you can have a look at my fork. The result seems correct for my usage, yet the accuracy is not satisfactory. I am looking for a way to use the background segmentation from the toolkit in OF now.
The text was updated successfully, but these errors were encountered:
Hi there ! Thanks for your great work.
I couldn't get a proper alignment by setting true to the function
initDepthstream
so I did some changes.I think the mapping routine in the update method might be wrong and the result of the method
INuiCoordinateMapper::MapDepthFrameToColorFrame
might have been misunderstood as the comment// if mapping depth to color, upscale depth
point it. The result argumentpColorPoints
(cf doc) map a depth image index with a color image position and not a depth image index with a depth image position.Thus :
depthPixels[i] = depthLookupTable[ ofClamp(depthPixelsRaw[pts[i].y * depthFormat.dwWidth + pts[i].x] >> 4, 0, depthLookupTable.size()-1 ) ];
Should be :
int colorImageIndex = pts[i].y * depthFormat.dwWidth + pts[i].x;
depthPixels[colorImageIndex] = depthLookupTable[ofClamp(depthPixelsRaw[i] >> 4, 0, depthLookupTable.size() - 1)];
If I do not mistake, you can have a look at my fork. The result seems correct for my usage, yet the accuracy is not satisfactory. I am looking for a way to use the background segmentation from the toolkit in OF now.
The text was updated successfully, but these errors were encountered: