ecc align testing
This commit is contained in:
18
cmd/test.go
18
cmd/test.go
@@ -1,8 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/airbusgeo/godal"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -29,10 +27,20 @@ var testCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
mv := gocv.Split(*input0_mat)
|
||||
for i := 0; i < len(mv); i++ {
|
||||
out := producer.CV_Sobel(mv[i])
|
||||
utils.SavePanToGDALGTiff(out, 0, 0, "data/temp/out_"+strconv.Itoa(i)+".tif", 1.3)
|
||||
// for i := 0; i < len(mv); i++ {
|
||||
// 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])
|
||||
}
|
||||
|
||||
out := gocv.NewMat()
|
||||
mv[0].ConvertTo(&mv[0], gocv.MatTypeCV16U)
|
||||
gocv.Merge(mv, &out)
|
||||
utils.SaveBGRToGDALGTiff(out, 4, 0, 0, 5.2,
|
||||
[]godal.ColorInterp{godal.CIBlue, godal.CIGreen, godal.CIRed, godal.CIUndefined},
|
||||
"data/temp/ecc.tif")
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user