Skip to content

Commit

Permalink
Merge pull request opencv#15747 from TH3CHARLie:imshow-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Oct 20, 2019
2 parents 2477103 + da0fec7 commit 8ec6544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/highgui/src/precomp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ inline void convertToShow(const cv::Mat &src, cv::Mat &dst, bool toRGB = true)
break;
case CV_32F:
case CV_64F: // assuming image has values in range [0, 1)
cv::convertScaleAbs(src, tmp, 256.);
src.convertTo(tmp, CV_8U, 255., 0.);
break;
}
cv::cvtColor(tmp, dst, toRGB ? cv::COLOR_BGR2RGB : cv::COLOR_BGRA2BGR, dst.channels());
Expand Down

0 comments on commit 8ec6544

Please sign in to comment.