Skip to content

Commit ebdb728

Browse files
committed
Initial commit
0 parents  commit ebdb728

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+5700
-0
lines changed

CMakeLists.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cmake_minimum_required(VERSION 2.8.11)
2+
project(CALIB_CAM)
3+
4+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
5+
6+
find_package(OpenCV REQUIRED)
7+
include_directories($(OpenCV_INCLUDE_DIRS))
8+
9+
10+
11+
add_executable(calculate_rectification calculate_rectification.cpp)
12+
target_link_libraries(calculate_rectification ${OpenCV_LIBS} "-lpopt")

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Stereo calibration parameter converter from Matlab to Opencv
2+
3+
This repository converts the parameters used for OpenCV and ROS to the results of performing stereo calibration in matlab.
4+
5+
### Maintainer
6+
7+
- JinyongJeong
8+
9+
### Dependencies
10+
11+
- OpenCV
12+
13+
### Compilation
14+
15+
Compile all the files using the following commands.
16+
17+
```bash
18+
mkdir build && cd build
19+
cmake ..
20+
make
21+
```
22+
23+
### Run
24+
25+
Run the `matlab_calib_2_opencv.m` file with the calibration results from Matlab stored in the `stereoParams`.
26+
27+
The final result is stored in the `calib_result` folder as `left.yaml`, `right.yaml`.
28+
29+

build/CMakeCache.txt

+311
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,311 @@
1+
# This is the CMakeCache file.
2+
# For build in directory: /home/irap/git/stereo-calibration/build
3+
# It was generated by CMake: /usr/bin/cmake
4+
# You can edit this file to change values found and used by cmake.
5+
# If you do not want to change any of the values, simply exit the editor.
6+
# If you do want to change a value, simply edit, save, and exit the editor.
7+
# The syntax for the file is as follows:
8+
# KEY:TYPE=VALUE
9+
# KEY is the name of a variable in the cache.
10+
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
11+
# VALUE is the current value for the KEY.
12+
13+
########################
14+
# EXTERNAL cache entries
15+
########################
16+
17+
//Value Computed by CMake
18+
CALIB_CAM_BINARY_DIR:STATIC=/home/irap/git/stereo-calibration/build
19+
20+
//Value Computed by CMake
21+
CALIB_CAM_SOURCE_DIR:STATIC=/home/irap/git/stereo-calibration
22+
23+
//Path to a program.
24+
CMAKE_AR:FILEPATH=/usr/bin/ar
25+
26+
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
27+
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
28+
CMAKE_BUILD_TYPE:STRING=
29+
30+
//Enable/Disable color output during build.
31+
CMAKE_COLOR_MAKEFILE:BOOL=ON
32+
33+
//CXX compiler
34+
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
35+
36+
//Flags used by the compiler during all build types.
37+
CMAKE_CXX_FLAGS:STRING=
38+
39+
//Flags used by the compiler during debug builds.
40+
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
41+
42+
//Flags used by the compiler during release builds for minimum
43+
// size.
44+
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
45+
46+
//Flags used by the compiler during release builds.
47+
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
48+
49+
//Flags used by the compiler during release builds with debug info.
50+
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
51+
52+
//C compiler
53+
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
54+
55+
//Flags used by the compiler during all build types.
56+
CMAKE_C_FLAGS:STRING=
57+
58+
//Flags used by the compiler during debug builds.
59+
CMAKE_C_FLAGS_DEBUG:STRING=-g
60+
61+
//Flags used by the compiler during release builds for minimum
62+
// size.
63+
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
64+
65+
//Flags used by the compiler during release builds.
66+
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
67+
68+
//Flags used by the compiler during release builds with debug info.
69+
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
70+
71+
//Flags used by the linker.
72+
CMAKE_EXE_LINKER_FLAGS:STRING=
73+
74+
//Flags used by the linker during debug builds.
75+
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
76+
77+
//Flags used by the linker during release minsize builds.
78+
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
79+
80+
//Flags used by the linker during release builds.
81+
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
82+
83+
//Flags used by the linker during Release with Debug Info builds.
84+
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
85+
86+
//Enable/Disable output of compile commands during generation.
87+
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
88+
89+
//Install path prefix, prepended onto install directories.
90+
CMAKE_INSTALL_PREFIX:PATH=/usr/local
91+
92+
//Path to a program.
93+
CMAKE_LINKER:FILEPATH=/usr/bin/ld
94+
95+
//Path to a program.
96+
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
97+
98+
//Flags used by the linker during the creation of modules.
99+
CMAKE_MODULE_LINKER_FLAGS:STRING=
100+
101+
//Flags used by the linker during debug builds.
102+
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
103+
104+
//Flags used by the linker during release minsize builds.
105+
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
106+
107+
//Flags used by the linker during release builds.
108+
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
109+
110+
//Flags used by the linker during Release with Debug Info builds.
111+
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
112+
113+
//Path to a program.
114+
CMAKE_NM:FILEPATH=/usr/bin/nm
115+
116+
//Path to a program.
117+
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
118+
119+
//Path to a program.
120+
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
121+
122+
//Value Computed by CMake
123+
CMAKE_PROJECT_NAME:STATIC=CALIB_CAM
124+
125+
//Path to a program.
126+
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
127+
128+
//Flags used by the linker during the creation of dll's.
129+
CMAKE_SHARED_LINKER_FLAGS:STRING=
130+
131+
//Flags used by the linker during debug builds.
132+
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
133+
134+
//Flags used by the linker during release minsize builds.
135+
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
136+
137+
//Flags used by the linker during release builds.
138+
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
139+
140+
//Flags used by the linker during Release with Debug Info builds.
141+
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
142+
143+
//If set, runtime paths are not added when installing shared libraries,
144+
// but are added when building.
145+
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
146+
147+
//If set, runtime paths are not added when using shared libraries.
148+
CMAKE_SKIP_RPATH:BOOL=NO
149+
150+
//Flags used by the linker during the creation of static libraries.
151+
CMAKE_STATIC_LINKER_FLAGS:STRING=
152+
153+
//Flags used by the linker during debug builds.
154+
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
155+
156+
//Flags used by the linker during release minsize builds.
157+
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
158+
159+
//Flags used by the linker during release builds.
160+
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
161+
162+
//Flags used by the linker during Release with Debug Info builds.
163+
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
164+
165+
//Path to a program.
166+
CMAKE_STRIP:FILEPATH=/usr/bin/strip
167+
168+
//If this value is on, makefiles will be generated without the
169+
// .SILENT directive, and all commands will be echoed to the console
170+
// during the make. This is useful for debugging only. With Visual
171+
// Studio IDE projects all commands are done without /nologo.
172+
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
173+
174+
//The directory containing a CMake configuration file for OpenCV.
175+
OpenCV_DIR:PATH=/opt/ros/kinetic/share/OpenCV-3.3.1-dev
176+
177+
178+
########################
179+
# INTERNAL cache entries
180+
########################
181+
182+
//ADVANCED property for variable: CMAKE_AR
183+
CMAKE_AR-ADVANCED:INTERNAL=1
184+
//This is the directory where this CMakeCache.txt was created
185+
CMAKE_CACHEFILE_DIR:INTERNAL=/home/irap/git/stereo-calibration/build
186+
//Major version of cmake used to create the current loaded cache
187+
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
188+
//Minor version of cmake used to create the current loaded cache
189+
CMAKE_CACHE_MINOR_VERSION:INTERNAL=5
190+
//Patch version of cmake used to create the current loaded cache
191+
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
192+
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
193+
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
194+
//Path to CMake executable.
195+
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
196+
//Path to cpack program executable.
197+
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
198+
//Path to ctest program executable.
199+
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
200+
//ADVANCED property for variable: CMAKE_CXX_COMPILER
201+
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
202+
//ADVANCED property for variable: CMAKE_CXX_FLAGS
203+
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
204+
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
205+
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
206+
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
207+
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
208+
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
209+
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
210+
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
211+
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
212+
//ADVANCED property for variable: CMAKE_C_COMPILER
213+
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
214+
//ADVANCED property for variable: CMAKE_C_FLAGS
215+
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
216+
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
217+
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
218+
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
219+
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
220+
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
221+
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
222+
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
223+
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
224+
//Path to cache edit program executable.
225+
CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake
226+
//Executable file format
227+
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
228+
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
229+
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
230+
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
231+
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
232+
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
233+
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
234+
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
235+
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
236+
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
237+
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
238+
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
239+
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
240+
//Name of external makefile project generator.
241+
CMAKE_EXTRA_GENERATOR:INTERNAL=
242+
//Name of generator.
243+
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
244+
//Name of generator platform.
245+
CMAKE_GENERATOR_PLATFORM:INTERNAL=
246+
//Name of generator toolset.
247+
CMAKE_GENERATOR_TOOLSET:INTERNAL=
248+
//Source directory with the top level CMakeLists.txt file for this
249+
// project
250+
CMAKE_HOME_DIRECTORY:INTERNAL=/home/irap/git/stereo-calibration
251+
//Install .so files without execute permission.
252+
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
253+
//ADVANCED property for variable: CMAKE_LINKER
254+
CMAKE_LINKER-ADVANCED:INTERNAL=1
255+
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
256+
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
257+
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
258+
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
259+
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
260+
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
261+
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
262+
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
263+
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
264+
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
265+
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
266+
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
267+
//ADVANCED property for variable: CMAKE_NM
268+
CMAKE_NM-ADVANCED:INTERNAL=1
269+
//number of local generators
270+
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
271+
//ADVANCED property for variable: CMAKE_OBJCOPY
272+
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
273+
//ADVANCED property for variable: CMAKE_OBJDUMP
274+
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
275+
//ADVANCED property for variable: CMAKE_RANLIB
276+
CMAKE_RANLIB-ADVANCED:INTERNAL=1
277+
//Path to CMake installation.
278+
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5
279+
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
280+
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
281+
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
282+
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
283+
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
284+
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
285+
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
286+
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
287+
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
288+
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
289+
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
290+
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
291+
//ADVANCED property for variable: CMAKE_SKIP_RPATH
292+
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
293+
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
294+
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
295+
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
296+
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
297+
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
298+
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
299+
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
300+
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
301+
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
302+
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
303+
//ADVANCED property for variable: CMAKE_STRIP
304+
CMAKE_STRIP-ADVANCED:INTERNAL=1
305+
//uname command
306+
CMAKE_UNAME:INTERNAL=/bin/uname
307+
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
308+
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
309+
//Details about finding OpenCV
310+
FIND_PACKAGE_MESSAGE_DETAILS_OpenCV:INTERNAL=[/opt/ros/kinetic][v3.3.1()]
311+

0 commit comments

Comments
 (0)