filmdetect

package
v0.0.0-...-ebe128f Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FullScore = 16

The number of fields in Recipe

Variables

This section is empty.

Functions

func GetFiles

func GetFiles(path string) ([]string, error)

func ParseHighlightShadow

func ParseHighlightShadow(input string) (int, error)

func ParseSharpness

func ParseSharpness(input string) (int, error)

func ParseWhiteBalanceOffset

func ParseWhiteBalanceOffset(input string) (int, int, error)

func Run

func Run(simulationDir string, filename string)

CLI

Types

type Difference

type Difference struct {
	Input     Recipe
	Candidate Recipe
	Lines     [][]string
}

func Detect

func Detect(simulationDir string, filename string) ([]Difference, bool, error)

Detect is the main library function. It returns a list of differences, and the bool in the return means "were we able to find a perfect match?"

func DetectFromRecipes

func DetectFromRecipes(recipes []Recipe, recipe Recipe) ([]Difference, bool, error)

func DifferenceFromRecipes

func DifferenceFromRecipes(input, candidate Recipe) Difference

func (Difference) AsList

func (d Difference) AsList() []string

func (Difference) GetLines

func (d Difference) GetLines() [][]string

func (Difference) IsFullScore

func (d Difference) IsFullScore() bool

func (Difference) Score

func (d Difference) Score() int

func (Difference) String

func (d Difference) String() string

type Recipe

type Recipe struct {
	Name                 string `json:"name"`
	Author               string
	Url                  string
	FilmSimulation       string `json:"film_simulation"`
	GrainEffectSize      string `json:"grain_effect_size"`
	GrainEffectRoughness string `json:"grain_effect_roughness"`
	ColorChromeEffect    string `json:"color_chrome_effect"`
	ColorChromeFXBlue    string `json:"color_chrome_fx_blue"`
	WhiteBalanceMode     string `json:"white_balance_mode"`
	WhiteBalanceRed      int    `json:"white_balance_r"`
	WhiteBalanceBlue     int    `json:"white_balance_b"`
	DynamicRange         string `json:"dynamic_range"`
	Highlights           int    `json:"tone_curve_highlights"`
	Shadows              int    `json:"tone_curve_shadows"`
	Color                int
	Sharpness            int
	NoiseReduction       int `json:"noise_reduction"`
	Clarity              int
}

func GetRecipeFromFile

func GetRecipeFromFile(filename string) (Recipe, error)

func GetRecipeFromJson

func GetRecipeFromJson(b []byte) (Recipe, error)

func GetRecipes

func GetRecipes(simulationDir string) ([]Recipe, error)

func ParseRecipeFile

func ParseRecipeFile(filename string) (Recipe, error)

func (Recipe) String

func (r Recipe) String() string

Jump to

Keyboard shortcuts

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