implementing in OpenCV, I would recommend repeated pyrDown()
until close enough, then resize()
. pyrDown does a lowpass, then plain nearest neighbor sampling, because that’s recommended by signal processing theory. its only downside is that it’s specifically optimized for 2x decimation, nothing else. it’s made for image pyramids. there are some pyramid schemes that need better than an octave per step, so for those one uses pyrDown, then calculates the finer steps from the octave steps.
IDK what steps they do in the code you investigated, or why their filtering would happen between steps
I agree. I was surprised that those DNN calls just use nearest by default. that’s not a good default for them.