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

Add new post processing filter - rotation filter #13499

Merged
merged 13 commits into from
Nov 18, 2024

Conversation

noacoohen
Copy link
Contributor

@noacoohen noacoohen commented Nov 7, 2024

This PR introduce a new post processing filter for rotating depth frames 90,180,-90 degrees.
This feature can be handy when installing the camera rotated.

Tracked-by RSDSO-19843

@noacoohen noacoohen requested review from Nir-Az and OhadMeir November 7, 2024 17:04
src/proc/rotation-filter.h Outdated Show resolved Hide resolved
src/proc/rotation-filter.h Outdated Show resolved Hide resolved
@Nir-Az
Copy link
Collaborator

Nir-Az commented Nov 10, 2024

Great work overall :)
Can we also add a non live GHA python unit test for it?
It can check the correctness of the logic and also validate that the filter is accessible through python API.
Thanks!

@Nir-Az
Copy link
Collaborator

Nir-Az commented Nov 10, 2024

Please check the CI failure, looks related to this changes

@Nir-Az Nir-Az changed the title Rotate frames Add new post processing filter - rotate filter Nov 11, 2024
@Nir-Az Nir-Az changed the title Add new post processing filter - rotate filter Add new post processing filter - rotation filter Nov 11, 2024
@Nir-Az
Copy link
Collaborator

Nir-Az commented Nov 11, 2024

Remember to try to add this filter to our post processing example and to a python unit test
https://github.com/IntelRealSense/librealsense/tree/development/examples/post-processing

vs = create_video_stream(depth_intrinsics)
depth_stream_profile = depth_sensor.add_video_stream(vs)

sync = rs.syncer()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need a syncer?

@@ -269,11 +272,29 @@ void render_ui(float w, float h, std::vector<filter_options>& filters)
ImGui::Checkbox(filter.filter_name.c_str(), &tmp_value);
filter.is_enabled = tmp_value;
ImGui::PopStyleColor();


if( filter.filter_name == "Rotate" ) // Combo box specifically for the rotation filter
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder why rotate is the only one needs special handling,
Is it because we added a special option for it?
What is the value of RS2_OPTION_FILTER_MAGNITUDE for other filters?
Is it always 1,2,3,4 ?
If not maybe we could have used it for 90/-90/180?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the rest of the options use filter_slider_ui which is set up for continuous values, but we need discrete 90-degree increments.

@Nir-Az Nir-Az merged commit a6d4972 into IntelRealSense:development Nov 18, 2024
23 checks passed
@mewescott
Copy link

Is this compatible with the ROS 2 wrapper? I need to rotate my images from two D455 cameras then detect april tags and human presence. If it is how can I use it?

@mewescott
Copy link

This PR introduce a new post processing filter for rotating depth frames 90,180,-90 degrees. This feature can be handy when installing the camera rotated.

Tracked-by RSDSO-19843

How do we use this filter? I need to rotate 90 degrees in a ROS 2 based application. Can I pass the filter in with my launch command?

@noacoohen
Copy link
Contributor Author

Hi, currently, this filter isn’t enabled in ROS 2, but it’s a great idea, and we plan to add support for it soon.

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.

3 participants