Adding Depth-Filter OpenCV example - #4733
Merged
Merged
Conversation
ev-mp
reviewed
Aug 27, 2019
| rs2::pipeline pipe; | ||
|
|
||
| rs2::config cfg; | ||
| cfg.enable_stream(RS2_STREAM_DEPTH, 848, 480); |
Contributor
There was a problem hiding this comment.
The params are D435-oriented. Can the explicit params be replaced with defaults to allow using D415 and SR300?
ev-mp
reviewed
Aug 27, 2019
|
|
||
| high_confidence_filter filter; | ||
|
|
||
| std::ifstream file("./camera-settings.json"); |
Contributor
There was a problem hiding this comment.
Not clear what the optional camera-settings.json should include
Contributor
Author
There was a problem hiding this comment.
It is included and copied to output folder
ev-mp
reviewed
Aug 27, 2019
| sp->set_format(format); | ||
|
|
||
| auto vid = std::dynamic_pointer_cast<video_stream_profile_interface>(sp); | ||
| auto i = *intr; |
Contributor
There was a problem hiding this comment.
VALIDATE_NOT_NULL(intr) is needed, imho
ev-mp
approved these changes
Aug 27, 2019
ev-mp
left a comment
Contributor
There was a problem hiding this comment.
Very nice crafted. Couple minor remarks inside
(cherry picked from commit 4718aa21c0cb843a932c53100b6e8886b4e0b551) (cherry picked from commit 8a09e5be35271c6f1af0de025c6bd5bc63d743a7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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