the Results

My output is still not perfect, but COS 126 is the only computer science course I've ever taken so I'm not too dissatisfied with my results. I used the two images below as test images because they had high contrast (orange and black, red and white), which I thought would be easier for the program to recognize. (Click any image on this page for a full-size view.)

The Princeton University seal Marilyn Monroe (in case you couldn't tell)

After three weeks, I had a basic algorithm programmed and was making mosaics the fourth week. I even utilized a "distance restriction." This distance is different from the color distance in that it aims to create a more aesthetically pleasing mosaic by ensuring adjacent tiles images are not identical. With or without the distance restrictions, the mosaics weren't visually accurate.

First seal mosaic with tile distance restriction at 1 First Marilyn mosaic, distance restriction 1.  Looks just like her, doesn't it?

I was very frustrated with these results because, as far as I could see, the same algorithm worked for other programs (that I had read about online). I decided that to get more details I would have to get more detailed. So after the initial subdivision of the target, I further divided each tile into 16 subtiles and printed the 16 values (per R, G, and B) to the .txt file created by the library program. Similarly, I divided each tile image and stored those in the tile image array. This explains the significant increase in size of the library and tile image arrays from those created by the first algorithm. As you can see, I did not use the distance restriction (the program took up quite enough memory without it).

Second seal mosaic That's more like it.

The difference is quite obvious. Whereas the field of the seal was more grey according to the first algorithm, it finally looks black after the change, and Miss Monroe's shape is a little more discernible. You can even tell where her eyes and lips should be. (Doesn't look like much, I know, but this is quite a triumph for me.) It is interesting to note that the program, with either algorithm, even attempts to reproduce the "bleeding" pixels around the seal.

Return to "Title" page


the Project | the Algorithm | the Process and Program | the Results | the Flaws | the Unfinished | the Art

Code Snippets | Sources | email me