Bsoft function
img_colour_power_spectrum
Source:
src/img/img_complex.c
Description:
Generates a power spectrum with phases coloured according to a colour wheel.
Algorithm:
A polar data type image (such as a Fourier transform) is converted
to indicate the phases as colours. The primary colours are located
0 degrees (red), 120 degrees (green) and -120 degrees (blue). All
three colour values are down-weighted based on the amplitude. The
weighting is calculated as:
weight = amplitude/(average+2*standard_deviation)
The origin specified in the image is used to shift the phases.
The scale is multiplied with the amplitude and cut off at one
to give the user the ability to enhance the image.
Default:
scale = 1/(average_amplitude + standard_deviation_of_amplitude)
Arguments:
| Bimage* p | image.
|
| float scale | amplitude scaling.
|
Returns:
int 0.
Prototype:
int img_colour_power_spectrum(Bimage* p, float scale)
Functions used:
balloc
bfree
Other objects included:
struct Bimage
struct Bmarker
class Complex
Generated by bdoc.pl on Mon Jun 15 11:47:45 2009
Back to the Bsoft home