Skip to content

Commit 638776a

Browse files
committed
Update class2d docstring and add comment about log polar
1 parent 2b144d6 commit 638776a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/aspire/classification/averager2d.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,17 @@ def _reddychatterji(self, images, class_k, reflection_k):
621621
# Compute the Cross_Correlation to estimate rotation
622622
# Note that _phase_cross_correlation uses the mangnitudes (abs()),
623623
# ie it is using both freq and phase information.
624-
cross_correlation, shift = self._phase_cross_correlation(
624+
cross_correlation, _ = self._phase_cross_correlation(
625625
warped_fixed_img_fs, warped_regis_img_fs
626626
)
627627

628+
# Rotating Cartesian space translates the angular log polar component.
629+
# Scaling Cartesian space translates the radial log polar component.
630+
# In common image resgistration problems, both components are used
631+
# to simultaneously estimate scaling and rotation.
632+
# Since we are not currently concerned with scaling transformation,
633+
# disregard the second axis of the `cross_correlation` returned by
634+
# `_phase_cross_correlation`.
628635
cross_correlation_score = cross_correlation[:, 0].ravel()
629636

630637
self._rotation_cross_corr_diagnostic(

src/aspire/classification/class2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ def classify(self):
5454
@abstractmethod
5555
def averages(self, classes, refl, distances):
5656
"""
57-
Returns class averages using prescribed `aligner`.
57+
Returns class averages.
5858
"""

0 commit comments

Comments
 (0)