function [ img ] = mtpreproc( img )
%MTPREPROC Preprocesses an image for motion tracking
%   This function performs a series of preprocessing steps to an image.

% convert to grayscale
img = rgb2gray(img);

% crop to right half
img = img(:,345:end);

% remove noise with median filter
img = medfilt2(img, [5 5]);

end

