Background subtraction

Background subtraction, also known as Foreground detection, is a technique in the fields of image processing and computer vision wherein an image’s foreground is extracted for further processing (object recognition etc.). Generally an image’s regions of interest are objects (humans, cars, text etc.) in its foreground. Background subtraction is a widely used approach for detecting moving objects in videos from static cameras. The rationale in the approach is that of detecting the moving objects from the difference between the current frame and a reference frame, often called “background image”, or “background model.

The basic method of background subtraction is to compare |frame – background| with
a pre-defined threshold (theta). If the difference of a pixel is larger than theta, then classify it as foreground; otherwise, claim that it is background.

(video dataset)

Continue reading

Break Time

Break Time!

I wrote a program that give you break by playing your favourite video(youtube):

import webbrowser
import time

total_breaks=3
break_count=0

print("This program started on" +time.ctime())
while (break_count< total_breaks):
time.sleep(10)
webbrowser.open("http://www.youtube.com/watch?v=-2U0Ivkn2Ds&list=FLapMSp10Zw5H6trxm9ynGAw")
break_count=break_count+1