The RealSense SDK 2.0's 'RealSense Viewer' program can load in pre-recorded data files so that you can practice with the software without having to have a camera attached. You can download the sample data from the link below.
OpenCV is not required to detect Z-depth with the D435. If you have already written a program using it though then it is understandable that you would wish to continue with that. The developer UnaNancyOwen has created a depth sample that uses OpenCV.
There are also a couple of object detection examples for the RealSense 400 Series cameras that use OpenCV.
In regard to a maximum distance, setting up a 'MaxZ' depth clamp may work for you.
Hi thank you so much for all the resources.
I would like to rephrase so my first question is clearer. I'm trying to detect a black pea that enter my camera's view and capture it's real time x,y,z values. I don't need to classify it in any way. So what you're saying is that I can do my program 100% in the realsense sdk?
You could certainly do the depth sensing part with the RealSense SDK only. Detection and recognition of objects would usually require third-party software such as OpenCV though. Here's an example YouTube video of a face's motion being tracked in OpenCV using a point cloud.
The only way I can think of to detect the mosquito with the RealSense SDK alone would be to program an application to detect a particular color in the IR image that the mosquito always shows up as, and trigger a 'detect' event if that color is recognized in the IR image.
As a mosquito is a living creature with blood under its skin, red may show up best. It would be even easier to detect once the mosquito has drank blood and stored it inside itself.
In the older models of RealSense camera, a technique called Pulse Estimation was demonstrated to estimate heart rate based on the color of blood under the skin on the IR image.