- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In IQSampleTool application, the specified function returns a vertices array of 3D points (PXCMPoint3DF32[]). These points suppose to have 3 'single' fields - x,y,z.
However, the z field of all points of the vertices array retrieved by the function always seems to have an integer value. Is it necessarily the case? Do these vertices points always have an integer z value?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes they do, annoyingly! If you want float values for depth you'll have to do depthImage.AcquireAccess() with a float pixel format then use depthData.ToFloatArray(), and use these z values along with the x & y you get from the vertices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
I am trying to follow your instructions, but the change from depthData.ToUShortArray() to depthData.ToFloatArray() cause this runtime exception: "System.AccessViolationException - Attempted to read or write protected memory".
Do you know what is it about and how to resolve it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using PXCMImage.PixelFormat.PIXEL_FORMAT_DEPTH_F32?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We solved the problem. Sorry for the trouble.
The problem was dividing by sizeof(float) instead of sizeof(ushort)...
Now it's working, thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm, not sure what that could be.. I presume dpixels is of float[] type? My code is in bits at the moment so I can't test for you but I don't remember seeing this error before. Perhaps someone else can help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please note this rounding behavior of QueryVertices() was fixed for future SDK releases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DMITRY Z. (Intel) wrote:
Please note this rounding behavior of QueryVertices() was fixed for future SDK releases.
That's good to hear! Is there anything you can share with us as to when we can expect the next release?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page