63 lines
2.4 KiB
Go
63 lines
2.4 KiB
Go
package config
|
|
|
|
import (
|
|
"github.com/sirupsen/logrus"
|
|
"starwiz.cn/sjy01/image-proc/pkg/payload"
|
|
)
|
|
|
|
type Config struct {
|
|
CoRegistration CoRegistrationConfig `yaml:"coregistration" mapstructure:"coregistration"`
|
|
Radiation RadiationConfig `yaml:"radiation" mapstructure:"radiation"`
|
|
LogLevel logrus.Level `yaml:"log_level" mapstructure:"log_level"`
|
|
}
|
|
|
|
type CoRegistrationConfig struct {
|
|
MssBands int `yaml:"mss_bands" mapstructure:"mss_bands"`
|
|
PixelBytes int `yaml:"pixel_bytes" mapstructure:"pixel_bytes"`
|
|
MssWidth int `yaml:"mss_width" mapstructure:"mss_width"`
|
|
PanWidth int `yaml:"pan_width" mapstructure:"pan_width"`
|
|
CRBlockNW int `yaml:"cr_block_nw" mapstructure:"cr_block_nw"`
|
|
CRBlockNH int `yaml:"cr_block_nh" mapstructure:"cr_block_nh"`
|
|
OverlappedBlockLines int `yaml:"overlapped_block_lines" mapstructure:"overlapped_block_lines"`
|
|
CRResampleMethod string `yaml:"cr_resample_method" mapstructure:"cr_resample_method"`
|
|
FUSBandOrder string `yaml:"fus_band_order" mapstructure:"fus_band_order"`
|
|
}
|
|
|
|
type RadiationConfig struct {
|
|
PANRemoveHfNoise bool `yaml:"pan_remove_hf_noise" mapstructure:"pan_remove_hf_noise"`
|
|
MSSRemoveHfNoise bool `yaml:"mss_remove_hf_noise" mapstructure:"mss_remove_hf_noise"`
|
|
SceneMomentMatching bool `yaml:"scene_moment_matching" mapstructure:"scene_moment_matching"`
|
|
HfRadiusRatio float64 `yaml:"hf_radius_ratio" mapstructure:"hf_radius_ratio"`
|
|
MinHistLevel float64 `yaml:"min_hist_level" mapstructure:"min_hist_level"`
|
|
MaxHistLevel float64 `yaml:"max_hist_level" mapstructure:"max_hist_level"`
|
|
HFBandStopWidth int `yaml:"hf_band_stop_width" mapstructure:"hf_band_stop_width"`
|
|
}
|
|
|
|
var GCONFIG Config
|
|
|
|
func init() {
|
|
GCONFIG = Config{
|
|
LogLevel: logrus.DebugLevel,
|
|
CoRegistration: CoRegistrationConfig{
|
|
MssBands: 4,
|
|
PixelBytes: 2,
|
|
PanWidth: payload.PAN_PIXEL_WIDTH,
|
|
MssWidth: payload.MSS_PIXEL_WIDTH,
|
|
OverlappedBlockLines: 3000,
|
|
CRBlockNW: 8,
|
|
CRBlockNH: 4,
|
|
CRResampleMethod: "down_sample_pan",
|
|
FUSBandOrder: "RGB",
|
|
},
|
|
Radiation: RadiationConfig{
|
|
PANRemoveHfNoise: true,
|
|
MSSRemoveHfNoise: true,
|
|
SceneMomentMatching: false,
|
|
MinHistLevel: 0.3,
|
|
MaxHistLevel: 0.6,
|
|
HfRadiusRatio: 0.49,
|
|
HFBandStopWidth: 24,
|
|
},
|
|
}
|
|
}
|