计算分辨率
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func (r *Registrator) SaveOriginalPanToGDALGTiff(tiffFile string) error {
|
||||
err := savePanToGDALGTiff(r.PanImage, 0, 0, tiffFile)
|
||||
err := savePanToGDALGTiff(r.PanImage, 0, 0, tiffFile, PanResolution)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -21,7 +21,7 @@ func (r *Registrator) SaveOriginalPanToGDALGTiff(tiffFile string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func savePanToGDALGTiff(pan gocv.Mat, topLeftX, topLeftY float64, tiffFile string) error {
|
||||
func savePanToGDALGTiff(pan gocv.Mat, topLeftX, topLeftY float64, tiffFile string, resolution float64) error {
|
||||
// log.Println("Saving PAN image to TIFF file:", tiffFile)
|
||||
|
||||
width := pan.Cols()
|
||||
@@ -34,7 +34,7 @@ func savePanToGDALGTiff(pan gocv.Mat, topLeftX, topLeftY float64, tiffFile strin
|
||||
}
|
||||
defer ds.Close()
|
||||
|
||||
setGeoTransform(ds, topLeftX, topLeftY, PanResolution)
|
||||
setGeoTransform(ds, topLeftX, topLeftY, resolution)
|
||||
ds.SetMetadata("NBITS", "16")
|
||||
|
||||
// 将通道的数据转换为uint16数组
|
||||
|
||||
Reference in New Issue
Block a user