Seam carving 1st version, little more efficient memory usage.
update energy matrix added