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

Adding Depth-Filter OpenCV example #4733

Merged
merged 5 commits into from
Aug 27, 2019

Conversation

dorodnic
Copy link
Contributor

Based on the experience of Daniel Pohl and Markus Achtelik using RealSense cameras with outdoor drones for collision avoidance.

drone

The sample shows several techniques that should be useful to anyone solving similar problems:
a. Defining OpenCV-based depth processing block
b. Loading high-confidence preset prior to streaming
c. Filtering out low confidence depth values based on features in the infrared image

rs2::pipeline pipe;

rs2::config cfg;
cfg.enable_stream(RS2_STREAM_DEPTH, 848, 480);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The params are D435-oriented. Can the explicit params be replaced with defaults to allow using D415 and SR300?


high_confidence_filter filter;

std::ifstream file("./camera-settings.json");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not clear what the optional camera-settings.json should include

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is included and copied to output folder

sp->set_format(format);

auto vid = std::dynamic_pointer_cast<video_stream_profile_interface>(sp);
auto i = *intr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

VALIDATE_NOT_NULL(intr) is needed, imho

Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

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

Very nice crafted. Couple minor remarks inside

(cherry picked from commit 4718aa21c0cb843a932c53100b6e8886b4e0b551)
(cherry picked from commit 8a09e5be35271c6f1af0de025c6bd5bc63d743a7)
@dorodnic dorodnic merged commit 446560b into IntelRealSense:development Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants