├── .gitignore
├── example
├── run_example.sh
└── download_dataset.sh
├── src
├── visualizer
│ ├── shaders
│ │ ├── render_points.frag
│ │ ├── colored_vertices.frag
│ │ ├── render_points.vert
│ │ ├── draw_mesh.vert
│ │ ├── colored_vertices.vert
│ │ └── draw_mesh.frag
│ ├── visualizer.h
│ └── visualizer.cpp
├── fastcd
│ ├── shaders
│ │ ├── project_mesh.frag
│ │ └── project_mesh.vert
│ ├── image_region.h
│ ├── image.cpp
│ ├── regions_matcher.h
│ ├── depth_projector.h
│ ├── image_sequence.cpp
│ ├── depth_projector.cpp
│ ├── point_covariance2d.cpp
│ ├── image.h
│ ├── image_sequence.h
│ ├── change_detector.h
│ ├── regions_matcher_hist.h
│ ├── point_covariance3d.h
│ ├── point_covariance2d.h
│ ├── point_covariance3d.cpp
│ ├── regions3d_projector.h
│ ├── change_detector.cpp
│ ├── mesh.h
│ ├── camera.h
│ ├── processed_image.h
│ ├── camera.cpp
│ ├── mesh.cpp
│ ├── regions3d_projector.cpp
│ ├── regions_matcher_hist.cpp
│ └── processed_image.cpp
├── utils
│ ├── obj_reader.h
│ └── obj_reader.cpp
└── example.cpp
├── package.xml
├── .gitlab-ci.yml
├── LICENSE.txt
├── .clang-format
├── CMakeLists.txt
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | docs/
--------------------------------------------------------------------------------
/example/run_example.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ../bin/fastcd_example dataset/statue
--------------------------------------------------------------------------------
/src/visualizer/shaders/render_points.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 |
3 | out vec4 color;
4 |
5 | void main() {
6 | color = vec4(1.0, 0.0, 0.0, 1.0);
7 | }
--------------------------------------------------------------------------------
/src/visualizer/shaders/colored_vertices.frag:
--------------------------------------------------------------------------------
1 | #version 330 core
2 |
3 | in vec4 vertexColor;
4 |
5 | out vec4 color;
6 |
7 | void main() {
8 | color = vertexColor;
9 | }
--------------------------------------------------------------------------------
/src/fastcd/shaders/project_mesh.frag:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | in vec4 pos;
4 | out vec4 pos_out;
5 |
6 | void main() {
7 | pos_out = vec4(pos.xyz, 1.0); // that's it! position and valid flag.
8 | }
9 |
--------------------------------------------------------------------------------
/example/download_dataset.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | mkdir dataset
4 |
5 | wget http://www.ipb.uni-bonn.de/html/projects/changedetection2017/changedetection2017.zip -O dataset/changedetection2017.zip
6 |
7 | unzip dataset/changedetection2017 -d dataset
8 | rm dataset/changedetection2017.zip
--------------------------------------------------------------------------------
/src/visualizer/shaders/render_points.vert:
--------------------------------------------------------------------------------
1 | #version 330 core
2 |
3 | layout (location = 0) in vec2 texCoords;
4 |
5 | uniform sampler2D texOutput;
6 | uniform mat4 mvp;
7 |
8 | void main() {
9 | gl_Position = vec4(10,10,10,1.0); // invalid NDC
10 |
11 | vec4 point = texture(texOutput, texCoords);
12 | if(point.w > 0.5) {
13 | gl_Position = mvp * point;
14 | }
15 | }
--------------------------------------------------------------------------------
/src/fastcd/shaders/project_mesh.vert:
--------------------------------------------------------------------------------
1 | #version 330 core
2 |
3 | layout (location = 0) in vec4 position_in;
4 |
5 | uniform mat4 mvp; // model-view-projection matrix. (applied p*v*m)
6 |
7 | out vec4 pos; // this will be linearly interpolated between the three triangle corners.
8 |
9 | void main() {
10 | gl_Position = mvp * position_in; // this must be in NDC.
11 | pos = position_in;
12 | }
13 |
--------------------------------------------------------------------------------
/src/visualizer/shaders/draw_mesh.vert:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | layout (location = 0) in vec4 position_in;
4 | layout (location = 1) in vec4 normal_in;
5 |
6 | uniform mat4 model_mat; // model matrix.
7 | uniform mat4 normal_mat; // transformation of normals to world coordinates.
8 | uniform mat4 mvp; // model-view-projection matrix. (applied p*v*m)
9 |
10 | out vec4 pos;
11 | out vec4 normal;
12 |
13 | void main() {
14 | gl_Position = mvp * position_in;
15 | pos = model_mat * position_in;
16 | normal = normal_mat * normal_in;
17 | }
--------------------------------------------------------------------------------
/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | fast_change_detection
4 | 0.0.1
5 | The fast_change_detection package
6 |
7 | Emanuele Palazzolo
8 |
9 | FreeBSD
10 |
11 | catkin
12 | glow
13 | glow
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/visualizer/shaders/colored_vertices.vert:
--------------------------------------------------------------------------------
1 | #version 330 core
2 |
3 | layout (location = 0) in vec4 position_color;
4 |
5 | uniform mat4 mvp;
6 |
7 | out vec4 vertexColor;
8 |
9 | uniform bool useCustomColor;
10 | uniform vec4 customColor;
11 |
12 | vec4 decodeColor(float c) {
13 | vec4 col;
14 | col.x = float(int(c) >> 16 & 0xFF) / 255.0f;
15 | col.y = float(int(c) >> 8 & 0xFF) / 255.0f;
16 | col.z = float(int(c) & 0xFF) / 255.0f;
17 | col.w = 1.0f;
18 | return col;
19 | }
20 |
21 | void main()
22 | {
23 | gl_Position = mvp * vec4(position_color.xyz, 1.0);
24 | vertexColor = decodeColor(position_color.w);
25 | if(useCustomColor) vertexColor = customColor;
26 | }
--------------------------------------------------------------------------------
/src/fastcd/image_region.h:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Emanuele Palazzolo (emanuele.palazzolo@uni-bonn.de), Cyrill Stachniss, University of Bonn
2 | #pragma once
3 | #include
4 | #include
5 |
6 | namespace fastcd {
7 |
8 | /**
9 | * @brief Class that represents a labeled region.
10 | */
11 | class ImageRegion {
12 | public:
13 | /**
14 | * @brief Constructor.
15 | *
16 | * @param[in] contour The contour of the region
17 | */
18 | explicit ImageRegion(std::vector contour)
19 | : contour_(contour) {}
20 |
21 | /** The points describing the contour of the region */
22 | std::vector contour_;
23 |
24 | /** The label of the region */
25 | int label_ = -1;
26 | };
27 |
28 | } // namespace fastcd
29 |
--------------------------------------------------------------------------------
/src/utils/obj_reader.h:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Jens Behley (jens.behley@igg.uni-bonn.de), Cyrill Stachniss, University of Bonn
2 | #pragma once
3 |
4 | #include