Commit a69fd602 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #5512 from edgarriba:gdal_lan

parents 3c31d6ad f50858dd
...@@ -127,6 +127,7 @@ Currently, the following file formats are supported: ...@@ -127,6 +127,7 @@ Currently, the following file formats are supported:
- TIFF files - \*.tiff, \*.tif (see the *Notes* section) - TIFF files - \*.tiff, \*.tif (see the *Notes* section)
- OpenEXR Image files - \*.exr (see the *Notes* section) - OpenEXR Image files - \*.exr (see the *Notes* section)
- Radiance HDR - \*.hdr, \*.pic (always supported) - Radiance HDR - \*.hdr, \*.pic (always supported)
- Raster and Vector geospatial data supported by Gdal (see the *Notes* section)
@note @note
...@@ -141,6 +142,10 @@ Currently, the following file formats are supported: ...@@ -141,6 +142,10 @@ Currently, the following file formats are supported:
codecs supplied with an OS image. Install the relevant packages (do not forget the development codecs supplied with an OS image. Install the relevant packages (do not forget the development
files, for example, "libjpeg-dev", in Debian\* and Ubuntu\*) to get the codec support or turn files, for example, "libjpeg-dev", in Debian\* and Ubuntu\*) to get the codec support or turn
on the OPENCV_BUILD_3RDPARTY_LIBS flag in CMake. on the OPENCV_BUILD_3RDPARTY_LIBS flag in CMake.
- In the case you set *WITH_GDAL* flag to true in CMake and @ref IMREAD_LOAD_GDAL to load the image,
then [GDAL](http://www.gdal.org) driver will be used in order to decode the image by supporting
the following formats: [Raster](http://www.gdal.org/formats_list.html),
[Vector](http://www.gdal.org/ogr_formats.html).
@param filename Name of file to be loaded. @param filename Name of file to be loaded.
@param flags Flag that can take values of cv::ImreadModes @param flags Flag that can take values of cv::ImreadModes
*/ */
......
This diff is collapsed.
...@@ -290,7 +290,7 @@ imread_( const String& filename, int flags, int hdrtype, Mat* mat=0 ) ...@@ -290,7 +290,7 @@ imread_( const String& filename, int flags, int hdrtype, Mat* mat=0 )
// grab the decoded type // grab the decoded type
int type = decoder->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 ) if( (flags & CV_LOAD_IMAGE_ANYDEPTH) == 0 )
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type)); type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
...@@ -382,7 +382,7 @@ imreadmulti_(const String& filename, int flags, std::vector<Mat>& mats) ...@@ -382,7 +382,7 @@ imreadmulti_(const String& filename, int flags, std::vector<Mat>& mats)
{ {
// grab the decoded type // grab the decoded type
int type = decoder->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) if ((flags & CV_LOAD_IMAGE_ANYDEPTH) == 0)
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type)); type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
...@@ -521,7 +521,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 ) ...@@ -521,7 +521,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
size.height = decoder->height(); size.height = decoder->height();
int type = decoder->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 ) if( (flags & CV_LOAD_IMAGE_ANYDEPTH) == 0 )
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type)); type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment