当前位置: 首页>>代码示例>>C++>>正文


C++ ARLOG函数代码示例

本文整理汇总了C++中ARLOG函数的典型用法代码示例。如果您正苦于以下问题:C++ ARLOG函数的具体用法?C++ ARLOG怎么用?C++ ARLOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ARLOG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: keyEvent

static void   keyEvent( unsigned char key, int x, int y)
{
    int   value;

    /* quit if the ESC key is pressed */
    if( key == 0x1b ) {
        cleanup();
        exit(0);
    }

    if( key == '1' ) {
        arGetLabelingThresh( arHandle, &value );
        value -= 5;
        if( value < 0 ) value = 0;
        arSetLabelingThresh( arHandle, value );
        ARLOG("thresh = %d\n", value);
    }
    if( key == '2' ) {
        arGetLabelingThresh( arHandle, &value );
        value += 5;
        if( value > 255 ) value = 255;
        arSetLabelingThresh( arHandle, value );
        ARLOG("thresh = %d\n", value);
    }

    if( key == 'd' ) {
        arGetDebugMode( arHandle, &value );
        value = 1 - value;
        arSetDebugMode( arHandle, value );
    }
}
开发者ID:AadityaDev,项目名称:artoolkit5,代码行数:31,代码来源:multiWin.c

示例2: keyEvent

static void  keyEvent( unsigned char key, int x, int y)
{
    CvPoint2D32f   *p1, *p2;
    int             i;

    if( key == 0x1b || key == 'q' || key == 'Q' ) {
        cleanup();
    }

    if( cornerFlag && key==' ' ) {
        cvFindCornerSubPix( calibImage, corners, chessboardCornerNumX*chessboardCornerNumY, cvSize(5,5),
                            cvSize(-1,-1), cvTermCriteria (CV_TERMCRIT_ITER, 100, 0.1)  );
        p1 = &corners[0];
        p2 = &cornerSet[capturedImageNum*chessboardCornerNumX*chessboardCornerNumY];
        for( i = 0; i < chessboardCornerNumX*chessboardCornerNumY; i++ ) {
            *(p2++) = *(p1++);
        }
        capturedImageNum++;
        ARLOG("---------- %2d/%2d -----------\n", capturedImageNum, calibImageNum);
        for( i = 0; i < chessboardCornerNumX*chessboardCornerNumY; i++ ) {
            ARLOG("  %f, %f\n", corners[i].x, corners[i].y);
        }
        ARLOG("---------- %2d/%2d -----------\n", capturedImageNum, calibImageNum);

        if( capturedImageNum == calibImageNum ) {
            calib();
            cleanup();
        }
    }
}
开发者ID:AkiraSoumi,项目名称:artoolkit5,代码行数:30,代码来源:calib_camera.cpp

示例3: main

int main(int argc, char *argv[])
{
    ARParam cparam;
    // ARParamLT          *cparamLT;
    float trans[3][4];
    float pos[2];
    float dpi[2];
    // char                name[1024], ext[1024];
    int   i, j;
    float z;

    init(argc, argv);

    if (!cpara)
        cpara = cparaDefault;

    // ar2UtilDivideExt( cpara, name, ext );

    // Load the camera parameters, resize for the window and init.
    // if( arParamLoad(name, ext, 1, &cparam) < 0 )
    if (arParamLoad(cpara, 1, &cparam) < 0)
    {
        ARLOGe("setupCamera(): Error loading parameter file %s for camera.\n", cpara);
        exit(-1);
    }

    if (xsize != -1 && ysize != -1 && (cparam.xsize != xsize || cparam.ysize != ysize))
    {
        ARLOG("*** Camera Parameter resized from %d, %d. ***\n", cparam.xsize, cparam.ysize);
        arParamChangeSize(&cparam, xsize, ysize, &cparam);
    }

    ARLOG("*** Camera Parameter ***\n");
    arParamDisp(&cparam);

    // if ((cparamLT = arParamLTCreate(&cparam, AR_PARAM_LT_DEFAULT_OFFSET)) == NULL) {
    //    ARLOGe("setupCamera(): Error: arParamLTCreate.\n");
    //    exit(-1);
    // }

    pos[0] = 0.0;
    pos[1] = 0.0;

    for (j = 0; j < 3; j++)
        for (i = 0; i < 4; i++)
            trans[j][i] = ((i == j) ? 1.0 : 0.0);

    for (i = 10; i <= 1000; i *= 10)
    {
        for (j = 1; j < 10; j++)
        {
            z           = j * i;
            trans[2][3] = z;
            ar2GetResolution2(&cparam, trans, pos, dpi);
            ARLOG("Distance: %f [mm] --> Resolution = %10.5f, %10.5f [DPI]\n", z, dpi[0], dpi[1]);
        }
    }

    return (0);
}
开发者ID:hyyh619,项目名称:ARToolKit_5.3.1,代码行数:60,代码来源:checkResolution.c

示例4: keyEvent

static void  keyEvent( unsigned char key, int x, int y)
{
    int             i;

    if( key == 0x1b || key == 'q' || key == 'Q' ) {
        cleanup();
    }

    if( cornerFlag && key==' ' ) {
        cvFindCornerSubPix( calibImageL, cornersL, chessboardCornerNumX*chessboardCornerNumY, cvSize(5,5),
                            cvSize(-1,-1), cvTermCriteria(CV_TERMCRIT_ITER, 100, 0.1)  );
        for( i = 0; i < chessboardCornerNumX*chessboardCornerNumY; i++ ) {
            arParamObserv2Ideal(paramL.dist_factor, (double)cornersL[i].x, (double)cornersL[i].y,
                                &calibData[capturedImageNum].screenCoordL[i].x, &calibData[capturedImageNum].screenCoordL[i].y, paramL.dist_function_version);
        }
        cvFindCornerSubPix( calibImageR, cornersR, chessboardCornerNumX*chessboardCornerNumY, cvSize(5,5),
                            cvSize(-1,-1), cvTermCriteria(CV_TERMCRIT_ITER, 100, 0.1)  );
        for( i = 0; i < chessboardCornerNumX*chessboardCornerNumY; i++ ) {
            arParamObserv2Ideal(paramR.dist_factor, (double)cornersR[i].x, (double)cornersR[i].y,
                                &calibData[capturedImageNum].screenCoordR[i].x, &calibData[capturedImageNum].screenCoordR[i].y, paramR.dist_function_version);
        }
        ARLOG("---------- %2d/%2d -----------\n", capturedImageNum+1, calibImageNum);
        for( i = 0; i < chessboardCornerNumX*chessboardCornerNumY; i++ ) {
            ARLOG("  %f, %f  ----   %f, %f\n", calibData[capturedImageNum].screenCoordL[i].x, calibData[capturedImageNum].screenCoordL[i].y,
                  calibData[capturedImageNum].screenCoordR[i].x, calibData[capturedImageNum].screenCoordR[i].y);
        }
        ARLOG("---------- %2d/%2d -----------\n", capturedImageNum+1, calibImageNum);
        capturedImageNum++;

        if( capturedImageNum == calibImageNum ) {
            calib();
            cleanup();
        }
    }
}
开发者ID:kolzar,项目名称:artoolkit5,代码行数:35,代码来源:calib_stereo.cpp

示例5: usage

static void usage( char *com )
{
    ARLOG("%s <filename>\n", com);
    ARLOG("    -fset     Show fset features.\n");
    ARLOG("    -fset2    Show fset2 features.\n");
    ARLOG("%s <filename>\n", com);
    exit(0);
}
开发者ID:Ray0427,项目名称:artoolkit-ios,代码行数:8,代码来源:dispFeatureSet.c

示例6: init

static int init( int argc, char *argv[] )
{
    ARGViewport		viewport;
    char		*filename = NULL;
    int			xmax, ymax;
    float		xzoom, yzoom;
    float		zoom;
    int			i;

    for( i = 1; i < argc; i++ ) {
        if( filename == NULL ) filename = argv[i];
        else usage(argv[0] );
    }
    if (!filename || !filename[0]) usage(argv[0]);

    ARLOG("Read ImageSet.\n");
    ar2UtilRemoveExt( filename );
    imageSet = ar2ReadImageSet( filename );
    if( imageSet == NULL ) {
        ARLOGe("file open error: %s.iset\n", filename );
        exit(0);
    }
    ARLOG("  end.\n");

    arMalloc(vp, ARGViewportHandle *, imageSet->num);

    xmax = ymax = 0;
    for( i = 0; i < imageSet->num; i++ ) {
        if( imageSet->scale[i]->xsize > xmax ) xmax = imageSet->scale[i]->xsize;
        if( imageSet->scale[i]->ysize > ymax ) ymax = imageSet->scale[i]->ysize;
    }
    xzoom = yzoom = 1.0;
    while( xmax > winXsize*xzoom ) xzoom += 1.0;
    while( ymax > winYsize*yzoom ) yzoom += 1.0;
    if( xzoom > yzoom ) zoom = 1.0/xzoom;
    else                zoom = 1.0/yzoom;
    winXsize = xmax * zoom;
    winYsize = ymax * zoom;
    ARLOG("Size = (%d,%d) Zoom = %f\n", xmax, ymax, zoom);
    argCreateWindow( winXsize, winYsize );

    for( i = 0; i < imageSet->num; i++ ) {
        viewport.sx = viewport.sy = 0;
        viewport.xsize = imageSet->scale[i]->xsize * zoom;
        viewport.ysize = imageSet->scale[i]->ysize * zoom;
        vp[i] = argCreateViewport( &viewport );
        argViewportSetImageSize( vp[i], imageSet->scale[i]->xsize, imageSet->scale[i]->ysize );
        argViewportSetDispMethod( vp[i], AR_GL_DISP_METHOD_TEXTURE_MAPPING_FRAME );
        //argViewportSetDispMethod( vp[i], AR_GL_DISP_METHOD_GL_DRAW_PIXELS );
        argViewportSetDispMode( vp[i], AR_GL_DISP_MODE_FIT_TO_VIEWPORT );
        argViewportSetDistortionMode( vp[i], AR_GL_DISTORTION_COMPENSATE_DISABLE );
    }

    reportCurrentDPI();
    
    return 0;
}
开发者ID:AadityaDev,项目名称:artoolkit5,代码行数:57,代码来源:dispImageSet.c

示例7: saveParam

static void saveParam(ARParam *param)
{
    char   *name = NULL, *cwd = NULL;
    size_t len;
    int    nameOK;

    arMalloc(name, char, MAXPATHLEN);
    arMalloc(cwd, char, MAXPATHLEN);
    if (!getcwd(cwd, MAXPATHLEN))
        ARLOGe("Unable to read current working directory.\n");

    nameOK = 0;
    ARLOG("Filename[%s]: ", SAVE_FILENAME);
    if (fgets(name, MAXPATHLEN, stdin) != NULL)
    {
        // Trim whitespace from end of name.
        len = strlen(name);

        while (len > 0 && (name[len - 1] == '\r' || name[len - 1] == '\n' || name[len - 1] == '\t' || name[len - 1] == ' '))
        {
            len--;
            name[len] = '\0';
        }

        if (len > 0)
        {
            nameOK = 1;
            if (arParamSave(name, 1, param) < 0)
            {
                ARLOG("Parameter write error!!\n");
            }
            else
            {
                ARLOG("Saved parameter file '%s/%s'.\n", cwd, name);
            }
        }
    }

    // Try and save with a default name.
    if (!nameOK)
    {
        if (arParamSave(SAVE_FILENAME, 1, param) < 0)
        {
            ARLOG("Parameter write error!!\n");
        }
        else
        {
            ARLOG("Saved parameter file '%s/%s'.\n", cwd, SAVE_FILENAME);
        }
    }

    free(name);
    free(cwd);
}
开发者ID:hyyh619,项目名称:ARToolKit_5.3.1,代码行数:54,代码来源:calib_camera.cpp

示例8: reportCurrentDPI

static void reportCurrentDPI(void)
{
#if AR2_CAPABLE_ADAPTIVE_TEMPLATE
    ARLOG("%f[dpi] image. Size = (%d,%d)\n", imageSet->scale[page / (AR2_BLUR_IMAGE_MAX)]->dpi,
          imageSet->scale[page / (AR2_BLUR_IMAGE_MAX)]->xsize,
          imageSet->scale[page / (AR2_BLUR_IMAGE_MAX)]->ysize);
#else
    ARLOG("%f[dpi] image. Size = (%d,%d)\n", imageSet->scale[page]->dpi,
          imageSet->scale[page]->xsize,
          imageSet->scale[page]->ysize);
#endif
}
开发者ID:hyyh619,项目名称:ARToolKit_5.3.1,代码行数:12,代码来源:dispImageSet.c

示例9: dispFunc

static void dispFunc( void )
{
    int     x, y;
    int     i, j;
    char    str[32];

    glClear( GL_COLOR_BUFFER_BIT );
#if AR2_CAPABLE_ADAPTIVE_TEMPLATE
    argViewportSetPixFormat( vp[page/AR2_BLUR_IMAGE_MAX], AR_PIXEL_FORMAT_MONO );
    argDrawMode2D( vp[page/AR2_BLUR_IMAGE_MAX] );
    argDrawImage( imageSet->scale[page/AR2_BLUR_IMAGE_MAX]->imgBWBlur[page%AR2_BLUR_IMAGE_MAX] );
#else
    argViewportSetPixFormat( vp[page], AR_PIXEL_FORMAT_MONO );
    argDrawMode2D( vp[page] );
    argDrawImage( imageSet->scale[page]->imgBW );
#endif

    if (display_fset) {
        for( i = 0; i < featureSet->list[page].num; i++ ) {
            x = featureSet->list[page].coord[i].x;
            y = featureSet->list[page].coord[i].y;
            drawFeatureRect( x, y, AR2_DEFAULT_TS1, AR2_DEFAULT_TS2 );
            sprintf(str, "%d", i);
            glColor3f( 0.0f, 0.0f, 1.0f );
            argDrawStringsByObservedPos(str, x, y);
        }
        ARLOG("fset:  Num of feature points: %d\n", featureSet->list[page].num);
    }

    if (display_fset2) {
        for( i = j = 0; i < refDataSet->num; i++ ) {
            if( refDataSet->refPoint[i].refImageNo != page ) continue;
            x = refDataSet->refPoint[i].coord2D.x;
            y = refDataSet->refPoint[i].coord2D.y;
            glColor3f( 0.0f, 1.0f, 0.0f );
            argDrawLineByObservedPos(x-5, y-5, x+5, y+5);
            argDrawLineByObservedPos(x+5, y-5, x-5, y+5);
            j++;
        }
        ARLOG("fset2: Num of feature points: %d\n", j);
#if 0
        for (i = 0; i < refDataSet->pageNum; i++) {
            for (j = 0; j < refDataSet->pageInfo[i].imageNum; j++) {
                if (refDataSet->pageInfo[i].imageInfo[j].imageNo == page) {
                    ARLOG("fset2: Image size: %dx%d\n", refDataSet->pageInfo[i].imageInfo[j].width, refDataSet->pageInfo[i].imageInfo[j].height);
                }
            }
        }
#endif
    }

    argSwapBuffers();
}
开发者ID:Ray0427,项目名称:artoolkit-ios,代码行数:53,代码来源:dispFeatureSet.c

示例10: icpDispMat

void icpDispMat( char *title, ARdouble *mat, int row, int clm )
{
    int    i, j;

    ARLOG("====== %s ========\n", title);
    for( j = 0; j < row; j++ ) {
        for( i = 0; i < clm; i++ ) {
            ARLOG("%7.5f ", mat[j*clm+i]);
        }
        ARLOG("\n");
    }
    ARLOG("-------------------------\n");

    return;
}
开发者ID:AadityaDev,项目名称:artoolkit5,代码行数:15,代码来源:icpCore.c

示例11: arUtilPrintMtx16

void arUtilPrintMtx16(const ARdouble mtx16[16])
{
    int i;
    for (i = 0; i < 4; i++) {
        ARLOG("[% .3f % .3f % .3f] [% 6.1f]\n", mtx16[i], mtx16[i + 4], mtx16[i + 8], mtx16[i + 12]);
    }
}
开发者ID:Avatarchik,项目名称:nft_generator,代码行数:7,代码来源:arUtil.c

示例12: arUtilPrintTransMat

void arUtilPrintTransMat(const ARdouble trans[3][4])
{
    int i;
    for (i = 0; i < 3; i++) {
        ARLOG("[% .3f % .3f % .3f] [% 6.1f]\n", trans[i][0], trans[i][1], trans[i][2], trans[i][3]);
    }
}
开发者ID:Avatarchik,项目名称:nft_generator,代码行数:7,代码来源:arUtil.c

示例13: keyEvent

static void keyEvent(unsigned char key, int x, int y)
{
    int threshChange = 0;
	switch (key) {
		case 'T':
		case 't':
			printf("Enter new threshold value (now = %d): ", thresh);
			scanf("%d",&thresh); while( getchar()!='\n' );
				printf("\n");
			break;
		case '1':
		case '-':
			threshChange = -5;
			break;
		case '2':
		case '=':
		case '+':
			threshChange = 5;
			break;
		default:
			break;
	}
	if (threshChange) {
		thresh += threshChange;
		if (thresh < 0) thresh = 0;
		if (thresh > 255) thresh = 255;
		ARLOG("Threshhold changed to %d.\n", thresh);
	}
}
开发者ID:AadityaDev,项目名称:artoolkit5,代码行数:29,代码来源:main.c

示例14: ar2VideoDispOptionAndroid

int ar2VideoDispOptionAndroid( void )
{
    ARLOG(" -device=Android\n");
    ARLOG(" -width=N\n");
    ARLOG("    specifies desired width of image.\n");
    ARLOG(" -height=N\n");
    ARLOG("    specifies desired height of image.\n");
    ARLOG(" -cachedir=/path/to/cache\n");
    ARLOG("    Specifies the path in which to look for/store camera parameter cache files.\n");
    ARLOG("    Default is working directory.\n");
    ARLOG("\n");
    
    return 0;
}
开发者ID:Ray0427,项目名称:artoolkit-ios,代码行数:14,代码来源:videoAndroid.c

示例15: usage

static void usage(char *com)
{
    ARLOG("Usage: %s [options]\n", com);
    ARLOG("Options:\n");
    ARLOG("  --vconf <video parameter for the camera>\n");
    ARLOG("  -cornerx=n: specify the number of corners on chessboard in X direction.\n");
    ARLOG("  -cornery=n: specify the number of corners on chessboard in Y direction.\n");
    ARLOG("  -imagenum=n: specify the number of images captured for calibration.\n");
    ARLOG("  -pattwidth=n: specify the square width in the chessbaord.\n");
    ARLOG("  -h -help --help: show this message\n");
    exit(0);
}
开发者ID:hyyh619,项目名称:ARToolKit_5.3.1,代码行数:12,代码来源:calib_camera.cpp


注:本文中的ARLOG函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。