Skip to content

Commit

Permalink
(doc) Add documentation to PixelMatcherResult
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMartinez committed Dec 8, 2016
1 parent 0bdfca4 commit 5d9f4be
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

import javafx.scene.image.Image;

/**
* Indicates how similar/dissimilar two images were on a pixel-to-pixel comparison level via
* {@link PixelMatcher#match(Image, Image)}.
*/
public class PixelMatcherResult {

//---------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -48,26 +52,44 @@ public PixelMatcherResult(Image matchImage,
// METHODS.
//---------------------------------------------------------------------------------------------

/**
* Gets the image whose pixels indicate matches and mismatches between the two original images.
*/
public Image getMatchImage() {
return matchImage;
}

/**
* Gets the total number of pixels in the match image
*/
public long getTotalPixels() {
return totalPixels;
}

/**
* Gets the total number of pixels that matched between the two original images.
*/
public long getMatchPixels() {
return matchPixels;
}

/**
* Gets the total number of pixels that did not match between the two original images.
*/
public long getNonMatchPixels() {
return totalPixels - matchPixels;
}

/**
* Gets the percentage of pixels that matched between the two original images
*/
public double getMatchFactor() {
return matchFactor;
}

/**
* Gets the percentage of pixels that did not match between the two original images
*/
public double getNonMatchFactor() {
return 1.0 - matchFactor;
}
Expand Down

0 comments on commit 5d9f4be

Please sign in to comment.