Earlier quoted context omitted.
That seems to just be using the depth map information stored by the app, not replicating the effect from scratch.
They recalculate the blur. Were you asking about calculating the depthmap?
Yes, I was wondering how to fully replicate the effect without the need for the app.