Updated to include bronsons code - issue with MAT format means it won't find contour. Requires investigation