Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
13269d7f
Commit
13269d7f
authored
Jun 18, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding beginnings of a tool for dealing with labeled image datasets.
parent
53a01f4c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
0 deletions
+92
-0
CMakeLists.txt
tools/imglab/CMakeLists.txt
+45
-0
main.cpp
tools/imglab/src/main.cpp
+47
-0
No files found.
tools/imglab/CMakeLists.txt
0 → 100644
View file @
13269d7f
#
# This is a CMake makefile. You can find the cmake utility and
# information about it at http://www.cmake.org
#
cmake_minimum_required
(
VERSION 2.6
)
# create a variable called target_name and set it to the string "imglab"
set
(
target_name imglab
)
PROJECT
(
${
target_name
}
)
# add all the cpp files we want to compile to this list. This tells
# cmake that they are part of our target (which is the executable named imglab)
ADD_EXECUTABLE
(
${
target_name
}
src/main.cpp
)
# add the folder containing the dlib folder to the include path
INCLUDE_DIRECTORIES
(
../..
)
# There is a CMakeLists.txt file in the dlib source folder that tells cmake
# how to build the dlib library. Tell cmake about that file.
add_subdirectory
(
../../dlib dlib_build
)
# Tell cmake to link our target executable to the non-gui version of the dlib
# library.
TARGET_LINK_LIBRARIES
(
${
target_name
}
dlib
)
INSTALL
(
TARGETS
${
target_name
}
RUNTIME DESTINATION bin
)
#set default build type to Release
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Release"
CACHE STRING
"Choose the type of build, options are: Debug Release
RelWithDebInfo MinSizeRel."
FORCE
)
endif
()
tools/imglab/src/main.cpp
0 → 100644
View file @
13269d7f
#include <iostream>
#include <fstream>
#include <dlib/cmd_line_parser.h>
using
namespace
std
;
using
namespace
dlib
;
int
main
(
int
argc
,
char
**
argv
)
{
try
{
typedef
dlib
::
cmd_line_parser
<
char
>::
check_1a_c
parser_type
;
parser_type
parser
;
parser
.
add_option
(
"h"
,
"Displays this information."
);
parser
.
add_option
(
"c"
,
"Create an XML file named <arg> listing a set of images."
,
1
);
parser
.
parse
(
argc
,
argv
);
const
char
*
singles
[]
=
{
"h"
,
"c"
};
parser
.
check_one_time_options
(
singles
);
if
(
parser
.
option
(
"h"
))
{
cout
<<
"Options:
\n
"
;
parser
.
print_options
(
cout
);
cout
<<
endl
;
return
EXIT_SUCCESS
;
}
if
(
parser
.
option
(
"c"
))
{
return
EXIT_SUCCESS
;
}
}
catch
(
exception
&
e
)
{
cout
<<
e
.
what
()
<<
endl
;
return
EXIT_FAILURE
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment