You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use #pharecor again like I did for another project ~2 years ago but I still fail to understand the result of this function.
For example, here are two images:
If we compare under names a2 and a3:
we see that the resulting image was reflected, ok, then we assume there is the "negative axis quarter". Does it mean that we shift only up to half of the image size? Let's test a bigger shift:
nope! it's detected the shift farther than a half.
Now the question is: How do we recognize it's a shift "3/4 right and a bit down" and not "1/4 left and a bit down"?
Previously when I faced this problem I was taking 4 variants [dx,dy], [dx-width,dy], [dx,dy-height], [dx-width,dy-height], cropping out the intersecting part and used an heuristic such as .min_by{ ... (a_crop - b_crop).avg } but isn't there a better way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to use
#pharecor
again like I did for another project ~2 years ago but I still fail to understand the result of this function.For example, here are two images:
If we compare under names
a2
anda3
:we can interpretate this as "the
a3
matchesa2
if we shift it right and a bit down". Now what if we swap them?we see that the resulting image was reflected, ok, then we assume there is the "negative axis quarter". Does it mean that we shift only up to half of the image size? Let's test a bigger shift:
nope! it's detected the shift farther than a half.
Now the question is: How do we recognize it's a shift "3/4 right and a bit down" and not "1/4 left and a bit down"?
Previously when I faced this problem I was taking 4 variants
[dx,dy], [dx-width,dy], [dx,dy-height], [dx-width,dy-height]
, cropping out the intersecting part and used an heuristic such as.min_by{ ... (a_crop - b_crop).avg }
but isn't there a better way?Beta Was this translation helpful? Give feedback.
All reactions