My final goal is to leave on the image only those objects that are close to the camera. I believe that for this I need to create a DepthMap.

Such an example with these photos works for me: https://docs.opencv.org/trunk/dd/d53/tutorial_py_depthmap.html

I want to do the same with my images. There is a homemade stereo camera: two identical low cost webcams, which are fixed on a tripod.

I calibrated the cameras, the lens does not distort the image too much, so nothing much has changed, only small black stripes appeared on the edges.

What to do next? Only stereo calibration (I will be very grateful for examples on java)? Do I need to have cameras with a ruler in a special way, or is it even enough to direct them in parallel?

Here's what I got at the moment:

left camera right camera total

    0