#test-cases #image #comparison #renderer #diffing #diff #algorithm

rendiff

Image comparison (diffing) for computer graphics renderer test cases

1 unstable release

0.1.0 May 6, 2023

#744 in Images

Download history 3/week @ 2024-01-05 9/week @ 2024-01-12 34/week @ 2024-01-19 1/week @ 2024-01-26 28/week @ 2024-02-02 102/week @ 2024-02-09 65/week @ 2024-02-16 108/week @ 2024-02-23 66/week @ 2024-03-01 33/week @ 2024-03-08 45/week @ 2024-03-15 85/week @ 2024-03-22 53/week @ 2024-03-29 6/week @ 2024-04-05 5/week @ 2024-04-12 5/week @ 2024-04-19

72 downloads per month

MIT/Apache

21KB
329 lines

rendiff

Image comparison (diffing) for computer graphics renderer test cases

The algorithm implemented in this Rust library is intended to allow comparing images of the same scene which were rendered using different algorithms, or different hardware, causing small “rounding errors” in either color or spatial position that should be ignored as insignificant.

See the library documentation for details on the algorithm used.

rendiff provides only a comparison algorithm which can use a pass/fail criterion, and a visual representation of the diff; it does not provide any test-framework features like loading expected images and overwriting them, or producing visual reports.

Stability

rendiff is being used within one of my other projects (all-is-cubes) and reliably performs its function. However, there are several features that it lacks, which may result in API changes in future versions:

  • Customizing the pixel comparison (color value distance) function.
  • More effective comparison of antialiased images.
  • Processing images of greater than 8 bits-per-component.
  • Not requiring the input to use the image type from the image library.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~10MB
~34K SLoC