Skip to content

Commit

Permalink
Merge pull request #161 from fmi-faim/fix-160
Browse files Browse the repository at this point in the history
Fix scaling.
  • Loading branch information
tibuch authored Jul 10, 2024
2 parents 06f1b7c + d0f4f02 commit 4e25410
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/faim_ipa/detection/blobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ def detect_blobs(
scale_cube = np.empty(image.shape + (len(sigmas),), dtype=np.uint8)

h_ = img_as_float32(np.array(h, dtype=img.dtype))
scale_norm = np.mean([axial_sigma, lateral_sigma, lateral_sigma])
for i, sigma in enumerate(sigmas):
log_img = (
-gaussian_laplace(image, sigma=sigma)
* rescale_factor
* (np.mean(sigma) / np.mean(sigmas[0])) ** 2
* (np.mean(sigma) / scale_norm) ** 2
)
scale_cube[..., i] = h_maxima(log_img, h=h_, footprint=ball(1))

Expand Down

0 comments on commit 4e25410

Please sign in to comment.