控制点过少时导致图像内畸变较大
This commit is contained in:
@@ -57,7 +57,7 @@ type RPCModel struct {
|
||||
func NewRPC(r *Registrator, scene *Scene, rpb string) *RPC {
|
||||
rpc := RPC{
|
||||
elevationLayer: 3,
|
||||
gridsize: 3,
|
||||
gridsize: 19,
|
||||
registrator: r,
|
||||
scene: scene,
|
||||
rpb: rpb,
|
||||
@@ -150,14 +150,14 @@ func (rpc *RPC) RPC() error {
|
||||
rpc.saveVec(strings.Replace(rpc.scene.Tiff, ".tiff", ".vec_norm.txt", -1),
|
||||
rowVec, colVec, latVec, lonVec, heightVec)
|
||||
|
||||
// 设计矩阵 B = [ 20个分子系数 19个分母系数 ]
|
||||
|
||||
// x = (B^T * B)^-1 * B^T * l, 其中 x = [a1..a20 b2..b20]^T
|
||||
// 设计矩阵 B = [ 20个分子系数 19个分母系数 ] W = 权矩阵 R = 观测结果
|
||||
method := SolveMethodNelderMead
|
||||
// x = (B^T * W^2 * B)^-1 * (B^T * W^2 * R), 其中 x = [a1..a20 b2..b20]^T
|
||||
// 行参数
|
||||
// B := setupSystemOfEquations(rowVec, latVec, lonVec, heightVec)
|
||||
// J, err := SolveNormalEquation(B, rowVec)
|
||||
log.Println("solving row coefficients")
|
||||
J, err := solveCoefficients(rowVec, latVec, lonVec, heightVec, SolveMethodNelderMead)
|
||||
J, err := solveCoefficients(rowVec, latVec, lonVec, heightVec, method)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -166,7 +166,7 @@ func (rpc *RPC) RPC() error {
|
||||
// D := setupSystemOfEquations(colVec, latVec, lonVec, heightVec)
|
||||
// K, err := SolveNormalEquation(D, colVec)
|
||||
log.Println("solving col coefficients")
|
||||
K, err := solveCoefficients(colVec, latVec, lonVec, heightVec, SolveMethodNelderMead)
|
||||
K, err := solveCoefficients(colVec, latVec, lonVec, heightVec, method)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user