From: Nikolay Polyarniy Date: Wed, 2 Jun 2021 12:53:32 +0000 (+0300) Subject: EXR reading: support Z channel if no Y channel X-Git-Tag: submit/tizen/20220120.021815~1^2~1^2~25^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=746bd47ce55a153e34eeb80603e303b4581e14ca;p=platform%2Fupstream%2Fopencv.git EXR reading: support Z channel if no Y channel --- diff --git a/modules/imgcodecs/src/grfmt_exr.cpp b/modules/imgcodecs/src/grfmt_exr.cpp index 9667b8ca03..8cf4db99c5 100644 --- a/modules/imgcodecs/src/grfmt_exr.cpp +++ b/modules/imgcodecs/src/grfmt_exr.cpp @@ -156,6 +156,10 @@ bool ExrDecoder::readHeader() else { m_green = channels.findChannel( "Y" ); + if( !m_green ) + { + m_green = channels.findChannel( "Z" ); // Distance of the front of a sample from the viewer + } if( m_green ) { m_ischroma = true;