Skip to content

Commit

Permalink
Harden haralick computation. (#1122)
Browse files Browse the repository at this point in the history
Should resolve #1116.
  • Loading branch information
manthey authored Aug 1, 2024
1 parent d0a8fd9 commit 4e2e2eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion histomicstk/features/compute_haralick_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def compute_haralick_features(im_label, im_intensity, offsets=None,
IMC1 = (HXY - HXY1) / max(HX, HY)

# computes information measures of correlation
IMC2 = np.sqrt(1 - np.exp(-2.0 * (HXY2 - HXY)))
IMC2 = np.sqrt(np.maximum(0, 1 - np.exp(-2.0 * (HXY2 - HXY))))

features_per_offset[r] = [
ASM,
Expand Down

0 comments on commit 4e2e2eb

Please sign in to comment.