Several 3D printers do this, such as the Cetus Mk1 and the Bambu A1 https://uk.store.bambulab.com/products/a1-mini. I have a Cetus myself and the performance (accuracy) is pretty good.

This method is probably ok for a camera or 3D printer but I doubt you'll see it on any machine tool. If you go for a Hiwin or similar quality linear rail, I suspect your approach would be fine.