Skip to content

Commit

Permalink
undelete difference test
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Sep 26, 2023
1 parent 495f013 commit bd8ea53
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ public class FilterDifferenceTest {
@Test
public void test() throws IOException {
TransformedImage src = new TransformedImage( ImageIO.read(new FileInputStream("src/test/resources/chicken.png")) );
Filter_GaussianBlur a = new Filter_GaussianBlur(src,2);
FilterGaussianBlur a = new FilterGaussianBlur(src,2);
TransformedImage a2 = a.filter();
ImageIO.write(a2.getSourceImage(), "jpg", new java.io.File("src/test/resources/chicken-a.jpg"));

Filter_GaussianBlur b = new Filter_GaussianBlur(src,4);
FilterGaussianBlur b = new FilterGaussianBlur(src,4);
TransformedImage b2 = b.filter();
ImageIO.write(b2.getSourceImage(), "jpg", new java.io.File("src/test/resources/chicken-b.jpg"));

Filter_Scale scale = new Filter_Scale(b2,0.85);
FilterScale scale = new FilterScale(b2,0.85);
TransformedImage afterScale = scale.filter();
ImageIO.write(afterScale.getSourceImage(), "jpg", new java.io.File("src/test/resources/chicken-c.jpg"));

Filter_Difference diff = new Filter_Difference(a2,afterScale);
FilterDifference diff = new FilterDifference(a2,afterScale);
TransformedImage afterDiff = diff.filter();
ImageIO.write(afterDiff.getSourceImage(), "jpg", new java.io.File("src/test/resources/chicken-d.jpg"));

Filter_Threshold threshold = new Filter_Threshold(afterDiff,8);
FilterThreshold threshold = new FilterThreshold(afterDiff,8);
TransformedImage afterThreshold = threshold.filter();

ImageIO.write(afterThreshold.getSourceImage(), "jpg", new java.io.File("src/test/resources/chicken-difference.jpg"));
Expand Down

0 comments on commit bd8ea53

Please sign in to comment.