Skip to content

Add new post processing filter - rotation filter - #13499

Merged
Nir-Az merged 13 commits into
realsenseai:developmentfrom
noacoohen:rotate_depth_frames
Nov 18, 2024
Merged

Add new post processing filter - rotation filter#13499
Nir-Az merged 13 commits into
realsenseai:developmentfrom
noacoohen:rotate_depth_frames

Conversation

@noacoohen

@noacoohen noacoohen commented Nov 7, 2024

Copy link
Copy Markdown
Contributor

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
Comment thread include/librealsense2/h/rs_option.h
Comment thread include/librealsense2/hpp/rs_processing.hpp
Comment thread src/proc/rotation-filter.cpp Outdated
Comment thread src/proc/rotation-filter.cpp Outdated
Comment thread src/proc/rotation-filter.cpp Outdated
Comment thread src/proc/rotation-filter.h Outdated
Comment thread src/proc/rotation-filter.h Outdated
@Nir-Az

Nir-Az commented Nov 10, 2024

Copy link
Copy Markdown
Collaborator

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

Nir-Az commented Nov 10, 2024

Copy link
Copy Markdown
Collaborator

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

Nir-Az commented Nov 11, 2024

Copy link
Copy Markdown
Collaborator

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

Comment thread examples/post-processing/rs-post-processing.cpp Outdated
Comment thread unit-tests/post-processing/test-rotation-filter.py
Comment thread unit-tests/post-processing/test-rotation-filter.py Outdated
Comment thread unit-tests/post-processing/test-rotation-filter.py
vs = create_video_stream(depth_intrinsics)
depth_stream_profile = depth_sensor.add_video_stream(vs)

sync = rs.syncer()

Copy link
Copy Markdown
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?

ImGui::PopStyleColor();


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

Copy link
Copy Markdown
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
Copy Markdown
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 realsenseai:development Nov 18, 2024
@mewescott

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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