diff --git a/.gitignore b/.gitignore index 7a94aea..3f9c06d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ data *.PNG bin log +deployment diff --git a/build/Dockerfile.build b/build/Dockerfile.build index 7d589b1..1b3fecc 100644 --- a/build/Dockerfile.build +++ b/build/Dockerfile.build @@ -14,4 +14,4 @@ ENV PATH="/opt/go/bin:${PATH}" RUN cd /opt && git clone -b v0.36.1 https://github.com/hybridgroup/gocv.git && cd gocv && \ make install - +RUN cd /sjy01/image-proc && go mod download && make linux diff --git a/pkg/producer/image_registration.go b/pkg/producer/image_registration.go index a6fe708..02e3dc6 100644 --- a/pkg/producer/image_registration.go +++ b/pkg/producer/image_registration.go @@ -378,5 +378,9 @@ func (r *Registrator) DoCoRegistration() error { color.RGBA{0, 0, 0, 0}) } + // 裁掉末尾的的 MSS 480 行 和 PAN 的 480*4 行 + r.PanHeight -= 480 * 4 + r.MssHeight -= 480 + return nil } diff --git a/pkg/producer/scenes.go b/pkg/producer/scenes.go index f8482bb..20f5166 100644 --- a/pkg/producer/scenes.go +++ b/pkg/producer/scenes.go @@ -42,7 +42,7 @@ func (r *Registrator) SubScenes() (panScenes []*Scene, mssScenes []*Scene, err e hPANOverlap := 2336 panScenesCnt := r.PanHeight / hPAN - for i := 0; i < panScenesCnt; i++ { + for i := 0; i <= panScenesCnt; i++ { y1 := (i+1)*hPAN + hPANOverlap if y1 > r.PanHeight { y1 = r.PanHeight @@ -68,7 +68,7 @@ func (r *Registrator) SubScenes() (panScenes []*Scene, mssScenes []*Scene, err e hMSS := hPAN / 4 hMSSOverlap := hPANOverlap / 4 mssScenesCnt := r.MssHeight / hMSS - for i := 0; i < mssScenesCnt; i++ { + for i := 0; i <= mssScenesCnt; i++ { y1 := (i+1)*hMSS + hMSSOverlap if y1 > r.MssHeight { y1 = r.MssHeight