Mantiuk's tonemapping

This commit is contained in:
Fedor Morozov
2013-08-05 19:22:42 +04:00
parent c51b50b44c
commit 17609b90c7
9 changed files with 835 additions and 630 deletions

View File

@@ -123,10 +123,9 @@ HdrEncoder::~HdrEncoder()
bool HdrEncoder::write( const Mat& _img, const std::vector<int>& params )
{
CV_Assert(_img.channels() == 3);
Mat img;
if(_img.depth() == CV_32F) {
_img.convertTo(img, CV_32FC3);
} else {
if(_img.depth() != CV_32F) {
_img.convertTo(img, CV_32FC3, 1/255.0f);
}
CV_Assert(params.empty() || params[0] == HDR_NONE || params[0] == HDR_RLE);