histogram

package
v0.0.0-...-bbf78bc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Histogram

type Histogram interface {
	Values() [256]uint
	Cumulative() [256]uint
}

type ImageHistogram

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

ImageHistogram encapsulates the data extracted from an image bundled with the logic used to extract it in order to apply meaningful transformations to it

func NewImageHistogram

func NewImageHistogram(img image.Image, eval strategy.ColorEvaluation) *ImageHistogram

func (*ImageHistogram) Cumulative

func (h *ImageHistogram) Cumulative() [256]uint

func (*ImageHistogram) Equalize

func (h *ImageHistogram) Equalize(correction strategy.ColorCorrection) image.Image

Equalize returns a new image corresponding to the last image scanned with this histogram, having a cumulative histogram as close to a linear ramp as possible with the available values

func (*ImageHistogram) Match

func (h *ImageHistogram) Match(target Histogram, correction strategy.ColorCorrection) image.Image

Match returns a new image corresponding to the last image scanned with this histogram, having a cumulative histogram as close to a given set of values as possible with the available values

func (*ImageHistogram) Values

func (h *ImageHistogram) Values() [256]uint

type ValueHistogram

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

func (*ValueHistogram) Cumulative

func (h *ValueHistogram) Cumulative() [256]uint

func (*ValueHistogram) Values

func (h *ValueHistogram) Values() [256]uint

Jump to

Keyboard shortcuts

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