Introduced transfrom matrices, converted <Contour> points to appropriate data type, organized comments,