G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 3.4.3        Current pre-release: 3.4.4 (2024/11/20)

Tutorial

Do Your Own Diffusion Tensor Fields

img In the usual course of events, an image comes in from the wild with a baggage of noise, and one would like to make as much of it go away as possible without losing what's “really in” the image1. In G'MIC, the command of choice for such work is smooth. It is a nice black box that does something called “anisotropic smoothing” and hundreds use it daily without knowing much about what goes on inside, and since it doesn't cause people to break out in hives who's to worry?

We who write tutorials, of course, are constantly interested in what goes on inside, if, for no other reason, than to see if the mechanisms therein can be debauched used for other purposes. Of course, if one ever does look inside of smooth all the anisotropic smoothing bits, structuretensors, eigen2tensor, eigen and diffusiontensors, are there along with other shiny bits, and while every one of them is designed to work with -smooth, each can be used for other purposes.

In this Cookbook Recipe, we'll harness eigen2tensor to package up tensor fields for various shenanigans. In the usual course of events, smooth acquires diffusion tensor fields from the anisotropic smoothing bits, but we can override that by providing our own tensor field on the command line. So long as our tensor field is well formed, smooth will use it even though it may bear no relation to the image at hand. That could be an awful lot of fun.

Here's what's on tap:

  1. Graduated Blurs: Apply a strong directional blur at the top of the image, leaving the bottom alone.
  2. Variations On A Theme: Generalizations on graduated blurs, plus some background.
  3. EigenValues and EigenVectors: Various theoretical bits about setting up home-brew tensor fields.
  4. Directional Blurring: Swirls and curls.
  5. Tensors for the Tonsorially Challenged: Grow your hair back. At least in some Digital Dream World.
  6. Fake Depth of Field: Narrowing it in post production.
  7. Eigen Thingys: What G'MIC uses for eyeballs when it looks for edges, and what it does when it finds them. You may care to skip this section on the first or second read, or maybe forever. It does not go directly into the subject of home brew diffusion tensor fields. But, if you want to cook with insight and possess a basic understanding of linear algebra then budget some time for this. It goes into the proper use of diffusion tensors which we proceed to use improperly. But that's OK. David said we could. Honest.


Graduated Blurs >
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.