To connect RealSense Listener to CvMat nodes you need to use Texture to CvMat node.
Please note that this conversion is a bit costly, so it is recommended to downscale the Texture beforehand. That’s why I’ve inserted a Texture Resize node. The subsequent CvMat Threshold and Find CvMat Circles is just for illustration in this case.
Doing everything with Textures
As to your other question: it might actually be possible to do the whole thing with textures, which is always preferrable.
See the example below:
You can use Texture Slice
node to choose the color levels which will get output and which will be turned to black.
Then you could use Get Pixel from Texture to check what’s the color of the sliced texture to see if there was anything at this depth.
Because if it was, then the color components would be larger than 0.
Nodes you also might want to look into are Texture and CvMat Threshold
I hope this helps,