Skip main navigation

Practical: Median filter for background learning

A practical showing how to implment median filtering for background substuction for use in video motion detection
A common way of finding and updating a background image for use in motion detection is the use of median filtering.

This practical shows you how to try this out using OpenCV.

All the instructions are in the attached pdf Median filtering.

The sample video data, walking.mp4, can be downloaded at

Please let us know how you get on in the comments.

This article is from the free online

Introduction to Image Analysis for Plant Phenotyping

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now