This commit is contained in:
Scott 2019-12-19 15:13:53 +10:30
parent 669e72e86d
commit 8086cac802
1 changed files with 2 additions and 0 deletions

View File

@ -107,9 +107,11 @@ func (m *MOGFilter) Write(f []byte) (int, error) {
rect := gocv.BoundingRect(c)
gocv.Rectangle(&img, rect, color.RGBA{0, 0, 255, 0}, 1)
}
if len(contours) > 0 {
gocv.PutText(&img, "Motion", image.Pt(32, 32), gocv.FontHersheyPlain, 2.0, color.RGBA{255, 0, 0, 0}, 2)
}
m.windows[0].IMShow(img)
m.windows[1].IMShow(imgDelta)
m.windows[0].WaitKey(1)