k-Wave Toolbox |

# overlayPlot

Overlay two images

## Syntax

    overlayPlot(bg, fg)
    overlayPlot(bg, fg, fg_dnr)
    overlayPlot(x, y, bg, fg, fg_dnr)

## Description

`overlayPlot` overlays two 2D images. The background image is displayed using a grayscale map. The foreground is first log-compressed and thresholded to a particular dynamic range, and then overlayed onto the background image using an alpha value of 0.5. If a dynamic range is not specified, a value of 30 dB is used.

Example:

    bg = rand(128);
    fg = peaks(128);
    overlayPlot(bg, fg);

## Inputs

`x, y` | vectors describing the position of the pixels in the image equivalent to image(x, y, c)
`bg` | background image
`fg` | foreground image
`fg_dbr` | dynamic range in dB of foreground image

## See Also

`beamPlot`, `voxelPlot`

© 2009-2014 Bradley Treeby and Ben Cox.