CanopyDigi ThresholdSet

Program Overview
This program takes a copy of a monochrome photograph and converts it into several false colour images, where dark ‘canopy’ pixels are coloured blue and light ‘sky’ pixels are coloured red.

Procedure
Eight different false colour images are created simultaneously for each original photograph by setting eight different thresholds (the value at and above which all pixels are regarded as ‘canopy’). A set of default thresholds is provided (see below), and it is intended that this is left unaltered. Alternatively, user-supplied thresholds can be set and these are retained automatically from one run to the next. The program will check that all eight thresholds have been set and that they are all different.

Experimentation has shown that thresholds between about 120 and 200 often give reasonable results (155 seems particularly successful) so default thresholds are in this range. It is suggested that if user-supplied thresholds are set, the eight thresholds are entered in ascending order as this displays most intuitively in CanopyThresholdChoose.

As well as regularly-updated progress information during a run, the start time is shown, together with the end time and time used. As a very rough estimate, processing will take around 30 seconds per photograph. Should a run be started in error, the cancel button may be used.

As stated in the synopsis, it is possible – and indeed not uncommon – for the program to consider that a monochrome picture is a colour picture. In such cases, a warning will be displayed. If the user is SURE that the picture in question is indeed a monochrome one, the warning may be ignored.

Buttons
There are several buttons, which do exactly as they say. No further explanation is necessary except to mention that when the "Run" button has been pressed it will disappear (so it cannot be pressed twice) and will be replaced by a “Cancel” button; the “Default Thresholds” and “User Thresholds” buttons will also disappear. A message box will appear when the program completes. After program completion, clicking the “End” button will return the user to the Control List for further action.

Input
Input is from the OriginalBMP folder.

Output
Output is to the ProcessedBMP folder and this is automatic, requiring no user intervention. Output consists of a copy of each photograph processed, together with eight false colour BMP image files (one at each threshold) for each monochrome photograph. Consequently, there will be nine files for every original photograph. These can be viewed using CanopyDigiThresholdChoose.

Technical Comments
The file names contain all the necessary information, viz: Test001-th125blue0226989perc073p890.bmp The file name was constructed as follows: The default file folder was used and the original photograph file name was Test001. A threshold of 125 was used, giving 226,989 blue pixels out of a possible (640*480) = 307,200 pixels which equates to 73.890% (note that a "p" is used in the file name instead of a "." as this character should not be used in file names - a programming restriction). The percentage figure shown generally has a leading zero as file names are used on a positional basis - it is possible, if rare, to need to show 100%. Three decimal places are shown as standard. The legend "perc" is used rather than a percentage sign as this (%) sign should not be used in file names – again, a programming restriction. Thresholds are quite arbitrary, merely being used to distinguish canopy from sky effectively in any particular photograph, thus photographs processed using different thresholds can still be compared correctly.

-End of Help -