transcolor

package module
v0.0.0-...-076680a Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2019 License: MIT Imports: 4 Imported by: 1

README

Go Color Transfer

Go Report Card

Transcolor is a simple color transfer library implemented according whitepaper.

That is pure Go implementation using https://github.com/lucasb-eyer/go-colorful to switch between color spaces.

Library is currently in Beta, so no benchmarks, optimizations, tests, or anything else unfortunately. I will improve this lib according to issues and personal needs

Docs

Follow godoc link

Example

An example and a program to provide simple color transfering.

Use ./run.sh script to see it in action, or compile and use for your own personal needs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transfer

func Transfer(src, target image.Image) image.Image

Transfer transfers color palette from one image to other It adjust color of source image based on target image

Types

type Lab

type Lab struct {
	Pix []float64
}

Lab is a representation of L*a*b* image

func ImageToLab

func ImageToLab(src image.Image) *Lab

ImageToLab converts image to L*a*b* image. That is made public for future needs to expose Lab image struct if necessary

func (*Lab) Stat

func (src *Lab) Stat() *LabStat

Stat calculates L*a*b* image stats

type LabStat

type LabStat struct {
	LStat Stat
	AStat Stat
	BStat Stat
}

LabStat is a set of stats calculated for each channel

type Stat

type Stat struct {
	Mean   float64
	StdDev float64
}

Stat is a set of channel statistics

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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