From 2ad042c92a327766ae3fb82c1eff7cdc1ec75029 Mon Sep 17 00:00:00 2001 From: yunzhil Date: Thu, 22 Jul 2021 00:35:41 -0400 Subject: [PATCH] update comments --- trackpointer/centroid.py | 23 ++++++++++++----------- trackpointer/centroidMulti.py | 7 +++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/trackpointer/centroid.py b/trackpointer/centroid.py index 1d90cb4..6585516 100644 --- a/trackpointer/centroid.py +++ b/trackpointer/centroid.py @@ -53,8 +53,8 @@ class centroid(object): # # @brief Centroid track-pointer constructor. # - # @param[in] iPt The initial track point coordinates. - # @param[in] params The parameter structure. + # @param[in] iPt The initial track point coordinates. + # params The parameter structure. # def __init__(self, iPt=None, params=None): @@ -72,7 +72,7 @@ def __init__(self, iPt=None, params=None): # @brief Set parameters for the tracker. # # @param[in] fname Name of parameter. - # @param[in] fval Value of parameter. + # fval Value of parameter. # def set(self, fname, fval): @@ -151,8 +151,6 @@ def offset(self, dp): def transform(self, g): if self.tpt: - # @todo need double check on this usage of g - # this.tpt = g .* this.tpt; self.tpt = g * self.tpt @@ -167,7 +165,9 @@ def predict(self): # # @brief Measure the track point from the given image. # - # @param[in] I The input image. + # @param[in] I The input image. + # + # @param[out] mstate The measured state. # def measure(self, I): @@ -182,10 +182,7 @@ def measure(self, I): self.tpt = np.array([np.mean(jbin), np.mean(ibin)]).reshape(-1,1) - # # @todo - # # Not sure if we need a check on the value when target is lost - # if np.isnan(self.tpt ).any(): - # print('s') + self.haveMeas = self.tpt.shape[1] > 0 # center = transpose(size(image)*[0 1;1 0]+1)/2; # trackpoint = trackpoint - center; @@ -238,12 +235,16 @@ def displayState(self, dstate = None): def displayDebugState(self, dbstate=None): pass - #---------------------------- setIfMissing --------------------------- + #========================= setIfMissing ========================= # # @brief Set missing parameters in the registration parameters structure. + # # @param[in] params The parameter structure. # pname Name of parameter. # pval Value of parameter. + # + # @param[out] params The parameter structure. + # def setIfMissing(self, params, pname, pval): # @todo diff --git a/trackpointer/centroidMulti.py b/trackpointer/centroidMulti.py index fb89091..d48bb6b 100644 --- a/trackpointer/centroidMulti.py +++ b/trackpointer/centroidMulti.py @@ -57,7 +57,7 @@ class centroidMulti(centroid): # @brief Centroid track-pointer constructor. # # @param[in] iPt The initial track point coordinates. - # @param[in] params The parameter structure. + # params The parameter structure. # def __init__(self, iPt=None, params=None): @@ -69,7 +69,7 @@ def __init__(self, iPt=None, params=None): # @brief Set parameters for the tracker. # # @param[in] fname Name of parameter. - # @param[in] fval Value of parameter. + # fval Value of parameter. # def set(self, fname, fval): @@ -83,6 +83,7 @@ def set(self, fname, fval): # @brief Get parameter of the tracker. # # @param[in] fname Name of parameter. + # # @param[out] fval Value of parameter. # def get(self, fname): @@ -103,8 +104,6 @@ def measure(self, I): Ip = self.tparams.improcessor.apply(I) else: Ip = I - plt.imshow(Ip) - plt.show() binReg = centroidMulti.regionProposal(Ip) self.tpt = np.array(binReg).T # from N x 2 to 2 x N