显示图片

#include "stdafx.h"
#include "highgui.h"
int main()
{
    IplImage* img=cvLoadImage("test.jpg");
    cvNamedWindow("Example1",CV_WINDOW_AUTOSIZE);
    cvShowImage("Example1",img);
    cvWaitKey(0);                    //press any key to be continued
    cvReleaseImage(&img);
    cvDestroyWindow("Example1");
    return 0;
}

生成的可执行文件可以作为一个命令行使用~

test.exe    example.jpg

posted @ 2012-05-29 13:59  Epirus  阅读(144)  评论(0编辑  收藏  举报