Skip to content

Conversation

@rashidraihan
Copy link

Fixes issue #2

Issue:
The pipeline crashed or distorted images when inputs were sized differently, as the Walsh–Hadamard transform takes power‑of‑2, same vector lengths.

Fix:

  • Pad every image individually to the nearest square power‑of‑2 (pad2d_to_pow2).
  • Flatten in column-major (Fortran) order and reshape again in the same order.
  • Reshape after decoding to the padded square, and then crop to the original size.

Followed on 33×40 & 41×34 images; decoded results now exactly like originals with no errors or stripes.

@danielbultrini
Copy link
Contributor

Thanks for your submission rashidraihan! The fix works, but sadly someone submitted an equally working fix earlier than you. I hope that our decision is understandable.

@rashidraihan
Copy link
Author

Thanks a lot for the update! While I’m a bit sad I wasn’t first, I'm grateful for the opportunity to work on the issue and make my very first contribution. I'm glad my fix was valid. I'll definitely keep an eye out for other opportunities to contribute in the future.

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

Successfully merging this pull request may close these issues.

2 participants