ImageGrid is a Processing program for visually analyzing images using a grid interface. The user divides a single image into different categories by selecting cells within a grid. The program then outputs data on how many cells in the grid were assigned to different categories.

ImageGrid allows for categorization within an image through two kinds of overlapping categories: “primary” and “secondary” categories. The primary category is exclusive: users can only assign one primary category to a cell. The secondary category is inclusive: users can assign multiple secondary categories to a cell. Take, for example, a painting of a still life. The user might classify thematic content using a primary category: FRUIT cells overlaying an apple, FURNITURE cells overlaying a table, etc. They could then assign those same cells multiple secondary categories according to brushstroke: FRUIT cells overlaying the apple could be secondarily categorized as both “glazed” and “stippled.”

ImageGrid then outputs a data file so that the user can analyze the different components of the image. Which combinations of brushstrokes did the artist use to paint various kinds of objects? What percentage of the canvas was dedicated to different brushstrokes and where on the canvas were they concentrated? By analyzing a series of still-lifes by the same artist, the user might notice larger patterns in technique: a shift away from “dry” brushtrokes when painting CLOTH, perhaps. The program outputs two text files:

  1. A summary file indicating the total cell counts for each primary and secondary category.
  2. A file with the category attributes of every individual cell in the grid. Useful for more advanced analysis, such as calculating the spatial distribution of categories within an image or statistics on overlapping primary and secondary categories.

If you would like a quick introduction to the ImageGrid interface, see our web-based introductory application. A blog post explains the background and development of the program.


ImageGrid is an open-source program and can be downloaded and modified on GitHub. It is also available here as a zip file that includes:

  • ImageGrid.pde - The main Processing file.
  • README.txt - Guide to editing the program and  instructions.

Creative Commons License ImageGrid by Bridget Baird and Cameron Blevins is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.