fitting
This commit is contained in:
@@ -9,9 +9,10 @@ import (
|
||||
)
|
||||
|
||||
type PhaseShiftM struct {
|
||||
dx float32
|
||||
dy float32
|
||||
Block Block
|
||||
dx float32
|
||||
dy float32
|
||||
response float64
|
||||
Block Block
|
||||
}
|
||||
|
||||
type Block struct {
|
||||
@@ -20,7 +21,7 @@ type Block struct {
|
||||
coord image.Point // top-left corner of the block in the original image
|
||||
}
|
||||
|
||||
func (r *Registrator) calculateBlockPhaseShift(panBlock, mssBlock gocv.Mat) gocv.Point2f {
|
||||
func (r *Registrator) calculateBlockPhaseShift(panBlock, mssBlock gocv.Mat) (gocv.Point2f, float64) {
|
||||
pan := gocv.NewMat()
|
||||
mss := gocv.NewMat()
|
||||
|
||||
@@ -38,7 +39,7 @@ func (r *Registrator) calculateBlockPhaseShift(panBlock, mssBlock gocv.Mat) gocv
|
||||
dy := shift.Y
|
||||
log.Printf("Block shift: dx = %f, dy = %f. response = %f \n", dx, dy, response)
|
||||
|
||||
return shift
|
||||
return shift, response
|
||||
}
|
||||
|
||||
func (r *Registrator) DoMssPhaseShift() error {
|
||||
|
||||
Reference in New Issue
Block a user