Documentation ¶
Overview ¶
Package facebox provides a client for accessing Facebox services.
Index ¶
- type Client
- func (c *Client) Check(image io.Reader) ([]Face, error)
- func (c *Client) CheckBase64(data string) ([]Face, error)
- func (c *Client) CheckURL(imageURL *url.URL) ([]Face, error)
- func (c *Client) Info() (*boxutil.Info, error)
- func (c *Client) OpenState() (io.ReadCloser, error)
- func (c *Client) PostState(r io.Reader) error
- func (c *Client) PostStateURL(stateURL *url.URL) error
- func (c *Client) Remove(id string) error
- func (c *Client) Rename(id, name string) error
- func (c *Client) RenameAll(oldName, newName string) error
- func (c *Client) Similar(image io.Reader) ([]Similar, error)
- func (c *Client) SimilarBase64(data string) ([]Similar, error)
- func (c *Client) SimilarID(id string) ([]Similar, error)
- func (c *Client) SimilarURL(imageURL *url.URL) ([]Similar, error)
- func (c *Client) Teach(image io.Reader, id, name string) error
- func (c *Client) TeachBase64(data, id, name string) error
- func (c *Client) TeachURL(imageURL *url.URL, id, name string) error
- type ErrFacebox
- type Face
- type Rect
- type Similar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // HTTPClient is the http.Client that will be used to // make requests. HTTPClient *http.Client // contains filtered or unexported fields }
Client is an HTTP client that can make requests to the box.
func (*Client) CheckBase64 ¶
CheckBase64 checks the Base64 encoded image for faces.
func (*Client) OpenState ¶
func (c *Client) OpenState() (io.ReadCloser, error)
OpenState opens the state file for reading. Clients must call Close.
func (*Client) PostStateURL ¶
PostStateURL tells facebox to download the state file specified by the URL.
func (*Client) SimilarBase64 ¶
SimilarBase64 checks the Base64 encoded image for similar faces.
func (*Client) SimilarURL ¶
SimilarURL checks the image at the specified URL for similar faces.
func (*Client) Teach ¶
Teach teaches facebox the face in the io.Reader. The name should be the name of the person who owns the face. The id should be a unique identifier for the image, usually the filename.
func (*Client) TeachBase64 ¶
TeachBase64 teaches facebox the face in the Base64 encoded image. See Teach for more information.
type ErrFacebox ¶
type ErrFacebox string
ErrFacebox represents an error from Facebox.
func (ErrFacebox) Error ¶
func (e ErrFacebox) Error() string