L515 Confidence Stream fails to update.
| Required Info | |
|---|---|
| Camera Model | L515 |
| Firmware Version | 01.05.01.03 |
| Operating System & Version | Win 10 |
| Platform | PC |
| SDK Version | not sure |
| Language | C# Unity |
| Segment | others |
Issue Description
I am getting very sporadic updates of Confidence frames on my L515 using the C# wrapper in Unity.
Initialised as such:
{
config.EnableDevice(Serial);
config.EnableStream(Stream.Confidence, 640, 480, Format.Raw8, 30);
Pipe.Start(config);
}
I have a thread running:
{
lock (FrameLock)
{
...
ConfidenceFrame = fs[Stream.Confidence].As<VideoFrame>();
...
}
}
Which runs successfully at 30fps -- but when I actually use the frame, it remains the same thing for 2 or 5 seconds until it changes to a new frame. So even though it "updates at 30fps", I receive something like 60-300 frames that are exactly the same until a new one comes in....
I know this is my code, not my device, because I have several L515s which all act the same in my Unity scene, but the confidence streams act just fine in the realsense viewer, updating properly at 30fps.
I process an entire set of frames (depth, color and confidence) one after the other on the processing thread - and the depth and color updates fine.
I have set the depth sensor's ConfidenceThreshold value to 3f.
Any hints? Does the confidence frame wait for some value to update itself? Is there some option I can set?
Here is a video demonstrating what is happening: https://i.imgur.com/LxQSp55.mp4
For anyone looking to solve a similar issue, using the "Keep" method on the frame keeps it around...
...
var confidence = fs[Stream.Confidence];
confidence.Keep();
ConfidenceFrame = confidence.As<VideoFrame>();
...