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
Image correlation correct? #940
Comments
Can you try putting values everywhere in both image. Background (0) will have random value to avoid NaN error, so right now you have a image with just background and one with data. That will not give a 1 result |
If a compare a bunch of zeros with a bunch of one and I print the result for one patch, I get:
So actually, the error comes from the zero-padding around the image. It should maybe be done only when the images do not have the same shape. If instead I do as you asked and compare a bunch of 1 with a bunch of 2, to make sure I don't have a 0-background, I get:
So here the zero-padding is not an issue (although I would change the eps added for a smaller value). But, in the middle of the image, I get:
And I'm really not sure why there's a 3 suddenly in the middle of my data. Do you think you have time to help me understand your patches code? We can check it together if you wish. |
Hi!
I tried to add the missing unit test in scil.image.tests.test_volume_math.py for the method correlation. I used:
This fails. The output correlation is:
which makes no sense to me.
Also, please note that currently, patch_radius is NEVER used in scilpy. To delete?
@frheault, you made the other tests in that file. Can you help?
The text was updated successfully, but these errors were encountered: