Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/avoid image copy #42

Merged
merged 16 commits into from
Aug 8, 2021
Merged

Conversation

ProgHunter
Copy link
Contributor

Description

  • Avoid to use copyTo() in contrast_and_brightness_filter and white_filter.
  • Added the "enable" condition in white_filter.
  • Implemented a parallel version of contrast_and_brightness_filter.
  • contrast_and_brightness_filter show an acceleration of 575% with the new implementation

Fixes

How has this been tested ?

  • Tested with a bag and the telemetry

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@@ -6,5 +6,6 @@
"python.analysis.extraPaths": [
"/home/sonia/base_lib_ws/devel/lib/python2.7/dist-packages",
"/opt/ros/melodic/lib/python2.7/dist-packages"
]
],
"cmake.configureOnOpen": false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I delete that ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what this is...

@@ -118,6 +121,8 @@ namespace proc_image_processing {
ROS_ERROR("[FILTERCHAIN %s ], Error in image processing: %s", name_.c_str(), e.what());
};
}
// Uncomment with the timer to see filterchain performance
//ROS_INFO("Filterchain exec time: %f", timer.getExecutionTime());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I let this ?

Copy link
Contributor

@thecanadianroot thecanadianroot Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non, ça bloat le code, mais ça pourrait être bien d'ajouter un debug pour chaque filter qu'on peut activer quand on test et que ça shoot le temps de performance

@@ -6,5 +6,6 @@
"python.analysis.extraPaths": [
"/home/sonia/base_lib_ws/devel/lib/python2.7/dist-packages",
"/opt/ros/melodic/lib/python2.7/dist-packages"
]
],
"cmake.configureOnOpen": false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what this is...

README.md Outdated
@@ -125,6 +125,23 @@ TODO document how to run this module with VSCode
- `ctrl+shift+p`
- Type `ROS: Start Core` (command id: `ros.startCore`)

- Manage and execute filterchains with bags from telemetry:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe faire une section pour rouler les bags au lieu de mettre ça dans la section pour vscode?

@@ -22,15 +22,15 @@ filters:
value: 17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmmh normalement dans un yaml tu peux pas avoir 2 fois la même key dans un item (2x value ici)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, github being github

@@ -9,6 +9,29 @@

namespace proc_image_processing {

class ParallelCABF : public cv::ParallelLoopBody {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On voulait pas extract ça dans une classe abstraite pour l'utiliser ailleurs?

@@ -118,6 +121,8 @@ namespace proc_image_processing {
ROS_ERROR("[FILTERCHAIN %s ], Error in image processing: %s", name_.c_str(), e.what());
};
}
// Uncomment with the timer to see filterchain performance
//ROS_INFO("Filterchain exec time: %f", timer.getExecutionTime());
Copy link
Contributor

@thecanadianroot thecanadianroot Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non, ça bloat le code, mais ça pourrait être bien d'ajouter un debug pour chaque filter qu'on peut activer quand on test et que ça shoot le temps de performance

@ProgHunter ProgHunter self-assigned this Aug 5, 2021
thecanadianroot
thecanadianroot previously approved these changes Aug 8, 2021
# Conflicts:
#	src/proc_image_processing/cpu/filters/low_pass/contrast_and_brightness_filter.h
#	src/proc_image_processing/cpu/filters/low_pass/equalize_filter.h
#	src/proc_image_processing/cpu/filters/low_pass/subtract_all_planes_filter.h
#	src/proc_image_processing/cpu/filters/low_pass/subtract_plane_adder_filter.h
#	src/proc_image_processing/cpu/filters/low_pass/thresholds/hsv_threshold_filter.h
#	src/proc_image_processing/cpu/filters/transformations/rotate_filter.h
@thecanadianroot thecanadianroot merged commit 4c5acdd into develop Aug 8, 2021
@thecanadianroot thecanadianroot deleted the feature/avoid-image-copy branch August 8, 2021 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants