Community
cancel
Showing results for 
Search instead for 
Did you mean: 
anjani_j_
Beginner
91 Views

Mapped points from Color to Depth Issue

Jump to solution

Hello All,

Mapped points from a valid color coordinate to depth is showing as negative e.g. :

lets say i take some color image coordinate (400, 402) and map the coordinate to depth (u,v) pixel locations than it shows as (-1, -1).

Please note here that those coordinate were not far from the camera nor even near, as that issue i already know this problem from one of the posts from sebastian.

Code :         

PXCPointF32 *posij = new PXCPointF32[no_of_points];

PXCPointF32 *posuv = new PXCPointF32[no_of_points];

projection->MapColorToDepth(_depth, no_of_points, posij, posuv);

                                                            where _depth is PXCImage* depth image;

Please help.

Regards,

Anjani J.

0 Kudos
1 Solution
jb455
Valued Contributor II
91 Views

If your mapped point returns (-1,-1), it usually means that there is no point in the depth image corresponding to the point you've asked for. So either it's not in depth range (though you've said it should be), or it's outside of the depth frame: becuase the two cameras point to different locations, some edges of the colour photo can't be seen by the depth lens. If your points aren't too close to the edges you should be safe here.

Though looking at your code, just checking you are filling in your posij array? ie, posij[0] = new PXCPoint(400,402);

View solution in original post

1 Reply
jb455
Valued Contributor II
92 Views

If your mapped point returns (-1,-1), it usually means that there is no point in the depth image corresponding to the point you've asked for. So either it's not in depth range (though you've said it should be), or it's outside of the depth frame: becuase the two cameras point to different locations, some edges of the colour photo can't be seen by the depth lens. If your points aren't too close to the edges you should be safe here.

Though looking at your code, just checking you are filling in your posij array? ie, posij[0] = new PXCPoint(400,402);

View solution in original post

Reply