from photo to 3d image
I'm not sure exactly what you mean (what's a CNC?) but the short answer is, the 3D information needs to be available somehow. Blender cannot invent or deduce it.

My suggestions:


you can take 2D to 3D if you have enough visual elements. That means a few pictures. Meshroom can help you.
You can remodel a scene. For sceneries, rooms and the like, fSpy can help for camera angles and measurements
This tutorial about projection mapping can help: https://www.youtube.com/watch?v=p9IfDeNU8K0, but there will be no miracles. It works well with planes, mostly.
You may be after parallax effect, which can be achieved as explained here: https://www.youtube.com/watch?v=gvaiHqBuTz8


For grey scale relief, there is a Gimp filter that does it (something like emboss). If you want to do it on a sequence of images, I suggest you try Natron rather than Blender.