RM-net: rasterizing Markov signals to images for deep learning