You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am exploring Rust for image processing and am working on a small toy project. As a sanity check, I compare results with Python, which I am more familiar with. I noticed that decoding a JPEG with the image crate yields slightly different results than using Python's imageio. It looks like those are generally off by one. If this is to be expected with the JPEG algorithm (numerical instability, rounding), please disregard and close.
Expected
This is what the pixel values are in Python with imageio:
hi, author of jpeg decoder, yes this is to be expected. Jpeg is lossy and decoders are free to do what they want to a certain degreee so as long as thr deviation isn't big, this is normal
I am exploring Rust for image processing and am working on a small toy project. As a sanity check, I compare results with Python, which I am more familiar with. I noticed that decoding a JPEG with the
image
crate yields slightly different results than using Python'simageio
. It looks like those are generally off by one. If this is to be expected with the JPEG algorithm (numerical instability, rounding), please disregard and close.Expected
This is what the pixel values are in Python with
imageio
:Actual behaviour
This is what I get in Rust, iterating over and printing all pixels:
Reproduction steps
Example image
tests-tiny.jpg
Rust code
Python Code
The text was updated successfully, but these errors were encountered: