#include <iostream>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/video/background_segm.hpp>
using namespace std;
using namespace cv;
int main(int argc, char** argv) {
VideoCapture capture(argv[1]);
if(!capture.isOpened())
return -1;
Mat frame, foreground;
BackgroundSubtractorMOG mog;
while(1){
if(!capture.read(frame))
break;
mog(frame, foreground, 0.05);
threshold(foreground, foreground,120,255,THRESH_BINARY_INV);
imshow("img", frame);
imshow(argv[1], foreground);
if(waitKey(10)> 0) break;
}
}
Tuesday, November 8, 2011
Opencv extract background from video
opencv 2.3.1
Proxmox installation display out of range
Reference: https://forum.proxmox.com/threads/proxmox-ve-screen-out-of-range.131297/
-
How to remove BBCODE from a string ? <?php $String = "[b][color=#0000ff]TEST[/color][/b]"; $regex = '|[[\/\!]*?[^\[\]...
-
Original Source:: http://www.zytrax.com/tech/pc/serial.html Tech Info - USB and Firewire USB and FireWire (IEEE 1394a and b) represent the...