Loren on the Art of MATLAB

March 31st, 2009

Technique for Visual Image Comparison

Recently Steve wrote an interesting post entitled Image Overlay Transparency that I found quite interesting.

Contents

The Idea

The idea is to plot one image on top of the other, exposing pieces of the buried image by making parts of the top image transparent. Here's a teaser for you to look at.

Other Techniques?

Do you have some other techniques for visual image comparison that you find helpful? Post them here.


Get the MATLAB code

Published with MATLAB® 7.8

4 Responses to “Technique for Visual Image Comparison”

  1. Oliver Woodford replied on :

    In my work I often have an image and some 1-d metric for each pixel in the image, which I then want to overlay on the image. I do this by making the image greyscale and using the metric to overlay colour, using a colormap like jet. I use my SC function (on the FEX) to do this for me, using the ‘prob’ or ‘prob_jet’ colormaps.

  2. Oliver Woodford replied on :

    Here is an example of what I was talking about above:
    http://www.robots.ox.ac.uk/~ojw/images/prob_demo.png
    One of the benefits of using SC to do this is that it allows a colorbar to be added (with the correct colours and scale).

  3. Loren replied on :

    Oliver-

    Nice technique!

    –Loren

  4. Mike Garrity replied on :

    This is called a “matrix wipe”. It can be really effective if you add a slider to let the user control the amount of wipe. Also, being able to choose different wipes is useful.

    http://en.wikipedia.org/wiki/Wipe_(transition)

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Loren Shure works on design of the MATLAB language at The MathWorks. She writes here about once a week on MATLAB programming and related topics.

  • Loren: Hi Ghazanfar- Please look at the help for the function hist (and perhaps histc). They will do what you want...
  • Ghazanfar Ali: Hi Miss Loren I am in need of an algo to count cosecutive duplicate values in a one dimensional...
  • OysterEngineer: Clearly this is a complex topic & these pair of blogs show that The MathWorks are masters of the...
  • Tim Davis: I’ve often been puzzled about how sub-matrix-assignmen t works for full and sparse arrays: clear A =...
  • Loren: Paul- There *are* issues depending on the sizes of ii and jj. And it’s a bit complicated, but really...
  • Loren: Bob- You don’t say what happens when you run your code. Can you please explain more. It looks like you...
  • Loren: Kishore- It is not clear to me what you are trying to actually achieve. If you want to concatenate the 4...
  • Kishore: sorry, in the previous code mat2cell(c,[19 121],[19 134],[19 84],[19 107])
  • Kishore: Hi Loren, Why does the following not work? data_classwise = [19x121 double] [19x134 double] [19x84 double]...
  • Paul Jackson: Loren, Are there any aspects of empty matrices that may be tricky when they are used as indices into...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.