Sending image from Matlab via serial port and sending it back

I had not noticed that you are using Serial and Serial1.

What Arduino are you using?
How is Serial1 connected to the PC?

...R