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

About realization #4

Closed
syan1992 opened this issue Jul 26, 2018 · 5 comments
Closed

About realization #4

syan1992 opened this issue Jul 26, 2018 · 5 comments

Comments

@syan1992
Copy link

Hi,
I'd like to know if the realization similar to Matlab. I find the result seems different from matlab.
Thanks a lot.

@addisonElliott
Copy link
Owner

Not entirely sure. I did not compare this library's results with MATLAB.

Can you give an isolated example in MATLAB & Python that produces different results?

@syan1992
Copy link
Author

default

@syan1992
Copy link
Author

I subtract the result of matlab and python, I feel the difference of the boundary is large. I'm not sure if it related to the realization.

@addisonElliott
Copy link
Owner

Oh okay, I see what you are saying now. Attaining pixel-perfect polar transformations between MATLAB & Python will be difficult because the underlying methods used may be a bit different. Here are some reasons why:

  • The interpolation may be different, polarTransform defaults to bicubic. Not sure why MATLAB uses by default.
  • Increased accuracy due to Python using 64-bit floating point. Once again, not sure how many bits is used for floating point calculation. This is probably a small different.
  • Resolution of the polar image (polarImageSize). A difference in MATLAB/Python for resolution will cause a difference in the images.

Do the two images produced between MATLAB & polarTransform look similar? If so, that may be sufficient for your purposes. I did my best to validate the library to ensure that the polar transform was done correctly.

If you want to investigate further, please write a test case (MATLAB & polarTransform code) with example images that clearly shows the difference in images.

The steps for tracking this down would be to have a test case in Python & MATLAB that produces different results. Then pick one of the large pixel differences and do the math by hand to see which implementation is doing it correctly.

@syan1992
Copy link
Author

I got it. Thanks for ur detailed answer.

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

2 participants