Skip to content

picture rotated when applying a transformation ? #3

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

Closed
PicoJr opened this issue Sep 21, 2018 · 2 comments
Closed

picture rotated when applying a transformation ? #3

PicoJr opened this issue Sep 21, 2018 · 2 comments

Comments

@PicoJr
Copy link

PicoJr commented Sep 21, 2018

Hello,

It appears that pictures are rotated during the transformation:

picojr

picojr-st

I haven't found out what is the cause for it yet ^^

But since it occurs for each transformation:

I guess it involves a function that is called regardless of the transformation.

Take care,

@PicoJr
Copy link
Author

PicoJr commented Sep 21, 2018

After further investigation:

Conversion to LMS seems to be the cause for the 1/4 rotation

  • image arrays are matrices -> line i, column j, rgb k -> top right pixel is (0, width)
  • PIllow images -> cartesian with origin top left -> top right pixel is (width, 0)

edit: the suggestion below only works for square ratio pictures.

editablePhoto[i,j,k] = photo[i,j][k] should be editablePhoto[i,j,k] = photo[j,i][k]

As for the symmetry, the normalization seems to be the cause.

I must admit I don't understand why a normalization is required ^^

Did you find the algorithm described somewhere?

Take care,

@tsarjak
Copy link
Owner

tsarjak commented Apr 3, 2021

After further investigation:

Conversion to LMS seems to be the cause for the 1/4 rotation

  • image arrays are matrices -> line i, column j, rgb k -> top right pixel is (0, width)
  • PIllow images -> cartesian with origin top left -> top right pixel is (width, 0)

edit: the suggestion below only works for square ratio pictures.

editablePhoto[i,j,k] = photo[i,j][k] should be editablePhoto[i,j,k] = photo[j,i][k]

As for the symmetry, the normalization seems to be the cause.

I must admit I don't understand why a normalization is required ^^

Did you find the algorithm described somewhere?

Take care,

Yes, I have the link to the paper. Also checkout the updated version. It fixes all the issues.
https://arxiv.org/pdf/1711.10662.pdf

@tsarjak tsarjak closed this as completed Apr 3, 2021
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