zcalib

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 8 Imported by: 0

README

zcalib

zhang calibration implementation written in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrossProduct

func CrossProduct(a cv.Vecf, b cv.Vecf) cv.Vecf

func CvMatToMat

func CvMatToMat(m cv.Mat) (*mat.Dense, error)

func DotProduct

func DotProduct(a cv.Vecf, b cv.Vecf) float32

func NewMatWithSizeNElem

func NewMatWithSizeNElem(rows int, cols int, mt cv.MatType, srcElems []float32) cv.Mat

func RefineAll

func RefineAll(
	imgVec []cv.Point2fVector,
	obj cv.Point2fVector,
	K cv.Mat,
	extrinsics []cv.Mat,
	k1, k2 float32) (cv.Mat, []cv.Mat, float32, float32)

func SolveH

func SolveH(img cv.Point2fVector, obj cv.Point2fVector) cv.Mat

Types

type CalibResults

type CalibResults struct {
	Intrinsic  cv.Mat
	DistCoeffs []float32
	Homography []cv.Mat
	Extrinsics []cv.Mat
}

CalibResults is set of calibration matrices

func Run

func Run(data Data) CalibResults

type Data

type Data struct {
	// Board is general information of checkerboard
	Board struct {
		Count      int     `yaml:"count"`
		Row        int     `yaml:"row"`
		Column     int     `yaml:"column"`
		SquareSize float32 `yaml:"squareSize"`
		Width      float32 `yaml:"width"`
		Height     float32 `yaml:"height"`
	} `yaml:"board"`
	//Coordinates []cv.Point2fVector `yaml:"coordinates"`
	Coordinates [][]Point2f `yaml:"coordinates"`
}

type Point2f

type Point2f []float32 // for only saving yaml

type Point3f

type Point3f struct {
	X float32
	Y float32
	Z float32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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