-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Adding Depth-Filter OpenCV example #4733
Conversation
rs2::pipeline pipe; | ||
|
||
rs2::config cfg; | ||
cfg.enable_stream(RS2_STREAM_DEPTH, 848, 480); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this 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)
Based on the experience of Daniel Pohl and Markus Achtelik using RealSense cameras with outdoor drones for collision avoidance.
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