Skip to content
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

Tests: Fix incorrect threshold in image comparisons #1647

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/render-image/check.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ int main(int argc, char** argv)

// Compare them
double error;
return img0.compare(img1, 50, error) ? EXIT_SUCCESS : EXIT_FAILURE;
return img0.compare(img1, 0.05, error) ? EXIT_SUCCESS : EXIT_FAILURE;
}
2 changes: 1 addition & 1 deletion examples/libf3d/python/img-cmp/img-cmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
diff = f3d.Image()
error = 0.0

result = img_0.compare(img_1, 50, diff, error)
result = img_0.compare(img_1, 0.05, diff, error)

if result:
print("Images are identical")
Expand Down
2 changes: 1 addition & 1 deletion python/testing/test_image_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def test_compare_with_file():

error = 0.0

assert img.compare(f3d.Image(reference), 50, error)
assert img.compare(f3d.Image(reference), 0.05, error)
2 changes: 1 addition & 1 deletion python/testing/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def test_load_memory():

error = 0.0

assert img.compare(f3d.Image(reference), 50, error)
assert img.compare(f3d.Image(reference), 0.05, error)