OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
楼主: bebekifis

Opencv感想和一些分享

  [复制链接]
发表于 2015-3-26 10:56:56 | 显示全部楼层
计算机视觉:一种现代方法 里讲的例程是OC吗?英文的好像没提到OC。
回复 支持 反对

使用道具 举报

发表于 2015-5-22 15:11:53 | 显示全部楼层
您好,请问以下代码如何改为调用opencv库的。
int main (int argc, char * const argv[])
{
        int rv;
        int PixelFormat = 24, Width, Height;
        unsigned char * pImg;
        unsigned char * pBin;
       
        if ( argc < 2 )
        {
                fprintf( stderr, "Usage: GetContour.exe image\n" ) ;
                return 0 ;
        }

        rv = viGetImageWH( argv[1], Width, Height ) ;
        if ( rv == 0 )
        {
                printf( "Could not get image. Program exits!\n" );
                exit( 0 );
        }
        pImg = new unsigned char [ Width*Height*PixelFormat/8 ];
        viReadImageFile( argv[1], pImg, Width, Height, PixelFormat );
        pBin = new unsigned char [Width*Height];
        viColor24toGray8(pImg, Width, Height,1,pBin);
        areaSplitCombine( pBin, Width, Height);
        viNamedWindow( "Image", GUI_WINDOW_AUTOSIZE );
    viShowImage( "Image",pBin, Width, Height, 8, 0 );
        viWaitKey( 0 );
    delete [] pImg;
        delete [] pBin;
        viDestroyAllWindows();               
    return 0;
}
回复 支持 反对

使用道具 举报

发表于 2015-8-26 12:44:01 | 显示全部楼层
有点感触,感谢分享~
回复 支持 反对

使用道具 举报

发表于 2015-9-1 16:48:30 | 显示全部楼层
叼叼叼
回复 支持 反对

使用道具 举报

发表于 2016-4-4 18:12:42 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-5-4 00:58 , Processed in 0.008941 second(s), 13 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表