Refactor pixel formats enum
This commit is contained in:
@@ -22,11 +22,14 @@
|
||||
* \brief Calyp modules interface for OpenCV
|
||||
*/
|
||||
|
||||
#include "CalypFrame.h"
|
||||
#include "CalypModuleIf.h"
|
||||
|
||||
// OpenCV
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
#include "PixelFormats.h"
|
||||
|
||||
bool CalypOpenCVModuleIf::create( std::vector<CalypFrame*> apcFrameList )
|
||||
{
|
||||
_BASIC_MODULE_API_2_CHECK_
|
||||
@@ -39,7 +42,7 @@ bool CalypOpenCVModuleIf::create( std::vector<CalypFrame*> apcFrameList )
|
||||
Mat* outputMat = create_using_opencv( acMatList );
|
||||
if( outputMat )
|
||||
{
|
||||
unsigned pelFormat = m_bConvertToGray ? CalypFrame::findPixelFormat( "GRAY" ) : apcFrameList[0]->getPelFormat();
|
||||
auto pelFormat = m_bConvertToGray ? ClpPixelFormats::CLP_GRAY : apcFrameList[0]->getPelFormat();
|
||||
m_pcOutputFrame = std::make_unique<CalypFrame>( outputMat->cols, outputMat->rows, pelFormat, apcFrameList[0]->getBitsPel() );
|
||||
bRet = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user