Documentation
¶
Index ¶
Constants ¶
const ( BOUND_PATH string = "./images/" OUT_PATH string = "./output/" //todo: customize DEFAULT_CONCURRENCY int = 10 )
Variables ¶
This section is empty.
Functions ¶
func TestImageMaster_Find ¶
Types ¶
type Changeable ¶
type changeable used for assertion on parsed images
type ImageMaster ¶
type ImageMaster struct {
// contains filtered or unexported fields
}
func NewImageMaster ¶
func NewImageMaster() *ImageMaster
func (*ImageMaster) Find ¶
func (im *ImageMaster) Find(object string) error
the folder passed to the docker image is mounted to the //images folder inside the container, so we perform our operations inside there if cached return from cache 1. stash labels in db to use next time its called with this image path 2. foreach the labels and if even partial match to word, store image in outputs
func (*ImageMaster) GrayScale ¶
func (im *ImageMaster) GrayScale() error
The GrayScale function uses a standart method from the image library to convert an image to GrayScale and saves it to the outPath directory For a realistic RGB -> grayscale conversion, the following weights have to be used: Y = 0.299 * R + 0.587 * G + 0.114 * B inPath is the path from which an image is taken outPath is the path where the image is saved
func (*ImageMaster) ListAll ¶
func (im *ImageMaster) ListAll()
func (*ImageMaster) Sharpen ¶
func (im *ImageMaster) Sharpen() error
apply sharpening via morphological operations
func (*ImageMaster) ShowHelp ¶
func (im *ImageMaster) ShowHelp()
func (*ImageMaster) Smoothen ¶
func (im *ImageMaster) Smoothen(timesToRepeat int) error
The smoothen function uses a gaussian blur with kernel of size 5x5 to smoothen an image inPath is the path from which an image is taken outPath is the path where the image is saved timesToRepeat is an integer value, signaling how many times the blur would be applied to the image a.k.a filter strength
type MongoClient ¶
type MongoClient interface { GetAllImageClassifications() ([]mongo.ImageClassification, error) AddImageClassification(imagePath string, probabilities []string) error GetImageClassification(imagePath string) (mongo.ImageClassification, error) }