$30
ENPM 673 - Perception for Autonomous Robots
1 Welcome
This “assignment” serves as a warm welcome to the course. The aim of this assignment is for
you to evaluate yourself, familiarize yourself with the tools you will be using . This
assignment, will give you a fair idea of the minimum requirements and knowledge required to
perform the rest of the projects assigned during the course. While not graded, it will serve as a
means of getting you acquainted with the input and output specificationsthat will accompany
each project .
Ideally, this shouldn’t take more than a week to complete. Now is the time to ask us any
and all queries you may have regarding this.
1.1 Note on Programming Environment
The official programming environment for this class is Matlab, and projects should be
submitted in Matlab.
As a Roboticists, you are encouraged to familiarize yourself with using Python with OpenCV.
When providing instructions, sometimes we will refer to OpenCV manuals.
The best way to install OpenCV is from the Github repository and use version 3.4.0:
https://github.com/opencv/opencv/tree/3.4.0
1
2 Pin It!
You are given an image of colored objects on a white background, as included in t he file named
TestImgResized.jpg. Your task is to s egment out t he objects, count t he number of colored
objects and also count t he objects of t he same color, i.e., green, blue, yellow and r ed. To have
some fun, we also t hrew in a white object and a t ransparent object ( we r eally want you
to try to get these as well to make your fundamentals stronger).
2.1 Submission Deadline
Submissions are expected on or before Wednesday, 8th of February, 2018. Considering
this is a very simple and ungraded assignment, there will be no extension of deadlines
provided. This project is the your chance to clear all doubts regarding submissions and
programming environments and similar issues since we would like to avoid such problems once
the actual projects are released.
2.2 Functions you are allowed
For this project, no additional toolkits will be necessary. Only the Image Processing Toolbox
(included with MATLAB) will be necessary. Any built-in Matlab function except the colorThresholder App (http://www.mathworks.com/help/images/ref/colorthresholder-app.
html). If you have a doubt whether a function can be used or not e-mail Kanishka at
kganguly@terpmail.umd.edu or Anton Mitrokhin amitrokh@umd.edu via Canvas.
2.3 Various Steps Involved
2.3.1 Denoise Images
You can use any denoising filter l ike a gaussian or a median filter to ‘ smooth out’ t he image
to reduce noise.
2.3.2 Find total number of colored objects (excluding white and transparent
pin)
You can use a combination of morphological operations and blob based properties (regionprops)
to do this.
2.3.3 Find individual colored objects - Red, Green, Blue and Yellow
Find and count individually red, green, blue and yellow objects. Use color information in any
color space you want in conjunction with the previous step output to do this.
2
2.3.4 EXTRA: Detect the white and transparent colored pins
Do anything you want to find this. (If possible, avoid hard-coding the thresholds).
2.4 Submission Guidelines
Submit your codes (.m files) with the naming convention
YourDirectoryName hw0.zip on Canvas (Please compress it to .zip and no other format). Your DirectoryName is the username to your UMD e-mail ID. Your zip file should have
the following things:
• Folder named Code with all your code.
• Folder named Output with your output image(s).
• A Readme.txt file on how to run your code.
3 Allowed Matlab functions
imfilter, conv2, imrotate, im2double, rgb2gray, rgb2lab, rgb2ycbcr, rgb2hsv, kmeans
and all other plotting and matrix operation/manipulation functions are allowed.
fspecial, imgaussfilt are NOT ALLOWED!
4 Collaboration Policy
The code you turn-in should be your own and if you DO USE other external codes/codes
from other students - do cite them. For the honor code refer to the UMD Honor Pledge
website here http://shc.umd.edu/SHC/HonorPledgeUse.aspx.
3