Skip to content

Commit

Permalink
read calib and convert to camera coords
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterlew committed Aug 25, 2018
1 parent c473574 commit 5273b91
Show file tree
Hide file tree
Showing 42 changed files with 419,144 additions and 63 deletions.
Binary file modified stereo_matching.sdf
Binary file not shown.
Binary file modified stereo_matching.v12.suo
Binary file not shown.
6 changes: 2 additions & 4 deletions stereo_matching/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void Solver::Show_disp()
ptr[j] = INVALID_DISP;
}
}
imwrite("example/disp_grey.png", disp);

// convert to RGB for better observation
Colormap();
Expand All @@ -67,10 +68,7 @@ void Solver::Show_disp()

namedWindow("disp_map", 1);
imshow("disp_map", debug_view);
//imwrite("example/result_sgm.jpeg", debug_view);
//imwrite("example/result_sgm.png", debug_view);
//imwrite("example/uni_sgm.png", debug_view);
imwrite("example/test.png", debug_view);
imwrite("example/disp_rgb.png", debug_view);

waitKey();
destroyWindow("disp_map");
Expand Down
4 changes: 4 additions & 0 deletions stereo_matching/Solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class Solver
void Build_dsi();
void Find_dsi_mean_max();
void Colormap();
Mat get_disp() const
{
return disp;
}
virtual ~Solver();

protected:
Expand Down
4 changes: 4 additions & 0 deletions stereo_matching/example/calib_0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
P0: 7.215377e+02 0.000000e+00 6.095593e+02 0.000000e+00 0.000000e+00 7.215377e+02 1.728540e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00
P1: 7.215377e+02 0.000000e+00 6.095593e+02 -3.875744e+02 0.000000e+00 7.215377e+02 1.728540e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00
P2: 7.215377e+02 0.000000e+00 6.095593e+02 4.485728e+01 0.000000e+00 7.215377e+02 1.728540e+02 2.163791e-01 0.000000e+00 0.000000e+00 1.000000e+00 2.745884e-03
P3: 7.215377e+02 0.000000e+00 6.095593e+02 -3.395242e+02 0.000000e+00 7.215377e+02 1.728540e+02 2.199936e+00 0.000000e+00 0.000000e+00 1.000000e+00 2.729905e-03
4 changes: 4 additions & 0 deletions stereo_matching/example/calib_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
P0: 7.188560e+02 0.000000e+00 6.071928e+02 0.000000e+00 0.000000e+00 7.188560e+02 1.852157e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00
P1: 7.188560e+02 0.000000e+00 6.071928e+02 -3.861448e+02 0.000000e+00 7.188560e+02 1.852157e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00
P2: 7.188560e+02 0.000000e+00 6.071928e+02 4.538225e+01 0.000000e+00 7.188560e+02 1.852157e+02 -1.130887e-01 0.000000e+00 0.000000e+00 1.000000e+00 3.779761e-03
P3: 7.188560e+02 0.000000e+00 6.071928e+02 -3.372877e+02 0.000000e+00 7.188560e+02 1.852157e+02 2.369057e+00 0.000000e+00 0.000000e+00 1.000000e+00 4.915215e-03
Binary file added stereo_matching/example/disp_grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added stereo_matching/example/disp_grey_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added stereo_matching/example/disp_grey_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added stereo_matching/example/left_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added stereo_matching/example/left_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5273b91

Please sign in to comment.