From e2e604eb18b8bbe219f9a69d4b7dcf544cdb826a Mon Sep 17 00:00:00 2001 From: Fedor Morozov Date: Thu, 22 Aug 2013 21:13:50 +0400 Subject: [PATCH] HDR writing bug fix --- modules/highgui/src/grfmt_hdr.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/highgui/src/grfmt_hdr.cpp b/modules/highgui/src/grfmt_hdr.cpp index 8d25fe9..e35902f 100644 --- a/modules/highgui/src/grfmt_hdr.cpp +++ b/modules/highgui/src/grfmt_hdr.cpp @@ -122,15 +122,15 @@ HdrEncoder::~HdrEncoder() { } -bool HdrEncoder::write( const Mat& _img, const std::vector& params ) +bool HdrEncoder::write( const Mat& input_img, const std::vector& params ) { Mat img; - CV_Assert(img.channels() == 3 || img.channels() == 1); - if(img.channels() == 1) { - std::vector splitted(3, _img); + CV_Assert(input_img.channels() == 3 || input_img.channels() == 1); + if(input_img.channels() == 1) { + std::vector splitted(3, input_img); merge(splitted, img); } else { - _img.copyTo(img); + input_img.copyTo(img); } if(img.depth() != CV_32F) { img.convertTo(img, CV_32FC3, 1/255.0f); -- 2.7.4