Compcam 2012 Fall Assignment 3

Used the matlab code to do the edge detection. We then do region filling to create mask for foreground/background separation. Kmeans clustering method was applied to create a cartoonized photo, which is used to be the color source of final output image.

Tested on photos given, edges found:

Mask created via region filling:

Cartoonized effect via Kmeans clustering with 8 colors:

Output image (background color changed to illustrate the background/foreground separation):

Another experiment by our own photos:

 

 

Since the lighting condition, background is less controlled compared to the photos given, edges detected are more noisy. Also, some edges such as desk boundary is actually correct.

 

Via low-pass filtering some manually editing (e.g., for desk boundary) we get the following mask:

 

We again apply Kmeans clustering to get cartoonized effect (with 32 colors):

 

Here is the output image:

 



Leave a comment