Browse Source

Compilation errors fixed and readme extended!

Joel Janai 1 year ago
parent
commit
a0698c7d24
10 changed files with 165 additions and 122 deletions
  1. 59 62
      CMakeLists.txt
  2. 8 8
      README.md
  3. 24 1
      adaptiveFR.cpp
  4. 15 24
      configuration.h
  5. 0 15
      configuration_epic.h
  6. 25 8
      dense_tracking.cpp
  7. 4 1
      epic_flow_extended/variational_aux_mt.h
  8. 2 0
      matlab/detect_edges.m
  9. 23 1
      slow_flow.cpp
  10. 5 2
      utils/utils.h

+ 59 - 62
CMakeLists.txt

@@ -5,7 +5,13 @@ project(slow_flow)
5 5
 set(CMAKE_C_COMPILER_INIT g++)
6 6
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -Wall -g -O3 -msse4") 
7 7
 
8
-set(MIDDLEBURY_DEVKIT "[SPECIFY PATH TO MIDDLEBURY DEVKIT]")
8
+
9
+############################# PLEASE SPECIFY ############################# 
10
+set(MIDDLEBURY_DEVKIT_PATH "[SPECIFY PATH TO MIDDLEBURY DEVKIT]")					# Middlebury Devkit
11
+set(GCO_PATH "[SPECIFY PATH TO GRAPH CUT]")  										# Graph cut library
12
+set(TRWS_PATH "[SPECIFY PATH TO TRWS]")												# Tree-Reweigthed Message Passing
13
+#set(DMGUNTURK_PATH "[SPECIFY PATH TO HAMILTON ADAMS DEMOSAICING]")					# Gunturk-Altunbasak-Mersereau Alternating Projections Image Demosaicking 
14
+############################# PLEASE SPECIFY ############################# 
9 15
 
10 16
 # opencv library
11 17
 find_package(OpenCV REQUIRED)
@@ -23,8 +29,8 @@ find_package(PNG REQUIRED)
23 29
 find_package(JPEG REQUIRED)
24 30
 
25 31
 # Img library
26
-find_path(IMG_INCLUDE_DIRS Image.h ${MIDDLEBURY_DEVKIT}/cpp/imageLib)
27
-find_library(IMG_LIBRARY NAMES Img PATHS ${MIDDLEBURY_DEVKIT}/cpp/imageLib)
32
+find_path(IMG_INCLUDE_DIRS Image.h PATHS ${MIDDLEBURY_DEVKIT_PATH}/imageLib/ NO_DEFAULT_PATH) 
33
+find_library(IMG_LIBRARY NAMES Img PATHS ${MIDDLEBURY_DEVKIT_PATH}/imageLib/)
28 34
 add_library(Img STATIC IMPORTED)
29 35
 
30 36
 # LAPACK library
@@ -44,9 +50,40 @@ include_directories(${BLAS_INCLUDE_DIR})
44 50
 include_directories(${LAPACK_INCLUDE_DIR})
45 51
 include_directories(${GSLCBLAS_INCLUDE_DIR})
46 52
 include_directories(${GSL_INCLUDE_DIR})
53
+include_directories(${TRWS_PATH})
47 54
 
48 55
 link_directories(${Boost_LIBRARY_DIR})
49 56
 
57
+# INCLUDES
58
+set(EPIC_FLOW_EXTENDED_INCLUDES epic_flow_extended/epic_aux.cpp
59
+    epic_flow_extended/epic.cpp
60
+    epic_flow_extended/image.c
61
+    epic_flow_extended/io.c
62
+    epic_flow_extended/solver.c
63
+    epic_flow_extended/variational_aux_mt.cpp
64
+    epic_flow_extended/variational_mt.cpp)
65
+set(EPIC_FLOW_INCLUDES epic_flow_extended/epic_aux.cpp
66
+    epic_flow_extended/epic.cpp
67
+    epic_flow_extended/image.c
68
+    epic_flow_extended/io.c
69
+    epic_flow_extended/solver.c
70
+    epic_flow_extended/variational_aux.c
71
+    epic_flow_extended/variational.c)
72
+set(UTILS_INCLUDES utils/utils.cpp utils/parameter_list.cpp)
73
+set(MIDDLEBURY_INCLUDES ${MIDDLEBURY_DEVKIT_PATH}/colorcode.cpp ${MIDDLEBURY_DEVKIT_PATH}/flowIO.cpp)
74
+set(GCO_INCLUDES ${GCO_PATH}/GCoptimization.cpp
75
+    ${GCO_PATH}/maxflow.cpp
76
+    ${GCO_PATH}/graph.cpp
77
+    ${GCO_PATH}/LinkedBlockList.cpp)
78
+if(DMGUNTURK_PATH)
79
+	set(DMGUNTURK_INCLUDES ${DMGUNTURK_PATH}/dmha.c
80
+	    ${DMGUNTURK_PATH}/dmbilinear.c
81
+	    ${DMGUNTURK_PATH}/basic.c
82
+	    ${DMGUNTURK_PATH}/imageio.c)
83
+else()
84
+	set(DMGUNTURK_INCLUDES )
85
+endif()
86
+
50 87
 # parallel computing
51 88
 find_package(OpenMP)
52 89
 if (OPENMP_FOUND)
@@ -57,74 +94,34 @@ if (OPENMP_FOUND)
57 94
 endif()
58 95
 
59 96
 add_executable(slow_flow slow_flow.cpp
60
-    epic_flow_extended/epic_aux.cpp
61
-    epic_flow_extended/epic.cpp
62
-    epic_flow_extended/image.c
63
-    epic_flow_extended/io.c
64
-    epic_flow_extended/solver.c
65
-    epic_flow_extended/variational_aux_mt.cpp
66
-    epic_flow_extended/variational_mt.cpp
67
-   	utils/utils.cpp
68
-    utils/parameter_list.cpp
69
-    ../libs/middlebury_devkit/cpp/colorcode.cpp
70
-    ../libs/middlebury_devkit/cpp/flowIO.cpp
71
-    ../libs/gco/GCoptimization.cpp
72
-    ../libs/gco/maxflow.cpp
73
-    ../libs/gco/graph.cpp
74
-    ../libs/gco/LinkedBlockList.cpp
75
-    ../libs/dmgunturk/dmha.c
76
-    ../libs/dmgunturk/dmbilinear.c
77
-    ../libs/dmgunturk/basic.c
78
-    ../libs/dmgunturk/imageio.c)
97
+    ${EPIC_FLOW_EXTENDED_INCLUDES}
98
+    ${UTILS_INCLUDES}
99
+    ${MIDDLEBURY_INCLUDES}
100
+    ${GCO_INCLUDES}
101
+    ${DMGUNTURK_INCLUDES})
79 102
 
80 103
 add_executable(adaptiveFR adaptiveFR.cpp
81
-    epic_flow_extended/epic_aux.cpp
82
-    epic_flow_extended/epic.cpp
83
-    epic_flow_extended/image.c
84
-    epic_flow_extended/io.c
85
-    epic_flow_extended/solver.c
86
-    epic_flow_extended/variational_aux.c
87
-    epic_flow_extended/variational.c
88
-   	utils/utils.cpp
89
-    utils/parameter_list.cpp
90
-    ../libs/middlebury_devkit/cpp/colorcode.cpp
91
-    ../libs/middlebury_devkit/cpp/flowIO.cpp
92
-    ../libs/gco/GCoptimization.cpp
93
-    ../libs/gco/maxflow.cpp
94
-    ../libs/gco/graph.cpp
95
-    ../libs/gco/LinkedBlockList.cpp
96
-    ../libs/dmgunturk/dmha.c
97
-    ../libs/dmgunturk/dmbilinear.c
98
-    ../libs/dmgunturk/basic.c
99
-    ../libs/dmgunturk/imageio.c)
104
+    ${EPIC_FLOW_INCLUDES}
105
+    ${UTILS_INCLUDES}
106
+    ${MIDDLEBURY_INCLUDES}
107
+    ${GCO_INCLUDES}
108
+    ${DMGUNTURK_INCLUDES})
100 109
 
101 110
 add_executable(dense_tracking dense_tracking.cpp
102
-    epic_flow_extended/epic_aux.cpp
103
-    epic_flow_extended/epic.cpp
104
-    epic_flow_extended/image.c
105
-    epic_flow_extended/io.c
106
-    epic_flow_extended/solver.c
107
-    epic_flow_extended/variational_aux_mt.cpp
108
-    epic_flow_extended/variational_mt.cpp
111
+    ${EPIC_FLOW_EXTENDED_INCLUDES}
112
+    ${UTILS_INCLUDES}
109 113
    	utils/hypothesis.cpp
110
-   	utils/utils.cpp
111
-    utils/parameter_list.cpp
112 114
    	penalty_functions/penalty_function.h
113 115
    	penalty_functions/lorentzian.h
114 116
    	penalty_functions/modified_l1_norm.h
115 117
    	penalty_functions/quadratic_function.h
116
-    ../libs/middlebury_devkit/cpp/colorcode.cpp
117
-    ../libs/middlebury_devkit/cpp/flowIO.cpp
118
-    ../libs/maxflow/maxflow.cpp
119
-    ../libs/maxflow/graph.cpp
120
-    ../libs/gco/GCoptimization.cpp
121
-    ../libs/gco/maxflow.cpp
122
-    ../libs/gco/graph.cpp
123
-    ../libs/gco/LinkedBlockList.cpp
124
-    ../libs/dmgunturk/dmha.c
125
-    ../libs/dmgunturk/dmbilinear.c
126
-    ../libs/dmgunturk/basic.c
127
-    ../libs/dmgunturk/imageio.c)
118
+    ${MIDDLEBURY_INCLUDES}
119
+    ${TRWS_PATH}/MRFEnergy.cpp
120
+    ${TRWS_PATH}/minimize.cpp
121
+    ${TRWS_PATH}/ordering.cpp
122
+    ${TRWS_PATH}/treeProbabilities.cpp
123
+    ${GCO_INCLUDES}
124
+    ${DMGUNTURK_INCLUDES})
128 125
 
129 126
 target_link_libraries(slow_flow ${OpenCV_LIBS} ${Boost_LIBRARIES} ${IMG_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
130 127
 target_link_libraries(adaptiveFR ${OpenCV_LIBS} ${Boost_LIBRARIES} ${IMG_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})

+ 8 - 8
README.md

@@ -21,30 +21,30 @@ We provide [two teaser sequences](http://www.cvlibs.net/projects/slow_flow/slow_
21 21
 	https://www.microsoft.com/en-us/download/details.aspx?id=52370&from=http%3A%2F%2Fresearch.microsoft.com%2Fen-us%2Fdownloads%2F389109f6-b4e8-404c-84bf-239f7cbf4e3d%2F
22 22
 
23 23
 	Download Piotr Dollar's toolbox
24
-	http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html
24
+	https://pdollar.github.io/toolbox/
25 25
 
26 26
 	Download Deep Matching 
27 27
 	(Optional: using coarse-to-fine by setting ‘deep_matching’ to 0 and ‘slow_flow_layers’  larger than 1)
28
-	http://lear.inrialpes.fr/people/revaud
28
+	http://lear.inrialpes.fr/src/deepmatching/
29 29
 	
30 30
 	Download flow-code from Middlebury OF dataset and compile ImageLib
31 31
 	http://vision.middlebury.edu/flow/code/flow-code.zip
32 32
 	
33
-	Download gco-v3.0 library
33
+	Download gco-v3.0 library (Multi-label optimization)
34 34
 	http://vision.csd.uwo.ca/code/
35 35
 
36 36
 	Download the tree-reweighted message passing algorithm (v1.3)
37
+	(You might need to modify instances.inc and change "template ..." to "template class ...")
37 38
 	https://www.microsoft.com/en-us/download/details.aspx?id=52499&from=http%3A%2F%2Fresearch.microsoft.com%2Fen-us%2Fdownloads%2Fdad6c31e-2c04-471f-b724-ded18bf70fe3%2F
38 39
 	
39 40
 	(Optional) Download Gunturk-Altunbasak-Mersereau Alternating Projections Image Demosaicking 
40
-	By setting ‘raw_demosaicing’ to 1 in the configuration file and uncommenting line 17 and 38 in configuration.h
41
+	By setting ‘raw_demosaicing’ to 1 in the configuration file, uncommenting line 25 and 26 in configuration.h and uncommenting line 13 in CMakeLists.txt
41 42
 	http://www.ipol.im/pub/art/2011/g_gapd/
42 43
 
43 44
 #### The paths to the libraries need to be specified in the following files:
44
-	configuration.h
45
-	configuration_epic.h
46
-	matlab/detect_edges.m
47
-	CMakeLists.txt 
45
+	CMakeLists.txt 			(lines 10-13)
46
+	configuration.h 			(lines 20-25)
47
+	matlab/detect_edges.m    (lines 3-5)
48 48
 
49 49
 #### Run cmake and make to compile the code
50 50
 	mkdir build

+ 24 - 1
adaptiveFR.cpp

@@ -4,6 +4,8 @@
4 4
  *  Created on: Sep 15, 2016
5 5
  *      Author: jjanai
6 6
  */
7
+#include "configuration.h"
8
+
7 9
 #include <fstream>
8 10
 #include <stdlib.h>
9 11
 #include <string.h>
@@ -26,7 +28,28 @@
26 28
 #include "epic_flow_extended/variational.h"
27 29
 #include "utils/utils.h"
28 30
 #include "utils/parameter_list.h"
29
-#include "configuration.h"
31
+
32
+// include Hamilton-Adams demosaicing
33
+extern "C"
34
+{
35
+#ifdef DMGUNTURK
36
+	#include DMGUNTURK_PATH(/dmha.h)
37
+#endif
38
+}
39
+
40
+// include flowcode (middlebury devkit)
41
+#include MIDDLEBURY_PATH(/colorcode.h)
42
+#include MIDDLEBURY_PATH(/flowIO.h)
43
+
44
+// include TRWS
45
+#include TRWS_PATH(/MRFEnergy.h)
46
+
47
+void HADemosaicing(float *Output, const float *Input, int Width, int Height, int RedX, int RedY) {
48
+#ifdef DMGUNTURK
49
+	HamiltonAdamsDemosaic(Output, Input, Width, Height, RedX, RedY); // Hamilton-Adams implemented by Pascal Getreuer
50
+#endif
51
+}
52
+
30 53
 
31 54
 using namespace std;
32 55
 using namespace cv;

+ 15 - 24
configuration.h

@@ -11,31 +11,22 @@
11 11
 #include <iostream>
12 12
 #include <string>
13 13
 
14
-// include Hamilton-Adams demosaicing
15
-extern "C"
16
-{
17
-//	#include "[SPECIFY PATH TO HAMILTON ADAMS DEMOSAICING]/dmha.h"
18
-}
19
-
20
-// include flowcode (middlebury devkit)
21
-#include "[SPECIFY PATH TO MIDDLEBURY DEVKIT]/cpp/colorcode.h"
22
-#include "[SPECIFY PATH TO MIDDLEBURY DEVKIT]/cpp/flowIO.h"
23
-
24
-// include TRWS
25
-#include "[SPECIFY PATH TO TRWS]/MRFEnergy.h"
26
-
27
-// path to deepmatching
28
-const string DEEPMATCHING_PATH = "[SPECIFY PATH TO DEEPMATCHING]/deepmatching/";
14
+#define IDENT(x) x
15
+#define XSTR(x) #x
16
+#define STR(x) XSTR(x)
17
+#define CONCAT(x,y) STR(IDENT(x)IDENT(y))
18
+
19
+//############################# PLEASE SPECIFY #############################
20
+const std::string DEEPMATCHING_PATH = "[SPECIFY PATH TO DEEP MATCHING]";					// DeepMatching
21
+#define MIDDLEBURY_PATH(file) 	CONCAT([SPECIFY PATH TO MIDDLEBURY DEVKIT], file)			// Middlebury Devkit
22
+#define GCO_PATH(file) 			CONCAT([SPECIFY PATH TO GRAPH CUT], file)	    			// Graph cut library
23
+#define TRWS_PATH(file) 		CONCAT([SPECIFY PATH TO TRWS], file)						// Tree-Reweigthed Message Passing
24
+//#define DMGUNTURK
25
+//#define DMGUNTURK_PATH(file) 	CONCAT([SPECIFY PATH TO HAMILTON ADAMS DEMOSAICING], file)	// Gunturk-Altunbasak-Mersereau Alternating Projections Image Demosaicking
26
+//############################# PLEASE SPECIFY #############################
29 27
 
30 28
 // source path
31
-const string SOURCE_FILE = __FILE__;
32
-const string SOURCE_PATH = SOURCE_FILE.substr(0, SOURCE_FILE.rfind("/") + 1);
33
-
34
-void HADemosaicing(float *Output, const float *Input, int Width, int Height, int RedX, int RedY) {
35
-//	HamiltonAdamsDemosaic(Output, Input, Width, Height, RedX, RedY); // Hamilton-Adams implemented by Pascal Getreuer
36
-}
37
-
38
-
39
-
29
+const std::string SOURCE_FILE = __FILE__;
30
+const std::string SOURCE_PATH = SOURCE_FILE.substr(0, SOURCE_FILE.rfind("/") + 1);
40 31
 
41 32
 #endif /* CONFIGURATION_H_ */

+ 0 - 15
configuration_epic.h

@@ -1,15 +0,0 @@
1
-/*
2
- * configuration_epic.h
3
- *
4
- *  Created on: Jul 15, 2017
5
- *      Author: jjanai
6
- */
7
-
8
-#ifndef CONFIGURATION_EPIC_H_
9
-#define CONFIGURATION_EPIC_H_
10
-
11
-// include graph cut library
12
-#include "[SPECIFY PATH TO GCO]/GCoptimization.h"
13
-
14
-
15
-#endif /* CONFIGURATION_EPIC_H_ */

+ 25 - 8
dense_tracking.cpp

@@ -4,6 +4,9 @@
4 4
  *  Created on: Mar 7, 2016
5 5
  *      Author: Janai
6 6
  */
7
+#include "configuration.h"
8
+
9
+
7 10
 #include <iostream>
8 11
 #include <fstream>
9 12
 #include <stdio.h>
@@ -14,10 +17,6 @@
14 17
 #include <set>
15 18
 
16 19
 #include <flann/flann.hpp>
17
-
18
-extern "C" {
19
-	#include "../libs/dmgunturk/dmha.h"
20
-}
21 20
 #include <chrono>
22 21
 
23 22
 #include <opencv2/core.hpp>
@@ -46,8 +45,28 @@ extern "C" {
46 45
 #include "penalty_functions/lorentzian.h"
47 46
 #include "penalty_functions/modified_l1_norm.h"
48 47
 #include "penalty_functions/quadratic_function.h"
49
-#include "configuration.h"
50 48
 
49
+// include Hamilton-Adams demosaicing
50
+extern "C"
51
+{
52
+#ifdef DMGUNTURK
53
+	#include DMGUNTURK_PATH(/dmha.h)
54
+#endif
55
+}
56
+
57
+// include flowcode (middlebury devkit)
58
+#include MIDDLEBURY_PATH(/colorcode.h)
59
+#include MIDDLEBURY_PATH(/flowIO.h)
60
+
61
+// include TRWS
62
+#include TRWS_PATH(/instances.h)
63
+#include TRWS_PATH(/MRFEnergy.h)
64
+
65
+void HADemosaicing(float *Output, const float *Input, int Width, int Height, int RedX, int RedY) {
66
+#ifdef DMGUNTURK
67
+	HamiltonAdamsDemosaic(Output, Input, Width, Height, RedX, RedY); // Hamilton-Adams implemented by Pascal Getreuer
68
+#endif
69
+}
51 70
 
52 71
 using namespace std;
53 72
 using namespace cv;
@@ -638,10 +657,8 @@ int main(int argc, char **argv) {
638 657
 
639 658
 	// discrete optimization set options
640 659
 	MRFEnergy<TypeGeneral>::Options options;
641
-	options.m_method = params.parameter<int>("acc_approach");  							// 0: TRW-S, 1: BP
642 660
 	options.m_eps = params.parameter<double>("acc_trws_eps");
643 661
 	options.m_iterMax = params.parameter<int>("acc_trws_max_iter");
644
-	options.m_verbosityLevel = params.verbosity(VER_CMD);
645 662
 	options.m_printIter = 1;
646 663
 	options.m_printMinIter = 0;
647 664
 
@@ -1798,7 +1815,7 @@ int main(int argc, char **argv) {
1798 1815
 
1799 1816
 			mrf->SetAutomaticOrdering();
1800 1817
 
1801
-			if (options.m_method == 0) {
1818
+			if (params.parameter<int>("acc_approach") == 0) {
1802 1819
 				mrf->Minimize_TRW_S(options, lowerBound, energy);
1803 1820
 
1804 1821
 				time(&opt_end);

+ 4 - 1
epic_flow_extended/variational_aux_mt.h

@@ -1,13 +1,16 @@
1 1
 #ifndef __VARIATIONAL_AUX_H_
2 2
 #define __VARIATIONAL_AUX_H_
3 3
 
4
+#include "../configuration.h"
5
+
4 6
 #include <stdlib.h>
5 7
 #include "image.h"
6 8
 
7 9
 #include "../penalty_functions/penalty_function.h"
8 10
 #include "../penalty_functions/modified_l1_norm.h"
9 11
 
10
-#include "../configuration_epic.h"
12
+// include graph cut library
13
+#include GCO_PATH(/GCoptimization.h)
11 14
 
12 15
 #include <vector>
13 16
 #include <xmmintrin.h>

+ 2 - 0
matlab/detect_edges.m

@@ -1,7 +1,9 @@
1 1
 function detect_edges( img1, output_edges )
2
+	% ############################# PLEASE SPECIFY ############################# 
2 3
 	addpath('[SPECIFY PATH TO STRUCTURED EDGE DETECTION TOOLBOX]');
3 4
 	addpath(genpath('[SPECIFY PATH TO PIOTR TOOLBOX]')); 
4 5
 	load('[SPECIFY PATH TO SLOW FLOW RELEASE]/epic_flow_extended/modelFinal.mat'); 
6
+	% ############################# PLEASE SPECIFY ############################# 
5 7
     
6 8
 	% load first image, convert it to 8 bit unsigned and scale it
7 9
 	I = imread(img1); 

+ 23 - 1
slow_flow.cpp

@@ -4,6 +4,8 @@
4 4
  *  Created on: Mar 7, 2016
5 5
  *      Author: Janai
6 6
  */
7
+#include "configuration.h"
8
+
7 9
 #include <fstream>
8 10
 #include <stdlib.h>
9 11
 #include <string.h>
@@ -25,7 +27,27 @@
25 27
 #include "epic_flow_extended/variational_mt.h"
26 28
 #include "utils/utils.h"
27 29
 #include "utils/parameter_list.h"
28
-#include "configuration.h"
30
+
31
+// include Hamilton-Adams demosaicing
32
+extern "C"
33
+{
34
+#ifdef DMGUNTURK
35
+	#include DMGUNTURK_PATH(/dmha.h)
36
+#endif
37
+}
38
+
39
+// include flowcode (middlebury devkit)
40
+#include MIDDLEBURY_PATH(/colorcode.h)
41
+#include MIDDLEBURY_PATH(/flowIO.h)
42
+
43
+// include TRWS
44
+#include TRWS_PATH(/MRFEnergy.h)
45
+
46
+void HADemosaicing(float *Output, const float *Input, int Width, int Height, int RedX, int RedY) {
47
+#ifdef DMGUNTURK
48
+	HamiltonAdamsDemosaic(Output, Input, Width, Height, RedX, RedY); // Hamilton-Adams implemented by Pascal Getreuer
49
+#endif
50
+}
29 51
 
30 52
 using namespace std;
31 53
 using namespace cv;

+ 5 - 2
utils/utils.h

@@ -8,6 +8,8 @@
8 8
 #ifndef EPIC_UTILS_H_
9 9
 #define EPIC_UTILS_H_
10 10
 
11
+#include "../configuration.h"
12
+
11 13
 #include <stdexcept>      // std::out_of_range
12 14
 #include <iostream>
13 15
 #include <fstream>
@@ -24,8 +26,9 @@
24 26
 #include "../epic_flow_extended/image.h"
25 27
 #include "../epic_flow_extended/io.h"
26 28
 
27
-#include "../../libs/middlebury_devkit/cpp/flowIO.h"
28
-#include "../../libs/middlebury_devkit/cpp/colorcode.h"
29
+// include flowcode (middlebury devkit)
30
+#include MIDDLEBURY_PATH(/colorcode.h)
31
+#include MIDDLEBURY_PATH(/flowIO.h)
29 32
 
30 33
 using namespace cv;
31 34
 using namespace std;