- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I have decided I want to do some smoothing of the depth images before I construct a point cloud from the data. I might be trying different algorithms, so working in the PXC format and writing filters myself might not be the best use of time when OpenCV can do that for me. So I try and make an OpenCV Mat.
From my understanding. When I set up the depth stream it is 16-bit unsigned. I then try to set up an OpenCV Mat as so (I have looked around at other forum posts prior to this).
cv::Mat matDepth(cv::Size(dHeight, dWidth), CV_16U, ddata.planes[0], ddata.pitches[0]);
It doesn't complain but when I use imshow() I'm left with a black image with just a bar across the image which does not correspond to the image. I tried converting the Mat to 8 bit but still issues there. Am I setting up the matrix wrongly? If I am right I want to smooth on the 16 bit image anyway so I am not losing detail.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is for the F200, but the OpenCV conversion should be similar:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is for the F200, but the OpenCV conversion should be similar:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
samontab wrote:
This is for the F200, but the OpenCV conversion should be similar:
Thank you, I actually had already looked at that video prior. I realised just a few minutes ago it was because I had my size defined as cv::Size(height, width), instead of cv::Size(width, height). OpenCVs [row, col] format or [col, row] format tricks me up yet again! It works now.
I am just trying to work on how to make the conversion back to PXCImage.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page