-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into feature/add_githu…
…b_actions
- Loading branch information
Showing
55 changed files
with
512 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"editor.tabSize": 2, | ||
"C_Cpp.vcFormat.indent.braces": false, | ||
"C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "sameLine", | ||
"C_Cpp.vcFormat.newLine.beforeOpenBrace.namespace": "newLine", | ||
"C_Cpp.vcFormat.newLine.beforeOpenBrace.type": "newLine", | ||
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyFunction": true, | ||
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType": true, | ||
"C_Cpp.vcFormat.space.beforeInitializerListOpenBrace": true, | ||
"C_Cpp.vcFormat.space.betweenEmptyBraces": true, | ||
"C_Cpp.clang_format_style": "Visual Studio", | ||
"C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "newLine", | ||
"C_Cpp.vcFormat.space.pointerReferenceAlignment": "right", | ||
"C_Cpp.vcFormat.space.beforeEmptySquareBrackets": true, | ||
"C_Cpp.vcFormat.space.beforeOpenSquareBracket": false, | ||
"files.associations": { | ||
"bitset": "cpp", | ||
"optional": "cpp", | ||
"iosfwd": "cpp", | ||
"__bit_reference": "cpp", | ||
"__bits": "cpp", | ||
"__config": "cpp", | ||
"__debug": "cpp", | ||
"__errc": "cpp", | ||
"__hash_table": "cpp", | ||
"__locale": "cpp", | ||
"__mutex_base": "cpp", | ||
"__node_handle": "cpp", | ||
"__split_buffer": "cpp", | ||
"__threading_support": "cpp", | ||
"__tuple": "cpp", | ||
"__verbose_abort": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"bit": "cpp", | ||
"cctype": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"complex": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"deque": "cpp", | ||
"exception": "cpp", | ||
"fstream": "cpp", | ||
"initializer_list": "cpp", | ||
"iomanip": "cpp", | ||
"ios": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"locale": "cpp", | ||
"memory": "cpp", | ||
"mutex": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"ratio": "cpp", | ||
"sstream": "cpp", | ||
"stack": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"system_error": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"typeinfo": "cpp", | ||
"unordered_map": "cpp", | ||
"variant": "cpp", | ||
"vector": "cpp", | ||
"__nullptr": "cpp", | ||
"__string": "cpp", | ||
"chrono": "cpp", | ||
"compare": "cpp", | ||
"concepts": "cpp", | ||
"algorithm": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CXX = g++ | ||
#CXX = g++ | ||
VISP_CFLAGS = `pkg-config --cflags visp` | ||
VISP_LDFLAGS = `pkg-config --libs visp` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <iostream> | ||
#include <visp3/core/vpImagePoint.h> | ||
|
||
int main() | ||
{ | ||
vpImagePoint start_pixel(10, 12); | ||
vpImagePoint end_pixel(20, 16); | ||
//vpImagePoint start_pixel(10.5, 12.2); | ||
//vpImagePoint end_pixel(20, 12); | ||
//vpImagePoint end_pixel(20.5, 16.2); | ||
//vpImagePoint end_pixel(21, 16.4); | ||
|
||
for (auto curr_pixel = start_pixel; curr_pixel.inSegment(start_pixel, end_pixel); | ||
curr_pixel = curr_pixel.nextInSegment(start_pixel, end_pixel)) { | ||
std::cout << "pixel: " << curr_pixel << std::endl; | ||
if (curr_pixel == end_pixel) break; | ||
} | ||
|
||
return EXIT_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <visp3/core/vpIoTools.h> | ||
|
||
int main() | ||
{ | ||
std::cout << vpIoTools::getIndex("file-1.txt", "file-%d.txt") << std::endl; | ||
std::cout << vpIoTools::getIndex("/tmp/file0040.txt", "/tmp/file%04d.txt") << std::endl; | ||
std::cout << vpIoTools::getIndex("file.txt", "file%d.txt") << std::endl; | ||
std::cout << vpIoTools::getIndex("file03.txt", "file%02d.txt") << std::endl; | ||
std::cout << vpIoTools::getIndex("file-03.txt", "file%02d.txt") << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <visp3/core/vpIoTools.h> | ||
|
||
int main() | ||
{ | ||
std::string tmp_path = vpIoTools::getTempPath(); | ||
std::cout << "Temp path: " << tmp_path << std::endl; | ||
|
||
std::string tmp_dir1 = vpIoTools::makeTempDirectory(tmp_path); | ||
std::cout << "Created unique temp dir1: " << tmp_dir1 << std::endl; | ||
|
||
std::string tmp_dir2_template = tmp_path + vpIoTools::path("/") + "dir_XXXXXX"; | ||
std::string tmp_dir2 = vpIoTools::makeTempDirectory(tmp_dir2_template); | ||
std::cout << "Created unique temp dir2: " << tmp_dir2 << std::endl; | ||
|
||
if (vpIoTools::remove(tmp_dir1)) { | ||
std::cout << "Temp dir1 was deleted" << std::endl; | ||
} | ||
if (vpIoTools::remove(tmp_dir2)) { | ||
std::cout << "Temp dir2 was deleted" << std::endl; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include <visp3/core/vpMatrix.h> | ||
|
||
int main() | ||
{ | ||
std::string filename("matrix.yaml"); | ||
{ | ||
vpMatrix M(2, 3); | ||
M[0][0] = -1; M[0][1] = -2; M[0][2] = -3; | ||
M[1][0] = 4; M[1][1] = 5.5; M[1][2] = 6.0f; | ||
|
||
std::string header("My header"); | ||
|
||
if (vpMatrix::saveMatrixYAML(filename, M, header.c_str())) { | ||
std::cout << "Matrix saved in " << filename << std::endl; | ||
M.print(std::cout, 10, header); | ||
} else { | ||
std::cout << "Cannot save matrix in " << filename << std::endl; | ||
} | ||
} | ||
{ | ||
vpMatrix N; | ||
char header[FILENAME_MAX]; | ||
if (vpMatrix::loadMatrixYAML(filename, N, header)) { | ||
std::cout << "Matrix loaded from " << filename << std::endl; | ||
N.print(std::cout, 10, header); | ||
} else { | ||
std::cout << "Cannot load matrix from " << filename << std::endl; | ||
} | ||
} | ||
} |
Oops, something went wrong.