Fix frame->matrix conversion and guassian blur