MRF-CNN: a nonlinear analog circuit for piecewise constant image synthesis