Documentation
¶
Index ¶
- type OpVals
- type Opponents
- func (i Opponents) Desc() string
- func (i Opponents) Int64() int64
- func (i Opponents) MarshalText() ([]byte, error)
- func (i *Opponents) SetInt64(in int64)
- func (i *Opponents) SetString(s string) error
- func (i Opponents) String() string
- func (i *Opponents) UnmarshalText(text []byte) error
- func (i Opponents) Values() []enums.Enum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpVals ¶
type OpVals struct { // red vs. green (long vs. medium) RedGreen float32 // blue vs. yellow (short vs. avg(long, medium)) BlueYellow float32 // greyscale luminance channel -- typically use L* from LAB as best Grey float32 }
OpVals holds color opponent values based on cone-like L,M,S inputs These values are useful for generating inputs to vision models that simulate color opponency representations in the brain.
type Opponents ¶
type Opponents int32 //enums:enum
Opponents enumerates the three primary opponency channels: WhiteBlack, RedGreen, BlueYellow using colloquial "everyday" terms.
const OpponentsN Opponents = 3
OpponentsN is the highest valid value for type Opponents, plus one.
func OpponentsValues ¶
func OpponentsValues() []Opponents
OpponentsValues returns all possible values for the type Opponents.
func (Opponents) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*Opponents) SetString ¶
SetString sets the Opponents value from its string representation, and returns an error if the string is invalid.
func (*Opponents) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.