Skip to content

Picture Comparer v0.5d

Choose a tag to compare

@maksik997 maksik997 released this 12 Jul 23:27
55b3c0e

Description:

New version of the library completely changes how it works. Now user have to specify order of operations. Those changes allow user to define more flexible approach and allow some more user created content (like new comparing algorithms etc.). The library in it's current state allow you to define your own function (as in ImageRecord class), group by your own grouping algorithms (in current version I used checksum grouping, which isn't ideal), or using FileOperator load all the files that you want.
Additionally if you want, you're allowed to compare not only images but also any different files (as long as you specify your own algorithms and groupings).

Note:

What's now?
Well for now library is in good shape to leave it as it is. In future however it's quiet likely that I will enhance it, add new algorithms, change grouping algorithm for something better, maybe enhance I/O operations. Probably add some threading policy (now I use both virtual threading and traditional threading.).

Changes:

  • Added new FileOperator class inside IO package, which for now handles loading files.
  • Added new DCT class inside Algorithms package, which allows use of DCT algorithm (Fast DCT Lee) in Perceptual Hash creation.
  • Added new FilePredicate functional interface inside Comparator package, which is mandatory in current implementation, filters allow not-valid files. This interface is similar to Java's Predicate functional interface but throws IOException.
  • Added new ImageFilePredicate, which is implementation of FilePredicate, that allows to filter all non-image files.
  • Added new test class (FTest) which is simple implementation of the library.
  • Moved Utils package from Structures package into project directory (src/).
  • Modified tinylog.properties files.
  • Modified ImageRecord class, changing a little bit createChecksum method, adding two private methods: loadImage, compareImage (which are used by processing functions) and also added two fields: Function <...,...> pHashFunction, pixelByPixelFunction (which are used as processing functions).
  • Modified Record class, adding two methods: gropingByChecksum (which changes given Collection of File objects into map of Record sub-type objects), process (which process given Collection by map entries with given process functions).
  • Deleted Comparer class.
  • Deleted PictureComparer class.
  • Delete both of old test classes.
  • Updated .gitignore file.
  • Updated README.md file.
  • Updated pom.xml file, added TwelveMonkeys ImageIO enhancement, to allow loading different types of images using ImageIO class.

More Information about current release you can find in README.md file.
If you're interested in supporting this project (I don't know why, you could be q:), then you're welcome to post in discussion that hopefully is attached to this release.