colourise

turn a greyscale image into a false-colour image

usage: colourise image.bw image.rgb [threshold] [saturation]

colourise maps greyscale pixels in the source image image.bw to colour pixels in the new image image.rgb in the following manner:

threshold may be negative, and saturation may be greater than 255. In such instances, the projection is a subrange of the spectrum.

To use colourise during postprocessing of correlation images produced as a result of running corr, use

colourise unwarped_overlay.bw unwarped_overlay.rgb [threshold] [saturation]
add unwarped_overlay.rgb SPGR_image.bw superpos.rgb

where threshold is 255 times the minimum correlation value required for statistical significance divided by the maximum correlation value that is ever attained, and saturation is 255 times the maximum correlation value that is ever attained divided by the maximum correlation value in the current image.

Author: Matthew Belmonte