Simplified code a bit

This commit is contained in:
Davis King 2012-12-12 19:33:32 -05:00
parent 7c4cde7f0c
commit 25bf3c5114
9 changed files with 15 additions and 10 deletions

View File

@ -3,6 +3,7 @@
#include "common.h"
#include <fstream>
#include <dlib/error.h>
// ----------------------------------------------------------------------------------------

View File

@ -4,8 +4,6 @@
#define DLIB_IMGLAB_COmMON_H__
#include <string>
#include <dlib/cmd_line_parser.h>
typedef dlib::cmd_line_parser<char>::check_1a_c parser_type;
// ----------------------------------------------------------------------------------------

View File

@ -5,6 +5,7 @@
#include <string>
#include <dlib/dir_nav.h>
#include <dlib/time_this.h>
#include <dlib/cmd_line_parser.h>
using namespace std;
using namespace dlib;
@ -163,7 +164,7 @@ namespace
}
void convert_idl(
const parser_type& parser
const command_line_parser& parser
)
{
cout << "Convert from IDL annotation format..." << endl;

View File

@ -4,8 +4,9 @@
#define DLIB_IMGLAB_CONVErT_IDL_H__
#include "common.h"
#include <dlib/cmd_line_parser.h>
void convert_idl(const parser_type& parser);
void convert_idl(const dlib::command_line_parser& parser);
#endif // DLIB_IMGLAB_CONVErT_IDL_H__

View File

@ -137,7 +137,7 @@ namespace
}
void convert_pascal_v1(
const parser_type& parser
const command_line_parser& parser
)
{
cout << "Convert from PASCAL v1.00 annotation format..." << endl;

View File

@ -4,8 +4,9 @@
#define DLIB_IMGLAB_CONVERT_PASCAl_V1_H__
#include "common.h"
#include <dlib/cmd_line_parser.h>
void convert_pascal_v1(const parser_type& parser);
void convert_pascal_v1(const dlib::command_line_parser& parser);
#endif // DLIB_IMGLAB_CONVERT_PASCAl_V1_H__

View File

@ -5,6 +5,7 @@
#include <dlib/xml_parser.h>
#include <string>
#include <dlib/dir_nav.h>
#include <dlib/cmd_line_parser.h>
using namespace std;
using namespace dlib;
@ -197,7 +198,7 @@ namespace
}
void convert_pascal_xml(
const parser_type& parser
const command_line_parser& parser
)
{
cout << "Convert from PASCAL XML annotation format..." << endl;

View File

@ -4,8 +4,9 @@
#define DLIB_IMGLAB_CONVERT_PASCAl_XML_H__
#include "common.h"
#include <dlib/cmd_line_parser.h>
void convert_pascal_xml(const parser_type& parser);
void convert_pascal_xml(const dlib::command_line_parser& parser);
#endif // DLIB_IMGLAB_CONVERT_PASCAl_XML_H__

View File

@ -5,6 +5,7 @@
#include "convert_pascal_xml.h"
#include "convert_pascal_v1.h"
#include "convert_idl.h"
#include <dlib/cmd_line_parser.h>
#include <iostream>
#include <fstream>
@ -24,7 +25,7 @@ using namespace dlib;
// ----------------------------------------------------------------------------------------
void create_new_dataset (
const parser_type& parser
const command_line_parser& parser
)
{
using namespace dlib::image_dataset_metadata;
@ -118,7 +119,7 @@ int main(int argc, char** argv)
try
{
parser_type parser;
command_line_parser parser;
parser.add_option("h","Displays this information.");
parser.add_option("c","Create an XML file named <arg> listing a set of images.",1);