Assignment 2: Edge Detector

The assignment this week was to create an edge detector that would read an image file and compare each pixel with its adjacent pixel.  The pixels that were the most different from their neighbors (based on a certain threshold) would be considered an 'edge.'  So the first program draws the edges in a given image, the edge colored white and the rest black.

The next part was to similarly compare each pixel to its neighbors, but this time to assign the pixel a greyscale value depending on how unique that pixel was.  The more unique the closer to white, and the more similar the closer to black.

My first attempt at the second program yielded a less accurate but interesting result.  I kept the threshold in from the first problem, and the resulting image looked a little more vibrant than the more accurate version I made later.

Finally, I made another modification to the greyscale assigning edge detector, this time assigning pixels whose uniqueness was in seven different ranges assigned to certain colors.  The resulting image is strange, but interesting nontheless.

See comparisons below:


original

edge detector (threshold 100)

edge detector grey

edge detector grey V1 (threshold 300)

edge detector color (threshold 300)


original

edge detector (threshold 100)

edge detector grey

edge detector grey V1 (threshold 100)

edge detector color (threshold 100)



Home