Skip to content
Snippets Groups Projects
Commit c4c21743 authored by simon.fanetti's avatar simon.fanetti
Browse files

add comments

parent 94c298bc
No related branches found
No related tags found
No related merge requests found
# Utilisation # display_levels
- Modifiez les chemins relatifs à la libsandbox dans le Makefile Application de démo affichant les niveaux en couleurs sur le bac.
- Inclure les flags du linker avec DEP_SANDBOX du fichier dep.mk
- Indiquer la position du fichier libsandobx.so dans la variable "LD_LIBRARY_PATH" du terminal
- Executez le Makefile
# test_perf
Application testant les performances de la librairie, elle permet d'avoir une idée des temps d'exécution des fonctions de la librairie et le frame rate moyen.
# ar_cubes
Application de démo (incomplète) projetant un carré blanc sur un carré bleu détecté sur le bac.
...@@ -49,6 +49,7 @@ void displayLevels(Sandbox &sandbox, float top, float height){ ...@@ -49,6 +49,7 @@ void displayLevels(Sandbox &sandbox, float top, float height){
// don't update little differences due to the camera depth captors // don't update little differences due to the camera depth captors
new_depth.copyTo( depth_cache, (cv::abs(depth_cache-new_depth) > DEPTH_MARGIN_ERROR/2) ); new_depth.copyTo( depth_cache, (cv::abs(depth_cache-new_depth) > DEPTH_MARGIN_ERROR/2) );
// TODO : try to colorize with HSV
colorized = colorizeDepth(depth_cache, top, height); colorized = colorizeDepth(depth_cache, top, height);
res = sandbox.adjustProjection(colorized, depth_cache); res = sandbox.adjustProjection(colorized, depth_cache);
......
# Tests librairie performances application
## test.cpp
Allows you to tests some functions of the sandbox library and output the duration of the execution of the functions in a file in /output.
You can custom the number of cycle and if it has to take pictures with the camera.
## read_output.py
Allows you to read an output file and display the average times and frames in the console
[capture_frame_ms, get_depth_frame_ms, get_color_frame_ms, adjust_projection_ms] git branch 1904bb0d
19,0,1,355
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,210
14,1,0,209
15,0,1,209
15,0,0,211
14,1,0,209
15,0,0,210
14,1,0,209
15,0,1,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,209
15,0,0,210
14,1,0,209
15,0,1,209
14,1,0,209
15,0,0,210
15,0,0,210
15,0,0,210
15,0,0,210
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,209
15,0,1,209
15,0,0,210
14,1,0,209
15,0,1,209
15,0,0,210
14,1,0,209
15,0,0,210
15,1,0,209
15,0,0,210
14,1,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,0,1,209
15,0,0,209
15,0,1,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,1,209
15,0,0,209
15,0,1,209
15,0,0,209
15,0,1,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,209
15,0,0,210
15,0,0,209
14,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
15,0,0,210
14,1,0,210
14,1,0,209
15,0,0,210
15,0,0,209
15,0,1,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
15,1,0,211
14,1,0,209
15,0,0,210
14,1,0,209
15,0,1,209
15,0,0,209
15,0,1,209
15,0,0,210
15,0,0,209
15,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,209
15,0,1,209
15,0,0,209
15,1,0,209
15,0,0,210
15,0,0,209
15,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,209
15,1,0,209
15,0,0,210
15,0,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,210
14,1,0,209
15,0,0,210
15,0,0,210
15,0,0,209
15,0,1,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,210
14,1,0,209
15,0,0,210
14,1,0,210
15,0,0,210
14,1,0,209
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
15,0,0,209
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,210
15,0,0,209
15,1,0,210
15,0,0,209
15,0,0,210
15,0,0,210
15,0,0,210
15,0,0,210
15,0,0,210
15,0,0,210
14,1,0,209
15,0,0,210
15,0,0,209
15,0,0,210
14,1,0,209
15,0,1,209
15,0,0,209
15,0,1,210
15,0,0,209
15,0,0,210
15,0,0,209
15,0,1,209
15,0,0,209
15,0,1,209
15,0,0,210
14,1,0,209
15,1,0,209
15,0,1,209
15,0,0,210
14,1,0,209
[capture_frame_ms, get_depth_frame_ms, get_color_frame_ms, adjust_projection_ms] git branch 0c4ff5dc
15,0,0,183
15,1,0,57
14,1,0,56
15,1,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,1,55
15,0,0,56
15,0,0,57
14,1,0,56
15,0,0,57
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,57
14,1,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
14,0,0,57
14,1,0,56
15,0,0,56
15,0,0,56
14,1,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
14,0,0,57
14,1,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,58
15,0,0,57
15,1,0,58
15,0,0,57
15,1,0,57
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,57
15,0,0,58
15,0,0,57
15,0,0,57
15,0,0,56
15,1,0,57
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,57
15,0,0,57
15,0,0,57
15,0,0,57
15,0,0,58
15,0,0,61
16,0,0,58
15,0,0,57
15,0,0,58
15,0,0,58
15,0,0,57
15,0,0,59
15,0,0,60
16,0,0,58
16,0,0,58
15,0,0,57
15,0,0,56
15,0,0,56
15,0,0,56
15,0,0,58
15,0,0,56
15,0,0,56
16,0,0,57
15,0,0,57
15,0,0,58
15,0,0,56
16,0,0,61
15,0,0,60
16,0,0,60
16,0,0,59
16,0,0,59
16,0,0,58
16,0,0,60
16,0,0,58
16,0,0,60
15,1,0,59
16,0,0,59
15,1,0,57
15,0,0,59
15,0,0,57
16,0,0,56
15,0,0,57
15,0,0,57
15,0,0,57
15,0,0,56
15,0,0,57
14,1,0,57
16,0,0,57
15,0,0,58
15,0,0,57
15,1,0,57
16,0,0,57
15,0,0,56
15,0,0,57
15,0,0,58
15,0,0,57
15,0,0,57
15,0,0,58
15,0,0,57
15,0,0,61
15,1,0,57
16,0,0,59
16,0,0,57
15,1,0,57
16,0,0,58
15,0,0,61
16,0,0,60
16,0,0,59
16,0,0,60
16,0,0,59
16,0,0,59
15,1,0,59
15,0,0,59
16,0,0,58
15,0,0,60
16,0,0,59
15,0,0,58
15,0,0,57
15,0,0,57
14,0,0,57
15,0,0,57
15,0,0,56
15,0,0,57
15,0,0,57
14,1,0,56
15,1,0,56
15,0,0,56
15,0,0,56
15,0,0,56
15,1,0,56
15,0,0,56
15,0,0,56
15,0,0,57
14,0,0,58
14,1,0,56
15,0,0,56
15,0,0,56
15,0,0,56
14,1,0,56
[capture_frame_ms, get_depth_frame_ms, get_color_frame_ms, adjust_projection_ms] git branch e0079671
34,0,0,202
20,0,0,85
18,0,0,84
18,0,1,83
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,1,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,1,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,1,0,83
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,1,0,84
18,0,0,84
18,0,0,84
18,1,0,83
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,85
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,85
18,0,0,85
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,1,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,1,0,84
18,0,0,84
18,0,0,85
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
19,0,0,84
18,0,0,85
18,0,0,85
18,0,0,84
18,0,0,85
18,0,0,85
18,0,0,84
18,0,0,85
18,0,0,84
18,0,1,83
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,0,1,83
18,0,0,84
18,0,0,84
18,0,1,83
19,0,0,84
18,0,0,85
18,0,0,84
18,0,1,83
19,0,0,84
18,0,0,84
18,0,1,83
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,85
18,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
19,0,0,84
19,0,0,85
18,0,0,85
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,1,0,84
18,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,85
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,1,0,83
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,1,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,0,1,83
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,1,84
18,0,0,84
18,0,0,84
18,1,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
18,0,1,83
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,84
18,0,0,84
18,1,0,83
19,0,0,84
18,0,0,84
18,0,0,84
19,0,0,85
18,0,0,84
...@@ -23,6 +23,8 @@ int main(){ ...@@ -23,6 +23,8 @@ int main(){
return 1; return 1;
} }
// you can custom the number of cycle and if
// it has to take a picture at the beginning of the process
testPerformances( sandbox, 200, false ); testPerformances( sandbox, 200, false );
} }
...@@ -53,9 +55,9 @@ void testPerformances(Sandbox &sandbox, int cycle, bool take_pic){ ...@@ -53,9 +55,9 @@ void testPerformances(Sandbox &sandbox, int cycle, bool take_pic){
std::ofstream output; std::ofstream output;
output.open ("./output/durations.txt"); output.open ("./output/durations.txt");
output << "[capture_frame_ms, get_depth_frame_ms, get_color_frame_ms, adjust_projection_ms]\n"; output << "capture_frame_ms,get_depth_frame_ms,get_color_frame_ms,adjust_projection_ms\n";
// line : [capture_frame_ms, get_depth_frame_ms, get_color_frame_ms, adjust_projection_ms] // line : capture_frame_ms, get_depth_frame_ms, get_color_frame_ms, adjust_projection_ms
for(int i = 0; i < cycle; i++){ for(int i = 0; i < cycle; i++){
std::chrono::milliseconds start_capt_ms = std::chrono::duration_cast< std::chrono::milliseconds >( std::chrono::system_clock::now().time_since_epoch() ); std::chrono::milliseconds start_capt_ms = std::chrono::duration_cast< std::chrono::milliseconds >( std::chrono::system_clock::now().time_since_epoch() );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment