You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/11/21 23:44:11 UTC

[GitHub] sxjscience opened a new pull request #8757: [ImageIO] Fix image io for opencv3.3

sxjscience opened a new pull request #8757: [ImageIO] Fix image io for opencv3.3
URL: https://github.com/apache/incubator-mxnet/pull/8757
 
 
   ## Description ##
   Starting from OpenCV3.3 the `imdecode` function will automatically rotate the image based on the EXIF' orientation flag.
   ```c++
   Mat imdecode( InputArray _buf, int flags )
   {
       CV_TRACE_FUNCTION();
   
       Mat buf = _buf.getMat(), img;
       imdecode_( buf, flags, LOAD_MAT, &img );
   
       /// optionally rotate the data if EXIF' orientation flag says so
       if( !img.empty() && (flags & IMREAD_IGNORE_ORIENTATION) == 0 && flags != IMREAD_UNCHANGED )
       {
           ApplyExifOrientation(buf, img);
       }
   
       return img;
   }
   ```
   
   This can be disabled by setting the `cv::IMREAD_IGNORE_ORIENTATION` flag.
   
   ## Checklist ##
   ### Essentials ###
   - [x] Passed code style checking (`make lint`)
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [ ] All changes have test coverage
   - [x] For user-facing API changes, API doc string has been updated. For new C++ functions in header files, their functionalities and arguments are well-documented. 
   - [x] To my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [ ] add `IMREAD_IGNORE_ORIENTATION` flag when opencv 3.3 is used.
   
   ## Comments ##
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services