I'm using an OAK-D PRO camera. From it I gather depth frames(using depth_preview code). The thing is, how do I get distance to the center of my frame? I would like just to calculate an average depth of 9x9 sector(or something more suitable) in the middle of my frame. How do I do this? I suppose that I do not need any fancy spatial calculations, complex formulas and so on because I do not need to calculate distance to any objects, I just need to calculate depth in front of the camera, am I right?
I'm using C++