本文整理汇总了C++中FImage::traceEdges方法的典型用法代码示例。如果您正苦于以下问题:C++ FImage::traceEdges方法的具体用法?C++ FImage::traceEdges怎么用?C++ FImage::traceEdges使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FImage
的用法示例。
在下文中一共展示了FImage::traceEdges方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: record
void FRecord::record()
{
FStateInput inputState(0);
if(getFlag(RECORD_FLASH_R) == true)
{
inputState[FLASH_CHANNEL_R] = flashIntensityR;
(*dmx)->setSystemState(inputState);
}
if(getFlag(RECORD_FLASH_G) == true)
{
inputState[FLASH_CHANNEL_G] = flashIntensityG;
(*dmx)->setSystemState(inputState);
}
if(getFlag(RECORD_FLASH_B) == true)
{
inputState[FLASH_CHANNEL_B] = flashIntensityB;
(*dmx)->setSystemState(inputState);
}
msleep(1000);
nSamples++;
if(*camera == NULL)
return;
//cimg_library::CImg<unsigned char>* image;
FImage<unsigned char> image;
(*camera)->grab(&image());
image.traceEdges();
unsigned char color[] = {255,0,0};
image.paintEdges(color);
QApplication::beep();
//image.speckImage()->display("title");
dateTime = QDateTime::currentDateTime();
int year = dateTime.date().year();
int month = dateTime.date().month();
int day = dateTime.date().day();
int hour = dateTime.time().hour();
int min = dateTime.time().minute();
int sec = dateTime.time().second();
int msec = dateTime.time().msec();
FStateSens sensState;
(*camera)->getSensorState(&sensState);
FStateSysLed ledState;
(*dmx)->getSystemState(&ledState);
FStateSysRgb rgbState;
(*camera)->getSystemState(&rgbState);
FStateLab labState;
//(*color)->rgb2lab(rgbState[F_STATE_SYS_RGB_R](), rgbState[F_STATE_SYS_RGB_G](), rgbState[F_STATE_SYS_RGB_B]());
//(*color)->getSensorState(labState);
image.blobs();
if(getFlag(RECORD_IMAGES_ON) == true)
{
char saveString[255];
sprintf(saveString, "%s\\%s_%d%02d%02d_%02d%02d%02d.bmp",mImagePath, mBaseName, year, month, day, hour, min, sec);
image()->save(saveString);
}
if(getFlag(RECORD_CSV_ON) == true)
{
char saveString[255];
sprintf(saveString, "%s\\%s_%d%02d%02d.csv", mCsvPath, mBaseName, year, month, day);
QFile file(saveString);
bool bHeaderWrite = false;
bHeaderWrite = !file.exists();
if(bHeaderWrite == true)
{
if(file.open(QIODevice::WriteOnly | QIODevice::Text))
{
std::string lineBuffer;
lineBuffer.empty();
writeTimeStampHeader(file);
std::string label;
label.empty();
char separator = ';';
sensState.labelString(label,separator);
ledState.labelString(label,separator);
rgbState.labelString(label,separator);
refState.labelString(label,separator);
//.........这里部分代码省略.........