A quick method is to create a preparsed pseudocode file using the pcode function of your m-file and put the p-file on the network.
or
Use the Matlab Compiler toolbox to create a standalone executable program or a dll.
I'm not that familiar with video grabbing but I can give you some tips...
You will surely benefit from preallocating memory for your image matrices, especially if you collect images inside a loop.
img = zeros(h,w,3,n); h = height, w = width and n = number of images.
Explore the possibility of...
If you had bothered to read the docs, as I suggested, you would have seen an example of the fscanf function. Where the use of the fscanf is exactly the same as in Tom's post.
I believe hexadecimal numbers are always treated as ascii by Matlab. Use the hex2dec or the hex2num function to convert.
The serial port object has some events and callbacks that will help you with the data collection part.
Search the help for BytesAvailableFcn, BytesAvailableFcnCount and...
Change the Position property.
set(gca, 'Position', [x y width height])
The values range from 0 to 1.
Set x=0, y=0, width=1 and height=1 to completely fill the figure.
However, no axis labels or tick labels will be visible.
You need to flip each color separately.
img = imread('photo.jpg');
for i=1:3 % loop through R, G and B
imgflp(:,:,i) = fliplr(img(:,:,i)); % flip 2-D matrix
end
imshow(imgflp) % show flipped image