The agreement is that for type CV_8UC3, pixel values range from 0 to 255, and for type CV_32FC3, they range from 0.0 to 1.0. Thus, you need to use a scale factor of 1 / 255.0 instead of 1.0:
Mat::convertTo(newImage, CV_32FC3, 1/255.0);
source share