histogram RRC

This commit is contained in:
nuknal
2024-06-14 10:26:54 +08:00
parent 268076017e
commit 4a2fc805c9
5 changed files with 328 additions and 95 deletions

View File

@@ -44,6 +44,8 @@ var procCmd = &cobra.Command{
godal.RegisterAll()
os.MkdirAll(params.OutputDir, 0755)
reg.DoRRC()
if err := reg.DoPhaseCorrelation(); err != nil {
logrus.Fatal(err)
}

28
cmd/rrc.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"github.com/spf13/cobra"
"starwiz.cn/sjy01/image-proc/pkg/rrc"
)
var (
panDS string
mssDS string
)
var rrcCmd = &cobra.Command{
Use: "rrc",
Short: "Run RRC algorithm on an image",
Long: `Run RRC algorithm on an image`,
Run: func(cmd *cobra.Command, args []string) {
rrc := rrc.NewRRC()
rrc.StatisticalPAN(panDS)
},
}
func init() {
rrcCmd.Flags().StringVarP(&panDS, "pan-dataset", "p", "data/RAW/pan.txt", "path to pan dataset")
rrcCmd.Flags().StringVarP(&mssDS, "mss-dataset", "m", "data/RAW/mss.txt", "path to mss dataset")
rootCmd.AddCommand(rrcCmd)
}