made a few changes in the matlab script that converts raw images