parametres input
This commit is contained in:
14
output.go
14
output.go
@@ -25,8 +25,8 @@ func (r *Registrator) SaveFilteredPanToGDALGTiff(tiffFile string) error {
|
||||
func savePanToGDALGTiff(pan gocv.Mat, tiffFile string) error {
|
||||
log.Println("Saving PAN image to TIFF file:", tiffFile)
|
||||
|
||||
width := pan.Rows()
|
||||
height := pan.Cols()
|
||||
width := pan.Cols()
|
||||
height := pan.Rows()
|
||||
|
||||
ds, err := godal.Create(godal.GTiff, tiffFile, 1, godal.UInt16, width, height)
|
||||
if err != nil {
|
||||
@@ -166,8 +166,8 @@ func (r *Registrator) SaveRegisteredMssToRaw(raw string) error {
|
||||
mssData[i] = r.registeredMssImages[i].ToBytes()
|
||||
}
|
||||
|
||||
width := r.MssWidth * PixelBytes
|
||||
height := r.MssHeight
|
||||
width := r.registeredMssImages[0].Cols() * PixelBytes
|
||||
height := r.registeredMssImages[0].Rows()
|
||||
log.Println("Writing registered MSS to RAW file...", len(mssData[0])*4)
|
||||
log.Println("width:", width)
|
||||
log.Println("height:", height)
|
||||
@@ -180,9 +180,9 @@ func (r *Registrator) SaveRegisteredMssToRaw(raw string) error {
|
||||
}
|
||||
|
||||
hdr := EnviHdr{
|
||||
Samples: r.MssWidth,
|
||||
Lines: r.MssHeight,
|
||||
Bands: MssBands,
|
||||
Samples: 4 * width / PixelBytes,
|
||||
Lines: height,
|
||||
Bands: 1,
|
||||
}
|
||||
|
||||
hdrFile := filepath.Join(filepath.Dir(raw),
|
||||
|
||||
Reference in New Issue
Block a user