Connecting Mathematical Models For Image Processing And Neural Networks