zoukankan      html  css  js  c++  java
  • snip_opencv环境配置和测试程序

    opencv2.4.9环境变量配置的记录. 2014年8月10日

    Microsoft Windows XP [版本 5.1.2600]
    (C) 版权所有 1985-2001 Microsoft Corp.

    C:Documents and SettingsAdministrator>set
    ALLUSERSPROFILE=C:Documents and SettingsAll Users
    AltiumPath=D:Program FilesAltium Designer Summer 09System
    ANS_OLD_ATTACH=1
    APPDATA=C:Documents and SettingsAdministratorApplication Data
    CommonProgramFiles=C:Program FilesCommon Files
    COMPUTERNAME=SMT
    ComSpec=C:WINDOWSsystem32cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=Documents and SettingsAdministrator
    LOGONSERVER=\SMT
    NUMBER_OF_PROCESSORS=4
    OS=Windows_NT
    Path=C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesMi
    crosoft SQL Server100ToolsBinn;C:Program FilesMicrosoft SQL Server100DTS
    Binn;D:Program FilesAltium Designer Summer 09System
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 58 Stepping 9, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=3a09
    ProgramFiles=C:Program Files
    PROMPT=$P$G
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:WINDOWS
    TEMP=C:DOCUME~1ADMINI~1LOCALS~1Temp
    TMP=C:DOCUME~1ADMINI~1LOCALS~1Temp
    USERDOMAIN=SMT
    USERNAME=Administrator
    USERPROFILE=C:Documents and SettingsAdministrator
    VS100COMNTOOLS=d:Program FilesMicrosoft Visual Studio 10.0Common7Tools
    windir=C:WINDOWS
    _DFX_INSTALL_UNSIGNED_DRIVER=1

    C:Documents and SettingsAdministrator>setx
    'setx' 不是内部或外部命令,也不是可运行的程序
    或批处理文件。

    C:Documents and SettingsAdministrator>echo %Path% //查看缺省的PATH值
    C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesMicroso
    ft SQL Server100ToolsBinn;C:Program FilesMicrosoft SQL Server100DTSBinn
    ;D:Program FilesAltium Designer Summer 09System

    C:Documents and SettingsAdministrator>^A^A


    VS2010默认的设置。
    —————————————————————————————————————————————
    可执行文件的目录:(缺省设置(VS2010))

    $(VCInstallDir)bin
    $(WindowsSdkDir)binNETFX 4.0 Tools
    $(WindowsSdkDir)bin
    $(VSInstallDir)Common7Toolsin
    $(VSInstallDir)Common7 ools
    $(VSInstallDir)Common7ide
    $(ProgramFiles)HTML Help Workshop
    $(FrameworkSDKDir)in
    $(MSBuildToolsPath32)
    $(VSInstallDir)
    $(SystemRoot)SysWow64
    $(FxCopDir)
    $(PATH)


    (INCLUIDE)缺省值: 包含头文件用的。

    $(VCInstallDir)include
    $(VCInstallDir)atlmfcinclude
    $(WindowsSdkDir)include
    $(FrameworkSDKDir)include

    (LIBPATH)引用目录: using命令引用的文件使用

    $(VCInstallDir)atlmfclib
    $(VCInstallDir)lib

    (LIB) 库目录: .dll, 。lib文件的目录

    $(VCInstallDir)lib
    $(VCInstallDir)atlmfclib
    $(WindowsSdkDir)lib
    $(FrameworkSDKDir)lib
    ======
    (.LIB)库目录中的链接项(缺省);
    kernel32.lib
    user32.lib
    gdi32.lib
    winspool.lib
    comdlg32.lib
    advapi32.lib
    shell32.lib
    ole32.lib
    oleaut32.lib
    uuid.lib
    odbc32.lib
    odbccp32.lib
    -------------------------------------------------------

    (1)2014年8月10日

    1.1 添加INCLUDE目录。 在集成$includePath的基础上。
    注: 选中从父级或项目默认设置集成。 默认:没有diy的目录。
    添加的:
    D:opencvuildinclude
    D:opencvuildincludeopencv
    D:opencvuildincludeopencv2

    视图 → 属性管理器。。 在Microsoft.Cpp.Win32.user右键,属性中设置会永久保存的加载opencv的一些文件。
    1.2(可选)
    D:opencvuildx86vc10in

    1.3 库目录的设置.
    D:opencvuildx86vc10
    D:opencvuildx86vc10in
    D:opencvuildx86vc10lib

    环境变量设置:
    用户变量:
    [opencv] D:opencvuild
    [PATH] D:opencvuildx86vc10in;
    系统变量:
    [PATH] D:opencvuildx86vc10in;
    在x64位系统上调试的时候,在Debug小箭头右侧的平台选项,要设置为x64的,默认的是Win32的应用程序....


    ___________________________________________________________

    Win32应用程序,测试程序。


    // set_ENV.cpp : 定义控制台应用程序的入口点。
    //
    #include "stdafx.h"
    #include <opencv2opencv.hpp>
    using namespace cv;


    int _tmain(int argc, _TCHAR* argv[])
    {
    IplImage * src;
    src = cvLoadImage("D:\lena.jpg", CV_LOAD_IMAGE_UNCHANGED);
    cvNamedWindow("lena",CV_WINDOW_AUTOSIZE);
    cvShowImage("lena",src);
    cvWaitKey(0);
    cvWaitKey(0);

    cvDestroyWindow("lena");
    //cvRelease(&src);
    cvRelease((void**)&src);
    return 0;
    }

    ________________________

    包含目录:

     具体需要制定的库文件,在链接项→输入中,进行设置, 可以百度opencv 2.4.9配置方法

    opencv_calib3d244.lib 

    opencv_calib3d244d.lib 

    opencv_contrib244.lib 

    opencv_contrib244d.lib 

    opencv_core244.lib 

    opencv_core244d.lib 

    opencv_features2d244.lib 

    opencv_features2d244d.lib 

    opencv_flann244.lib 

    opencv_flann244d.lib 

    opencv_gpu244.lib 

    opencv_gpu244d.lib 

    opencv_haartraining_engine.lib 

    opencv_haartraining_engined.lib 

    opencv_highgui244.lib 

    opencv_highgui244d.lib 

    opencv_imgproc244.lib 

    opencv_imgproc244d.lib 

    opencv_legacy244.lib 

    opencv_legacy244d.lib 

    opencv_ml244.lib 

    opencv_ml244d.lib 

    opencv_nonfree244.lib 

    opencv_nonfree244d.lib 

    opencv_objdetect244.lib 

    opencv_objdetect244d.lib 

    opencv_photo244.lib 

    opencv_photo244d.lib 

    opencv_stitching244.lib 

    opencv_stitching244d.lib 

    opencv_ts244.lib 

    opencv_ts244d.lib 

    opencv_video244.lib 

    opencv_video244d.lib 

    opencv_videostab244.lib 

    opencv_videostab244d.lib 

    快乐-奋斗
  • 相关阅读:
    等额本息还款法、等额本金
    数学集合:N Z Q R C
    Xshell配置SSH免密码登录
    【转】Microsoft .Net Remoting之Marshal、Disconnect与生命周期以及跟踪服务
    【转】Microsoft .Net Remoting 之.Net Remoting基础篇
    【转】C#调用WebService实例和开发
    【MYSQL】存储过程示例
    【转】【C++】C++ 中的线程、锁和条件变量
    【C++】线程_beginthreadex参数说明
    【转】【c++】指针参数是如何传递内存的
  • 原文地址:https://www.cnblogs.com/tt-player/p/3903414.html
Copyright © 2011-2022 走看看