Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Uio96 committed Jul 22, 2021
1 parent 7cf9c38 commit 2ad042c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
23 changes: 12 additions & 11 deletions trackpointer/centroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand All @@ -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):

Expand Down Expand Up @@ -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


Expand All @@ -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):

Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions trackpointer/centroidMulti.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand All @@ -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):

Expand All @@ -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):
Expand All @@ -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
Expand Down

0 comments on commit 2ad042c

Please sign in to comment.