UP | HOME

CSCI 507 / EENG 507 - HW4

Quick Reference

  • Due date: Monday, October 23rd by the beginning of class.
  • Submission: Submission must be made on Canvas
  • Format: Your submission will consist of two files: (1) a matlab or C++ file, and (2) a PDF file. Please upload these as seperate files – do not group them into a single tar/zip/archive.

1 Assignment (100 pts)

On the course website is a video of a CD player with two ArUco tags attached to it.

Your mission is to use computer vision to recognize and identify the tags, and display the location of the “on/off” switch to the user. The markers are 4x4 bit patterns, size is 2 inches on a side, and the markers were created by specifying 100 markers in the dictionary. The marker on the left is id=0; the marker on the right is id=1.

Here is the location of the switch (in inches):
With respect to marker 0: (X,Y,Z) = (2.5; -2.0; -1.0).
With respect to marker 1: (X,Y,Z) = (-2.5; -2.0; -5.0).

Your program should recognize a marker, determine its pose, and overlay a circle on the image showing the location of the on/off switch as an overlay. See the examples below.

hw4image1.png

hw4image2.png

Examples of a circle overlay indicating position of the on/off switch. Of course, when neither marker is visible, the position of the switch cannot be displayed.

Note – in OpenCV you can create an output video using this code:

const cv::String fnameOut("video.avi");
cv::VideoWriter outputVideo(fnameOut,
    cv::VideoWriter::fourcc('D', 'I', 'V', 'X'), 
    30.0,               // fps
    cv::Size((int)WIDTH, (int)HEIGHT),
    true);              // true (default): output color

And write to it using:

outputVideo << image;

2 Extra credit (10 pts)

Create another video using a different object, using at least two markers. Shoot a video using your own camera, and indicate the position of a switch or some other item.

3 Turn in

  1. Your MATLAB or C++ program listing, with comments.
  2. A PDF file containing a description of your solution and a link to your video or videos.