- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi Guys.
I tried to get 3D depth points, but I do not know if this correct.
below, the code:
for (int i = 0; i < MAX_FRAMES; i++) { if(mPXC.AcquireFrame(true) == pxcmStatus.PXCM_STATUS_NO_ERROR){ PXCMCapture.Sample sample = mPXC.QuerySample(); if (sample.depth != null) { PXCMImage.ImageData cData = new PXCMImage.ImageData(); sample.depth.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_DEPTH, cData); mDepthBuffer = cData.ToShortArray(0, mDepthBuffer); int gridSize = 3; // populate mDepthPoints int cId = 0; for (int dy = 0; dy < height; ++dy) { for (int dx = 0; dx < width; ++dx) { PXCMPoint3DF32 cPoint = new PXCMPoint3DF32(); cPoint.x = dx; cPoint.y = dy; cPoint.z = (float) mDepthBuffer[cId]; mDepthPoints[cId] = cPoint; ++cId; } } sample.depth.ReleaseAccess(cData); } } mPXC.ReleaseFrame(); }
I wonder if there examples in Java or C sharp to show how I can capture the 3D points of depth using the camera realsense
- Balises:
- Intel® RealSense™ Technology
Lien copié
1 Répondre
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
That looks about right, if you only need the depths for depth image coordinates.If you want camera coordinates (where x & y are distances from the centre in mm rather than pixel coordinates) you can use QueryVertices (search the docs or the forum for info on how to use it), and if you want to map the depths to the colour image you can use CreateDepthImageMappedToColor.

Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable