Permalink
Browse files

seperate cleanUpSteady.m from dbCleanUp.m

  • Loading branch information...
1 parent b6adaf0 commit 605d66c19d41f438806a4afa4bfb7aa4bc946477 @lbl1985 committed Sep 14, 2011
Showing with 20 additions and 23 deletions.
  1. +20 −0 20Tracking/@TrackBlobs/cleanUpSteady.m
  2. +0 −23 20Tracking/@TrackBlobs/dbCleanUp.m
@@ -0,0 +1,20 @@
+function cleanUpSteady(obj)
+ ndb = length(obj.DB);
+ keepIndex = true(ndb, 1);
+ for i = 1 : ndb
+ isSteady = checkIsSteady(obj, i);
+ if isSteady == 1
+ keepIndex(i) = false;
+ end
+ end
+ obj.DB = obj.DB(keepIndex);
+end
+
+function isSteady = checkIsSteady(obj, i)
+ tmpEntry = obj.DB{i};
+ tmpStd = std(tmpEntry.Centroid);
+ isSteady = 0;
+ if all(tmpStd < obj.steadyCriteria)
+ isSteady = 1;
+ end
+end
@@ -15,18 +15,6 @@ function cleanUpOnlyOneAppearance(obj)
obj.DB = obj.DB(keepIndex);
end
-function cleanUpSteady(obj)
- ndb = length(obj.DB);
- keepIndex = true(ndb, 1);
- for i = 1 : ndb
- isSteady = checkIsSteady(obj, i);
- if isSteady == 1
- keepIndex(i) = false;
- end
- end
- obj.DB = obj.DB(keepIndex);
-end
-
function cleanUpUnConsistent(obj)
ndb = length(obj.DB);
keepIndex = true(ndb, 1);
@@ -38,15 +26,4 @@ function cleanUpUnConsistent(obj)
end
end
obj.DB = obj.DB(keepIndex);
-end
-
-
-
-function isSteady = checkIsSteady(obj, i)
- tmpEntry = obj.DB{i};
- tmpStd = std(tmpEntry.Centroid);
- isSteady = 0;
- if all(tmpStd < obj.steadyCriteria)
- isSteady = 1;
- end
end

0 comments on commit 605d66c

Please sign in to comment.