load multi/hyperspectral images with using gdal

This commit is contained in:
edgarriba
2015-10-14 09:16:04 +02:00
parent 536634b1fe
commit 1e9bd59f07
3 changed files with 51 additions and 31 deletions
+4 -4
View File
@@ -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. */