本文整理汇总了C++中ImageDecoder::RunDecodingImg方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageDecoder::RunDecodingImg方法的具体用法?C++ ImageDecoder::RunDecodingImg怎么用?C++ ImageDecoder::RunDecodingImg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageDecoder
的用法示例。
在下文中一共展示了ImageDecoder::RunDecodingImg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoDecodeImage
void LambdaTask::DoDecodeImage()
{
LOG_TRACE(__FUNCTION__);
char* ptrchTmpImg;
char* ptrchTmpImg1;
ptrchTmpImg = 0; // Null pointer initially
ptrchTmpImg1 = 0;
ImageDecoder* objDecoder = new ImageDecoder(m_vCurrentChip);
ImageDecoder* objDecoder1 = new ImageDecoder(m_vCurrentChip);
short* ptrshDecodedImg;
short* ptrshDecodedImg1;
int* ptrnDecodedImg = new int[m_nDecodedImageSize];
int* ptrnFinishedImg;
DistortionCorrector<short> *objDC = new DistortionCorrector<short>(m_vNIndex,m_vNNominator,(int)pow(2,12));
DistortionCorrector<int> *objDC1 = new DistortionCorrector<int>(m_vNIndex,m_vNNominator,(int)pow(2,24));
while(true)
{
usleep(20);
boost::unique_lock<boost::mutex> lock(*m_boostMtx);
bool bVal = m_objSys->SysExit();
string strOperationMode =m_objSys->GetOperationMode();
int nDistortionCorr = m_objSys->GetDistortionCorrecttionMethod();
lock.unlock();
if(bVal)
break;
if(*m_enumTargetPriority > m_enumPriority) // If priority lower, throttle back task
{
usleep(10000);
continue;
}
//continuousReadWrite
if(strOperationMode == OPERATION_MODE_12)
{
if((m_objMemPoolRaw->GetStoredImageNumbers() == 0) || (m_objMemPoolDecodedShort->IsFull()))
{
usleep(50);
continue;
}
short shErrCode = 0;
long lFrameNo = 0;
if(m_objMemPoolRaw->GetImage(ptrchTmpImg,lFrameNo,shErrCode))
{
objDecoder->SetRawImage(ptrchTmpImg);
ptrshDecodedImg = objDecoder->RunDecodingImg();
if(nDistortionCorr == 1)
{
//distortion correction
short* pShImgOut = objDC->RunDistortCorrect(ptrshDecodedImg);
ptrshDecodedImg = pShImgOut;
}
if(m_objMemPoolDecodedShort->GetFirstFrameNo() == -1)
{
long lFristFrame = m_objMemPoolRaw->GetFirstFrameNo();
//if lFristFrame is -1, means it is single link version
if(lFristFrame!=-1)
m_objMemPoolDecodedShort->SetFirstFrameNo(lFristFrame);
}
//cout<<lFrameNo<<":is taken for decoding"<<endl;
while(true)
{
usleep(20);
lock.lock();
bool bIsAcq = m_objSys->GetAcquisitionStop();
lock.unlock();
if(bIsAcq)
break;
if(m_objMemPoolDecodedShort->SetImage(ptrshDecodedImg,lFrameNo,shErrCode,true) == true)
{
break;
}
}
}
}
else if(strOperationMode == OPERATION_MODE_24)
{
if((m_objMemPoolRaw->GetStoredImageNumbers() < 2) || (m_objMemPoolDecodedInt->IsFull()))
{
usleep(50);
continue;
}
//.........这里部分代码省略.........