本文整理汇总了C++中DImage::splitRGB方法的典型用法代码示例。如果您正苦于以下问题:C++ DImage::splitRGB方法的具体用法?C++ DImage::splitRGB怎么用?C++ DImage::splitRGB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DImage
的用法示例。
在下文中一共展示了DImage::splitRGB方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: filterImage_
//.........这里部分代码省略.........
fprintf(stderr, "DMaxFilter::filterImage_() failed to spawn "
"thread #%d. Exiting.\n", tnum);
exit(1);
}
}
#endif
maxFiltHuang_u8(imgDst, *pImgPad, _radiusX, _radiusY,
wKern, hKern, rgKern, numKernPxls,
rgRightEdge, pProg, 0, hUnpad+1, 0, _numThreads);
#ifndef D_NOTHREADS
for(int tnum = 1; tnum < _numThreads; ++tnum){
if(pthread_join(rgThreadID[tnum],NULL))
fprintf(stderr, "DMaxFilter::filterImage_() failed to join "
"thread %d\n", tnum);
}
#endif
if(NULL != pProg){
pProg->reportStatus(hUnpad+1, 0, hUnpad+1);//report progress complete
}
}
break;
case DImage::DImage_RGB:
{
DImage imgR, imgG, imgB;
DImage imgRDst, imgGDst, imgBDst;
imgRDst.create(wUnpad, hUnpad, DImage::DImage_u8, 1,
imgSrc.getAllocMethod());
imgGDst.create(wUnpad, hUnpad, DImage::DImage_u8, 1,
imgSrc.getAllocMethod());
imgBDst.create(wUnpad, hUnpad, DImage::DImage_u8, 1,
imgSrc.getAllocMethod());
pImgPad->splitRGB(imgR, imgG, imgB);
#ifndef D_NOTHREADS
for(int tnum = 1; tnum < _numThreads; ++tnum){
rgParms[tnum].pImgDst = &imgRDst;
rgParms[tnum].pImgSrc = &imgR;
rgParms[tnum].radiusX = _radiusX;
rgParms[tnum].radiusY = _radiusY;
rgParms[tnum].wKern = wKern;
rgParms[tnum].hKern = hKern;
rgParms[tnum].rgKern = rgKern;
rgParms[tnum].numKernPxls = numKernPxls;
rgParms[tnum].rgRightEdge = rgRightEdge;
rgParms[tnum].pProg = NULL;
rgParms[tnum].progStart = 0;
rgParms[tnum].progMax = 1;
rgParms[tnum].threadNumber = tnum;
rgParms[tnum].numThreads = _numThreads;
if(0 != pthread_create(&rgThreadID[tnum], NULL,
DMaxFilter::DMaxFilter_Huang8threadWrap,
&rgParms[tnum])){
fprintf(stderr, "DMaxFilter::filterImage_() failed to spawn "
"thread #%d. Exiting.\n",tnum);
exit(1);
}
}
#endif
maxFiltHuang_u8(imgRDst, imgR, _radiusX, _radiusY,
wKern, hKern, rgKern, numKernPxls,
rgRightEdge, pProg, 0, 3 * hUnpad);
#ifndef D_NOTHREADS
for(int tnum = 1; tnum < _numThreads; ++tnum){