Moments of Intensity
Moments of Intensity
This option determines the moments of
intensity for each line and/or column within a window. The data may
optionally be written to file and/or plotted on a frame buffer as either a
histogram or intensity bar.
Line/column intensity moment for which buffer ?
The line/column intensity moment may be calculated on a list of buffers.
Any valid DigImage buffer may be used.
Another buffer ?
Responding yes (<Y>) allows a further buffer to be specified, while no
(<N>) allows DigImage to continue.
Line/column intensity moments for Window or whole Screen ?
The line/column intensity momentss may be calculated using a window (<W>)
within a buffer, or the entire buffer (<S>).
Specify Window: Region used to evaluate line/column intensity moments
The window specification submenu will be produced only if a window (<W>) is
selected in the previous entry. Means will be calculated only for
lines/columns lying within the window. The window is specified in the
normal DigImage manner. For further details, consult [H Help] within the
submenu.
Calculate intensity means for Lines, Columns or Both ?
If <L> is chosen, then the intensity moment for every line in the window or
buffer will be calculated. Similarly, if <C> is chosen, the moment for
every column will be calculated. Selecting <B> will calculate the moment
for every column and the moment for every row.
The moment calculated is of the form
Ú a b c
³ r P (255-P)
Ù
where r is the coordinate across line or down the column and P is the
intensity of each pixel.
Use what exponent (a) for the coorinate ?
This entry specifies the power to which the spatial coordinate (relative
to the left or top of the selected window) is raised. Use a zero exponent
to remove this term.
Use what exponent (b) for the intensity ?
This entry specifies the power to which the pixel intensities are raised.
Use a zero exponent to remove this term.
Use what exponent (c) for the inverse intensity ?
This entry specifies the power to which the inverse pixel intensities are
raised. Use a zero exponent to remove this term.
Normalised by intensity product, normalised by Mean values or Raw moment ?
The results may be displayed either normalised by the corresponding mean
intensity product, the product of the mean values, or in their raw form
(suitably scaled). If normalised, by intensity product then
Ú a b c / Ú b c
³ r P (255-P) dr / ³ P (255-P) dr
Ù / Ù
if normalised by mean values, then
Ú a b c / Ú a Ú b Ú c
³ r P (255-P) dr / [³ r dr] [³ P dr] [³ (255-P) dr]
Ù / Ù Ù Ù
else simply
Ú a b c
³ r P (255-P) dr
Ù
will be plotted (after suitable scaling.
Name of file to write data to (blank to suppress, .DAT default extension) ?
The line/column moment data may be written to the formatted file specified
by this field. The formatted output file may be suppressed by entering a
blank line.
New or Append ?
If the specified output file already exists, answering <N> to this question
will cause the previous contents of that file to be lost, while <A> will
append the new data to the existing file. If the file does not already
exist, then the answer to this question will have no effect and a new file
will always be created.
Plot line/column moments on which buffer (-1 to suppress) ?
The line/column intensity moments may be plotted on one of the frame
buffers as specified by this option. A value of -1 is used to indicate
that the plot is not to be produced.
{If plotting moments}
Erase plot buffer first ?
Answering yes (<Y>) to this question will erase the current contents of the
plot buffer before producing the line/column intensity moment plots.
{If plotting means}
Plot as an Intensity bar or a Histogram ?
The plot of the line/column intensity moment may take to form of either a
an intensity bar (<I>) or a histogram (<H>). If a histogram is chosen, then
the line moments are plotted as a function of line number in an intensity
equal to 255-8*iBuf, where iBuf is the buffer sequence number. The column
moments are plotted as a function of column number in an intensity equal to
127-8*iBuf. When plotting intensity bars, the user may select where the bar
is positioned (see below).
{If plotting intensity bars}
Plot first line moment at which column ?
This prompt is produced only when evaluating line moments and plotting them
as an intensity bar. The height of the intensity bar is equal to the height
of the window and its vertical position is fixed by the window. This entry
specifies the horizontal position of the intensity bar. One bar two pixels
in width is generated for each buffer processed. The first bar is
positioned at the column specified here. The second bar is positioned in
the two columns immediately to the right of the first bar, etc.
{If plotting intensity bars}
Plot first column moments at which row ?
This prompt is produced only when evaluating column moments and plotting
them as an intensity bar. The width of the intensity bar is equal to the
width of the window and its horizontal position is fixed by the window.
This entry specifies the vertical position of the intensity bar. One bar
two pixels in height is generated for each buffer processed. The first bar
is positioned at the row specified here. The second bar is positioned in
the two rows immediately below the first bar, etc.
Errors, Warnings and Messages
# Buffer !!R0
# Intensity moments for lines (I[..] => integral of ..)
# 1. Line number
# 2. I[r^a P^b (255-P)^c dr]
# 3. I[P^b (255-P)^c dr]
# 4. I[r^a P^b (255-P)^c dr]/I[P^b (255-P)^c dr]
# 5. I[r^a P^b (255-P)^c dr]/I[R]^a I[P]^b I[255-P]^c
# 6. I[r dr]
# 7. I[P dr]
# 8. I[(255-P) dr]
# 9. I[r^a dr]
# 10. I[P^b dr]
# 11. I[(255-P)^c dr]
# 12. nPixels
.301
# Global averages of pixel data:
# nPixels : !!R0
# Average (r) : !!GR1
# Average (P) : !!GR2
# Average (255-P) : !!GR3
# Average (r^a) : !!GR4
# Average (P^b) : !!GR5
# Average ((255-P)^c): !!GR6
.320
#
# Vertical averages of line-accumulated data
# r^a P^b (255-P)^c : !!GR7
# P^b (255-P)^c) : !!GR8
.330
#
# Horizonal averages of column-accumulated data
# r^a P^b (255-P)^c : !!GR9
# P^b (255-P)^c : !!GRa
.340
# Buffer !!R0
# Intensity moments for columns (I[..] => integral of ..)
# 1. Column number
# 2. I[r^a P^b (255-P)^c dr]
# 3. I[P^b (255-P)^c dr]
# 4. I[r^a P^b (255-P)^c dr]/I[P^b (255-P)^c dr]
# 5. I[r^a P^b (255-P)^c dr]/I[R]^a I[P]^b I[255-P]^c
# 6. I[r dr]
# 7. I[P dr]
# 8. I[(255-P) dr]
# 9. I[r^a dr]
# 10. I[P^b dr]
# 11. I[(255-P)^c dr]
# 12. nPixels
.401
Global averages of pixel data:
nPixels : !!R0 = !!R0
Average (r) : !!R1 = !!GR
Average (P) : !!R2 = !!GR2
Average (255-P) : !!R3 = !!GR3
Average (r^a) : !!R4 = !!GR4
Average (P^b) : !!R5 = !!GR5
Average ((255-P)^c): !!R6 = !!GR6
.420
Vertical averages of line-accumulated data
r^a P^b (255-P)^c : !!R7 = !!GR7
P^b (255-P)^c) : !!R8 = !!GR8
.430
Horizonal averages of column-accumulated data
r^a P^b (255-P)^c : !!R9 = !!GR9
P^b (255-P)^c : !!Ra = !!GRa
Error Message:
Unable to open line/column moment file
DigImage is unable to opent the specified output file. This may be due to
an invalid file or path name.
Parent menu
Main Menu
DigImage User Documentation
Stuart Dalziel,
last page update: 19 February 1996