1 Image acquisition
An image of vegetable is captured by using a webcamera by
using matlab function „getsnapshot‟. If the image is grayscale
image than it is stored as MXN array. Else if its colored
image or RGB image than it is stored as an MXNX3 array.
The syntax for getting an image is
vid = videoinput ('winvideo', 2, 'YUY2_640x480');
data = getsnapshot(vid);
2 Than the serial communication by UART has been
acknowledged at the rate of 9600 baud rate.
ser=serial ('COM1','Baudrate',9600);