[Solved] Homework Assignment 3 CS696, applied computer vision

$25

File Name: Homework_Assignment_3_CS696,_applied_computer_vision.zip
File Size: 489.84 KB

SKU: [Solved] Homework Assignment 3 CS696, applied computer vision Category: Tag:
5/5 - (1 vote)

Overview

The goal is this problem is to practice the sliding window method for template matching.

Review of sliding window algorithm

Figure 1. Template matching with sliding window. Left: cropped template image; Middle: scaled template image; right: query image.

Given a template image, e.g., left eye, our task is to find the most similar sub-region in the query image.

To do so, we will exploit all possible sub-regions of the query image, and calculate the similarities between these sub-regions and the template image. The key is how to define the similarity metric.

In the class meeting, we introduced four different metrics.

  • Correlation
  • Zero-mean correlation
  • Sum Square Difference (SSD)
  • Normalized Cross Correlation (NCC)

Usually SSD and NCC are better choices.

Image Data

We provide three images (data folder) as query images. You are strongly encouraged to find sample images on your own.

Convert these query images into grayscale. You can visualize your final results in the RGB images if you like.

Crop template images from the query images. The size of the template image will be varying, e.g., 10 by 10 pixels, 20 by 20 pixels, 30 by 30 pixels.

Save the center position of each template image in the query image. This will be used to evaluate your template matching algorithm.

Resize the template images with a few factors (e.g., 2, 1, 0.5), and match each of them to the query image.

Evaluation

Once you localized a template image, calculate the Euclidean distance between the estimated locations to the ground-truth location (saved when you cropped the template images), i.e. localization error.

Coding requirement

You will deal with two cases.

Case-1: template matching with fixed scale: match the cropped template to the query image

  • Implement the sliding window method for matching a template image to a query image.
  • Try to use three different metrics Zero-mean correlation, SSD and NCC
  • Calculate the localization errors for each metric.

Case-2: template matching with pyramid representation:

  • Resize the template images with multiple scaling factors (e.g., 0.5, 1.0, 2.0) to get the pyramid representation of the template image.
  • Implement the sliding window method for matching each of the pyramid images (scaled image) to the query image.
  • Use the metrics Zero-mean correlation, SSD and NCC
  • Calculate the localization errors for each metric.

Useful functions

  • normxcorr2()

Forbidden functions

  • none

Write-up

In the report you will describe your algorithm and any decisions you made to write your algorithm a particular way. Then you will show and discuss the results of your algorithm.

In the case of this problem set , show the results of your localization results while using different metrics. Calculate and compare the localization errors in each case.

For some cases (e.g. scaled, metrics), you might fail to localize the template images. Please try to explain the reasons.

Also, discuss anything extra you did. Feel free to add any other information you feel is relevant.

How to submit

  • Submit your source codes and writeup through SDSU Blackboard
  • Two submissions are allowed.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Homework Assignment 3 CS696, applied computer vision
$25