reVReports.utilities.plots.compare_images_approx#

compare_images_approx(image_1_path, image_2_path, hash_size=12, max_diff_pct=0.25)[source]#

Check if two images match approximately

Parameters:
  • image_1_path (pathlib.Path) – File path to first image.

  • image_2_path (pathlib.Path) – File path to first image.

  • hash_size (int, default 12) – Size of the image hashes that will be used for image comparison, by default 12. Increase to make the check more precise, decrease to make it more approximate.

  • max_diff_pct (float, default 0.05) – Tolerance for the amount of difference allowed (0.05 = 5%). Increase to allow for a larger delta between the image hashes, decrease to make the check stricter and require a smaller delta between the image hashes.

Returns:

bool – Returns true if the images match approximately, false if not.