cloud cover by kmeans
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/paulmach/orb/geojson"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"gocv.io/x/gocv"
|
||||
cloudcover "starwiz.cn/sjy01/image-proc/pkg/cloud-cover"
|
||||
"starwiz.cn/sjy01/image-proc/pkg/config"
|
||||
"starwiz.cn/sjy01/image-proc/pkg/fusion"
|
||||
"starwiz.cn/sjy01/image-proc/pkg/payload"
|
||||
@@ -231,11 +232,13 @@ func (r *ImgProc) OutputL1A(panScenes []*Scene, mssScenes []*Scene) error {
|
||||
return err
|
||||
}
|
||||
|
||||
jpg := strings.Replace(scene.Tiff, ".tiff", ".jpg", 1)
|
||||
GTiffToJPG(scene.Tiff, jpg, "MSS", false)
|
||||
scene.Meta.CloudRate = cloudcover.CloudPercentByKMeans(jpg)
|
||||
scene.Meta.DataSize = sizeOfFile(scene.Tiff)
|
||||
metaFile := strings.Replace(scene.Tiff, ".tiff", ".meta.xml", 1)
|
||||
writeProductMeta(scene.Meta, metaFile)
|
||||
jpg := strings.Replace(scene.Tiff, ".tiff", ".jpg", 1)
|
||||
GTiffToJPG(scene.Tiff, jpg, "MSS", false)
|
||||
|
||||
r.report.Scenes = append(r.report.Scenes, ReportScene{
|
||||
Name: scene.SceneId,
|
||||
TiffData: scene.Tiff,
|
||||
|
||||
Reference in New Issue
Block a user