Image processing tips for geoscientists – 1

Today I would like to show a way to quickly create a pseudo-3D display from this map:

Original image

The map is a screen capture of a meandering river near Galena, Alaska, taken in Google Earth. I love this image; it is one of my favorite maps for several reasons. First of all it is just plainly and simply a stunningly beautiful image. Secondly, and more practically, the meanders look not too dissimilar to what they would appear on a 3D seismic time slice displayed in grayscale density which is great because it is difficult to get good 3D seismic examples to work with. Finally, this is a good test image from the filtering standpoint as it has a number of linear and curved features of different sizes, scales, and orientation.The method I will use to enhance the display is the shift and subtract operation illustrated in The Scientist and Engineer’s Guide to Digital Signal Processing along with other 3×3 edge modification methods. The idea is quite simple, and yet extremely effective – we convolve the input image with a filter like this one:

0  0  0
0  1  0
0  0 -1

Continue reading

Is Indigo really a colour of the rainbow?

Very good question asked on Colour Chat blog, and a partial answer, at the link below:

Also:

George Biernson, in 1972, wrote in the American Journal of Physics Why Did Newton See Indigo in the Spectrum? and “hypothesizes that Newton saw seven reasonably distinct colors in the artist’s paint mixture color circle (red, orange, yellow, green, blue, violet, and purple) and therefore assumed he could also see seven distinct colors in his crude spectral projections”.

Others have argued Newton was trying to add a seventh color to match the seven notes of the western world’s musical scale.

I will tackle the many problems of rainbow in my forthcoming series The rainbow is dead…long live the rainbow!!!

Stay tuned…

Time to spice up your visualization skills?

Introduction

I love a visualization well done, whether by me or someone else. In fact, I love visualization period. I find there’s always something to learn by looking at an image or animation, and always look for something new and interesting I can learn.

Today I would like to share with readers some of the things I learned, saw, or admired over time.

Where to start? Visualization in Google Earth

Yes, we all know nowadays how to use Google Earth to plan our next vacation, check our old neighbor’s new house, etcetera. But visualization? Yes indeed. Just today I was at a roundtable meeting of Fig Tree members (Fig Tree is an NGO that supports international development projects) and I learned how Google Earth is used by many NGOs for project planning: for a start check the Mercy Corps‘ Rough Google Earth Guide, these map overlay tools, and the official gallery.

Here’s a tutorial on annotating Google Earth:

and some beautiful visualizations created using Matlab in conjunction with Google Earth.

Read a book, pick a course

There are scores of great books on visualization. I introduce two I really like in my more recent post Two great visualization books. Reader Ron DeSpain mentioned these free online courses in a comment:  Introduction to Infographics and Data Visualization, by Roberto Cairo, which is also the author of  The functional art, a blog and a book, and Information Visualization MOOC, by Katy Börner and colleagues at the University of Indiana.

Be a generalist and a specialist at the same time

Specialize in one discipline if you can. See what the experts in that field do. For example I am a Geophysicist and do a lot of seismic visualization and interpretation, so I look at what folks like Steve Lynch, or Art Barnes to name a couple, and follow Agile Geoscience blog. Again, keep abreast of the latest technology: Google Earth is increasingly being used in seismic exploration planning and visualization. You can find some examples here and even get some seismic overlays and display them yourself: if you have Google Earth just download this KMZ file and double-click.

I am also always curious about other fields and browse for examples incessantly. I am interested in music, and I was thrilled to find this great review of Music Visualization. I am also interested in Astronomy and Planetary Exploration, and over time I have found some amazing visualizations.  This video for instance is a volume rendered animation of the star-forming region L1448 created by Nick Holliman (Durham University) in VolView, an open source volume visualization program.

Credits: Harvard Astronomical Medicine Project

Just recently I found on Visurus a time-lapse (1950 -2011) geocentric map of the visible universe.

A while back I learned a lot on from books like A Beginner’s Guide to Constructing the Universe, and its exploration of the relationships between nature, art, science, symbols, and numbers; I regularly go back to it.

Look for synergies and collaborations. Here’s what can happen when you put together a geologist and a design expert:

Don’t be afraid of using social media

Check answers on sites like Quora or Stack Overflow. Check regularly or better subscribe to visualization or specialistic blogs: I mentioned already VizThink and Fell in Love with Data.  I also like the excellent Datavisualization.ch and FlowingData, where you can actually find an extensive list of blogs.

Study what others do

Take a look at the groundbreaking work of Hans Roslins with his Gapminder:

Check this video on Designing for Visual Efficiency from Vizthink to learn how to declutter your visualizations:

Ignite Toronto 2: Ryan Coleman – Designing for visual efficiency at Ignite Toronto on Vimeo.

and this one on  Journalism in the age of data:

Journalism in the Age of Data from Geoff McGhee on Vimeo.

Looking for ideas?

Here’s an interesting visualization project from IMB: sign up on Many Eyes to not only browse several examples of visualizations but also to upload your own data and outsource the visualization project.

Color, color, color!

A subject I think is particularly important is how to use color in your presentations and visualizations. Use color sparingly and sensibly, and ad hoc. Know about color deficiencies and confusing color schemes and the difference a perceptually appropriate colormap can do. With Vischeck, Color Oracle, and Dichromacy you can simulate how people with different color vision deficiencies will see your images and decide if you need a different colormap; for two color contrast for presentations, webpages, diagrams, use the Accessibility Color Wheel. Select colormaps according to task, and avoid artifacts when using color blending. Reduce the hue range when possible and choose it based on the concept of color harmonization. After all, the hue circle isn’t really circular at all and contains non-spectral colors (purple). You can design harmonious schemes with Color Wheel Pro, and check the palettes’ mood using Colour monitor, a wonderful tool by Richard Weeler. Avoid at all costs rainbow and similar color palettes.

Finally, A fantastic resource on color: References and Resources for Visualization Professionals by by Robert Simmon at NASA’s Earth Observatory

Deep Zoom technology

Thanks to this technology you can now build interactive applications with seamless dynamic zooming. Look at Steve Lynch’s seismic visualization built using MS Silverlight, and Well Visualization in Prezi by Evan Bianco.

Regularly remind yourself to go back to the basics

The best tools are your brain and your hand. Draw and sketch a lot. Concept maps are a great tool for brainstorming and tinkering with ideas, whether on paper or your computer; check NASA’s Mars Exploration Concept Map. Finally, I strongly encourage you to read Experiences in Visual Thinking.

Want to make it your profession?

Read The Data Visualization Beginner’s Toolkit series from Fell in Love with Data blog. This is the introduction to the series. In the first post he reviews books and other resources. In the second post he introduces some rules and more importantly the software tools. There’s a  feature interview with Moritz Stefaner on data visualization freelancing:

Interview: Moritz Stefaner on Data Visualization Freelancing from FILWD on Vimeo.

And  if you are intimidated by having to pick up programming skills, he has a post that is just right for you.

Post Scriptum

It should go without saying, but unfortunately it does not: if data are sensitive, don’t forget about privacy.

Resources and tools

visualisingdata’s  essential collection of visualisation resources

Visualization Tools & Resources

How to avoid equidistant HSV colors

Non-uniform gradient creator

Colormap tool

Color Oracle – color vision deficiency simulation – stand alone (Window, Mac and Linux)

Dichromacy –  color vision deficiency simulation – open source plugin for ImageJ

Vischeck – color vision deficiency simulation – plugin for ImageJ and Photoshop (Windows and Linux)

Why is the hue circle circular at all?

There is an excellent explanation at the link below:

Also watch this short video by Minute Physics: “There is no pink light“.

If you are interested in the subject of color and visualization I would encourage you to read Color for the Sciences by Jan J. Koenderink (MIT Press).

Lending you a hand with impage processing – introduction to ImageJ

In a previous post I used an x-ray of my left hand to showcase some basic image visualization techniques in Matlab.

If you are interested in learning image processing and analysis on your own (just like I did) but are not too interested in the programming side of things or would rather find a noncommercial alternative I’d recommend ImageJ. I just stumbled into it a few weeks ago and was immediately drawn to it.

ImageJ is a completely free, open source, Java-based image processing environment. It allows users to display, edit, analyze, process, and filter images, and its capabilities are greatly increased by hundreds of plugins on the official webpage and elsewhere.

It is used extensively by biomedical and medical image processing professionals (check this fantastic tutorial by the Montpellier RIO imaging lab), but is popular in many fields, from A-stronomy (you can read a brief review in here) to Z-oology (check this site).

I decided to give it a try right away. Within an hour of installing it on my iMac I had added the Interactive 3D SurfacePlot plugin, loaded the hand x-ray image, displayed it and adjusted the z scale, smoothing, lighting, and intensity thresholds to what (preliminarily) seemed optimal.

For each discrete adjustment I saved a screen capture, then I reimported as an image sequence in ImageJ and easily saved the sequence as an AVI movie, which is here below. I’m hoping this will give you a sense of how I iteratively converged to a good result.

Continue reading

Lending you a hand with image processing – basic techniques 2

In my last post I illustrated some simple techniques to enhance and visualize a hand x-ray image. I showed how to use intensity values as if they were elevation to display the hand in pseudo-relief. I did this in 2 ways using the Matlab command surf: once keeping the elevation range of [0-255] obtained from intensity, and a second time creating a different elevation range (through trial and error) to try to further enhance the relief effect. In the case of the hand x-ray the relief was indeed enhanced but with that also unimportant details that are distracting possibly from the task (for the hypothetical specialist commissioning our image enhancement work) of interpreting the x-ray. Today I want to show you a case in which it would be useful to enhance dramatically the smaller details in an image. Below is a beautiful coin of the Roman Emperor Augustus I found here.


Continue reading

Lending you a hand with image processing – basic techniques 1

Literally!

This is a PA ulnar deviation x-ray of my left wrist from last month, which gives a good view of the scaphoid bone from above.

The bone is chipped in the area pointed by the arrow, due to a fall that occurred 20 or so years ago. Somewhere in there, there’s also a tiny detached fragment of cartilage that calcified (as seen in a CT scan at the time). I was lucky, because typically the result of a fall with outstretched hand for people aged 17-40 is the scaphoid fracture, which are known to have unpredictable healing. Lately, however, due to a tendonitis, the fragment too is acting out. I’m left handed so this is causing some trouble, and that’s why the recent x-rays.

Continue reading

Welcome to MyCarta!

Hi everyone and welcome. As I mention in the blog header and in my about page, this is Matteo Niccoli’s blog of Topics in Geophysics, Planetary Exploration, Image Processing, Digital Cartography, and Visualization.

POSTS

My goal would be, once established a stable readership, to publish original material at least once a month. Posts will be generally in the form of either tutorials or case studies, often with data and results made available. Although this is not strictly a programming blog I will frequently work in Python or Matlab and share my code.

I plan to publish a number of post series covering topics in the following areas:

– Image processing and analysis

– Perceptually improved colormaps for data visualization

– Geophysical and petrophysical modeling

– Visualization tips for geoscientists

– Geophysics of impact craters

– Semiautomatic filtering of acquisition footprint in seismic data and in digital images (moiré pattern)

– Exploration gravity – data acquisition and processing

– Exploration gravity – data enhancement and interpretation

SUBMISSIONS

I will welcome submissions from readers, with probably one or two calls for submissions a year. You write the piece, I take care of publishing and promoting it. When ready for new submissions I will activate a submission page. Initially I will rely solely on my judgment to select the right pieces. Essentially, if the material is well written, interesting for the blog audience, and original, I will publish it, although I reserve the right to edit it or request additional work, and I will split the content if lenghty. Over time, depending obviously on the success of the blog, I would like this to become a peer-reviewed venue with a panel of editors/reviewers on staff. Please notice however that I am not looking for pure research submissions but rather pieces that can be read and enjoyed by a diverse audience, not just specialists.
Contributions are on a voluntary basis, with no monetary compensation.

NEWS AND REVIEWS

Finally, when time permits, I will post reviews and news on software, resources, books, technology. Planned topics currently include

– Visualizing Plate Tectonics

– Moon and Mars exploration

– Geology in photos and diagrams

So welcome to MyCarta!