diff options
Diffstat (limited to 'debian/ti-timl/usr/src/timl/src/app/cnn/convert/sbd/appCNNConvertSBD.hpp')
-rw-r--r-- | debian/ti-timl/usr/src/timl/src/app/cnn/convert/sbd/appCNNConvertSBD.hpp | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/debian/ti-timl/usr/src/timl/src/app/cnn/convert/sbd/appCNNConvertSBD.hpp b/debian/ti-timl/usr/src/timl/src/app/cnn/convert/sbd/appCNNConvertSBD.hpp new file mode 100644 index 0000000..4a8af3a --- /dev/null +++ b/debian/ti-timl/usr/src/timl/src/app/cnn/convert/sbd/appCNNConvertSBD.hpp | |||
@@ -0,0 +1,102 @@ | |||
1 | #ifndef APPCNNCONVERTSBD_HPP_ | ||
2 | #define APPCNNCONVERTSBD_HPP_ | ||
3 | |||
4 | |||
5 | /******************************************************************************/ | ||
6 | /*! | ||
7 | * \file appCNNConvertSBD.hpp | ||
8 | * \defgroup appCNNConvertSBD appCNNConvertSBD | ||
9 | * \brief Stanford background dataset conversion applications | ||
10 | * \ingroup appCNN | ||
11 | */ | ||
12 | /* Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ | ||
13 | * | ||
14 | * Redistribution and use in source and binary forms, with or without | ||
15 | * modification, are permitted provided that the following conditions | ||
16 | * are met: | ||
17 | * | ||
18 | * Redistributions of source code must retain the above copyright | ||
19 | * notice, this list of conditions and the following disclaimer. | ||
20 | * | ||
21 | * Redistributions in binary form must reproduce the above copyright | ||
22 | * notice, this list of conditions and the following disclaimer in the | ||
23 | * documentation and/or other materials provided with the | ||
24 | * distribution. | ||
25 | * | ||
26 | * Neither the name of Texas Instruments Incorporated nor the names of | ||
27 | * its contributors may be used to endorse or promote products derived | ||
28 | * from this software without specific prior written permission. | ||
29 | * | ||
30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
41 | * | ||
42 | ******************************************************************************/ | ||
43 | |||
44 | /******************************************************************************* | ||
45 | * | ||
46 | * INCLUDES | ||
47 | * | ||
48 | ******************************************************************************/ | ||
49 | |||
50 | |||
51 | #include <opencv2/opencv.hpp> | ||
52 | #include <opencv2/core/core.hpp> | ||
53 | #include <opencv2/imgproc/imgproc.hpp> | ||
54 | #include <iostream> | ||
55 | #include <stdio.h> | ||
56 | #include <sys/stat.h> | ||
57 | #include <unistd.h> | ||
58 | #include <cstdlib> | ||
59 | |||
60 | using namespace std; | ||
61 | using namespace cv; | ||
62 | |||
63 | /******************************************************************************* | ||
64 | * | ||
65 | * DEFINES | ||
66 | * | ||
67 | ******************************************************************************/ | ||
68 | |||
69 | typedef enum { | ||
70 | ERROR_APP_CNN_CONVERT_ARG, | ||
71 | ERROR_APP_CNN_CONVERT_IMAGE_NUM | ||
72 | } appCNNConvertError; | ||
73 | |||
74 | #define IMAGE_ROW 240 | ||
75 | #define IMAGE_COL 320 | ||
76 | #define RAND_SEED 1 | ||
77 | #define NAME_BUFFER_SIZE 50 | ||
78 | |||
79 | //#define SBD_IMAGE_PATH "./iccv09Data/images/" | ||
80 | //#define SBD_LABEL_PATH "./iccv09Data/labels/" | ||
81 | #define SBD_IMAGE_NUM 715 | ||
82 | //#define SBD_INDEX_FILE_NAME "./iccv09Data/horizons.txt" | ||
83 | |||
84 | #define SBD_TRAIN_NUM 572 | ||
85 | //#define SBD_TRAIN_CONVERT_FOLDER_NAME "./iccv09Data/train" | ||
86 | #define SBD_TRAIN_CONVERT_FOLDER_MODE 0777 | ||
87 | |||
88 | |||
89 | #define SBD_TEST_NUM 143 | ||
90 | //#define SBD_TEST_CONVERT_FOLDER_NAME "./iccv09Data/test" | ||
91 | #define SBD_TEST_CONVERT_FOLDER_MODE 0777 | ||
92 | |||
93 | |||
94 | /******************************************************************************* | ||
95 | * | ||
96 | * FUNCTION PROTOTYPES | ||
97 | * | ||
98 | ******************************************************************************/ | ||
99 | |||
100 | int appCNNConvertSBDShuffle(char **names, int n); | ||
101 | |||
102 | #endif /* APPCNNCONVERTSBD_HPP_ */ | ||