Documentation ¶
Index ¶
- func GammaExpand_F64(f float64) float64
- type Aff3
- type FloatGrid
- func (H *FloatGrid) CalculateGradients(depth int) (FloatGrid, float64)
- func (g1 *FloatGrid) Copy() *FloatGrid
- func (g1 *FloatGrid) DownSample() FloatGrid
- func (fg *FloatGrid) Dx() int
- func (fg *FloatGrid) Dy() int
- func (I *FloatGrid) FindMaxMinLumAtPercentile(minPrct, maxPrct float64) (float64, float64)
- func (g1 FloatGrid) GaussianBlur() FloatGrid
- func (fg *FloatGrid) Get(x, y int) float64
- func (g1 *FloatGrid) NewFromThis() FloatGrid
- func (fg *FloatGrid) Ptr2array() *float64
- func (fg *FloatGrid) Set(x, y int, v float64)
- func (fg *FloatGrid) Stats() string
- func (fg *FloatGrid) ToImg(title, filename string)
- func (A *FloatGrid) UpSampleInto(B *FloatGrid)
- type Mat3
- type Vec3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GammaExpand_F64 ¶
Types ¶
type FloatGrid ¶
type FloatGrid struct {
// contains filtered or unexported fields
}
A FloatGrid is a grid of floats, with some operations
func NewFloatGrid ¶
func (*FloatGrid) CalculateGradients ¶
func (*FloatGrid) DownSample ¶
DownSample returns a grid that is 1/4 of the size, averaging the values from the original.
func (*FloatGrid) FindMaxMinLumAtPercentile ¶
func (FloatGrid) GaussianBlur ¶
func (*FloatGrid) NewFromThis ¶
func (*FloatGrid) ToImg ¶
ToImg saves a simple grayscale, based on the range of values in the grid, and gamma scaling the gray to look normal for human vision
func (*FloatGrid) UpSampleInto ¶
UpSampleInto populates a grid `B`, which is assumed be 2x as big, by simply copying each value from `A` four times into a 2x2 block of values in `B`
type Vec3 ¶
Actual 3x3 matrixes, used for color transforms
func GammaExpand_sRGB ¶
https://www.sjbrown.co.uk/posts/gamma-correct-rendering/ - "linear RGB to sRGB" Each channel in `v` is assumed to be in the range [0,1]
func (Vec3) InvertDiag ¶
Places the vector on the diagonal of a matrix, then inverts it