function

package
v0.0.0-...-b7be116 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(req []byte) string

Handle a serverless request

Types

type Cld

type Cld struct {
	// contains filtered or unexported fields
}

Cld is the main entry struct for the Coherent Line Drawing operations.

func NewCLD

func NewCLD(imgFile string, cldOpts options) (*Cld, error)

NewCLD is the constructor method which require the source image and the CLD options as parameters.

func (*Cld) GenerateCld

func (c *Cld) GenerateCld() []byte

GenerateCld is the entry method for generating the coherent line drawing output. It triggers the generate method in iterative manner and returns the resulting byte array.

type Etf

type Etf struct {
	// contains filtered or unexported fields
}

Etf is the main entry struct for the edge tangent flow computation. It encompass the basic operational entities needed for the matrix operations.

func NewETF

func NewETF() *Etf

NewETF is a constructor method which initializes an Etf struct.

func (*Etf) Init

func (etf *Etf) Init(rows, cols int)

Init initializes the ETF matrices.

func (*Etf) InitDefaultEtf

func (etf *Etf) InitDefaultEtf(file string, size image.Point) error

InitDefaultEtf computes the gradientField matrix by setting up the pixel values from original image on which a sobel threshold has been applied.

func (*Etf) RefineEtf

func (etf *Etf) RefineEtf(kernel int)

RefineEtf will compute the refined edge tangent flow based on the formulas from the original paper.

type PostProcessing

type PostProcessing struct {
	Etf
	// contains filtered or unexported fields
}

PostProcessing is a basic struct used for post processing operations

func NewPostProcessing

func NewPostProcessing(blurSize int) *PostProcessing

NewPostProcessing is a constructor method which initialize a PostProcessing struct.

func (*PostProcessing) AntiAlias

func (pp *PostProcessing) AntiAlias(src, dst gocv.Mat)

AntiAlias smooths out the destination matrix.

func (*PostProcessing) VizEtf

func (pp *PostProcessing) VizEtf(flowField, dst *gocv.Mat)

VizEtf visualize the edge tangent flow flowfield.

Jump to

Keyboard shortcuts

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