home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 4
/
AUCD4.iso
/
art_design
/
imaging
/
widget
/
!Widget5
/
!Help
< prev
next >
Wrap
Text File
|
1998-08-19
|
44KB
|
1,078 lines
Instructions for !Widget5 by Andrew Sellors
*****************************************************************************
* NOTE: *
* !Widget5 is FreeWare. *
* This means that you may freely copy and distribute it, provided that it *
* is complete with all original files, and that you do not sell it. *
* PD libraries may charge a nominal fee for the cost of duplication, *
* postage etc. *
* In no circumstances shall the author be liable for any damage, loss of *
* profits, time or data or any indirect or consequential loss rising out of *
* the use of this software or inability to use this software. *
*****************************************************************************
Contents:
~~~~~~~~~
About Widget 5
Compatibility
Operation
Managing Filters
Filter File Format
Drawing Masks
Configuration Window
Security
Credits
The Future
Contacting the author
********************************************************************************
About Widget 5:
~~~~~~~~~~~~~~~
* Widget 5 is a image processing package for square pixel 8 and 16 bit greylevel
and 24bit colour images. (See compatibility)
* Widget 5 will work with any size of image, memory permitting.
* Widget 5 loads any 256 colour file as a 256 grey level image, disregarding
any palette. (Useful for owners of the Brainsoft video digitizer)
* Widget 5 will load and save EPIC remote sensing images and display the image
information stored in the file.
* Widget 5 will load and save 8, 16 and 24bit Clear files.
* Widget 5 can load and save greylevel images in CSV format.
* Images are stored in 12 separate "Image Banks" in memory.
* Widget 5 can be run in any screen mode.
* Widget 5 will store the images in a dynamic area when used with RISC OS 3.5
or later
* Widget 5 can load and saved squashed sprite files to reduce disc usage.
* Widget 5 supports the following image manipulation functions:
* Add two images
* Average two images
* Mix two images
* Convolve an image to another using a NxM matrix (N,M in the range 1-9)
* Focal Analysis with the following localised processes on a
3x3, 5x5, 7x7 or 9x9 patch:
* Mean greylevel
* Median
* Maximum
* Minimum
* Changing image greylevels by: (not 24bit colour)
* Drawing the mapping function using the mouse
* Applying a threshold value
* Applying a gamma correction value
* Applying histogram equalization
* Applying S.L.C.E. (Saturating Linear Contrast Enhancement)
* Scaling an image by resampling using bi-linear interpolation
* False colouring selected greylevel ranges and calculating the percentage
of each range. (not 24bit colour)
* Levels slice by false colouring equally spaced sections of the total
grey level range to a defined number of sections and calculating the
percentages of pixels contained in each of the ranges. (not 24bit colour)
* Creating a 24bit colour image by combining three greyscale images to make
up the red, green and blue components of the image.
* Separating a 24bit colour image into three greyscale images for each of
the red, green and blue components.
* Widget 5 allows an irregularly shaped area mask to be defined to allow
localised processing.
* Area masks can be loaded and saved as text files of point coordinates.
* Widget 5 allows the image to be zoomed using the usual magnifier window
* Widget 5 can draw the following graphs from an image: (not 24bit colour)
* Greylevel histogram
* Ogive histogram
* Reverse ogive histogram
* Individual bar heights can be inspected on the graphs.
* Graph data can be saved as a CSV file to allow importation into another
package for analysis.
* Widget 5 allows Convolution Filters to be loaded and saved.
* Widget 5 can calculate statistical information about an image (or section of
an image using the masking function)
* Widget 5 can display information about the pixel under the mouse pointer
including the image pixel coordinates, values of colour components and map
coordinates for a rectified EPIC image.
********************************************************************************
Compatibility:
~~~~~~~~~~~~~~
This program is for RISC OS 3.10 or later.
It has been tested on both RISC OS 3.10, RISC OS 3.50 and RISC OS 3.70.
24bit image processing is only possible on RISC OS 3.x when used with the
'Deeper' module.
Widget5 is fully StrongARM compatible.
********************************************************************************
Operation:
~~~~~~~~~~
NOTE: Clicking on an action icon with Adjust performs the action but leaves the
window open
If a window contains icons where text can be entered in then pressing the
RETURN key when in the last icon has the affect of selecting the default
action button (the one with the yellow border).
About Image Banks
=================
When held in memory, an image is assigned an Image Bank number so that it can be
referenced to for subsequent operations. This is shown on the title of the
image window and also on the menu displayed when the menu button on the mouse
is pressed over an image.
Operations chosen from the menu on the image window always use that Image Bank
for the source image.
When an image window is closed, the image is discarded from memory and the Image
Bank becomes free.
Starting up
===========
The !Widget5 application starts up when you double-click on its filer icon.
Creating a blank image
======================
Clicking on the icon bar icon displays the create image window.
The size of the image can be changed by typing or using the arrow icons.
The "Bank" radio icons determine which image bank the image is created in.
Used image banks icons are greyed out.
The "Type" group of icons determines what kind of image is created.
256 colour images are currently not supported and 16.7M colour images can only
be processed when used with RISC OS 3.5 or later.
The "Memory" icon shows how much memory the image will take up when created.
Loading a file
==============
When a sprite file is dragged to the icon it is loaded into memory and the
place image window is displayed.
This allows the image to be placed into one of the Image Banks.
Unavailable banks are greyed out, if they are all greyed out then free one of
the banks by closing the window, but remember to save the image first if you
want to keep it!
More that one image can be loaded without being placed in a bank, and an image
can be loaded (but not placed) when all the image banks are used.
Loading squashed sprites
========================
Squashed sprite files can also be loaded into Widget 5 in the same way as normal
sprite files. These are the same as the files saved by the !Squash application
that comes with the machine and save disc space by storing the data in a
compressed form.
Only Squashed sprite files can be loaded, an attempt to load a file which does
not contain a squashed sprite will return an error message.
Loading EPIC images
===================
Specialised remote sensing images with the EPIC filetype are also able to be
loaded the same way as a sprite.
If you are interested in the EPIC image format, please refer to the 'EpicHead'
text file. There is an enormous amount of header information in this format,
some of the most important can be seen by looking under Info -> File in the
menu.
Image windows
=============
The title of the window displaying the image indicates the image bank number
that the image is stored under and also the type of the image in brackets:
(8G) - 8bit greyscale (256 greylevels)
(16G) - 16bit greyscale (65536 greylevels)
(8C) - 8bit colour (256 colours)
(24C) - 24bit colour (16.7 million colours)
If configured the title can also show the process and source image(s) in
braces {} that the image in the windows was generated from.
16bit Greylevel image display
=============================
16bit greylevel images are displayed by converting the greylevel into an 8bit
value on-the-fly.
The Translation submenu on the Image menu allows the translation method to be
selected between a linear or logarithmic mapping.
(see the section 'Convert 16bit to 8bit Grey' further down for details of the
methods used).
Image menu
==========
Pressing the menu button over one of the Image Banks displays the menu for that
bank. The Image Bank number is repeated on the menu title.
The "Info" submenu allows the two image information windows to be show either
statically by clicking on the entries or as menu subwindows. It also leads to
file header information.
The "Save" submenu allows the image to be saved as a 256 grey level sprite.
The name of the sprite in the file it set to the same as the filename (up to
a maximum of 12 characters).
Selecting the "Save squashed" option will result in the sprite being saved as
a squashed sprite and so saving disc space.
The "Process" submenu allows one of the image processing operations to be
selected. These operation will use the Image Bank as source that the menu was
open over.
The "Graphs" submenu allows graphs to be generated for that particular image.
The "Zoom" subwindow allows the size of the image to be changed on screen.
Clicking on the "Zoom" entry itself displays the zoom window statically.
The image that the zoom window refers to is displayed in its title and the
zoom window is always kept above that image window.
The "Image flipper" option displays the image flipper which can be used to
compare different images by flipping between them under the control of the
mouse or keyboard. See the section "Image flipper" for more details.
The "Add mask" option adds a mask to that image bank and displays the mask
tools window. If the image bank already has a mask then the option is greyed
out.
Using Masks
===========
Many process windows have "Use Source Mask" and "Copy Outside" options. These
options control how the mask defined on the source image is used by the process.
If the source image does not have a mask defined then these options are greyed
out.
The "Use Source Mask" option when selected makes the process only apply to
pixels within the mask area on the source image rather than on the whole image.
The "Copy Outside" option, when used in conjunction with the "Use Source Mask"
option results in the pixels around the masked area to be copied unchanged from
the source image. With this option off, the pixels around the mask area in the
destination image are left unchanged.
Pixel Display
=============
Clicking with the Adjust (right hand) mouse button over the image window
displays the pixel display window which shows the X and Y coordinate of the
pixel under the pointer and also the greylevel (or red, green and blue
components for colour images) and a display of the colour.
The window remains whilst the button is held down and is updated as the mouse
is moved around the image.
If the image is a rectified EPIC image then the map coordinates are included
in the display as Northings and Eastings on the right of the display.
Processes
=========
Copy:
-----
This copies the image to another bank.
Add:
----
This adds the grey levels in the source bank to those in the destination bank.
Average:
--------
This adds the grey levels in the source bank to those in the destination bank
and then divides by 2.
Mix:
----
This mixed the image in the source bank with another to produce a third which
can be placed in the same bank as the second source image.
Clicking on "Start" on the source and destination selection window replaces it
with a second window containing a horizontal slider. This slider allows the
proportions of each image (shown below each end of the slider) to be changed
by dragging the sliderbar.
Normally the resulting image is only created when the "Mix" icon is clicked on
, but if the destination Image Bank is different from both the source Image
Banks then the "Real-time" option can be selected. This updates the resulting
image when the mouse is released from the slider allowing different values to
be tried out easily.
Convolution:
------------
This performs a NxM convolution, where N and M can be any value between 1 and
9, using the matrix and anchor point selected. The values of the matrix and
anchor point can be entered by typing numbers into the icons or selecting
pre-defined filters from the pop-up menu.
The matrix size can be selected by clicking on the up and down arrows by the
numbers indicating the current size or by clicking on one of the size buttons,
eg. "3x3". The menu of pre-defined filters only shows the filters for the
selected matrix size.
The matrix size and anchor point values are shown as "ROWS X COLUMNS".
For the anchor point, 0,0 is the centre of the matrix with positive
coordinates in the right hand and upward direction.
When changing the size of the matrix, if the caret is in the matrix it is
always returned to the centre (0,0) of the matrix.
The matrix is overlayed on the source pixel (positioned under the anchor
point) and the overlapping values multiplied and summed together.
As the resultant value for each pixel after the convolution is normally scaled
in some way, the "Scale" value is provided to scale the value back to the
0 to 255 range of greylevels. This value is used to divide the result before
it is written into the destination image. Clicking on the "Auto" button
calculates the gain of the matrix and places it in the scale value. This value
will on average return the result back into the desired range.
The "Offset" value is provided to shift the grey levels up or down before
they are written. If the gain of the matrix is zero then it removes the
D.C. component resulting in negative as well as positive results. A positive
offset of 128 for example will ensure that the negative results are shifted
up and not lost.
Clicking on the "Clear" button sets all the values in the matrix and anchor
point icons to zero.
Clicking on the "Save" button displays the "Save Convolution Filter As"
dialogue. This allows the values of the filter matrix and anchor point to be
saved to a file for later use or added to the list of filters in memory.
See the section titled "Managing Filters" further on in this manual for more
details.
Focal Analysis:
---------------
This performs various localised processes on the image.
The size of the patch of the image around each source pixel taken for the
process is selected in a similar way to the convolution matrix size with the
row of size buttons.
An anchor point, also like in the convolution process, is provided to offset
the patch from the destination pixel position when it is placed over the
source image.
These processes take the pixels contained by the patch in the source image
and process them to produce the value that is placed in the destination
image.
Mean:
=====
The mean (average) value of the set of source pixels in the patch is
calculated and if the difference between that and the original source pixel
is less than the threshold set in the submenu then this value is written to
the destination image. If the difference is greater than the threshold then
the original greylevel from the source pixel is used for the destination.
The threshold is provided to lessen the blurring on edges where a large
transition between grey level values occurs.
L.A.C.E.:
=========
Not implemented yet :-(
Median:
=======
The set of source pixels in the patch are sorted into numerical order and
the median (middle) value is selected for the destination pixel.
This is a smoothing process which is particularly suited to removing scratches
from images.
Maximum:
========
The maximum greylevel in the source patch is selected and used for the
destination pixel value.
Minimum:
========
The minimum greylevel in the source patch is selected and used for the
destination pixel value.
Histogram:
==========
The destination pixel is calculated from the local histogram (ie. NxM
moving window).
Local Region:
=============
The local region filter divides the moving window into eight regions based
on angular position (ie. north, south, east, west, ne, nw, se, sw). The
method compares the variance values of the regions surrounding the pixel
of interest. The pixel of interest is replaced by the mean of the values
within the region with the lowest variance, ie. the most uniform region.
This method is very useful for decreasing the amount of speckle in a Radar
image.
Percentage Cover:
-----------------
This allows ranges of greylevels to be selected and false coloured in the
image. Beside the image window is displayed another window showing the colours
and greylevel ranges selected as well as the percentage of the whole image
containing pixels in each of the ranges.
Colours are selected by turning on the option button beside the relevant
colour box. This ungreys out the two writable icons into which the range of
greylevels for that colour is typed.
Clicking on "Colour" false colours the current image with the parameters
selected.
If "Copy to new image" is selected then the current image is copied to the
"New Image" image bank before being false coloured.
Closing the window attached to the image bank window that shows the
percentages causes the image colours to revert back to the normal greyscale.
The colours are preserved in the file when the false coloured image is saved
as a Sprite. As Widget 5 ignores any palette when loading an image, reloading
this image will result in the colours changing back to the original greyscale
but if the image is loaded into !Paint for example then the colours can be
seen.
Levels Slice:
-------------
This splits the full range of used greylevels into a selected number of
equally spaced sections. These ranges of greylevels are false coloured and
have their percentages of pixels in each of the ranges calculated like the
percentage cover process.
Clicking on "Colour" false colours the current image using the number of
levels selected.
If "Copy to new image" is selected then the current image is copied to the
"New Image" image bank before being false coloured.
Closing the window attached to the image bank window that shows the
percentages causes the image colours to revert back to the normal greyscale.
Greylevel Edit:
---------------
This allows the greylevels in the source bank to be mapped to different ones
and the resulting image placed in another bank.
Clicking on "Start" on the source and destination selection window replaces it
with a second window that performs the actual functions.
The large box shows the mapping function that maps the greylevels in the
source image (along the bottom of the box) to the resulting image (up the
side of the box). "0" is completely black and "255" is completely white.
The mapping function can be changed by clicking in the box and drawing the
line for the new mapping function. When you hold the button down, the
greylevels in the source and destination images for the current point in the
box are displayed.
Levels of smoothing can be applied when drawing the mapping function.
If "Normal Draw" is selected, then only the point in the line where the
mouse pointer is positioned is affected.
If either "Smooth Draw" or "V. Smooth Draw" is selected then the points
near the mouse pointer are also affected, the latter of which producing a
greater affect. This allows less jagged lines to be drawn.
Various mapping functions can also be selected from the "Processes" menu
displayed by pressing the "Menu" mouse button when over the window.
"Linear" produces a resulting image identical to the source.
"Invert" produces a negative of the source image.
"Threshold" makes all the levels below the value black and above white.
"Gamma" applies gamma correction using the value entered in the submenu.
"Histogram" applies histogram equalization on the source to give the
maximum possible contrast.
"S.L.C.E." applies Saturating Linear Contrast Enhancement on the source to
enhance the contrast in the image. This looks much better than histogram
equalization as the resulting image is less harsh.
Selecting "Real-time" results in the destination image being updated after
every operation instead of just when "Map" is selected. The image is updated
when the mouse button is released after drawing on the mapping function and
when any of the processes have been selected.
The arrow buttons on the submenus for the Threshold and Gamma processes can
be used to adjust the values. If the SHIFT key is pressed when the arrows are
clicked upon makes the values change faster. If the "Real Time" option is
selected then the image is updated as the values change.
Replace pixels:
---------------
This process is to replace either a single greylevel or a range of greys with
other greys. It is especially useful used in conjunction with a mask.
Possible uses are replacing columns or rows of bad pixels, or removing greys
for statistical reasons.
Another less obvious purpose is to extract a non-regular area from an image.
By using a mask, and keeping the greylevel range mapping 0..255 to 0.255, the
desired area is cut. However, this method does retain the full source image
size - and the 'Copy' process with mask is probably easier anyway :-)
Scale:
------
This allows the source image to be scaled by resampling using bi-linear
interpolation. When an image is enlarged using this process the "blockiness"
, caused by the pixels being enlarged, is reduced.
The new size can be selected from either a percentage of the original size,
"To Fit" a resolution which can be typed in the two icons or to "Custom"
x and y scaling ratios.
Extract:
--------
Used in combination with a mask, this allows a subscene of the original
image to be 'cut' out. The extract bounds are taken from the top left mask
point to the bottom left. If the image format is EPIC, the header is updated
appropriately.
Colour to RGB:
--------------
This process allows:
* a 24bit colour image to be created from three 8bit greyscale images
making up the red, green and blue components.
* three 8bit greyscale images of the red, green and blue components of
a 24bit image to be created.
8bit greyscale to 24bit colour:
When selecting the 'Colour to RGB' option from an 8bit greyscale image the
Combine Red, Green and Blue into Colour dialogue is displayed.
The image banks to be used for the three colour components are selected
using the pop-up menus in the Source group. These menus display images
which match the size of the image that the dialogue was opened from.
The R, G and B buttons on the bottom left allow the different components
of the colour image to be deselected if not required.
The destination image is selected using the radio icons in the Destination
group.
Clicking on the Combine button will produce the 24bit colour image.
Convert 16bit to 8bit Grey:
---------------------------
This process allows a 16bit greylevel image to be converted into an 8bit
image using the full 256 levels available.
Two different mappings are available:
* Linear full range mapping
This maps the range of greys used in the source image linearly to
the full 256 level range of the destination
* Logarithmic radar image mapping
This maps the range of greys in the source image using the
logarithmic function:
(sourcevalue - minvalue)
destinationvalue = 255 + 106.25 * log10(----------------------)
( maxvalue )
This is useful for radar height images to groundlevel detail is not
lost by high mountain peaks.
Graphs
======
The "Greylevel Histogram" graph shows the number of pixels using each
greylevel in the source image.
The "Cumulative Histogram" graph shows the total population of pixels in the
source image at and below the grey level shown on the x axis. Thus if the
greylevels are linearly allocated (ie. there is an equal number of pixels
having each greylevel) then the graph is a straight line between the bottom
left and top right.
The greylevel and height of the currently selected bar is shown on the bottom
of the graph. The selected bar is shown in blue instead of the normal red.
Clicking on a part of the graph updates the greylevel and bar height display
to the bar under the pointer.
The up and down arrows can be used to move the currently selected bar and
pressing the SHIFT key when clicking on the up or down arrow makes the
greylevel move faster.
Pressing the menu mouse button over the graph displays a menu that allows the
graph data to be saved as a CSV (Comma Separated Variables) file and the size
of the graph to be changed.
The 'Ignore 0' and 'Ignore 255' options when selected cause these bars to be
ignored when calculating the scale for the vertical axis on the graph.
Thus if the image predominantly contains black (colour 0) pixels for example
then there would be a large bar at 0 on the left of the graph and the other
bars would be very small making detail hard to see. Selecting 'Ignore 0' in
this case would expand the height of the small bars allowing the detail to be
seen.
Image flipper:
==============
This allows the user to compare image banks by 'flipping' between them. Over
each 'source' icon click the Menu button and select the image bank you wish
to compare with. All 12 image banks may be used. Clicking Adjust over one of
these 'source' icons will delete it from the image flipper.
If one of the images is of a different size, the 'Equalise size to' option
should be chosen if you wish to compare them accurately.
When you are ready to compare you can either click Select over the 'source'
icon, or use Select and Adjust (or left/right arrow keys) to flip forward and
backward through the selected images.
********************************************************************************
Managing Filters:
~~~~~~~~~~~~~~~~~
Widget 5 holds a set of convolution filters in memory that can be accessed by
the pre-defined filter menu in the Convolution Process window. The filters
are referenced by size (ie. the number of rows and columns in the matrix) and
filter name. The filter menu only shows the filters for the selected matrix
size, or "None Found" if none are defined for that particular size.
When Widget 5 starts up it scans all the files in the default filters directory
and loads up the filters that are present in the files to be shown in the menu.
The location of this directory, which is by default, !Widget5.Filters, is setup
with the system variable "<Widget5Filters$Dir>" in !Widget5.!Run. To add filters
so that they are loaded on startup, simply place the files in the Filters
directory (the !Widget5 application directory can be opened by double clicking
on the filter icon with the SHIFT key pressed). If you want to place the
directory somewhere else then just edit the !Widget5.!Run file with a text
editor such as !Edit.
By dragging a filter file to the Convolution Process window the first filter in
the file is used to set the values of the matrix and anchor point. This allows
a library of filters to be built up and selected easily.
By dragging a filter file to the Widget 5 iconbar icon, all the filters in the
file are loaded up into memory to appear on the filter menu.
When the "Save" button in the Convolution Process window is clicked on, a copy
of the filter matrix and anchor point coordinate is taken and the
"Save Convolution Filter As" dialogue is displayed.
The name with which the filter appears in the menu and is reference by must be
entered in the "Filter Name" icon.
This window allows the convolution filter to be saved to a filter file by either
dragging the filter file icon to a filter window or by typing in the full
pathname for the file and clicking on "Save". As this overwrites a file if it
is already present, Widget 5 prompts for conformation if a file will be
overwritten.
If "Add To Current" is selected then the filter is added to the end of a filter
file already on disc rather than replacing it. This way, more than one filter
can be added to a particular file.
If "Add To Memory" is clicked on then the filter is added to the list of filters
stored in memory and so will appear in the filter menu. This does not mean,
however, that the filter will be present the next time Widget 5 is loaded.
If "Save To Default" is clicked on then the filter is added to the default
filter file. This is a file in the default filters directory that holds the
default filters. Thus by clicking on this button, the filter will be loaded next
time Widget 5 starts. The filename of this file is also setup in the
!Widget5.!Run file with the system variable "<Widget5$FilterDefault>". The
default is !Widget5.Filter.Default.
As the filters are referenced by size and name, two filters with the same matrix
size and name cannot be present in memory at the same time. For this reason,
an attempt to do this by either loading a filter file or adding a filter to
memory using the "Save Convolution Filter As" window will result in an error
message being displayed showing the name and size (and the filename of the file
holding the file where applicable) of the duplicate. For this reason an error
is also displayed if an attempt is made to add a duplicate filter to a filter
file.
********************************************************************************
Filter File Format:
~~~~~~~~~~~~~~~~~~~
Convolution filters are stored in text files so that they can be easily edited
and created manually.
A filter definition in the file consists of a block of lines without any blank
lines between the lines for a particular filter. Blank lines are allowed between
different filters.
Numbers in a line are separated by commas (,).
Leading spaces, and spaces between the numbers and the separating commas are
ignored.
The first line of the block contains the name of the filter.
The second line contains the size of the filter as "rows,columns".
The third line contains the anchor point coordinates in the form "row,column".
The subsequent lines contain the matrix values, one line for each row in the
matrix.
eg.
Smooth
0,0
3,3
0,1,0
1,1,1
0,1,0
Defines a 3x3 matrix called "Smooth" with an anchor point of 0,0 and a matrix,
[ 0 1 0 ]
[ 1 1 1 ]
[ 0 1 0 ]
********************************************************************************
Drawing Masks:
~~~~~~~~~~~~~~
When a mask has been added to an image bank, the mask tools window is displayed,
giving access to tools that allow the shape and position of the mask to be
defined and the points saved as a text file for later use.
Dragging a text file containing a list of points to the mask tools window, loads
the points in as a new mask shape.
The mask outline is shown as a red line over the image. The points on this shape
are marked by either green squares or yellow triangles to indicate selected
points.
Add Point tool
The first tool button on the left allows points to be added to the mask shape
by clicking on the image with Select at the required position and is added on
the shape between the two selected points. The currently selected points can
be changed by clicking on the green squares.
Move Point tool
The next button allows points to be moved. This can be done by either dragging
a point with the mouse to the required position or by using the arrow buttons
on the tool window to move the selected point one pixel at a time. The
coordinates of the selected point are shown in the tool bar together with the
greylevel of the pixel under the point. These values are updated as the point
is dragged or moved using the arrows. If the SHIFT key is pressed at the same
time as the arrow icons then the point moves faster.
Delete Point tool
The next button allows points to be deleted from the mask shape by clicking on
the relevant green squares to remove that point. Points can no be deleted
when only two are left otherwise there is no shape!
Filled Shape tool
The next button causes the area inside the mask shape to be filled in yellow.
This allows the shape of the masked area to be seen clearly.
Memory Display
Next along the line at the bottom is the amount of memory that the mask uses.
This memory is freed when the mask is discarded.
Copy Mask
To the right of the memory display is a pop-up menu button that allows the
shapes of masks present on other image banks to be copied over. If no other
images have masks then the menu says "No masks".
Save Mask
The next button displays a save box allowing the mask points to be saved as a
text file. This allows masks to be stored and used later by dragging them from
the Filer window to the mask tools window.
Discard Mask
The last button removes the mask from the image bank and frees the memory that
it takes. Don't use this if you still want to use the shape as once it is gone,
it cannot be retrieved unless it was saved as a text file.
********************************************************************************
Toolbar:
~~~~~~~~
Most of these icons are self explanatory (or at least I hope so :-)
A point worth noting, however is that the histogram button performs two
actions, the a Select mouse click displays the Greylevel Histogram and an Adjust
click the Cumulative Histogram.
The info button also performs two actions, Select shows the "Image Info" window
and Adjust the "Statistical Info" window.
********************************************************************************
Configuration Window:
~~~~~~~~~~~~~~~~~~~~~~
The configuration window can be opened by selecting the "Configure..." entry
from the iconbar menu. The window allows program-wide options to be setup
and the configuration saved so that it is used when the program is next loaded.
"Process Destination"
=====================
This affect the way the destination banks are picked for the processes.
"Only use free banks" only allows you to pick banks that are unused for the
destination image.
"Use free or same size banks" allows you to pick banks that are either free
or contain an image that is the same size as the source.
"Graph Size"
============
This determines the size of the graphs that are drawn. The large size is ideal
for 17" monitors.
"Draw action"
=============
These determine the default selection of the draw action options in the
greylevel edit process window when it is displayed.
"Update"
========
This determines the default selection of the "Real-time" option when the
process windows that use it are displayed.
"Image Memory"
==============
This determines whether the images will be stored in a dynamic area or in the
application's normal wimpslot. The location can only be changed when no images
are present in memory and dynamic areas can only be selected on machines that
support it.
"Image Titles"
==============
Turning "Show process name" on will place the name of the process and source
image bank(s) onto the title of an image window created by a process.
"Squash Sprites"
================
Turning "Save squashed" on selects the option of saving the sprite files as
squashed files by default when the save dialogue is displayed.
"IO buffer size" is the amount of memory claimed when loading or saving a
squashed file to be used to buffer the reads and writes to and from the disc.
A value of 0 is not allowed in this field.
A small value slows down compression/decompression.
"Double Click Loads"
====================
These options select which files Widget 5 will load when their icon is double
clicked upon in the filer window.
When selected that particular file will be loaded on double click unless another
program that loads it has been loaded previous to Widget 5 (like !Paint for
sprites) and is shown to the right of Widget 5's icon on the icon bar.
Clicking on "Change" applies the changes made and closes the window.
Clicking on "Cancel" forgets the changes made and closes the window.
Clicking on "Save" applies the changes made and saves the new configuration so
that it is used the next time the program is loaded.
"Toolbar"
=========
The "Show" options selects whether the toolbar is present on the side of the
image bank windows. If you don't like toolbars then you can turn it off.
"Image Headers"
===============
'View header on loading' will automatically display EPIC headers when the
image has been loaded into Widget5. The 'Maximise window' will give the full
extent of available header information.
"Multitasking/threading"
========================
An extremely useful feature of Widget5 is the ability to either single-task
(for speed) or multitask (to continue working) processes. Even on a 257MHz
StrongARM, a single-tasked 5x5 median filter on a 2000x1200 image takes ~50
seconds. By altering Widget5 to use multitasking processes, and changing the
time slices, you can continue doing other things with very little time
disadvantage.
'Time slice interval' - measured in centi-seconds (hundredths of a second),
this interval is the period of time that Widget5 gives the user and other tasks
to continue working. For example, 25cs is a quarter of a second.
'Time slice length' - also measured in centi-seconds, this is the length of time
Widget5 gets to do its processing.
These two numbers do not have to equal 100 (1 second). For example, you can
still give Widget5 120cs and the user 50cs.
When you choose a multitasking Widget5, you have the option of 'Show progress
bar'. In use, this is a green line in the top left of an image window that
shows how the process is progressing. Immediately to the left of this green bar
will be a 'Stop' box. Clicking on this red box will abort the process.
'Real time update' allows you to watch the progress of Widget5 as it proceeds
with image processing. 'Update at end' is the opposite of this and draws the
image after the processing has completed.
There appears to be very little, if any, time disadvantage in a multitasking,
real time image update.
"16bit screen display"
======================
This allows the default image display method for 16bit images to be selected.
"Image Loading"
===============
Enabling the 'Autoplace image' option will cause a loaded image to be placed
in the next available image bank automatically.
When this option is off, the 'Place Loaded Image' window is displayed.
********************************************************************************
Image Information:
~~~~~~~~~~~~~~~~~~
The two image information windows provide general and statistical information
about a particular image. When these windows are shown statically, then the
contents are updated as any changes are being made.
These window can be displayed by either clicking on the questionmark button
on the toolbar with Select or Adjust or by using the image window menu.
The "Info area" buttons on the bottom of the window allow the image mask to be
used to define an area where the value are calculated from rather then the whole
image. These work in a similar way two those on the process windows and are
greyed out when no mask is present on that particular image.
The "Ignore" buttons on the very bottom of the window allow either or both
the 0 and 255 greylevel pixels to be ignored when calculating the information
displayed. These can be used to discard for example the black (colour 0) pixels
in an image when the image background is completely black and this large number
of pixels swamps the detail from the subject area of the image.
A third 'Info' option is 'File'. By clicking on 'Edit' when the header type
is EPIC, commonly used header information is shown such as the map projection¹,
satellite platform, sensor, and band, sun elevation and azimuth, scene centre
coordinates, and the sampling size. These data are required for advanced
processing, and possibly for use in other packages that loose the EPIC header
(eg. when the image is saved out in a non-EPIC format).
The fourth 'Info' option is 'Loading' which displays statistical information
from the process of loading the image file. This varies depending on the type
of file but normally includes timings from the stages during loading and a
report of the rate at which the data was read.
¹ Widget5 is unable to use this information to date.
********************************************************************************
Security:
~~~~~~~~~
If anything should go wrong with Widget5 and the program has to exit due to an
unrecoverable internal error, the option is provided of saving any loaded images
before the program quits.
Clicking on 'OK' when the error message is displayed saves the images by the
image bank number in a directory 'Widget5' in the Scrap Directory (in the
!Scrap application).
********************************************************************************
Credits:
~~~~~~~~
Many thanks must go to Jeremy Cook whose suggestions, encouragement, toolbar
sprites, and assistance have made Widget 5 what it is today.
********************************************************************************
The Future:
~~~~~~~~~~~
Widget 5 is not finished! Many improvements are planned although they won't be
implemented for a while which is why this release has been made.
To wet your appetites, here is a selection from my "To Do" list:
1. Image manipulation formula interpreter.
2. Topographic normalisation (Lambertian model)
3. Aspect process
4. Slope process
5. Mathematical operators (+,-,*,/)
6. S.D. option in Focal Analysis menu
7. HSI - RGB conversion
8. Configurable toolbar
9. Fast Fourier Transform
10. Combine three images (=24bpp sprite)
11. Provide read ahead buffers for file operations (eg. CD)
12. Go back to previous scale
13. Feature Space Image - scatterplot of two exact sized images
14. Column/row replacement by means of neighbours
15. Allow a drawfile of polygons to be overlayed as mask
16. Log file of actions
17. L.A.C.E. in focal analysis process
18. Transformation process (eg. rotate, mirror, skew)
19. Optimised ARM code processing routines (currently just C)
Any suggestions will be gladly accepted, as without suggestions it cannot get
better.
********************************************************************************
Contacting the author:
~~~~~~~~~~~~~~~~~~~~~~
I, Andrew Sellors, can be contacted either at
57 Boundaries Road
Feltham
Middlesex
TW13 5DR
England
Or via Internet email at
asellors@orac2.demon.co.uk
New versions of my software may be available from
http://www.orac2.demon.co.uk
Any feedback from users (bugs reports, requests for new features, praise,
money etc.) is gladly received.