Are you trying to automatically remove the frame? Perhaps image segmentation features in the Image Processing Toolbox would be helpful: http://www.mathworks.com/help/images/image-segmentation-1.html
Alternatively, if you already know a boundary between the head and frame you can import the data into MATLAB and set all pixels outside of the head region to be 0.