Computer Vision Projects
Posted on January, 20th, 2014
This was an introductory course to computer vision and computational
photography. In this course, we explored four topics: 1) image
features, 2) image morphing, 3) shape matching, and 4) image search.
All the programming was done in Matlab.
Logo Detection and Replacement
The project involves detection of the Penn logo in an image and
replacement with any chosen logo.
Implemented SIFT for key point extraction and obtaining feature
descriptors which are scale and orientation invariant. More
details are available at the
VLfeat site.
RANSAC was used for descriptor matching.
Estimate homography to get bounding box.
Use convex hull to identify the region of the logo.
Remove the logo and smoothen the background using roifill.
Apply homography to the replacement logo and copy olnly the convex
hull of the replacement logo.
Use bilinear interpolation with inverse warping for smoothened
pixel output.
Use alpha blending to create a realistic look to the warped logo.
Image Mosaicing
In this project, multiple images were taken to create an automatic
panaroma image.
Harris corner detector was used to get the corner response map.
Adaptive non maximum suppression was performed on the thresholded
corner response map.
Descriptors were obtained in a small window around the corner
points by subsampling and blurring.
Features were matched with RANSAC
Estimated the homography and placed the left image and right image
on top of the center image and the process was repeated.
The position of the warped image was adjusted to align with the
existing stitched image.
Image Morphing
In this project, I had to generate a video of my face being
morphed to another image or a face.
I chose the control points on both the images (such as ear
to ear, nose to nose and eye to eye).
Then I took the average of both the images and control
points at the mean image.
I constructed the Delaunay triangulation at the mean image.
At each frame, I computed the barycentric coordinates of
each pixel point of the intermediate image.
I implemented inverse warping to get the corresponding
points in both images using the barycentric coordinates.
Used bilinear interpolation to get a finer output. I
dissolved each of the image depending on which time frame,
the intermediate image is being generated for.
Combined the frames to produce the morphing video.
I chose the control points(matching) on both the images.
For each frame of the intermediate image, I computed the
weights and the constants of the TPS function, for both
x and y coordinates of the two images.
Now using the coefficients of the equation, the
corresponding pixel position in the source images were
found.
Used bilinear interpolation to get a finer output. I
dissolved each of the image depending on which time frame,
the intermediate image is being generated for.
Combined the frames to produce the morphing video.
Canny Edge Detection
In this project, I as a part of a two membered team, implemented
the Canny Edge Detection, algorithm to detect the edges of an
image.
Obtained the gradient map of the image, in both the horizontal (x
axis) and the vertical (y axis) direction, using a simple
convolution function by taking the difference of the adjacent
points of the image with simultaneous blurring.
Used bilinear interpolation and performed non maximum suppression.
Obtained the upper thresholded image and performed hysteresis
based edge linking for the edges which were between the upper
threshold and the lower threshold
For thresholding, we performed a technique of adaptive
thresholding, in which the value of the upper threshold is chosen
at the point at which the intensity values of 65% of the pixels in
image are below by using a histogram based approach.
We were one of the few teams who got full points on this project.