Need help in integrating Extrapolation or Interpolation in OpenCV/Python

Hello everyone,
I am working with a swarm of objects and using stereo vision cameras I am trying to get XYZ coordinates in gazebo/ROS. I am tracking the objects in real-time via OpenCV. Though getting the coordinates when they are away however having some difficulty when it gets denser and then it looses tracking.
Can somebody help me to integrate extrapolation or interpolation in my work to estimate the missing coordinates? Would really appreciate it if someone can guide or help in this regard.

maybe a KalmanFilter would help ?

but please, to get better help, - be more concise.

Thanks for the reply. Would you help in KalmanFilter or if possible can we connect on zoom? really need help

nope, i won’t
let’s keep it here( and public), where more ppl can help.

again, try to explain more, show (minimal, reproducable) current code, images, whatever.