Documentation ¶
Index ¶
- Variables
- func AllPermutations(list []int) [][]int
- func AverageColor(list []img.RGBA) img.RGBA
- func BCH_Check_Format(fmt int) int
- func BCH_Decode_Format(format int) (int, int)
- func BCH_Hamming_Weight(x int) int
- func BinaryToInt(list []int) int
- func CheckAllIsNum(list []int, num int) bool
- func ColorListToRGBA(colorList []int) img.RGBA
- func ConcatArray(arr1 []int, arr2 []int) []int
- func Galois_ADD(x, y int) int
- func Galois_DIV(x, y int, table Galois_GF) int
- func Galois_INVERSE(x int, table Galois_GF) int
- func Galois_MUL(x, y int, table Galois_GF) int
- func Galois_MUL_NO_TABLE(x, y, prim int) int
- func Galois_POLY_ADD(p []int, q []int) []int
- func Galois_POLY_DIV(dividend, divisor []int, table Galois_GF) ([]int, []int)
- func Galois_POLY_EVAL(p []int, x int, table Galois_GF) int
- func Galois_POLY_MUL(p []int, q []int, table Galois_GF) []int
- func Galois_POLY_SCALE(p []int, x int, table Galois_GF) []int
- func Galois_POW(x, power int, table Galois_GF) int
- func Galois_SUB(x, y int) int
- func Galois_Table()
- func IntListToString(numList []int) string
- func IntToBinary(num int, minLength int) []int
- func IntToIntList(num int) []int
- func IsSameColor(pointA img.RGBA, pointB img.RGBA) bool
- func IterateRGBA(point img.RGBA) []int
- func LineIntesect(lineA LineInfo, lineB LineInfo) (bool, core.ValuePosition)
- func ManhattanDistance(pointA img.RGBA, pointB img.RGBA) float64
- func OutputToImg(target string, width int, height int, pixels []img.RGBA)
- func Permutations(list []int, m int) [][]int
- func PerspectiveMap(posis *[]core.ValuePosition, targetWidth float64, targetHeight float64) []float64
- func PerspectiveTransform(matrix *[]float64, targetU float64, targetV float64) core.ValuePosition
- func PerspectiveTransformBack(matrix *[]float64, posi core.ValuePosition) core.ValuePosition
- func PointDistance(x1, y1, x2, y2 float64) float64
- func PointDistanceInt(x1, y1, x2, y2 int) int
- func RGBAToGrey(rgba img.RGBA) int
- func RS_Calc_Syndromes(msg []int, errCorrectSize int, table Galois_GF) []int
- func RS_Correct_Errata(msg []int, synd []int, err_pos []int, table Galois_GF) ([]int, error)
- func RS_Encode(msg []int, errCorrectSize int, table Galois_GF) []int
- func RS_Error_Correct(msg []int, nsym int, erase_pos []int, table Galois_GF) ([]int, error)
- func RS_Find_Errata_Locator(e_pos []int, table Galois_GF) []int
- func RS_Find_Error_Evaluator(synd []int, err_loc []int, nsym int, table Galois_GF) []int
- func RS_Find_Error_Locator(synd []int, nsym int, erase_count int, table Galois_GF) []int
- func RS_Find_Errors(err_loc []int, msgLength int, table Galois_GF) []int
- func RS_Forney_Syndromes(synd []int, erase_pos []int, msgSize int, table Galois_GF) []int
- func RS_Generator_Poly(errorCorrectionSize int, table Galois_GF) []int
- func ReverseArray(arr []int) []int
- func XOR(list []int, list2 []int) []int
- type Canopy
- type CanopyPoint
- type Galois_GF
- type KMeans
- type LineInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var Galois_GF_15 = Galois_GF{ // contains filtered or unexported fields }
View Source
var Galois_GF_256 = Galois_GF{ // contains filtered or unexported fields }
View Source
var Galois_GF_EXP_16 = []int{
1, 2, 4, 8, 3, 6, 12, 11, 5, 10, 7, 14, 15, 13, 9, 1,
}
View Source
var Galois_GF_EXP_256 = []int{}/* 256 elements not displayed */
都是通过上述方法执行生成的
View Source
var Galois_GF_LOG_16 = []int{
0, 15, 1, 4, 2, 8, 5, 10, 3, 14, 9, 7, 6, 13, 11, 12,
}
View Source
var Galois_GF_LOG_256 = []int{}/* 256 elements not displayed */
Functions ¶
func AllPermutations ¶
func BCH_Check_Format ¶
func BCH_Decode_Format ¶
func BCH_Hamming_Weight ¶
func BinaryToInt ¶
func CheckAllIsNum ¶
func ColorListToRGBA ¶
func ConcatArray ¶
func Galois_ADD ¶
伽罗瓦域计算 refs: https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders refs: https://github.com/paukerspinner/encode-decode_ReedSolomonCode 加
func Galois_INVERSE ¶
逆,使用速查表,求 1/x = Galois_DIV(1,x)
func Galois_POLY_DIV ¶
多项式,除法
func Galois_POLY_MUL ¶
多项式,乘 多项式,返回新的多项式
func Galois_POLY_SCALE ¶
多项式,乘以标量,返回新的多项式
func Galois_Table ¶
func Galois_Table()
func IntListToString ¶
func IntToBinary ¶
func IterateRGBA ¶
func LineIntesect ¶
func LineIntesect(lineA LineInfo, lineB LineInfo) (bool, core.ValuePosition)
两条线段是否有交点,以及交点位置
func Permutations ¶
func PerspectiveMap ¶
func PerspectiveMap(posis *[]core.ValuePosition, targetWidth float64, targetHeight float64) []float64
func PerspectiveTransform ¶
func PerspectiveTransform(matrix *[]float64, targetU float64, targetV float64) core.ValuePosition
func PerspectiveTransformBack ¶
func PerspectiveTransformBack(matrix *[]float64, posi core.ValuePosition) core.ValuePosition
func PointDistance ¶
func PointDistanceInt ¶
func RGBAToGrey ¶
func RS_Calc_Syndromes ¶
证候多项式的计算,如果被扫描消息未损坏,结果应为零
func RS_Correct_Errata ¶
func RS_Error_Correct ¶
错误纠正
func RS_Find_Errata_Locator ¶
func RS_Find_Error_Evaluator ¶
func RS_Find_Error_Locator ¶
使用 Berlekamp-Massey 计算错误定位器多项式
func RS_Forney_Syndromes ¶
计算Forney症状
func RS_Generator_Poly ¶
根据纠错符号数量,生成多项式
func ReverseArray ¶
Types ¶
type Canopy ¶
type Canopy struct { AllPoints []img.RGBA Canopies []*CanopyPoint T1 float64 T2 float64 }
type CanopyPoint ¶
func (*CanopyPoint) Add ¶
func (c *CanopyPoint) Add(point img.RGBA)
Click to show internal directories.
Click to hide internal directories.