-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
58 lines (48 loc) · 1.22 KB
/
main.cpp
File metadata and controls
58 lines (48 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
#include <fstream>
#include <qi/os.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <alcommon/albroker.h>
#include <alcommon/albrokermanager.h>
#include <alcommon/altoolsmain.h>
#include "OcrModule.hpp"
#define ALCALL
extern "C"
{
/**
* \brief Creates a new NAO module.
*
* \param pBroker
* \return int
*/
ALCALL int _createModule(boost::shared_ptr<AL::ALBroker> pBroker)
{
// init broker with the main broker instance from the parent executable
AL::ALBrokerManager::setInstance(pBroker->fBrokerManager.lock());
AL::ALBrokerManager::getInstance()->addBroker(pBroker);
// create module instances
AL::ALModule::createModule<OcrModule>(pBroker, "OcrModule");
return 0;
}
/**
* \brief Closes a NAO module.
*
* \return int
*/
ALCALL int _closeModule( )
{
return 0;
}
} // extern "C"
#ifdef TXTREC_IS_REMOTE
int main(int argc, char *argv[])
{
// pointer to createModule
TMainType sig;
sig = &_createModule;
// call main
return ALTools::mainFunction("OcrModule", argc, argv, sig);
}
#endif