Metameme: Pepper Spray Cop Mosaic

 

What could possible be more awesome than an #OccupyData hackathon? That’s right: the Casually Pepper Spray Everything Cop meme.

And what could be more awesome than a meme? That’s right: a metameme. One of our goals over the last couple of days has been to create just such a metameme. The basic idea is to start by generating a mosaic image of the Pepper Spraying Cop, composed of many tiny remixed Pepper Spraying Cop images. From our initial drawing on the whiteboard, we moved to start thinking about how to do a rapid implementation.

See http://brownbag.me:9001/p/pepperspraymosaic to follow the development

Update: [10.12.11 16.22] ET The game continues. Here some iterations from @numeroteca with metapixel:

Last iteration:

Third iteration with metapixel

The how to guide and steps:

 Pepper Spray Mosaic
One of the ideas we had for the #OccupyData hackathon was to create a kind of meta-visualization of the <a href=”http://knowyourmeme.com/memes/casually-pepper-spray-everything-cop“>Casually Pepper Spray Everything Cop meme</a>. The basic idea is to start by generating a mosaic image of the Pepper Spraying Cop, composed of many tiny remixed Pepper Spraying Cop images. From our initial <a href=”http://montera34.com/occupyresearch/2011/12/09/occupydata-brainstorm-images/20111209_121110/“>drawing on the whiteboard</a>, we moved to start thinking about how to do a rapid implementation.
Step 1: find a good image archive
The first step was to find a good source of images of Pepper Spraying Cop. We decided to scrape all the images from the most popular single-topic Tumblr on the meme: <a href=”http://peppersprayingcop.tumblr.com“>http://peppersprayingcop.tumblr.com</a>
Step 2: Download the images from tumblr
The second step was to 
One way to extract the links from a tumblr: http://sourceforge.net/projects/gettumblrpic/
To download the pics: http://code.google.com/p/tumblr-downloader/downloads/list [change the name of the tumblr acount at accounts.txt]
Run tumblr.jar . Only downloads the 20 last ones if they on an amazon server. lookig for better option.
Another way [from Kawan]: wget -r -l1 -H -t1 -nd -erobots=off http://lallallwebsiteIwantthingsfrom 
Note that this will pull everything from a page of the site.  must click through to the next page when needed.  It would be awesome to automate this
At one point, we thought that we didn’t have enough images from just one Tumblr to run the mosaic. Happily, KnowYourMeme.com had links to four separate Tumblrs dedicated to the topic:
<schock> we don’t have enough images to do the mosaic, need MOAR pepper spraying cops!
Creating the mosaic
Once we have the images we need, we can create a mosaic using one of several options.
There are web based mosaic generators (examples)
For Linux, there is a command line program called metapixel. The documentation for metapixel is here: http://linux.die.net/man/1/metapixel
I found this one for MacOS : http://web.me.com/knarf/MacOSaiX/Download.html (trying it out now)
And using this as the main image template of the pepper spray cop
 
We’ve made it finally with metapixels (available in the repositories of Ubuntu):
Steps
  1. Create the folder with the photos “photos-folder”
  1. Create the folder to output them “folder-out”
  1. Prepare the files: metapixel-prepare photos-folder folder-out  (this will generate all the small images that the application will use)
  1. Make the mosaic: metapixel –metapixel –scale 8 –distance 3 main_pepper_cop.jpg output.png –library out
Files: main_pepper_cop.jpg is the original file; output.png is the output file.
The options: –distance puts the images at this distance; –scale makes the size of the final file, in this case multiplied by 8.
Easy!
In your Ubuntu: share/doc/packages/metapixel/README
Next Steps
We’d like to generalize this as a webservice: OccupyMosaic. Have a huge DB of occupy images and let anyone generate a mosaic out of them. (Then we can have a link to print it out and send it to you, via some webservice that does that).
There are several examples of mosaic webservices – can we copy the code of any of them?
It would be really nice to start a campaign of ‘We Are All Occupy,’ with a microsite, where people take a picture of themselves and upload it, and it autogenerates a mosaic that composes their image using an archive of photos from Occupy. Then ask people to circulate these broadly (share across the social web) as well as download and print them and post them everywhere 🙂
|| A project of #OccupyData ||