• Open CV 图像显示(1)


     

    演示:读入一张图片,并显示

     

    1. #include "stdafx.h"  
    2. #include <opencv2/core/core.hpp>  
    3. #include <opencv2/contrib/contrib.hpp>  
    4. #include <opencv2/highgui/highgui.hpp>  
    5. #include <opencv2/imgproc/imgproc.hpp>  
    6. #include <opencv2/objdetect/objdetect.hpp>  
    7.     
    8. using namespace cv;  
    9. using namespace std;  
    10. #pragma comment(linker, "/subsystem:"windows" /entry:"mainCRTStartup"")   
    11. int main(int argc, char** argv[])  
    12. {  
    13.     //加载图像文件 
    14.     IplImage* img = cvLoadImage("F:\life\大悲集580360_4.jpg");  
    15.     
    16.     //显示窗口
    17.     cvNamedWindow("Pusa", CV_WINDOW_AUTOSIZE);  
    18.     
    19.     //显示图像
    20.     cvShowImage("Pusa", img);  
    21.     
    22.     //等待任意键
    23.     cvWaitKey(0);  
    24.     
    25.     //释放图像
    26.     cvReleaseImage(&img);  
    27.     //销毁窗口
    28.     cvDestroyWindow("Pusa");  
    29.     
    30.     return 0;  
    31. }  

     

  • 相关阅读:
    别让你的生活止于平庸!(摘)
    NSURLSession 请求
    第三方原理
    iOS实用的小技巧
    简书APP
    网络请求
    JQuery 简介
    struts2拦截器的实现原理及源码剖析
    hibernate配置文件注意点
    hibernate中三种状态
  • 原文地址:https://www.cnblogs.com/pengzhen/p/4951715.html
Copyright © 2020-2023  润新知