内存使用优化
This commit is contained in:
@@ -161,6 +161,7 @@ func (r *Registrator) CalcDownPhaseCorrelation() error {
|
||||
|
||||
// 将PAN将采样作为轮廓匹配基准图像
|
||||
downsampledPanImage := gocv.NewMat()
|
||||
defer downsampledPanImage.Close()
|
||||
gocv.Resize(r.PanImage, &downsampledPanImage,
|
||||
image.Point{X: r.MssWidth, Y: r.MssHeight}, 0, 0, gocv.InterpolationCubic)
|
||||
log.Println("down sampled PAN images size:", downsampledPanImage.Size())
|
||||
@@ -385,6 +386,9 @@ func (r *Registrator) DoCoRegistration() error {
|
||||
gocv.InterpolationCubic,
|
||||
gocv.BorderConstant,
|
||||
color.RGBA{0, 0, 0, 0})
|
||||
|
||||
mapX.Close()
|
||||
mapY.Close()
|
||||
}
|
||||
|
||||
// 裁掉末尾的的 MSS 480 行 和 PAN 的 480*4 行
|
||||
|
||||
Reference in New Issue
Block a user