The coded images acquired by the XRF imaging system can be reconstructed with a neural network and an iterative algorithm.