Statistics for 3D representation and CNC machining of 2D digital images