Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HSVColor ¶
type HSVColor struct { H float64 // 0 <= H <= 360 S float64 // 0 <= S <= 1 V float64 // 0 <= V <= 1 }
func NewHSVFromRGB ¶
type ImageDescriptor ¶
func NewImageDescriptor ¶
func NewImageDescriptor(sha1 string, picture image.Image, qtyBins QtyBins) *ImageDescriptor
func NewImageDescriptorFromFile ¶
func NewImageDescriptorFromFile(reader io.Reader, qtyBins QtyBins) (*ImageDescriptor, error)
const (
hBinsQty = 8 // 0 - 44, 45 - 89, ... 315 - 360 sBinsQty = 12 vBinsQty = 3
)
type ImageScorer ¶
type ImageScorer interface {
Score(seedImage, imageBeingScored *ImageDescriptor) MatchScore
}
type LocalLocation ¶
type LocalLocation struct {
LocationOnDisk string
}
func NewLocalLocation ¶
func NewLocalLocation(lastKnownLocation string) *LocalLocation
func (*LocalLocation) LastKnownLocation ¶
func (d *LocalLocation) LastKnownLocation() string
func (*LocalLocation) Protocol ¶
func (d *LocalLocation) Protocol() string
type Location ¶
Location is a representation of the last known location of the image (on disk, via http, etc) It doesn't really sit so well in the core image search code, but the results are not very useful without a location the top-ranked images can be found at
type MatchScore ¶
type MatchScore float64
type PersistedDescriptorWithMatchScore ¶
type PersistedDescriptorWithMatchScore struct { MatchScore MatchScore Descriptor *PersistedImageDescriptor }
func NewPersistedDescriptorWithMatchScore ¶
func NewPersistedDescriptorWithMatchScore(matchScore MatchScore, descriptor *PersistedImageDescriptor) *PersistedDescriptorWithMatchScore
type PersistedImageDescriptor ¶
type PersistedImageDescriptor struct { *ImageDescriptor Location }
func FileDescriptorFromFile ¶
func NewPersistedImageDescriptor ¶
func NewPersistedImageDescriptor(descriptor *ImageDescriptor, location Location) *PersistedImageDescriptor
Source Files ¶
Click to show internal directories.
Click to hide internal directories.