Custom Test Profiles

You can create your own test profiles to make AntiDitto match images the way you want.

The Test Profiles screen

image

This screen is displayed when you choose the Add New or Manage Existing menu options under Tools>Test Profiles.  When adding a new profile, the list to choose a profile is disabled and placeholder information is added.  When managing existing profiles, you can choose a profile to edit form the Profiles list and the information will be filled in for editing.

The name and description field are plain text values.  The description will be shown as a tool tip when the profile is selected in the main screen.

Sort order determines the order in which the profile appears in the Test Profile drop down in the main screen.

Test selection

The test grid has two fields: Type and Parameters. 

Type is a dropdown list showing the available test types to utilize.  These types are:

  • Exact Compare – Performs a hash comparison between two images.  There are no parameters needed for this type
  • Visual Compare – Performs a visual comparison of two images.  The parameter is a double value indicating the percentage difference that is allowed.  For example, .01 would be 1% difference allowed between the two images, which is huge amount.  The Basic profile uses .002, which is 0.2% and might still be considered too forgiving.
  • Colorless Compare – The same as Visual Compare except the two images are changed to greyscale before comparison.  The parameter is also a double indicating percentage difference allowed.  While converting to greyscale can fix some false positives between color differences, the luminosity of colors converted to grey might still be perceived as a difference.
  • Rotated Compare – This test type checks one image against a rotated and flipped version on the other image.  Checks at 90, 180, and 270 degrees are performed, as well as a horizontal flip (mirror image left to right).  The parameter is the same as Visual Compare, a double indicating percentage difference allowed.  Because this type performs four tests at once, using this test type will significantly slow the processing time.

The grid does allow multiple types to be defined for a test and those types are applied in an OR function.  Meaning, of you have a Visual Compare and a Rotated Compare in one profile, the Visual Compare is performed and if it fails, the rotated compare is performed.  If the Visual Compare passes, the Rotated Compare is not performed.  For this reason, more expensive types should appear later in the list.

The Import Test Profile screen

To aid in the extension of AntiDitto, an import profile can be added from a JSON string.  This allows sharing of test profiles online, without having to resort to manual JSON file editing.

image

To import a new test profile, paste the JSON code into the text box and click Import.  If the JSON’s structure is a valid test profile, the test profile will be added to the available list.

Test profiles are stored in the application’s folder with a filename of testprofiles.json.  To share a custom profile, open this file and copy out the test profile node from the JSON.

An example test profile looks like:

{
“Name”: “Exact Copy”,
“Description”: “Must be a bitwise duplicate of another image”,
“Tests”: [{ “TestType”: “Exact Compare”, “TestParameters”: [“”] }],
“SortOrder”: 2
}