Our inspiration started with this pixelated and "Lego-bricked" image. As a team of programmers that have never touched coding before this class, we were excited to explore image processing, data mining, and user interfacing.
We started by interpreting images as 3-dimensional arrays. Each pixel is then a 3 column RGB value. To pixelate we created "super pixels," square groups of pixels all consisting of the same RGB values. Their RGB is computed by taking the average of the whole group.
A pixelated image was produced by populating an empty array with all of the superpixels that were generated. This code interfaces with the user's choice of mat size produce appropriately sized superpixels to fulfill the user's request.
Our first attempt at image processing was unsuccessful. We managed to transform the image of a wallaby on the left into the resultant pixelation on the right. This was an issue in average RGB calculation as well as our display method.
With modifications we transitioned to successful image pixelation. After successfully pixelating we used Euclidian distances of RGB vectors to match colors to the closest existing lego brick color. With this technique we created a "lego-bricked" image.
The final steps in image processing is to overlay a lego texture so that the user can visualize the end product as accurately as possible in our GUI. This is done by populating an empty array with tiny, appropriately-color lego templates generated in Adobe illustrator for each lego brick.
The final result should look like the image on the left.