-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution for issue#190 #229
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss my comments
@@ -16,11 +16,18 @@ | |||
import javax.imageio.ImageIO; | |||
import javax.swing.ImageIcon; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, remove extra lines.
/** | ||
* Tools for the {@link ImageComparison} object. | ||
*/ | ||
public final class ImageComparisonUtil { | ||
|
||
public static int OFFSET = 0xff; | ||
public static int EIGHT = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the difference between EIGHT
and TENSIX
?
@@ -64,4 +64,34 @@ | |||
</plugin> | |||
</plugins> | |||
</build> | |||
|
|||
<reporting> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tell me please, for what reason you've added it?
e27a49d
to
89e24bc
Compare
Please, fix the build |
PR Details
To solve the problem in issue, I modify the formula to calculate the percentage of different pixels.
Description
I add a function
isDiffPixel()
to return true if two pixels have the different RGBs, and in functiongetDifferencePercent()
, the formula to calculate the percentage is 100 * diff pixels number / all pixels number.Related Issue
Motivation and Context
The original formula to calculate the percentage of different pixels is not intuitive and clear to the user. The new calculation formula makes it easier for users to know the number of different pixels.
How Has This Been Tested
Two tests are for the comparison with different images and the same images, I add a new assert to check the percentage of diff Pixels / all Pixels is right.
Types of changes
Checklist