HISDUMP -- Image Histogram Export

Generates an image histogram report of one channel to a text file, in a form suitable for import into other programs.

See Also: HIS, NUM, ImageWorks

PARAMETERS

HISDUMP is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBIC     Database Input Channel List             1-1024    Int
MASK     Area Mask (Window or Bitmap)            0-4       Int
HISW     Histogram Window                        0-4       Real
NUMBIN   Number of Histogram Bins                0-1       Int
HISFORM  Histogram Dump Format                   0-9       Char
REPORT   Report Mode: TERM/OFF/filename          1-64      Char

FILE

Specifies the name of the PCIDSK image file containing channel(s) to histogram.

 EASI>FILE="filespec"

DBIC

Specifies the image channels from which histogram data is extracted.

 EASI>DBIC=i,j,...,p

MASK

Specifies the area in the input channel which will be processed. This can be one of the following:

 EASI>MASK=xoff,yoff,xsize,ysize        | process window
 EASI>MASK=b                            | process only under bitmap
                                        | stored in segment b
 EASI>MASK=                             | process entire channel

HISW

Specifies the portion of the histogram to collect. If this is not provided the range -0.5 to 255.5 is used if DBIC[1] is eight bit, the range -32767.5 to 32767.5 is used if DBIC[1] is sixteen bit signed or 32 bit real, and the range -0.5 to 65535.5 is used if DBIC[1] is sixteen bit unsigned.

The HISW, and NUMBIN parameters together control the way that the histogram data is binned. The default binning approach loses no accuracy, and hence seldom needs to be overridden for eight bit, and sixteen bit data types. However, meaningful histograming of 32 bit real data may require explicit user control.

 EASI>HISW=mingreylevel,maxgreylevel
Note that HISW gives the low bound of the first bin, and the upper bin of the highest bin. It does not specify the center of the first and last bins.

Pixels that do not fall within the binning range will be ignored, and not included in the resulting histogram.

NUMBIN

Specifies the number of bins that the histogram should be reported in. If this value is defaulted it will be computed for the user (256 if DBIC[1] is 8 bit, otherwise 65536).

 EASI> NUMBIN =                         | Default
 EASI> NUMBIN = 1000                    | 1000 bins

HISFORM

Specifies the format of the output histogram report. The default value for this parameter is HITCENTER.

 EASI> HISFORM = "RAW"                  | Just the count data
 EASI> HISFORM = ""                     | HITCENTER

REPORT

Specifies the file to which to append the generated report.

 EASI>REPORT="filename"
The following names have special meaning:

 EASI>REPORT="TERM"     | generates reports on your terminal
 EASI>REPORT="DISK"     | generates reports on file "IMPRPT.LST"
 EASI>REPORT="OFF"      | usually cancels report generation, but
                        | HIS forces REPORT to terminal output

DETAILS

This HISDUMP program is a utility program for computing a histogram of one or more image channels, and dumping the result to a user specified report file. The report format is intended to be easily read into other packages for statistical analysis, rather than to be easily human readable.

This source image channels (DBIC) are read from a named PCIDSK file (FILE). The user can provide a window, or graphic plane in the MASK parameter to restrict the set of pixels sampled.

When computing a histogram, a histogram table is established with each entry in the table being called a bin. A particular bin will contain a count of all sampled pixels falling between the bin's minimum (inclusive), and maximum (not included) grey level values. The number of bins NUMBIN), and overall binning range (HISW) can be controlled by the user in order to control the accuracy of the histogram bins.

The default binning approach loses no accuracy, and hence seldom needs to be overridden for eight bit, and sixteen bit data types. However, meaningful histograming of 32 bit real data may require explicit user control.

The HISFORM parameter can be used to control the format of the report to be generated. The simplest form is a HISFORM="RAW" report. This generates one report line per histogram table bin, with the line containing the counts for each channel (DBIC) sampled.

The RANGE, and CENTER report types add column(s) at the beginning of each line containing the grey level range for the bin, or the central grey level value for the bin.

The HITRANGE, and HITCENTER report types are similar but only contain lines for bins that have at least one non-zero count.

The HIS program should be used to generate human friendly histogram reports. The ImageWorks/View/Histograms program also contains an interactive histograming tool from which a text data file, or PostScript plots can be generated.

EXAMPLE

Generate a report file with the histogram information for eight bit channels off irvine.pix under one of the bit masks. As this is eight bit data we don't need to control the binning.

 EASI> file = "/pci/demo/irvine.pix"
 EASI> dbic = 1,2,3,4,5
 EASI> mask = 9                         | Sample under bitmap 9
 EASI> hisform =                        | Default to HITCENTER
 EASI> numbin =
 EASI> hisw =
 EASI> report = "hist.txt"              | Write to hist.txt file.
The first 12 lines of hist.txt are shown here. The first column is the grey level value for the center of the sampled bins. Following that are the counts for each bin from channels ones through five.

  0          0          0          0          0         15 
  1          0          0          0          0         25 
  2          0          0          0          0         66 
  3          0          0          0          4         91 
  4          0          0          0          3        125 
  5          0          0          0          9         77 
  6          0          0          1         22         34 
  7          0          0          0         25         12 
  8          0          0          0         38          6 
  9          0          0          1        103          3 
 10          0          0          0        172          3 
 11          0          0          2         44          4

About PCI Help Gateway