propagated fix for EXR from 2.3 branch to trunk
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
int width() const { return m_width; };
|
||||
int height() const { return m_height; };
|
||||
int type() const { return m_type; };
|
||||
virtual int type() const { return m_type; };
|
||||
|
||||
virtual bool setSource( const string& filename );
|
||||
virtual bool setSource( const Mat& buf );
|
||||
|
@@ -96,6 +96,13 @@ void ExrDecoder::close()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int ExrDecoder::type() const
|
||||
{
|
||||
return CV_MAKETYPE((m_isfloat ? CV_32F : CV_32S), m_iscolor ? 3 : 1);
|
||||
}
|
||||
|
||||
|
||||
bool ExrDecoder::readHeader()
|
||||
{
|
||||
bool result = false;
|
||||
@@ -174,7 +181,9 @@ bool ExrDecoder::readHeader()
|
||||
|
||||
bool ExrDecoder::readData( Mat& img )
|
||||
{
|
||||
m_native_depth = CV_MAT_DEPTH(type()) == img.depth();
|
||||
bool color = img.channels() > 1;
|
||||
|
||||
uchar* data = img.data;
|
||||
int step = img.step;
|
||||
bool justcopy = m_native_depth;
|
||||
|
@@ -66,6 +66,7 @@ public:
|
||||
ExrDecoder();
|
||||
~ExrDecoder();
|
||||
|
||||
int type() const;
|
||||
bool readData( Mat& img );
|
||||
bool readHeader();
|
||||
void close();
|
||||
|
Reference in New Issue
Block a user