different enhancement method for different sensor type
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
"starwiz.cn/sjy01/image-proc/pkg/config"
|
||||
)
|
||||
|
||||
func GTiffToJPG(ftiff, fjpg string, reversed bool) error {
|
||||
func GTiffToJPG(ftiff, fjpg, sensor string, reversed bool) error {
|
||||
// 打开 TIFF 文件
|
||||
ds, err := godal.Open(ftiff)
|
||||
if err != nil {
|
||||
@@ -58,8 +58,12 @@ func GTiffToJPG(ftiff, fjpg string, reversed bool) error {
|
||||
}
|
||||
|
||||
channels := gocv.Split(img)
|
||||
enhancement, ok := config.GCONFIG.BrowserImg.Enhancement[sensor]
|
||||
if !ok {
|
||||
enhancement = "NoEnhancement"
|
||||
}
|
||||
for i, ch := range channels {
|
||||
switch config.GCONFIG.BrowserImg.Enhancement {
|
||||
switch enhancement {
|
||||
case StretchToCumulativeCutMinMax:
|
||||
channels[i] = cumulativeCountCutEnhancement(ch,
|
||||
config.GCONFIG.BrowserImg.CumulativeCutLower,
|
||||
|
||||
Reference in New Issue
Block a user