Skip to content

How to saved hashes for future comparison?  #45

@k0fi

Description

@k0fi

After I get an image hashed:

	hash1, err := goimagehash.AverageHash(img1)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("hash of image is:", hash1)
	fmt.Println("hash1.ToString():", hash1.ToString())

I get

hash of image is: &{9222170938831798272 1}
hash1.ToString(): a:7ffbbb9b93000000

My problem is how to save hash1 in database, so that later on I can retrive it and compare its distance with newly computed hash2 using:

distance, _ := hash1.Distance(hash2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions