Skip to content

Create ASSERT_IMAGE_NEAR which compares two images for equality #3170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

umar456
Copy link
Member

@umar456 umar456 commented Aug 17, 2021

Add an image comparison assertion to the tests that compares two images
and if there is an error, uploads the result and the gold image to CDash
for comparison. Useful for when image tests fail

Description

ASSERT_IMAGE_NEAR will compare two images for similarity and upload
the image to ci.arrayfire.org if the test fails. This allows us to quickly view
the errors by going to the site and viewing the differences to determine the
error.

This assertion works on both af::array and af_array objects. It currently
supports f32, f64, u8, and b8 images but can support additional types
fairly easily.

Changes to Users

N/A

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • Functions documented

Add an image comparison assertion to the tests that compares two images
and if there is an error, uploads the result and the gold image to CDash
for comparison. Useful for when image tests fail
@umar456 umar456 added the test label Aug 17, 2021
@umar456 umar456 requested a review from 9prady9 August 17, 2021 01:07
Copy link
Member

@9prady9 9prady9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@9prady9 9prady9 merged commit 1b95366 into arrayfire:master Aug 17, 2021
@9prady9 9prady9 deleted the assert_img branch August 17, 2021 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants