<< back to home || created with weditor
 
Edge Detection
 
Implementation
 
For this project, I implemented edge detection pretty much as it was described in the assignment. The major difference was that instead of having 16 orientations, I had only 12 because I decided that the 45 degree orientation was too close between the 30 degree and 60 degree and that I could get good results with 0, 30, 60, 90, etc... degree directions (essentially each is 30 degrees apart). As was suggested, I precomputed sum arrays to make calculating the avg color for different distances more efficient.
 
Description of Results
 
I think it is sufficient to show the DIhats that I computed for each image at each scale and orientation. In addition to what was assigned, I also wrote code to combine the DIhats for each direction into one image where all edges are shown. Also, I wrote code that colors the edges according to their direction. The way that this code works is that the brightness is controlled by edge strength, and the color is controlled by the relative strenghts of the edges in different direction. An edge along 0/90 degrees gives red color, an edge along 60/240 degrees gives green, and an edge along 120/300 degrees gives yellow. All other directions are combinations of these. So, a 30/210 degree edge will be yellow and a 90/270 degree edge will be cyan and a 150/330 degree edge will be purple.
 
Results for Simple Image
 
All the results for all the orientations can be downloaded here as a zip file: results.zip
 
The most interesting results are here:
 
My Kitchen (Original)
 
My Kitchen (All Edges at Scale = 3)
 
My Kitchen (Edges Colored Based on Direction at Scale = 3)
 
Circle and Square (Original)
 
Circle and Square (Edges at Scale = 3)

 

Circle and Square (Colored Edges at Scale = 3)

 

Face (Original)

 
Face (Edges at Scale = 7)
 
Face (Colored Edges at Scale = 7)
 
Other Results
 
I wrote some code to remove the Black/White component of images and leave just the color:
 
Here is another result. I removed more of the BW, so now there are less shadows, but this tends to add more noise.
 
 
Cool Blooper
 
I was fooling around with the outputs of the above algorithm in photoshop. This is what happened when I turned down the gamma.