-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17556 from kostrykin/files_diff_images
Add `image_diff` comparison method for test output verification using images
- Loading branch information
Showing
21 changed files
with
291 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<tool id="image_diff" name="image_diff" version="0.1.0"> | ||
<command><![CDATA[ | ||
cp '$in' '$out' | ||
]]></command> | ||
<inputs> | ||
<param name="in" type="data" format="data"/> | ||
</inputs> | ||
<outputs> | ||
<data name="out" format="data"/> | ||
</outputs> | ||
<tests> | ||
<!-- test pair of equal images (but different formats) --> | ||
<test> | ||
<param name="in" value="im1_uint8.png" /> | ||
<output name="out" value="im1_uint8.png" compare="image_diff" metric="mae" /> | ||
</test> | ||
<test> | ||
<param name="in" value="im1_uint8.tif" /> | ||
<output name="out" value="im1_uint8.png" compare="image_diff" metric="mse" eps="0" /> | ||
</test> | ||
<test> | ||
<param name="in" value="im1_uint8.png" /> | ||
<output name="out" value="im1_uint8.png" compare="image_diff" metric="rms" eps="0" /> | ||
</test> | ||
<!-- test pair of different images --> | ||
<test> | ||
<param name="in" value="im2_a.png" /> | ||
<output name="out" value="im2_b.png" compare="image_diff" metric="mae" eps="0.25" /> | ||
</test> | ||
<!-- test RGB data --> | ||
<test> | ||
<param name="in" value="im3_a.png" /> | ||
<output name="out" value="im3_b.tif" compare="image_diff" metric="fro" eps="256" /> | ||
</test> | ||
</tests> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.