GitHub - metaloom/video4j-fingerprint: Digital Video Fingerprinting Implementati...
source link: https://github.com/metaloom/video4j-fingerprint
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Video4j - Fingerprint
This project contains a Digital video fingerprinting implementation.
Details on the actual fingerprinting process can be found in this dedicated Blog post.
The actual fingerprinting process is relatively fast as it does not require complex transformation or edge detection.
Downside of the used stacking approach is however that there is no robustness against image rotation or mirroring of the image. Other solutions like pHash
might be better if this is a problematic limitation.
Maven
<dependency>
<groupId>io.metaloom.video</groupId>
<artifactId>video4j-fingerprint</artifactId>
<version>1.2.0</version>
</dependency>
Usage
Video4j.init();
// Create a fingerprinter for the video
MultiSectorVideoFingerprinter gen = new MultiSectorVideoFingerprinterImpl();
// Open the video using the Video4j API
try (Video video = Videos.open("src/test/resources/Big_Buck_Bunny_720_10s_30MB.mp4")) {
// Run the actual hashing process
MultiSectorFingerprint fingerprint = gen.hash(video);
String hex = fingerprint.hex();
// hex = 0001000100ff060006000f002e001d0084000600e40076d172c07c84ffcefffffefff8fffdff
// Or get the binary form of the fingeprint
byte[] bin = fingerprint.array();
// Access the vector data
float[] vec = fingerprint.vector();
// Print information about the fingerprint data
System.out.println(fingerprint.toString());
}
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK