Add new module FrameResampling and change opencv interface
This commit is contained in:
1 parent
ce82d0a17d
commit
3ed8b0916f
7 files changed
+180
-15
No files matched your search
@@ -39,12 +39,17 @@ bool CalypOpenCVModuleIf::create( std::vector<CalypFrame*> apcFrameList )
|
||||
acMatList[i] = new Mat;
|
||||
apcFrameList[i]->toMat( *acMatList[i], m_bConvertToGray );
|
||||
}
|
||||
if( create_using_opencv( acMatList ) )
|
||||
Mat* outputMat = create_using_opencv( acMatList );
|
||||
if( outputMat )
|
||||
{
|
||||
unsigned pelFormat = m_bConvertToGray ? CalypFrame::findPixelFormat( "GRAY" ) : apcFrameList[0]->getPelFormat();
|
||||
m_pcOutputFrame = new CalypFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), pelFormat, apcFrameList[0]->getBitsPel() );
|
||||
m_pcOutputFrame = new CalypFrame( outputMat->cols, outputMat->rows, pelFormat, apcFrameList[0]->getBitsPel() );
|
||||
bRet = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for( unsigned i = 0; i < apcFrameList.size(); i++ )
|
||||
{
|
||||
delete acMatList[i];
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
void destroy();
|
||||
|
||||
// API using OpenCV
|
||||
virtual bool create_using_opencv( std::vector<cv::Mat*> apcFrameList ) { return true; };
|
||||
virtual cv::Mat* create_using_opencv( std::vector<cv::Mat*> apcFrameList ) { return NULL; };
|
||||
virtual cv::Mat* process_using_opencv( std::vector<cv::Mat*> apcFrameList ) = 0;
|
||||
virtual void destroy_using_opencv(){};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user