package main

import (
	"github.com/spf13/cobra"
	"starwiz.cn/sjy01/image-proc/pkg/rrc"
)

var (
	panDS  string
	mssDS  string
	lutOut 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(lutOut)
		rrc.StatisticalPAN(panDS)
		rrc.StatisticalMSS(mssDS)
	},
}

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-none.txt", "path to mss dataset")
	rrcCmd.Flags().StringVarP(&lutOut, "lut-out-dir", "o", "data/rrc", "path to output lut file")

	rootCmd.AddCommand(rrcCmd)
}
