Permalink
Browse files

added Docker images

  • Loading branch information...
1 parent 2ccd53e commit ad8658a0a9a259f5bf572e6292db4ebcfff06721 @andrewssobral committed Oct 18, 2016
Showing with 22 additions and 5 deletions.
  1. +15 −3 README.md
  2. +7 −2 fet/fet.py
View
@@ -3,9 +3,9 @@ BGSLibrary
A Background Subtraction Library
-Last Page Update: **15/06/2016**
+Last Page Update: **18/10/2016**
-Latest Library Version: **1.9.2** (see Release Notes for more info)
+Latest Library Version: **1.9.2** (see Release Notes for more info)
The BGSLibrary was developed by [Andrews Sobral](https://sites.google.com/site/andrewssobral) and provides an easy-to-use C++ framework based on [OpenCV](http://www.opencv.org/) to perform background subtraction (BGS) in videos. The BGSLibrary compiles under Linux, Mac OS X and Windows. Currently the library offers **37**¹ BGS algorithms. A large amount of algorithms were provided by several authors. The source code is available under GNU GPL v3 license, the library is free and open source for academic purposes².
@@ -167,9 +167,21 @@ Read instructions in README.txt file.
<p align="center"><img src="https://sites.google.com/site/andrewssobral/bgslibrary_ubuntu.png" border="0" /></p>
+Docker images
+----------------------------------------
+Docker images are available for BGSLibrary with OpenCV 2.4.13 and OpenCV 3.1.0.
+
+* **Ubuntu 16.04 + VNC + OpenCV 2.4.13 + Python 2.7 + BGSLibrary (master branch)**
+https://hub.docker.com/r/andrewssobral/bgslibrary_opencv2/
+
+* **Ubuntu 16.04 + VNC + OpenCV 3.1.0 (+ contrib) + Python 2.7 + BGSLibrary (opencv3 branch)**
+https://hub.docker.com/r/andrewssobral/bgslibrary_opencv3/
+
+<p align="center"><img src="https://sites.google.com/site/andrewssobral/bgslibrary_opencv3_docker.png?width=640" border="0" /></p>
+
How to use BGS Library in other C++ code
----------------------------------------
-Download latest project source code, copy package_bgs directory to your project and create config folder (bgslibrary use it to store xml configuration files). For Windows users, a demo project for Visual Studio 2010 is provided.
+Download latest project source code, copy package_bgs directory to your project and create config folder (bgslibrary use it to store xml configuration files). For Windows users, a demo project for Visual Studio 2010 is provided.
See Demo.cpp example source code at:
https://github.com/andrewssobral/bgslibrary/blob/master/Demo.cpp
View
@@ -7,13 +7,17 @@
import numpy as np
import cv2
+import os
from os import listdir
from os.path import isfile, join
path_gt = 'GT/'
path_fg = 'FG/'
path_sc = 'SC/'
+if not os.path.exists(path_sc):
+ os.makedirs(path_sc)
+
files_gt = [ f for f in listdir(path_gt) if isfile(join(path_gt,f)) ]
files_fg = [ f for f in listdir(path_gt) if isfile(join(path_gt,f)) ]
@@ -42,8 +46,10 @@
print(k, file_gt, file_fg)
img_gt = cv2.imread(path_gt + file_gt,cv2.IMREAD_GRAYSCALE)
img_fg = cv2.imread(path_fg + file_fg,cv2.IMREAD_GRAYSCALE)
- #print(img_gt.shape,img_fg.shape)
+ # img_gt = cv2.resize(img_gt, (0,0), fx=0.5, fy=0.5)
+ # print(img_gt.shape,img_fg.shape)
rows,cols = img_gt.shape
+ img_fg = cv2.resize(img_fg,(cols,rows))
img_res = np.zeros((rows,cols,3),np.uint8)
for i in xrange(rows):
for j in xrange(cols):
@@ -85,4 +91,3 @@
print ''
#####################################################################
-

0 comments on commit ad8658a

Please sign in to comment.