A digital image differs from a photo in that the values are all discrete. Usually
they take integer values. A digital image can be considered as a large two
dimensional array of discrete cells, each of which has a brightness associated
with it. These dots are called pixels.
A binary image is represented by an M×N logical matrix
where pixel values are 1 (true) or 0 (false).
Setup the Connection
Reading from Serial port on MATLAB
byte b = Serial.read();