FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Implement the comparison of images ignore translation for #217 by Cheese-Bar · Pull Request #222 · romankh3/image-comparison · GitHub

Repository navigation

Implement the comparison of images ignore translation for #217 - #222

Open
Cheese-Bar wants to merge 2 commits into
romankh3:masterfrom
Cheese-Bar:try_to_solve_#217
Open

Cheese-Bar wants to merge 2 commits into
romankh3:masterfrom
Cheese-Bar:try_to_solve_#217

Conversation

Copy link
Copy Markdown
Contributor

PR Details

Description

  • Add a public function compareImagesIgnoreBackground() in ImageComparison, which provide an enhancement to compare two pictures while ignore there position in the same pure bacground.
  • Three different test cases are added to confirm it's correctness.
  • Fix a small path error in shouldProperlyHandleBug180FromRoot().

Related Issue

Motivation and Context

  • Users sometimes only care if the content in the image has been modified, not the background, such as ignore the leading line space in issue [IMPROVEMENT] - Ignoring linespaces and comparing only text and styling changes #217 .
  • Therefore, I added a method that automatically counts the pixels in the image with the most pixels and uses them as background values. Then select the subgraph of the non-background region for comparison.

How Has This Been Tested

Three test cases were added to the unit test, respectively testing issue 217, the white background with the same content that should MATCH, and the green background with modified content that should MISMATCH.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Cheese-Bar and others added 2 commits April 24, 2022 20:27
…son, which provide an enhancement to compare two pictures while ignore there position in the same pure bacground. Three different test cases are added to confirm it's correctness. The related issue is romankh3#217

Copy link
Copy Markdown
Owner

Looks interesting, I'll see it soon

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL