Skip to content
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

Discrepancy in command line utility (ird) and python function (similarity) #31

Open
cs16s027 opened this issue Dec 14, 2017 · 0 comments

Comments

@cs16s027
Copy link

cs16s027 commented Dec 14, 2017

I am trying to register two images that have been spatially translated (no rotations). When I use the command line utility ird, I get the exact (x, y) coordinates. But when I use the python utility, I get erroneous results. This is not the case for all the images, but it does happen in a few cases. I am unable to attach the actual images for copyright reasons.

Using python

template = cv2.imread(template_image_path, 0)
print template.shape # 512x512
subject = cv2.imread(subject_image_path, 0)
print subject.shape # 512x512

from imreg_dft.imreg import similarity
similarity(template, subject)

Output

'tvec': array([-14.03552074, -0.08051801]), 'Dt': 0.25

Using ird command-line

ird template_image_path subject_image_path

Output

shift (x, y): 58.9625, -0.0204523 +-0.25

I am not able to figure out what is wrong here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant