Documentation ¶
Index ¶
- func ApplyUnsharpMask(res, data, blurred []float32, gain float32, min, max, absThreshold float32)
- func Convolve1DX(res, data []float32, width int, kernel []float32)
- func Convolve1DY(res, data []float32, width int, kernel []float32)
- func GaussFilter2D(res, tmp, data []float32, width int, sigma float32)
- func GaussianDefiniteIntegral(mu, sigma, x float32) float32
- func GaussianKernel1D(sigma float32) (kernel []float32)
- func UnsharpMask(data []float32, width int, sigma float32, gain float32, ...) []float32
- type OpGamma
- type OpGammaPP
- type OpMidtones
- type OpNormalizeRange
- type OpScaleBlack
- type OpStretchIterative
- type OpUnsharpMask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyUnsharpMask ¶
Applies unsharp mask to 2D image given bz data and width, using provided radius for Gauss filter and gain for combination. Results are clipped to min..max. Pixels below the threshold are left unchanged. Overwrites tmp, and returns the result in res
func Convolve1DX ¶
Convolve the given 2D image provided by data and with with the given convolution kernel along the x axis, and store the result in res
func Convolve1DY ¶
Convolve the given 2D image provided by data and with with the given convolution kernel along the y axis, and store the result in res
func GaussFilter2D ¶
Generate a convolution kernel for a 2D gauss filter of given standard deviation, and applies it to the 2D image given by data and width. Overwrites tmp and returns the result in res.
func GaussianDefiniteIntegral ¶
Returns the definite integral of the gaussian function with midpoint mu and standard deviation sigma for input x
func GaussianKernel1D ¶
Generates a 1D gaussian kernel for the given sigma. Based on symbolic integration via error function
func UnsharpMask ¶
func UnsharpMask(data []float32, width int, sigma float32, gain float32, min, max, absThreshold float32) []float32
Applies unsharp mask to 2D image given bz data and width, using provided radius for Gauss filter and gain for combination. Results are clipped to min..max. Pixels below the threshold are left unchanged. Returns results in a newly allocated array
Types ¶
type OpGamma ¶
type OpGamma struct { ops.OpUnaryBase Gamma float32 `json:"gamma"` }
func NewOpGamma ¶
func NewOpGammaDefault ¶
func NewOpGammaDefault() *OpGamma
func (*OpGamma) UnmarshalJSON ¶
Unmarshal the type from JSON with default values for missing entries
type OpGammaPP ¶
type OpGammaPP struct { ops.OpUnaryBase Gamma float32 `json:"gamma"` Sigma float32 `json:"sigma"` }
func NewOpGammaPP ¶
func NewOpGammaPPDefault ¶
func NewOpGammaPPDefault() *OpGammaPP
func (*OpGammaPP) UnmarshalJSON ¶
Unmarshal the type from JSON with default values for missing entries
type OpMidtones ¶
type OpMidtones struct { ops.OpUnaryBase Mid float32 `json:"mid"` Black float32 `json:"black"` }
func NewOpMidtones ¶
func NewOpMidtones(mid, black float32) *OpMidtones
func NewOpMidtonesDefault ¶
func NewOpMidtonesDefault() *OpMidtones
func (*OpMidtones) UnmarshalJSON ¶
func (op *OpMidtones) UnmarshalJSON(data []byte) error
Unmarshal the type from JSON with default values for missing entries
type OpNormalizeRange ¶
type OpNormalizeRange struct {
ops.OpUnaryBase
}
Normalizes the image range to [0, 1]. Takes one input, produces one output
func NewOpNormalizeRange ¶
func NewOpNormalizeRange() *OpNormalizeRange
func NewOpNormalizeRangeDefault ¶
func NewOpNormalizeRangeDefault() *OpNormalizeRange
func (*OpNormalizeRange) UnmarshalJSON ¶
func (op *OpNormalizeRange) UnmarshalJSON(data []byte) error
Unmarshal the type from JSON with default values for missing entries
type OpScaleBlack ¶
type OpScaleBlack struct { ops.OpUnaryBase Location float32 `json:"location"` }
func NewOpScaleBlack ¶
func NewOpScaleBlack(location float32) *OpScaleBlack
func NewOpScaleBlackDefault ¶
func NewOpScaleBlackDefault() *OpScaleBlack
func (*OpScaleBlack) UnmarshalJSON ¶
func (op *OpScaleBlack) UnmarshalJSON(data []byte) error
Unmarshal the type from JSON with default values for missing entries
type OpStretchIterative ¶
type OpStretchIterative struct { ops.OpUnaryBase Location float32 `json:"location"` Scale float32 `json:"scale"` }
func NewOpStretchIterative ¶
func NewOpStretchIterative(loc float32, scale float32) *OpStretchIterative
must be called /100
func NewOpStretchIterativeDefault ¶
func NewOpStretchIterativeDefault() *OpStretchIterative
func (*OpStretchIterative) UnmarshalJSON ¶
func (op *OpStretchIterative) UnmarshalJSON(data []byte) error
Unmarshal the type from JSON with default values for missing entries
type OpUnsharpMask ¶
type OpUnsharpMask struct { ops.OpUnaryBase Sigma float32 `json:"sigma"` Gain float32 `json:"gain"` Threshold float32 `json:"threshold"` }
func NewOpUnsharpMask ¶
func NewOpUnsharpMask(sigma, gain, threshold float32) *OpUnsharpMask
func NewOpUnsharpMaskDefault ¶
func NewOpUnsharpMaskDefault() *OpUnsharpMask
func (*OpUnsharpMask) UnmarshalJSON ¶
func (op *OpUnsharpMask) UnmarshalJSON(data []byte) error
Unmarshal the type from JSON with default values for missing entries