Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from keijiro/rssdk-2.20
Rssdk 2.20
- Loading branch information
Showing
23 changed files
with
316 additions
and
101 deletions.
There are no files selected for viewing
This file contains 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
Binary file modified
BIN
+7 KB
(110%)
Assets/RealSenseSDK2.0/Plugins/Intel.RealSense.dll
100644 → 100755
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
Assets/RealSenseSDK2.0/Plugins/realsense2.bundle/Contents.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
Assets/RealSenseSDK2.0/Plugins/realsense2.bundle/Contents/MacOS.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+14.9 MB
Assets/RealSenseSDK2.0/Plugins/realsense2.bundle/Contents/MacOS/realsense2
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
Assets/RealSenseSDK2.0/Plugins/realsense2.bundle/Contents/MacOS/realsense2.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
62 changes: 62 additions & 0 deletions
62
Assets/RealSenseSDK2.0/Scripts/ProcessingBlocks/RsThresholdFilter.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using Intel.RealSense; | ||
using UnityEngine; | ||
|
||
[ProcessingBlockDataAttribute(typeof(ThresholdFilter))] | ||
[HelpURL("https://github.com/IntelRealSense/librealsense/blob/master/doc/post-processing-filters.md#hole-filling-filter")] | ||
public class RsThresholdFilter : RsProcessingBlock | ||
{ | ||
/// <summary> | ||
/// Min range in meters | ||
/// </summary> | ||
[Range(0f, 16f)] | ||
public float MinDistance = 0.1f; | ||
|
||
/// <summary> | ||
/// Max range in meters | ||
/// </summary> | ||
[Range(0f, 16f)] | ||
public float MaxDistance = 4f; | ||
|
||
private ThresholdFilter _pb; | ||
|
||
private IOption minOption; | ||
private IOption maxOption; | ||
|
||
public void Init() | ||
{ | ||
_pb = new ThresholdFilter(); | ||
minOption = _pb.Options[Option.MinDistance]; | ||
maxOption = _pb.Options[Option.MaxDistance]; | ||
} | ||
|
||
void OnDisable() | ||
{ | ||
if (_pb != null) | ||
_pb.Dispose(); | ||
} | ||
|
||
public override Frame Process(Frame frame, FrameSource frameSource) | ||
{ | ||
if (_pb == null) | ||
{ | ||
Init(); | ||
} | ||
|
||
UpdateOptions(); | ||
|
||
return _pb.Process(frame); | ||
} | ||
|
||
public void SetMinDistance(float v) { | ||
MinDistance = v; | ||
} | ||
public void SetMaxDistance(float v) { | ||
MaxDistance = v; | ||
} | ||
|
||
private void UpdateOptions() | ||
{ | ||
minOption.Value = MinDistance; | ||
maxOption.Value = MaxDistance; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/RealSenseSDK2.0/Scripts/ProcessingBlocks/RsThresholdFilter.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.