分景后配准

This commit is contained in:
nuknal
2024-11-01 09:19:42 +08:00
parent e51d07901d
commit 75e4dd6d90
7 changed files with 191 additions and 58 deletions

View File

@@ -31,12 +31,13 @@ var testCmd = &cobra.Command{
// out := producer.CV_Sobel(mv[i])
// utils.SavePanToGDALGTiff(out, 0, 0, "data/temp/out_"+strconv.Itoa(i)+".tif", 1.3)
// }
for i := 1; i < len(mv); i++ {
mv[i] = producer.CV_ECCAlign(mv[0], mv[i])
index := len(mv) - 1
for i := index - 1; i >= 0; i-- {
mv[i] = producer.CV_ECCAlign(mv[index], mv[i])
}
out := gocv.NewMat()
mv[0].ConvertTo(&mv[0], gocv.MatTypeCV16U)
mv[index].ConvertTo(&mv[index], gocv.MatTypeCV16U)
gocv.Merge(mv, &out)
utils.SaveBGRToGDALGTiff(out, 4, 0, 0, 5.2,
[]godal.ColorInterp{godal.CIBlue, godal.CIGreen, godal.CIRed, godal.CIUndefined},