Jpeg2k color to greyscale conversion on non-Windows is done post decoding because system libjasper segfaults when decoding color images as greyscale.
This commit is contained in:
@@ -374,15 +374,8 @@ imreadmulti_(const String& filename, int flags, std::vector<Mat>& mats)
|
||||
type = CV_MAKETYPE(CV_MAT_DEPTH(type), 1);
|
||||
}
|
||||
|
||||
// established the required input image size.
|
||||
CvSize size;
|
||||
size.width = decoder->width();
|
||||
size.height = decoder->height();
|
||||
|
||||
Mat mat;
|
||||
mat.create(size.height, size.width, type);
|
||||
|
||||
// read the image data
|
||||
Mat mat(decoder->height(), decoder->width(), type);
|
||||
if (!decoder->readData(mat))
|
||||
{
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user