Hey,
I have troubles with building the project:
here is my error:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:65:95: error: stray ‘\302’ in program
65 | void save_maximum(const std::string &filename, const std::vector<std::array<int, 2>> &indexes)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:65:96: error: stray ‘\240’ in program
65 | void save_maximum(const std::string &filename, const std::vector<std::array<int, 2>> &indexes)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:78:93: error: stray ‘\302’ in program
78 | void save_pairs(const std::string &filename, const std::vector<std::array<float, 4>> &pairs)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:78:94: error: stray ‘\240’ in program
78 | void save_pairs(const std::string &filename, const std::vector<std::array<float, 4>> &pairs)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:92:100: error: stray ‘\302’ in program
92 | le(const std::string &filename, const std::vector<std::array<int, 8>> &rectangles)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:92:101: error: stray ‘\240’ in program
92 | e(const std::string &filename, const std::vector<std::array<int, 8>> &rectangles)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:108:87: error: stray ‘\302’ in program
108 | void save_rectangle(const std::string &filename, const std::array<int, 8> &rectangles)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:108:88: error: stray ‘\240’ in program
108 | void save_rectangle(const std::string &filename, const std::array<int, 8> &rectangles)��{
| ^
In file included from /home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:1:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:19:37: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
19 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, Eigen::MatrixXf &gray, const int &x,
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:7:1: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
6 | #include
+++ |+#include
7 |
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:19:47: error: expected ‘,’ or ‘...’ before ‘<’ token
19 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, Eigen::MatrixXf &gray, const int &x,
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:31:31: error: ‘std::unique_ptr’ has not been declared
31 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size);
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:31:41: error: expected ‘,’ or ‘...’ before ‘<’ token
31 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size);
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:15:37: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
15 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, MatrixXf &gray, const int &x, const int &y) {
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:9:1: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
8 | #include "stb_image_write.h"
+++ |+#include
9 | #include "string"
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:15:47: error: expected ‘,’ or ‘...’ before ‘<’ token
15 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, MatrixXf &gray, const int &x, const int &y) {
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘void eigen_io::convert_RawBuff2Mat(int)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:16:20: error: ‘x’ was not declared in this scope; did you mean ‘nx’?
16 | const int nx = x;
| ^
| nx
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:17:20: error: ‘y’ was not declared in this scope; did you mean ‘ny’?
17 | const int ny = y;
| ^
| ny
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:20:17: error: ‘data’ was not declared in this scope
20 | MapType img(data.get(), y, x);
| ^~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:21:5: error: ‘gray’ was not declared in this scope
21 | gray = img.cast();
| ^~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: At global scope:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:26:31: error: ‘std::unique_ptr’ has not been declared
26 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size) {
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:26:41: error: expected ‘,’ or ‘...’ before ‘<’ token
26 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size) {
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘void eigen_io::convert_Mat2RawBuff(const Eigen::Matrix<float, -1, -1, 1>&, int)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:28:25: error: ‘size’ was not declared in this scope; did you mean ‘dysize’?
28 | for (int i = 0; i < size; ++i) {
| ^~~~
| dysize
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:29:9: error: ‘gray_UC’ was not declared in this scope; did you mean ‘gray’?
29 | gray_UC[i] = static_cast(round(*(gray.data() + i)));
| ^~~~~~~
| gray
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘int eigen_io::save_image(Eigen::Matrix<float, -1, -1, 1>&, const string&, const int&, const int&, const int&)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:41:10: error: ‘unique_ptr’ is not a member of ‘std’
41 | std::unique_ptr<unsigned char[]> gray_UC_hough(new unsigned char[size]);
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:41:10: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:41:21: error: expected primary-expression before ‘unsigned’
41 | std::unique_ptr<unsigned char[]> gray_UC_hough(new unsigned char[size]);
| ^~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:42:30: error: ‘gray_UC_hough’ was not declared in this scope
42 | convert_Mat2RawBuff(img, gray_UC_hough, size);
| ^~~~~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘Eigen::MatrixXf eigen_io::read_image(const string&)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:51:10: error: ‘unique_ptr’ is not a member of ‘std’
51 | std::unique_ptr<unsigned char[]> data(stbi_load(filename.c_str(), &x, &y, &n, 0));
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:51:10: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:51:21: error: expected primary-expression before ‘unsigned’
51 | std::unique_ptr<unsigned char[]> data(stbi_load(filename.c_str(), &x, &y, &n, 0));
| ^~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:53:9: error: ‘data’ was not declared in this scope
53 | if (data == NULL) {
| ^~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:59:25: error: ‘data’ was not declared in this scope
59 | convert_RawBuff2Mat(data, img, x, y);
| ^~~~
make[2]: *** [CMakeFiles/hough_lib.dir/build.make:102: CMakeFiles/hough_lib.dir/src/io.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:310: CMakeFiles/hough_lib.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Hey,
I have troubles with building the project:
here is my error:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:65:95: error: stray ‘\302’ in program
65 | void save_maximum(const std::string &filename, const std::vector<std::array<int, 2>> &indexes)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:65:96: error: stray ‘\240’ in program
65 | void save_maximum(const std::string &filename, const std::vector<std::array<int, 2>> &indexes)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:78:93: error: stray ‘\302’ in program
78 | void save_pairs(const std::string &filename, const std::vector<std::array<float, 4>> &pairs)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:78:94: error: stray ‘\240’ in program
78 | void save_pairs(const std::string &filename, const std::vector<std::array<float, 4>> &pairs)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:92:100: error: stray ‘\302’ in program
92 | le(const std::string &filename, const std::vector<std::array<int, 8>> &rectangles)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:92:101: error: stray ‘\240’ in program
92 | e(const std::string &filename, const std::vector<std::array<int, 8>> &rectangles)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:108:87: error: stray ‘\302’ in program
108 | void save_rectangle(const std::string &filename, const std::array<int, 8> &rectangles)��{
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:108:88: error: stray ‘\240’ in program
108 | void save_rectangle(const std::string &filename, const std::array<int, 8> &rectangles)��{
| ^
In file included from /home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:1:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:19:37: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
19 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, Eigen::MatrixXf &gray, const int &x,
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:7:1: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
6 | #include
+++ |+#include
7 |
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:19:47: error: expected ‘,’ or ‘...’ before ‘<’ token
19 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, Eigen::MatrixXf &gray, const int &x,
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:31:31: error: ‘std::unique_ptr’ has not been declared
31 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size);
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/include/io.hpp:31:41: error: expected ‘,’ or ‘...’ before ‘<’ token
31 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size);
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:15:37: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
15 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, MatrixXf &gray, const int &x, const int &y) {
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:9:1: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
8 | #include "stb_image_write.h"
+++ |+#include
9 | #include "string"
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:15:47: error: expected ‘,’ or ‘...’ before ‘<’ token
15 | void convert_RawBuff2Mat(const std::unique_ptr<unsigned char[]> &data, MatrixXf &gray, const int &x, const int &y) {
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘void eigen_io::convert_RawBuff2Mat(int)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:16:20: error: ‘x’ was not declared in this scope; did you mean ‘nx’?
16 | const int nx = x;
| ^
| nx
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:17:20: error: ‘y’ was not declared in this scope; did you mean ‘ny’?
17 | const int ny = y;
| ^
| ny
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:20:17: error: ‘data’ was not declared in this scope
20 | MapType img(data.get(), y, x);
| ^~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:21:5: error: ‘gray’ was not declared in this scope
21 | gray = img.cast();
| ^~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: At global scope:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:26:31: error: ‘std::unique_ptr’ has not been declared
26 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size) {
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:26:41: error: expected ‘,’ or ‘...’ before ‘<’ token
26 | std::unique_ptr<unsigned char[]> &gray_UC, const int &size) {
| ^
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘void eigen_io::convert_Mat2RawBuff(const Eigen::Matrix<float, -1, -1, 1>&, int)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:28:25: error: ‘size’ was not declared in this scope; did you mean ‘dysize’?
28 | for (int i = 0; i < size; ++i) {
| ^~~~
| dysize
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:29:9: error: ‘gray_UC’ was not declared in this scope; did you mean ‘gray’?
29 | gray_UC[i] = static_cast(round(*(gray.data() + i)));
| ^~~~~~~
| gray
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘int eigen_io::save_image(Eigen::Matrix<float, -1, -1, 1>&, const string&, const int&, const int&, const int&)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:41:10: error: ‘unique_ptr’ is not a member of ‘std’
41 | std::unique_ptr<unsigned char[]> gray_UC_hough(new unsigned char[size]);
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:41:10: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:41:21: error: expected primary-expression before ‘unsigned’
41 | std::unique_ptr<unsigned char[]> gray_UC_hough(new unsigned char[size]);
| ^~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:42:30: error: ‘gray_UC_hough’ was not declared in this scope
42 | convert_Mat2RawBuff(img, gray_UC_hough, size);
| ^~~~~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp: In function ‘Eigen::MatrixXf eigen_io::read_image(const string&)’:
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:51:10: error: ‘unique_ptr’ is not a member of ‘std’
51 | std::unique_ptr<unsigned char[]> data(stbi_load(filename.c_str(), &x, &y, &n, 0));
| ^~~~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:51:10: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:51:21: error: expected primary-expression before ‘unsigned’
51 | std::unique_ptr<unsigned char[]> data(stbi_load(filename.c_str(), &x, &y, &n, 0));
| ^~~~~~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:53:9: error: ‘data’ was not declared in this scope
53 | if (data == NULL) {
| ^~~~
/home/niklas/Desktop/conbotics/testing_libs/HoughRectangle/src/io.cpp:59:25: error: ‘data’ was not declared in this scope
59 | convert_RawBuff2Mat(data, img, x, y);
| ^~~~
make[2]: *** [CMakeFiles/hough_lib.dir/build.make:102: CMakeFiles/hough_lib.dir/src/io.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:310: CMakeFiles/hough_lib.dir/all] Error 2
make: *** [Makefile:141: all] Error 2