Sorry I was a bit terse, but that's what I meant by "detected focus."
> You then build software that blurs the image outside of their focal plane.
That's not it exactly. The problem you're trying to solve is that, when the viewer is focused at one depth but is viewing a flat image at another depth, it will already appear blurry to him. You can't fix that with extra blurring. The fix is to distort the original image, much like corrective lenses.
And BTW, I suspect that you can't perform this correction for even a single viewer in the audience unless you're tracking his location and orientation.