fitting
This commit is contained in:
44
cmd/main.go
Normal file
44
cmd/main.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/airbusgeo/godal"
|
||||
"github.com/sirupsen/logrus"
|
||||
imageproc "starwiz.cn/sjy01/image-proc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
logrus.SetFormatter(&logrus.TextFormatter{
|
||||
ForceColors: true,
|
||||
DisableColors: false,
|
||||
TimestampFormat: "2006-01-02 15:04:05",
|
||||
FullTimestamp: true,
|
||||
})
|
||||
}
|
||||
|
||||
func main() {
|
||||
reg := imageproc.NewRegistrator()
|
||||
|
||||
if err := reg.LoadMssRaw("/Users/lan/workspace/temp/ccv/ms_image.raw"); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err := reg.LoadPanRaw("/Users/lan/workspace/temp/ccv/pan_image.raw"); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
godal.RegisterAll()
|
||||
if err := reg.CalcDownPhaseCorrelation(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// reg.DoCoRegestration()
|
||||
|
||||
// if err := reg.DoUpPhaseCorrelation(); err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
|
||||
// reg.SaveRegisteredMssToRaw("data/registered_mss.RAW")
|
||||
// reg.SavePanToGDALGTiff("data/original_pan.tiff")
|
||||
// reg.SaveRegisteredMssToGDALGTiff("data/registered_mss.tiff")
|
||||
|
||||
reg.Clean()
|
||||
}
|
||||
Reference in New Issue
Block a user