计算机视觉代写

SCIT, University of Wollongong

CSCI435/CSCI935

Computer Vision: Algorithms and Systems

Spring 2018

Assignment Three (25%) Due Date: 11:59pm 28 October 2018

Objectives

  •   Design a C/C++ program that extracts and counts moving objects, e.g. people, cars and others.
  •   The assignment can be completed by either individuals or a group of two students.

    Introduction

    Extraction of moving objects from a sequence of images or video is often used in many video analysis tasks. For instance, it is a key component in intelligent video surveillance systems. In this assignment, you are required to develop a program in C/C++ using OpenCV 3.4.1 to detect, separate and count moving objects from a given sequence of images or video captured by a stationary camera in two different ways, i.e. background modelling and subtraction (Task One) and moving object segmentation (Task Two).

    Task One (18%)

    In this task, you are required to extract moving objects using background modelling. There are three key steps involved in the extracting and counting moving objects:

  1. Detecting moving pixels using background modelling and subtraction,
  2. Removing noisy detection using morphological operators or majority voting and
  3. Count separate moving objects using connected component analysis.
  4. Classify each object (or connected component) into person, car and other

OpenCV 3.4.1 provides various algorithms for each of the steps 1 & 2. However, you may have to implement your own connected component analysis algorithm and classification algorithm. For simplicity, you can assume that each connected component forms one object.

Original Video Frame

Estimated Background Frame

Detected Moving Pixels before Filtering

Detected Objects (original color)

1 of 3

SCIT, University of Wollongong

The program should display the original video frames, estimated background frames, detected moving pixels after the background modeling and subtraction (before any noise removal) and the detected moving objects in a single window as illustrated above. The detected object has to be displayed in its original RGB color (all background pixels should be displayed in black). At the same time, the number of objects or connected components should be output to the command window as follows:

Frame 0001: 0 objects
Frame 0002: 0 objects

Frame 0031: 5 objects (2 persons, 1 car and 2 others) Frame 0032: 6 objects (3 persons, 1 cars and 2 others) …

   Frame 1000: 10 objects (
   ...

Task Two (7%)

In this task, you are required to to extract moving objects using segmentation of moving object. You need to design your own solution by using the algorithms you have learned from the subject. The solution must be described in the head of your source C/C++ code.

Original Video Frame

Estimated Motion Field

Detected Moving Pixels

Detected Objects (original color)

The program should display the original video frames, estimated motion field, detected moving pixels and the detected moving objects in a single window as illustrated above. The detected object has to be displayed in its original RGB color (all background pixels should be displayed in black). At the same time, the number of objects or connected components should be output to the command window in the same format as that of Task One.

Requirements on coding

  1. The program should be named as “countMovingObj” and shall take an option, either –b or -s and a video filename as the input, e.g. countMovingObj –b videofile or countMovingObj –s videofile. When –b is given, the program should perform Task One and when –s is given, the program performs Task Two.
  2. Place your implementation in a single .cpp file called countMovingObj.cpp
  3. Description of the solution to Task Two should be given as comments at the beginning of the

    countMovingObj.cpp.

2 of 3

SCIT, University of Wollongong

4. No other third-party libraries should be used in the program except OpenCV 3.4.1. The code has to be in either C/C++.

Marking Scheme

Zero marks may be graded if your code cannot be compiled or the code does not meet the requirements

Task One

  1. Program structure, comments and usability (2%)
  2. Read and display of the video frames (2%)
  3. Background modeling or estimation (3%)
  4. Subtraction and display of the detected moving pixels (3%)
  5. Remove of noisy or false detection (2%)
  6. Connected component analysis and display of the moving objects (2%)
  7. Classification of moving objects (2%)
  8. Output number of objects or connected components (2%)

Task Two

9. Description of the solution (1%)
10. Estimation and display of motion fields (2%)
11. Detection and display of moving pixels (2%)
12. Connected component analysis and display of the moving objects (2%)

Submission

  1. Zip the SOURCE file to your_login_name.zip. The zip file has to be submitted in Moodle.
  2. If the assignment is competed by a group of two students.

a) Only one copy of the assignment should be submitted by one of the students.
b) At beginning of the source file, specify both students’ login names and student ids in the

comments

IMPORTANT:

  1. a)  DO NOT include and submit any object files and images in the zip file. Your submission may not be

    accepted if you do so.

  2. b)  Submission through email WILL NOT be accepted

3 of 3