-
Notifications
You must be signed in to change notification settings - Fork 0
FastIC samples
AvadoAvakado edited this page Dec 1, 2020
·
5 revisions
Here is some examples of using FastIC's Comparator with different set ups:
`new Comparator().compareImages(new File("firstImagePath"), new File("firstImagePath"));`
Returns:
true
Image:
Resized image 10x10 (zoomed):
Simplified image 10x10 (zoomed):
`new Comparator().compareImages(new File("firstImagePath"), new File("secondImagePath"));`
Returns:
false
| First image | Second image |
|---|---|
![]() |
![]() |
| First image resized 10x10(zoomed) | Second image resized 10x10(zoomed) |
|---|---|
![]() |
![]() |
| First image simplified 10x10(zoomed) | Second image simplified 10x10(zoomed) |
|---|---|
![]() |
![]() |
`new Comparator().compareImages(new File("firstImagePath"), new File("firstExtendedImagePath"));`
Returns:
true
| First image(png 512x512) | Extended copy (png 512x650) |
|---|---|
![]() |
![]() |
| First image resized 10x10(zoomed) | Extended copy resized 10x10(zoomed) |
|---|---|
![]() |
![]() |
| First image simplified 10x10(zoomed) | Extended copy simplified 10x10(zoomed) |
|---|---|
![]() |
![]() |
`new Comparator().compareImages(new File("firstImagePath"), new File("firstImageWithLinePath"));`
Returns:
false
| First image | Copy with line |
|---|---|
![]() |
![]() |
| First image resized 10x10(zoomed) | Copy with line resized 10x10(zoomed) |
|---|---|
![]() |
![]() |
| First image simplified 10x10(zoomed) | Copy with line simplified 10x10(zoomed) |
|---|---|
![]() |
![]() |
`Comparator comp = new Comparator();`
comp.setPercentageOfAllowableDifference(4);
comp.compareImages(new File("firstImagePath"), new File("firstImageWithLinePath"));
Returns:
true
NOTE:
if you look at the simplified pictures, you can notice that only 4 pixels differ in the simplified pictures, which at a picture resolution of 10x10 is exactly 4 percent indicated during tuning
| First image | Copy with line |
|---|---|
![]() |
![]() |
| First image resized 10x10(zoomed) | Copy with line resized 10x10(zoomed) |
|---|---|
![]() |
![]() |
| First image simplified 10x10(zoomed) | Copy with line simplified 10x10(zoomed) |
|---|---|
![]() |
![]() |
`Comparator comp = new Comparator(HashDetailing.HASH_DETAILING_6, 20, 4);` `comp.compareImages(new File("firstImagePath"), new File("firstImageWithLinePath"));`
Returns:
false
| First image | Copy with line |
|---|---|
![]() |
![]() |
| First image resized 20x20(zoomed) | Copy with line resized 20x20(zoomed) |
|---|---|
![]() |
![]() |
| First image simplified 20x20(zoomed) | Copy with line simplified 20x20(zoomed) |
|---|---|
![]() |
![]() |























