converted output images to uint8 explicitly before saving

This commit is contained in:
Sunita Nayak committed 2018-08-02 15:32:29 -07:00
1 parent 12c9dc4533
commit 56b52c7728
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -111,7 +111,10 @@ int main(int argc, char **argv)
string str = imageFileName;
str.replace(str.end()-4, str.end(), "");
str = str+"_colorized.png";
imwrite(str, color*255);
color = color*255;
color.convertTo(color, CV_8U);
imwrite(str, color);
cout << "Colorized image saved as " << str << endl;