-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does Difference of Gaussian need normalization? #4621
Comments
G(x, y, kσ ) − G(x, y, σ ) ≈ (k − 1)σ ^2∇ ^2 G. |
Hmm, I honestly don't know the answer to this. Thank you for raising the issue @hrch3n. @scikit-image/core can someone more familiar with |
Thanks for the reply. The reference I checked is "Distinctive Image Features from Scale-Invariant Keypoints", page 94. |
@hrch3n that paper doesn't have 94 pages? page 5 here https://people.eecs.berkeley.edu/~malik/cs294/lowe-ijcv04.pdf i also don't believe we should be normalizing the mutual differences one can also follow the derivation here on page 12 http://www.cs.toronto.edu/~jepson/csc420/notes/imageFeaturesIIIBinder.pdf so in fact if anything skimage should be normalizing by Edit: this must be code that's left over from when sigmas were chosen by linearly interpolating between min and max? In that case multiplying by sigma is correct Page 12 here |
Hi, I was going to open up an issue on this, but see it was already brought up. The current implement does get the scaling wrong: The current implementation does this: The bigger the Weirdly, there seems to be 2 ways to fix it:
(that's probably easiest)
gaussian_images = np.stack([gaussian_filter(image, s) for s in sigma_list])
gaussian_diffs = -1.0 * np.diff(gaussian_images, axis=0)
t_diffs = np.diff(sigma_list ** 2) # 't' is variance, sigma^2, in Lindeberg
dog_images = [
img * sigma ** 2 / dt
for (img, sigma, dt) in zip(gaussian_diffs, sigma_list[:-1], t_diffs)
] The first option seems easier, so if one of the other's don't get to it, I could put in a pull request to change that. |
closed by #4482 |
Description
At line 340 of blob.py, why do we need to multiply the average standard deviation to provide scale invariance? The Difference of Gaussian is already scale-invariant.
The text was updated successfully, but these errors were encountered: