fixed some datatype conversion error in images stitching