Skip to content

abates/disgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1d3adef · Jul 25, 2018

History

38 Commits
Jun 21, 2016
Jun 21, 2016
Jul 11, 2015
Feb 26, 2018
Jul 21, 2015
Jul 25, 2018
Feb 26, 2018
Jul 25, 2018
Feb 26, 2018
Feb 26, 2018
Jul 25, 2018
Jul 25, 2018

Repository files navigation

Duplicate Image Search in GO

Build Status GoDoc Coverage Status

This package is still a work in progress, but it works well in my own testing.

Example

package main

import "fmt"

import "github.com/abates/disgo"

func main() {
  // Create a disgo database with the default radix index
  db, _ := disgo.New()

  // load an image into the database and get the hash back
  file, _ := os.Open("test.png")
  hash, _ := db.AddFile(file)
  fmt.Printf("Image Hash: %08x\n", hash)

  // search for all hashes with a Hamming distance of 3
  // or less
  matches, _ := db.SearchByHash(hash, 3)
  fmt.Printf("Matches: %v\n", matches)
}

TODO

  • make radix index save/load functions thread safe
  • add record storage (e.g. file path) to database

About

Duplicate Image Search in GO

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages