HOMEWORK ASSIGNMENT #2 Solution

$30.00

Description

This is a programming assignment. You are asked to experiment with two methods implemented in the OpenCV library. One is the Mean Shift based segmentor; another is Watershed superpixel algorithm. Details of the two are given below.

Part (a): Mean Shift Segmentor

Implement and test a Mean Shift Segmentor. The Mean shift algorithm is given by the function PyrMeanShiftFiltering. Following link provides the declaration of the function in OpenCV documentation:

http://docs.opencv.org/3.1.0/d4/d86/group__imgproc__filter.html#ga9fabdce9543bd602445f5db3827e4cc0

Note 1: We will do the image segmentation based on LAB color space in this problem.

Note 2: You only need to use a level-1 pyramid for this assignment with different spatial window radius and different color window radius values.

Part (b): Watershed Segmentor

Implement and test a marker-based image segmentation using Watershed Segmentor. The Watershed algorithm is given by the function watershed. Following link provides the declaration of the function in OpenCV documentation:

http://docs.opencv.org/3.1.0/d7/d1b/group__imgproc__misc.html#ga3267243e4d3f95165d55a618c65ac6e1

Note: One of the input, “markers” map, is the initialization of the “seeds” for the image regions.

You can define it manually.

You will need to write code to invoke the functions given above, and to display the results. Apply your segmentors to the given image data. Vary the key parameters involved in the two algorithms to see the effects on the segmentation results. You are also asked to perform a qualitative comparison between the algorithms with the ground truth boundaries.

Image Data:

Following links provide access to three images and their corresponding ground truth boundaries.

https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/BSDS300/html/dataset/images/color/300091.html

https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/BSDS300/html/dataset/images/color/101085.html

https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/BSDS300/html/dataset/images/color/253027.html

What to Submit?

You should submit the following:

  1. A brief description of the programs you write (include the source listing). Include comments in your code.

  1. Test results on the given images with a few different values of the applicable parameters. Obviously, one can easily create hundreds of results by varying parameters; just include a few that you think illustrate the key differences.

  1. An analysis of your test results. This should include a discussion of the effects of the choice of relevant parameters and how one might make a good choice of these parameters. Base your conclusions on your test results rather than on the observations made by the instructor or the authors of the books and papers.


error: Content is protected !!