1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2018-11-02 05:31:07 +00:00
70 changed files with 2344 additions and 2076 deletions
+6
View File
@@ -253,6 +253,10 @@ bool TiffDecoder::readHeader()
int wanted_channels = normalizeChannelsNumber(ncn);
switch(bpp)
{
case 1:
m_type = CV_MAKETYPE(CV_8U, photometric > 1 ? wanted_channels : 1);
result = true;
break;
case 8:
m_type = CV_MAKETYPE(CV_8U, photometric > 1 ? wanted_channels : 1);
result = true;
@@ -269,6 +273,8 @@ bool TiffDecoder::readHeader()
m_type = CV_MAKETYPE(CV_64F, photometric > 1 ? 3 : 1);
result = true;
break;
default:
CV_Error(cv::Error::StsError, "Invalid bitsperpixel value read from TIFF header! Must be 1, 8, 16, 32 or 64.");
}
}
}
+1 -1
View File
@@ -266,7 +266,7 @@ bool WebPEncoder::write(const Mat& img, const std::vector<int>& params)
if (channels == 1)
{
cvtColor(*image, temp, CV_GRAY2BGR);
cvtColor(*image, temp, COLOR_GRAY2BGR);
image = &temp;
channels = 3;
}