app

package
v0.0.0-...-d54de9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BOUND_PATH          string = "./images/"
	OUT_PATH            string = "./output/" //todo: customize
	DEFAULT_CONCURRENCY int    = 10
)

Variables

This section is empty.

Functions

func TestImageMaster_Find

func TestImageMaster_Find(t *testing.T)

Types

type Changeable

type Changeable interface {
	Set(x, y int, c color.Color)
}

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)
}

type TensorFlowClient

type TensorFlowClient interface {
	ClassifyImage(image image.Image) ([]tensorflowAPI.Label, []float32, [][]float32, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL