Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

How to Visualize Colors in Big Image Data: The Slice Histogram

Damon Crockett
San Diego Satellite
Fig 1. One million slices of a satellite image from downtown San Diego, arranged as a hue histogram sorted vertically by saturation.

Slice histogram zoom
Fig 2. Closeup of slice histogram above.


INTRODUCTION

Perhaps primary amongst the outputs of our lab are visualizations of Big Image Data, and in particular what we call 'media visualizations' - visualizations of image data whose primary plot elements are the images themselves. Media visualizations are special cases of glyph visualizations, a class of statistical plots that present data points as glyphs - icons that carry information by way of their non-relational characteristics, things like size, shape, color, etc.

Glyph visualizations are not at all uncommon. For example, the popular plotting library ggplot in the R language can make glyphs of its scatter points (Figure 3), allowing the user to encode additional features in the visualization.

scatter
Fig 3. Glyph scatterplot. Five data dimensions are presented on two axes.

Because traditional scatter points have no non-relational characteristics - they are in fact point locations and not objects at all - they carry information only by their spatial positions. Traditional scatterplots, then, can present only as many informational dimensions as there are plotting axes. If, however, each scatter point is made a glyph with n non-relational characteristics, the dimensionality of the visualization is increased by n.

Media visualizations can therefore be understood as limit cases of glyph visualization, because they preserve, strictly speaking, all of the visual information in the dataset, and for image data, preserving all the visual information is preserving all the information. Of course, in practice, this isn't exactly true, since non-visual information (like time and place) will very often figure in the analysis, but typically, this data is used to define a subset of the data we're interested in, e.g., 'all the Instagram photos from Manhattan during this year's Fashion Week', and then our visualization of that subset now focuses exclusively on the visual information.

In any case, even assuming we care only about visual information, the mere presence of the information in the visualization does not guarantee its being readable for the viewing subject. Important for media visualizations are particular choices about sorting or otherwise organizing the images on the canvas in order to reveal patterns. Our lab has pioneered a suite of techniques for organizing images as plot elements on large digital canvases. These techniques are on display in several of our projects (most notably, Phototrails). We use sorted rectangular montages, Cartesian scatterplots, and perhaps most identifiably, polar scatterplots.


IMAGE HISTOGRAM

Recently, we've pioneered a new technique, one that has roots in our Selfie City project (thanks to Moritz Stefaner): the Image Histogram. The most basic form of the Image Histogram simply gives the distribution of a single feature, visual or non-visual, and uses the images themselves as plot elements.

Like the Image Montage, the Image Histogram gives every image its own place in the plot, and like the Image Plot (scatterplot), the Image Histogram uses an axis to organize data points. We have found this combination of characteristics to be very useful in presenting, e.g., temporal patterns in image data.

But because Image Histograms are media visualizations, we needn't settle for the presentation of a single feature. The images themselves are right there on display, and although the particular choice of histogram (i.e., what gets assigned to the x-axis) dictates the horizontal sorting, the vertical sorting is still up for grabs and can reveal additional patterns in the data. We can therefore think of each histogram bin as a columnar montage that can be sorted as many times as we like. In Figure 4, we can see the results of multiple vertical sorts.

SD vs. Philly
Fig 4. Image Histograms binned by hours over a week, sorted vertically by both brightness and hue.

The Image Histogram is a powerful statistical tool that admits of a great deal of variation, and is implemented using open source Python code (we use the Python Imaging Library). Big thanks to Cherie Huang for the original code. All of the Image Histograms shown here were made with a fork from that original code, using Python's pandas library and its lightning-fast operations over data tables.


SLICE HISTOGRAM

My own work with the lab began around the time we started making Image Histograms, and I confronted a problem: I wanted to make media visualizations that reveal, with great clarity, the color properties of image datasets. Images wear their colors on their sleeves, of course, and so media visualizations do carry color information - all of it, in fact - but again, particular choices about sorting can matter a lot.

Unfortunately, even our very best sorting choices for Image Histograms do not yield crystal clear presentations of color. And the problem is that images typically contain lots of different colors. When you sort them by color, how do you do it? Do you take the mean hue of the whole image? The mode? Do you look at all color dimensions, or just one? How you answer these questions will depend on your goals, of course, but the questions are less important if the images have very low standard deviation of their color properties. The more uniformly-colored the images, the easier it is to sort them by color. But we can't simply enforce uniformity in our data. What we can do is plot slices of images instead of whole images. This general idea is at work in various computer vision algorithms, and it makes good sense: images typically capture scenes, and scenes have parts, so we should at the very least be looking at those parts, whatever else we do. In computer vision (and human vision), the selection of parts can be very sophisticated (in human vision, this is roughly the function of visual attention), but it is computationally expensive. We need a way to get better color visibility without sacrificing computational speed.

I developed a technique that is fast and yields excellent color visibility (Figure 5; closeup in Figure 6). Each image is sliced into some number of equal-sized parts, features are extracted from the parts, and those parts are then plotted as an Image Histogram. The entire process, carried out with 1 million slices, can take less than an hour.

LA color
Fig 5. Hue histogram sorted vertically by brightness.

LA color closeup
Fig 6. Closeup of slice histogram above.

The number of parts will depend on the kind of images we use. In my own work, I set a criterion value for average standard deviation of hue (~0.1) and then find the minimum number of parts needed to meet the criterion. This approach ensures both that the plots will make a smooth (and consistent) presentation of color and that they will carry as much object content as is possible for that particular source of image data at that particular criterion value (this as opposed to slicing all types of image data into the same number of parts). As you might imagine, the more 'zoomed out' the original image data, the clearer the object content at any particular criterion value. Satellite photos give excellent results, for example (see Figures 1 and 2 at the top of the page).

The object content is an important product of this technique. Because the plot is, like all media visualizations, composed of the images themselves, it still carries much of the information it would have carried had we used whole images - that is, unless we set the criterion value so low that our slices are uniform fields of color (even single pixels!). This would yield maximal color visibility, of course, but we'd lose all the other information. Choosing a criterion value, then, is choosing the balance between color visibility and object information. As we lower the criterion value, we look at progressively smaller parts of scenes, and gradually, they lose their structure. Just where we choose to stop this degradation will depend on our analytical goals.

It is important to note that both the Image Histogram and the slicing technique are very general use tools, and admit of great variation in their application. And of course, the tools have no particular analytical power without some intelligent selection of data. For example, we might want to compare the color signatures of different sources of image data for the same region (Figure 7).

Slice Histograms Across Image Sources
Fig 7. Slice histograms for four different sources of image data: satellite, Google Streetview, Flickr, and Twitter.

Or, we might want to visualize the colors of a particular concept, like 'autumn' (Figure 8).

New England Autumn
Fig 8. Slice histogram of Flickr images autotagged 'autumn' from New England.

Additionally, in making slice visualizations, it's not essential that the visualization take the form of a histogram. What is essential is that the plot elements have low standard deviation of whichever visual properties we're interested in, and that there be some method of sorting that groups together similar elements. That's it. We can transform these histograms into any sort of plot, or montage, or map we like. In an upcoming post, I'll talk more about my efforts to expand the space of possible forms of media visualizations can take.

How to Visualize 4512 Instagram selfies? Introducing new version of our free ImageMontage tool



We released new version of ImageMontage free visualization tool (ImageMontage v.2).

ImagePlot v.2 Documentation

ImagePlot v.2 download (please use this version, rather than the one on ImageJ website).


ImageMontage v.2 - Key Features:

- Create high resolution montages of large image collections. For example, you can visualize a collection of 40,000 images (assume each image is 100 x 100 pixels) in a single 20,000 x 20,000 pixel montage.

- The images can have different sizes and/or proportions - they will be scaled to the same height in the montage.

- The order of images in a montage can be controlled by a user. (Create a text file with a list of file names in a sigle column, and use it as the input in "Image Source" option.) In the examples above, one montage organizes a set Instagram photos by upload date/time; another organizes the same images by average hue. (The plugins which measure image characteristics are included with our ImagePlot plugin.)

- You can include all images in a single folder; all images within subfolders; or images located in different areas of your drive ("Image Source" option.)

- The new version allows you to create 1-level, 2-level, or 3-level montages. For example, you can organize your photos by year, month, and event. Or, you can montage images of van Gogh painting by city, year, and season. (See examples below).


How to run:

ImageMontage is a plugin for ImageJ, a popular free open source image analysis software (runs on Mac, PC, Lunix).

1) Download ImageJ software;
2) Download ImageMontage v2 plugin from GitHub;
3) In ImageJ: use File > Open to open the plugin file. Then click on: Macros > Run. ImageMontage will start.


Also:

Check our ImagePlot and ImageSlice visualization plugins for ImageJ.




Examples of 1-level and 2-level montages:

level1demo
A montage of selected van Gogh paintings organized by creation year (1-level montage).

level2demo
A montage of selected van Gogh paintings organized by creation year and season (2-level montage).


Examples of montages of larger image sets:

Montage of 4512 Instagram selfie photos from selfiecity.net project. Original image is 24000 pixels wide. (Montage shows our larger image set before we did the final manual check - so few images are not true single selfies. Images from Tokyo which were not used in the final presentation are also included.)

4512-Instagram-selfies-crop
Closeup.

4512-Instagram-selfies-full
Full image (24000 pixels wide) scaled to 640 pixels.

See on Google+

See / download 8000 pixel wide version from Flickr.


TLV-WEEK-APRIL-21-26_hue
Montage visualization of 33,292 photos shared on Instagram in Tel Aviv (April 20-26, 2012), sorted by hue (top to bottom, right to left). (These and three other visualizations below are from our Phototrails project - analysis and visualization of 2.3 million Instagram photos from 13 global cities.)

TLV-WEEK-APRIL-21-26
Montage visualization of 33,292 photos shared on Instagram in Tel Aviv during the same period, sorted by upload date (top to bottom, left to right).

TOKYO-WEEK-montage
Montage visualization of 55,498 Instagram photos from Tokyo uploaded during four consecutive days, sorted by upload date and time (top to bottom, left to right).

NYC-WEEK-montage
Montage visualization of 57,493 Instagram photos from New York uploaded during four consecutive days, sorted by upload date and time (top to bottom, left to right).




ImagePlot user guide in Polish / analysis of V for Vendetta


Dr. Radosław Bomba (MediaLab, Maria Curie-Skłodowska University, Lublin, Poland) has been succesfully using our free ImagePlot software in his classes.


Here is the example of one the student projects - Aleksander Stando's visual analysis of V for Vendetta movie and comparison it with the original comic book:








Radosław developed a guide to ImagePlot in Polish. We are looking forward to more interesting ptojects to come from his classes.




The page of UMCS MediaLab (Maria Curie-Skłodowska University, Lublin) has a number of other projects by students which use ImagePlot and other tools for quantitative cultural analysis and visualization (Let Google translate it from Polish into the language your read)




ImagePlot video tutorials: learn how to visualize image collections



A while ago I recorded 4 video tutorials showing how to use our ImagePlot visualization tool.

ImagePlot allows you to explore image and video collections of any size by creating visualizations which show images in a collection - or keyframes in a video - sorted in different ways. Both metadata and visual properties of images - which can be measured with ImageMeasure tool included with ImagePlot - can be used for sorting.

In case you missed them, here are the tutorials:



1. Measure basic visual properties of an image collection with imageMeasure (this macro is distributed with ImagePlot). Image set used for the demo: 778 images of van Gogh paintings (included in ImagePlot download.) Note: You can also another tool - QTImageProcessing - to measure additional image properties.





2. Visualize image collection as points using ImagePlot. This visualization uses metadata (year and month for each painting) and one of the measurements created in step 1. (The measurement used is median brightness.)





3. Visualize image collection as images using ImagePlot:





4. Some of the advanced options available in ImagePlot. The demo uses another image collectin distributed with ImagePlot: 128 images of Piet Mondrian's paintings (1905-1919).




If you want us to explain any other features of ImagePlot, or want to know how to create particular visualizations, just let us know.


Google 60 and Google BBS Terminal - interacting with computers in 60s and 80s



Two very nice projects from masswerk.at recreate human-computer interaction in 1960s and 1980s:


Google60

The link to the working application - Google web and image search as it could have looked in 1960:

http://www.masswerk.at/google60/

“Google60” is an art project to explore distances and heroism in user interfaces.
All scripts and images © 2012 N. Landsteiner, mass:werk – media environments, www.masswerk.at.


Here is the screenshot from the second interactive application:

Google BBC terminal

Follow this link to try the application - Google web and image search as it could have looked in the 1980s:

Google BBS Terminal – What Google would have looked like in the 80s

(c) 2012 mass:werk – media environments, N. Landsteiner,
A working service after a video by Squirrel-Monkey.com: “If Google were invented in the 80s”.


ImagePlot 1.1 visualization software: explore patterns in large image collections


Today we’re excited to announce the release of ImagePlot 1.1 - a free software tool that visualizes collections of images and video. This updated version was developed by Jay Chow and Matias Giachino. The development was supported by Mellon Foundation grant "Tools for the Analysis and Visualization of Large Image and Video Collections for the Humanities."


Download ImagePlot 1.1

ImagePlot creates new types of visualizations not offered by any other application. It displays your data and images as a 2D line graph or a scatter plot, with the images superimposed over data points. The images can be sorted using any available metadata (e.g, dates), or by their visual properties which can be automatically measured with the included software. ImagePlot works on Mac, Windows, and Linux. Max visualization size: up to 2.5 GB (for example, you can render a 23,000 x 23,000 pixels visualization.) There no limits on how many images can be shown in a single visualization. (Largest image collections we visualized so far: 1 million manga pages; 1 million deviantArt artworks.)

What's New in Version 1.1
  • Each new visualization is given automatically generated meaningful unique filename. It includes the names of data file and the data columns used for x-axis and y-axis.
  • Option to automatically save the visualization after it have been rendered (appears in the first application dialog box).
  • Option to render the visualization using a better resize algorithm (runs slower but generates nicer images; the option appears in the Image Options dialog box).
  • File open error checking: if ImagePlot can't find a particular image, the filename is printed in the Log window, but rendering continues.


90000_DigitalArt.90000_TraditionalArt.scaled
Comparing 90,000 images from Digital Art category on deviantArt (left) and 90,000 images from Traditional Art category (right). In each image plot, images are sorted by average brightness (x) and average saturation (y). Software which analyzes these and other image properties is included with ImagePlot.

crop.Matrix_users.X_BrMean.Y_SatMean.Color_cat1_cat2.hue_shift..top_225
ImagePlot code can be easily extended and customized. This visualization compares image galleries from a number of deviantArt users. The colors of the circles indicate the primary and secondary categories of each image (e.g., Traditional Art / Portraits). The individual plots are combined into a matrix using ImageJ built-in command.

ImagePlot can create animated visualizations. Here we animated 128 paintings by Piet Mondrian from 1904-1917 over time. The year is indicated in the upper left corner. The distances between paintings indicate their visual similarity.


Guide to visualizing image and video collections


Guide to visualizing image and video collections


The guide describes the techniques used in our Software Studies Lab to explore large image and video sets.

Like our previously released ImagePlot software, these techniques use free ImageJ digital image analysis application with our custom macros.


The guide covers the following operations (software used is in brackets):

- Download and setup free ImageJ software used to prepare images and video for visualizations, and create visualizations.
- Automatically detect shots in a video (shotdetect).
- Output video as a sequence of frames (ImageJ).
- Automatically scale all images in a folder (ImageJ).
- Create "montage" and "slice" visualizations (ImageJ).
- Create "montage" and "slice" visualizations with diff. size images located in multiple folders (ImageMontage, ImageSlice).
- Use Unix commands to create a data file containing file paths to images located in multiple folders (Unix).

Visualizing image and video collections: examples, tutorials, software, theory



You can also download this 28-page PDF document from our server. It illustrates three key techniques used in our lab (softwarestudies.com) to explore large image and video sets: montage, slice, and image plot.(released 3/30/2012).

TUTORIALS:
To learn how to use montage and slice visualization techniques with your datasets, follow this guide:
Visualizing image and video collections: tutorials (released 3/30/2012).

SOFTWARE:
ImageMontage (released 3/30/2012)
ImageSlice (released 3/30/2012)

THEORY:
Lev Manovich. Media Visualization: Visual Techniques for Exploring Large Media Collections. (released 6/2/2011; updated 3/31/2012). Article about the theory and methods of media visualization, with the analysis of the examples.

More information about our digital humanities projects:
softwarestudies.com

new Vroom scalable display is ready for cultural analytics research

New super high resolution scalable display installed in Calit2 Vroom. The system consists from 32 individual displays arranged in 4 x 8 configuration.

The very thin bezels of individual screens make the system suitable for exhibitions and adoption in museums and other cultural venues. To test capabilities of this new system, we loaded our complete image set of 4535 Time magazine covers (1923-2009). Using our software, we can sort the images set according to different criteria. We can also select any single image or a group of images, and enlarge for a closer look. We are looking forward to using the new system for our cultural analytics projects.

IMG_2449

IMG_2453

IMG_2451

IMG_2443









QTIP software: analyze image collections with the speed of the light


QTIP is a free digital image processing application. It was developed by Multimodal Analysis Lab and National University of Singapore) and Software Studies Initiative at University of California, San Diego.

Download it from software page of our lab blog.

Use it to process your image collection and then visualize the collection with our free ImagePlot tool.


Example: using QTIP with ImagePlot to compare 580 van Gogh paintings (left) and 580 Gauguin paintings (right). In each plot, X-axis = median brightness, Y-axis = median saturation.

van_Gogh_left.Gauguin_right.X_brightness_median.Y_saturation_median


Since 2008, Software Studies Initiative (softwarestudies.com) has been developing a computational approach to working with big visual data sets which we call cultural analytics. We automatically analyze image or video collections using digital image processing, and then use the results to render high resolution visualizations which show all images in a collection sorted according to their visual attributes and metadata. This allows us to efficiently "look inside" large visual collections, identifying patterns and seeing the whole "landscape" of the data.

After refining our software on internal projects, in September 2011 we released ImagePlot visualization tool. The download also includes ImageMeasure macro which analyzes basic visual features of images in a collection (brightness, saturation, hue and number of shapes of every image).

Today we are making available a more powerful free digital image processing application:

QTIP: analyze image collections with the speed of the light.


QTIP stands for QTImageProcessing. Written in Java, QTIP uses OpenCV and is very fast. Fire it up, select a directory containing images, and watch it go through it with an amazing speed. The output is a single file (.csv) containing image filenames and 49 extracted features per image.

For example: we downloaded 178,930 images from Flickr group "Graphic Design." On our iMac (Fall 2011) with 16 GB of RAM, the application processed all these images in 15 minutes (192 images per second). On Mac Air (Fall 2011, 4 GB RAM), processing the same 178,300 images took 28 minutes (106 images per second.)

Once you process your image collection with QTIP, use the results file with ImagePlot to explore the collection and make discoveries.



NOTES:

1. If you are processing a directory which contains lots of images, it may take a few seconds before you see QTIP beginning to read images - just wait.

2. QTIP can process multiple image directories located inside a user-specified input directory.

3. One of the most useful features output by QTIP is the number which indicates if a given image is color or black and white. For the description of this and all other features, read program documentation.

4. The results file contains two columns called "titleID" and "bookID." Disregard these columns. (The program was originally written to analyze our one million manga pages data set which was divided into titles and books.)

5. If QTIP encounters a corrupt image, it will still create a row for this image containing filename and an error flag. You need to remove these lines before using these results with ImagePlot. Do a sort on the filename using "bookID" column and then delete the lines which have error flag. In our experience, image sets donwnloaded form social media sites (Flickr, deviantArt) often contain some corrupt images.

5-minute Guide: Graphic Design Principles for Information Visualization


Over last few years, Information visualization has become of the key contemporary communication medium and also research techniques. But unless you went to design school, how can you create good looking designs such as the ones on www.visualizing.org or infosthetics.com ?

(Note that I am not talking about visualization part itself - how to effectively translate data into visual representations, which visualization techniques to use then, etc. - but about graphic design part, i.e. how to “style” your visualizations.)

The purpose of this guide is to reduce modern design to seven essential "algorithms." Follow these principles and your design will look and communicate much better:

7 Principles for Designing Good-Looking Visualizations


----------------------------------------------------------------
Great visualization design: 2010 Annual Report by Nicholas Feltron.


a list of Innovative visualizations of temporal processes


I put together this online resource containing particularly interesting visualizations of temporal processes and some tools for time visualization:


LIST of INNOVATE VISUALIZATIONS OF TEMPORAL PROCESSES




Three examples of innovative visualizations of temporal cultural processes
(Movie narrative chart, Listening Post, The Ebb and Flow of Movies):

time_visualizations_examples






ImagePlot video demos now available

I have been having fun making short video tutorials for our imagePlot visualization software which we released on 9/16/2011:


ImagePlot video demos on YouTube


The videos correspond to tutorials in ImagePlot online documentation and the use sample image sets which we provide with ImagePlot program. So if you want to follow tutorials, download ImagePlot.zip - it includes the software, sample sets, and theory and methodology articles.

To make the video, I use Snapz Pro X software for the Mac. I then upload the captured video to YouTube, and use its built-in annotation tool to add captions and text.


If you want me to make a video explaining particular features, just email me !

Happy image plotting,

Lev Manvich and ImagePlot team

ImagePlot visualization software: 3 MB download now available

On September 16, 2011 we released ImagePlot - a tool for exploring large image collections developed by our lab:

ImagePlot.zip 110 MB
ImagePlot macro, ImageJ application (Windows / Mac / Linux), sample data sets, theory and methodology articles..


110 MB sounds big. We realize that not everybody has access to fast network connections. Therefore we now provide the option to download the software files by themselves. This download is only 3 MB:

ImagePlot-progam-only.zip 3 MB
ImagePlot macro, ImageJ application (Windows / Mac / Linux).


The best way to learn ImagePlot is to follow tutorials in the documentation - and for this you do need the sample image sets included in full download. So when you have access to fast connection, we would like to encourage to download the full file set. But if you can't wait to start playing, get 3 MB version now.












introducing ImagePlot visualization software: explore patterns in large image collections

ImagePlot is a free software tool that visualizes collections of images and video.

DOWNLOAD IMAGEPLOT 0.9

ImagePlot creates new types of visualizations not offered by any other application. It displays your data and images as a 2D line graph or a scatter plot, with the images superimposed over data points.

ImagePlot_points_images.Mondrian.1905_1917.X_saturation_median.Y_hue_median.c2500.back_100.b210.ponts64.im100
Scatterplot (left) vs ImagePlot (right) of the same data. 128 paintings by Piet Mondrian created between 1905 and 1917. In each plot:
X-axis = brightness median. Y-axis = saturation median.

ImagePlot works on Mac, Windows, and Lunix.
Maximum possible visualization resolution: 2.5 GB (2,684,354,560 greyscale pixels, or 671,088,640 RGB pixels).
Largest image collection visualized so far: 1,074,790 one megabyte images.

ImagePlot was developed by the members of Software Studies Initiative with support from the National Endowment for Humanities (NEH), the California Institute for Telecommunications and Information Technology (Calit2), and the Center for Research in Computing and the Arts (CRCA)

ImagePlot team:
Lev Manovich (Professor, Visual Arts, UCSD and Director, Software Studies Initiative, Calit2)
Jeremy Douglass (Post-doctoral researcher, Calit2)
Nadia Xiangfei Zeng (ICAM undergraduate students, UCSD)
Tara Zepel (PhD student, Visual Arts, UCSD).

Along with the program, we also distribute a number of articles by Manovich, Douglass and Zepel that address methodologies for exploring large visual cultural data sets, and discuss our digital humanities projects that use ImagePlot. (The articles can be also downloaded directly from softwarestudies.com.)

Visualizations created with ImagePlot have been shown in science centers, art and design museums, and art galleries, including Graphic Design Museum (Breda, Netherlands), Gwangju Design Biennale (Korea), and The San Diego Museum of Contemporary Art.

ImagePlot software was created as part of our Cultural Analytics research program.


Share Your Image Plots:

Twitter: Use #imageplot when you tweet about your image plots.
Flickr: Use "imageplot" tag for your image plots.
Subscribe to our blog softwarestudies.com
Email us your feedback, new feature requests, bug reports.


Examples of ImagePlot visualizations:

van_Gogh_left.Gauguin_right.X_brightness_median.Y_saturation_median



Google Logo Space

Manga Style Space

113 President Obama Weekly Address video set

Time_covers.imageplot.X_date.Y_saturation.all.scaled_up

Graphic Design Museum Breda Spring 2010

Gallery Opening 26

One million manga pages












Recently...