load multi/hyperspectral images with using gdal
This commit is contained in:
@@ -279,7 +279,7 @@ imread_( const String& filename, int flags, int hdrtype, Mat* mat=0, int scale_d
|
||||
|
||||
// grab the decoded type
|
||||
int type = decoder->type();
|
||||
if( flags != IMREAD_UNCHANGED )
|
||||
if( (flags & IMREAD_LOAD_GDAL) != IMREAD_LOAD_GDAL && flags != IMREAD_UNCHANGED )
|
||||
{
|
||||
if( (flags & CV_LOAD_IMAGE_ANYDEPTH) == 0 )
|
||||
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
|
||||
@@ -372,7 +372,7 @@ imreadmulti_(const String& filename, int flags, std::vector<Mat>& mats)
|
||||
{
|
||||
// grab the decoded type
|
||||
int type = decoder->type();
|
||||
if (flags != IMREAD_UNCHANGED)
|
||||
if( (flags & IMREAD_LOAD_GDAL) != IMREAD_LOAD_GDAL && flags != IMREAD_UNCHANGED )
|
||||
{
|
||||
if ((flags & CV_LOAD_IMAGE_ANYDEPTH) == 0)
|
||||
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
|
||||
@@ -532,7 +532,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
|
||||
size.height = decoder->height();
|
||||
|
||||
int type = decoder->type();
|
||||
if( flags != IMREAD_UNCHANGED )
|
||||
if( (flags & IMREAD_LOAD_GDAL) != IMREAD_LOAD_GDAL && flags != IMREAD_UNCHANGED )
|
||||
{
|
||||
if( (flags & CV_LOAD_IMAGE_ANYDEPTH) == 0 )
|
||||
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
|
||||
@@ -736,4 +736,4 @@ cvEncodeImage( const char* ext, const CvArr* arr, const int* _params )
|
||||
return _buf;
|
||||
}
|
||||
|
||||
/* End of file. */
|
||||
/* End of file. */
|
||||
Reference in New Issue
Block a user