Module imageproc::utils [] [src]

Utils for testing and debugging.

Structs

TestBuffer

Wrapper for image buffers to allow us to write an Arbitrary instance.

Traits

ArbitraryPixel

Workaround for not being able to define Arbitrary instances for pixel types defines in other modules.

Functions

describe_pixel_diffs

Gives a summary description of a list of pixel diffs for use in error messages.

edge_detect_bench_image

Gray image to use in edge detection benchmarks. Creates a white rectangle centered in black background.

gray_bench_image

Gray image to use in benchmarks. This is neither noise nor similar to natural images - it's just a convenience method to produce an image that's not constant.

load_image_or_panic

Loads image at given path, panicking on failure.

pixel_diff_summary

Human readable description of some of the pixels that differ between left and right, or None if all pixels match.

pixel_diffs

Lists pixels that differ between left and right images.

rgb_bench_image

RGB image to use in benchmarks. See comment on gray_bench_image.

significant_pixel_diff_summary

Human readable description of some of the pixels that differ signifcantly (according to provided function) between left and right, or None if all pixels match.

Type Definitions

GrayTestImage

8bpp grayscale TestBuffer.

RgbTestImage

24bpp RGB TestBuffer.