xgf(n) MISC. REFERENCE MANUAL PAGES xgf(n) NAME xgf - visualization tool for various geometric features. SYNOPSIS xgf [ -G .gf_file... ] [ -R .gf_file] [ -b .pgm_image] [ -e ] [ -F number] [ -s number] [ -N number] [ -P number] [ -o ] [ -c ] [ -Tnumber] [ -D .pgm_file] [ -f file] [ -A control_file] [ -q ] DESCRIPTION xgf is a visualization tool capable of displaying gray level .pgm images and various geometric features (lines, arc, polygons, strings of pixels, elipses). Geometric features must be stored in the .gf format. For further information about the .gf data format see the .gf man page. Output of several image processing and perceptual grouping programs available at the University of Surrey can be directly viewed by xgf (eg. the 'canny' and 'edged' edge detectors, 'ht' and 'approx' line fineders, 'junct' junc- tion detector, 'elf' ellipse finder). OPTIONS -G .gf_file [.gf_file ...] read in sets from one or more file, new sets are appended to old ones; -R .gf_file read in sets from the file, new sets replace old -b .pgm_image put the image stored in the .pgm_image file in the background. -e expand background as when pressing the EXPAND button. When used in conjunction with -F option, -e must be specified before -F. -F number M put set 'number' in foreground (i.e. display the set). The option(s) must be specified before the -b option. -s number select set 'number' -N n highlight the next n-th item ( = press- ing the Next button) -P n highlight the previous n-th item ( = pressing the Previous button) Sun Release 4.1 Last change: 6 June 1991 1 xgf(n) MISC. REFERENCE MANUAL PAGES xgf(n) -o switch origin on/off ( = pressing the Origin button) -c clear the display canvass -Tnumber specify line thickness -D file dump the current canvass to file -f file file that contains the start up options. Besides command line options, the file may contain '-d number' (not available on the command line) that will delay further processing by 'number' of seconds. -A filename xgf reads dynamically commands from the specified file. When using this option it is assumed that xgf will accept com- mands from a process running in paral- lel. The master process prepares the command file 'filename' for the slave (xgf). xgf starts reading commands from 'filename' when it detects presence of file called 'filename_cont'. When all the commands from 'filename' have been executed xgf removes 'filename_cont'. The master process can optionally prepare new commands in 'filename' or change data (images, .gf files) speci- fied in of 'filename_cont' indidates to xgf that commands form 'filename' can be read. In other words: when 'filename_cont' exists xgf executes com- mands from (this could result in deadlock or/and corruption of 'filename' before xgf was able to execute it). -q quit xgf OPERATION After invoking the program, two buttons appear (Quit and Load). BUTTONS QUIT Quits the program. Sun Release 4.1 Last change: 6 June 1991 2 xgf(n) MISC. REFERENCE MANUAL PAGES xgf(n) LOAD Loads a .gf file. A .gf file consists of one or more sets of data. When the Load button is clicked, a dialogue box pops up and prompts you to input a .gf file. Within the dialogue widget there are three command buttons Append, New and Can- cel. As the name suggests, the Append and New buttons allow you to append or input new file respectively. The Cancel button popdowns the dialogue box. Note that there is a limit of 15 on the total number of sets that can be viewed. OPERATION Once a .gf file has been loaded in, a set of command buttons and geometric features will appear. These are described as follows:- NEXT This button allows you to browse through a particular geometric feature. The choice of the geometric feature is set by clicking on the desired feature. Note that if the Next button was clicked before a feature is specified no feature will be highlighted. PREVIOUS This performs a similar function to Next except that the order in which the features are highlighted is reversed. ITEM # This button allows you to specify which item in the list to highlight. For example, if you have a set of lines in the .gf file you can enter the "number" which associate with a particular line to browse. By default, this "number" is set to 1(i.e. always highlight the first item). This function is useful for debugging and/or identifying any conceptual error associated with your program. BACKGROUND This is a pull-down menu to specify what to be displayed at the background. There are two choices for this option, 1)Image 2)Color. This is operated by pressing and pull the pointer(the mouse) down to your desired background. When Color is selected in the background, a dialog box pops up which allows you to specify the colour. By default, the background colour is black. A similar dialog box pops up if image-background was selected. This will prompts you to enter the image-file(it will only accept pgm format). When the image file is first loaded, it will be displayed in the size specified in the pgm file. Sun Release 4.1 Last change: 6 June 1991 3 xgf(n) MISC. REFERENCE MANUAL PAGES xgf(n) FOREGROUND This button is again a pull-down menu. This allows you to display the whole set of features. For example, display all lines or all collinear lines. The sets of features that you can display are given some default colours depending on the order they are loaded in. SET COLOR This button provides the flexibility to alter the pre- specified colour for each "set" specified in the gf file. HIGHLIGHT COLOR This provides a similar function to the Set Color button. Instead of specifying the "set" colour, you specify the colour for browsing through features(i.e. the colour for highlight when the Next button is clicked) and/or the colour for highlighting the "origin" of the set(i.e. the evidence which gives rise to the set.) Origin is described below. Here are the acceptable colours for Xgf, "Red", "LimeGreen", "Wheat", "Brown", "Blue", "Grey", "Pink", "Turquoise", "ForestGreen", "White", "OrangeRed", "Goldenrod", "Yellow", "Orange", "Magenta", "Salmon", "Coral", "Cyan", "Plum", "MediumSpringGreen", "Thistle", "SeaGreen", "Sienna", "MediumOrchid", "Black". ORIGIN This is a toggle button which allows you to either turn on Sun Release 4.1 Last change: 6 June 1991 4 xgf(n) MISC. REFERENCE MANUAL PAGES xgf(n) or turn off the origin( note: the button label will toggle from "origin[OFF]" to "origin[ ON]" depending on its state). When the origin is turned on, the evidence which gives rise to the set as well as the selected feature set will be highlighted. For instance, when lines are displayed one by one using the Next button, no evidence will be displayed unless the origin is on; in which case, the edge points as well as the lines will be displayed. This provides the abil- ity to identify any conceptual or programming error. REMOVE SETS This button allows the user to switch off all feature sets displayed either on top of an image or a plain background. EXPAND This is a toggle button which changes its functionality and label from Expand [ ON] to Expand [OFF] (by default zoom = 1). When the zoom factor is 1, both the images and the features defined in the gf file will be displayed in the current size. On the other hand, when the Expand button is clicked, any displayable will be displayed by a zoom factor of 2. Image is expanded by replacing each pixel by 2X2 pix- els. Note also that by default the zoom factor is set at 1. Note that when the pointer enters the display area the coor- dinates of the pointer will be shown in the box located at the top left hand corner. Grey level values will also be displayed when an image is at the background. WIN DUMP This button allows the user to dump the contents of xgf can- vas into a file called xgfdump.pgm. Another file named xgfcolor.ppm (colormap used by xgf) is also output. Using the system command .SH pgmtoppm the user can create a ppm file. Note that all colour features will also appear in the ppm file. COORD. INFO This is an ON/OFF button which allows the user to switch the pointer (coordinate) information on and off. Searching facility. The user can highlight a particular item in a feature set by clicking any button on the mouse. The item number associated with the feature is shown on the label widget. Sun Release 4.1 Last change: 6 June 1991 5 xgf(n) MISC. REFERENCE MANUAL PAGES xgf(n) Examples xgf invoke xgf, the rest is specified interactively xgf -G *.gf read in all .gf files in the current directory xgf -G can.gf -b pgm -e read in can.gf, put image called 'pgm' in the background and expand xgf -G can.gf -b pgm -e -F1 as before but display the first set BUGS Geometric structure POINTDOT is not displayed in expanded mode under OpenWindows (on Gloin). The Origin button info is not updated if the Origin toggle is set ON by the -o option: Origin OFF is erroneously shown. In this situation, the next click on the Origin button will not cause any visible change. However, internally the origin is switched off and the information displayed on the button is correct. After the second click, both the internal state and displayed information is set to ON. The Searching facility is not implemented for all geometric structures. For lines, the line with end endpoint closest to cursor is selected. An unexpected line cen be selected if the pointer is not close to the desired endpoint but rather near the line center. If the -F option is used, it must appear on the command line after -e or/and -b options Please report any bugs of xgf to either Anthony Tai(eep1at) or George Matas (ees2gm). SEE ALSO .gf(1), canny(l), edged(n), ht(l) AUTHOR Copyright (C) 1991 by Anthony Tai (a.tai@ee.surrey.ac.uk) nd George Matas (g.matas@ee.surrey.ac.uk). Sun Release 4.1 Last change: 6 June 1991 6 xgf(n) MISC. REFERENCE MANUAL PAGES xgf(n) Sun Release 4.1 Last change: 6 June 1991 7