work on color tracker
This commit is contained in:
parent
03d3fbd1dc
commit
86c7a31231
4 changed files with 176 additions and 6 deletions
|
|
@ -45,6 +45,7 @@ public class NavigationExecutor : IDisposable
|
|||
public void Reset()
|
||||
{
|
||||
_worldMap.Reset();
|
||||
_capture.ResetAdaptation();
|
||||
_stopped = false;
|
||||
_stuckCounter = 0;
|
||||
_lastPosition = null;
|
||||
|
|
@ -81,6 +82,8 @@ public class NavigationExecutor : IDisposable
|
|||
|
||||
SetState(NavigationState.Processing);
|
||||
var pos = _worldMap.MatchAndStitch(frame.ClassifiedMat, frame.WallMask);
|
||||
if (_worldMap.LastMatchSucceeded)
|
||||
_capture.CommitWallColors();
|
||||
|
||||
// Stuck detection: position hasn't moved enough over several frames
|
||||
if (_lastPosition != null)
|
||||
|
|
@ -186,6 +189,8 @@ public class NavigationExecutor : IDisposable
|
|||
|
||||
var stitchStart = sw.Elapsed.TotalMilliseconds;
|
||||
var pos = _worldMap.MatchAndStitch(frame.ClassifiedMat, frame.WallMask);
|
||||
if (_worldMap.LastMatchSucceeded)
|
||||
_capture.CommitWallColors();
|
||||
var stitchMs = sw.Elapsed.TotalMilliseconds - stitchStart;
|
||||
|
||||
var renderStart = sw.Elapsed.TotalMilliseconds;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue