Is it safe converting to a Mat itself with different type?
The following code can be compiled without error. However, is it safe doing this?
Mat im = imread('test.jpg', CV_LOAD_IMAGE_GRAYSCALE);
im.convertTo(im, CV_32F1);