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

Make Portilla-Simoncelli texture model work on arbitrarily-sized images #221

Open
billbrod opened this issue Sep 20, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@billbrod
Copy link
Collaborator

Because of how the Portilla-Simoncelli model handles multiscale representation, the input image needs to be divisible by 2^n_scales. There are two issue:

  • po.tools.signal.shrink, which currently throws an exception if you try to e.g., downsample an image of size (225, 225) by a factor of 2. If you do the obvious thing (just round), the shrunken image looks wrong. It's probably an off by one error, so tracking that down will probably work. This happens in _reconstruct_lowpass_at_each_scale.
  • There's something similar with po.tools.signal.expand as used in _double_phase_pyr_coeffs: if you expand an image of (128, 128) to (256, 256) and compare it against the finer-scale image of size (255, 255), you get a size error. Probably fixed by just lopping off one side or the other, but worth being careful.
@billbrod billbrod added the enhancement New feature or request label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant