码迷,mamicode.com
首页 > 其他好文 > 详细

Dlib使用过程全记录(二)

时间:2017-07-22 13:14:40      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:repr   image   source   fine   can   images   roc   上层   direct   

使用的环境: VS2015 + win7

使用dlib的方法: Compiling on Windows Using Visual Studio 2015 or Newer (来自官网)

 

官网的原文:

All you need to do is create an empty console project. Then add dlib/all/source.cpp to it and add the folder containing the dlib folder to the #include search path. Then you can compile any example program by adding it to your project.

Again, note that dlib will only be able to work with jpeg and png files if you link in libjpeg and libpng. In Visual Studio, the easiest way to do this is to add all the libjpeg, libpng, and zlib source files in the dlib/external folder into your project and also define the DLIB_PNG_SUPPORT and DLIB_JPEG_SUPPORT preprocessor directives. If you don‘t know how to configure Visual Studio then you should use CMake as shown above since it will take care of everything automatically.

 

我的操作步骤:

1、建立一个空的C++ 控制台工程;

2、把dlib 放到工程目录下;

3、把dlib/all/source.cpp添加到工程;

4、修改属性里的 #Additional Library Directories,增加dlib的上层目录,因为我们examples 里的头文件是#include <dlib/**.h>的形式。

  技术分享

5、把examples里的cpp加进来,跑一下。

  编译没问题,我遇到了.dll找不到问题,慢慢加进来好了。

 

Dlib使用过程全记录(二)

标签:repr   image   source   fine   can   images   roc   上层   direct   

原文地址:http://www.cnblogs.com/xiaochun-zhao/p/7220827.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!