LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-GHAMPAICN COP'S/ When Digitized by the Internet Archive in 2013 http://archive.org/details/showandtellinter429read S/0. ^f L£GAJ 'Report No. U29 ynu^ SHOW-and-TELL An Interactive Programming System For Image Processing System Specifications by John Read COO-2118-0003 VHt^'^'^"' ^r ir-ii. cX- - ■ February I8, 1971 coo 2118-0003 Report No. U29 SHOW-AND-TELL An, Interactive Programming System Por Image Processing System Specifications by John Read February I8, 1971 Department of Computer Science University of Illinois Urbana, Illinois 618OI Supported in part by Contract AT(ll-l)-21l8 with the U.S. Atomic Energy Commission. TABLE OF CONTENTS 1. System Overview 2. System Commands 3. Show-and-Tell Language h. Interactive PAX 5. Error Message Format References Appendix; Table of System Commands and S&T Language Instructions 1. SYSTEM OVERVIEW . 1.1 System Objectives The Show-and-Tell (S&T) progrannning system is a console- oriented software package providing a facile method of using the operational components of the Illiac III computer. The system operates on the hardware depicted in figure 1. An overall documentation of the Illiac III computer system is con- tained in reference [3]. S&T is designed to support two different types of programming objectives corresponding to a well-known decomposition of image processing into two phases: a preprocessing and feature-extraction phase followed by an interpretation phase. Some typical tasks included in the first phase are: Cleaning up the digitized image to reduce noise introduced by the transducer and by the digitization process. Normalization of the digitized image to eliminate variations inherent in the object being scanned. Location of occurrences of primitive features such as edges or lines . Encoding of subsets of the image for input to phase 2 processing. The second phase operates on the first phase output, which is in a symbolic form, rather than as an array of gray-scale values. It seems clear, however, that a data path must also lead from phase 2 back to phase 1 to permit interpretation routines to direct the acquisition of information from the original image. Show-and-Tell 's design is oriented towards this model. On one hand, it provides facilities for the manual control of scanning hardware so that preprocessing routines can be tried out on a large number of test images. On the other hand, a link is provided to the IBM 360/75 with its large amounts of storage and high-level programming languages -1- DEC PDP-8/e SUBSYSTEM IBM 360/75 SUBSYSTEM r" PATTERN ARTICULATION UNIT ILLIAC _ CORE MACHINE I/O PROCESSOR tmmxtsmviii^ arirMsuis^:, SCANNER -MONITOR -VIDEO CONTROLLER STAGE a FOCUS MOTOR CONTROLLER FLYING -SPOT MICROSCOPE SCANNER 46 MM FILM SCANNER MONITOR SCANNER -MONITOR -VIDEO CONTROLLER 35 MM FILM SCANNER 70 MM FILM SCANNER MONITOR S-M-V SUBSYSTEM VIDEO SUBSYSTEM VIDEO SWITCHING NETWORK STAGE a FOCUS MOTOR CONTROLLER AUTOMATED VIDEO MICROSCOPE VIDEO MONITOR MANUAL VIDEO MICROSCOPE VIDEO MONITOR LARGE FORMAT VIDEO CAMERA DATA AND/OR CONTROL CONTROL ONLr FIGURE 1 HARDWARE -2- CONFIGURATION so that phase 2's interpretation routines caji be coded with a minimum of wasted effort and time. Furthermore, this link is bidirectional, in that interpretation programs written in a high-level language (currently JORTEAN/PAX) cajn provide feedback to the acquisition and preprocessing of phase 1. Finally, due to the presently ill-defined requirements for picture-processing software, it was deemed wise to implement a minimal system at first, expecting that additions and changes would naturally occur as work on applications progresses. To this end, the system is fairly modular and includes provision for loading parts of the system into the very restricted (8k) PDF 8 core as they are required so as to reduce the need for tight or highly finished code. 1.2 System Elements S&T is composed of the following subsystems: Translator : Converts S&T language typed by the operator into an interpretable list structure. Enough information is contained in this internal coding to reconstruct the source statements on demand for listing and editing. Interpreter : Operates on the aforementioned list structure and on the Data Storage Lists. (see below). Interpretable Code Area (ICA) : Storage for the list structure produced by the Translator. • Executable Code Area (ECA): Storage for programs executed directly by the PDP-8 hardware; i.e., the output of the PAL assembler. Interpretable Code Loader : Loads interpretable code into the ICA. ■3- F.xecutable Code Loader : Loads executable code into the EGA. Supervisor : Provides first-level interrupt handling and controls loading of System Command Processors. System Command Processors : Carry out system commands. (see section 2). Data Storage Lists; Provides dynamically allocated storage for all operands. (see Section 3.2.2.5) 1.3 Use of the System Figure 2 is a panorama of the Input/output room of the Illiac III system, with the general location of some of the I/O devices indicated. Figure 3 is a view of an operator station, showing a teletype for entering instructions and a monitor console. On the monitor screen, the result of executing a SCMM instruction can he seen. The SCAM4 instruction enables an operator to select a small (128 x 128 picture elements) picture segment for machine processing. The small, brightly-lighted square is the segment. A low-resolution, reasonably flicker-free representation of the entire picture is simultaneously available to give the operator a general idea of the location of points of interest. One of the input devices, a high-resolution (1500 lines) video microscope is shown in figure U. A variety of other picture input equipment, as shown schematically in figure 1, is also available or in various stages of completion. All of the I/O devices are operated by a common control device, the Scanner-Monitor-Video Controller described in detail in reference [l]. This device permits program control of a wide selection of processing options, including a choice of raster size and location, sapling frequenc spot size, number of gray levels detected and some others. Pictures are converted to digital form by the input devices and stored in a 128 K byte Fabritek core memory which can store 2 bits of information. This capacity can be used in various ways, i.e., to store -k- (U •H one pict-ure of 512 x 512 picture elements (pixels) with four bits of gray- level data per pixel, or sixteen 128 x 128 pictures, or 6h one-bit X 128 X 128 planes, and so on. The rest of this section contains a step-by-step description of the use of Show-and-Tell to develop a simple application, the counting of particles of a certain size and darkness. In this sequence, the operator uses the XG (translate and go) commajid to learn a few useful facts about the image he wants to process, namely the size in pixels of a typical particle and a threshold value he can use to discriminate between particles and background. As each instruction is typed, it is translated and executed and the operator observes the effect. Having obtained the threshold and size numbers, the operator changes to translate mode (XL) and types a program to detect and count particles. He then executes the program, makes a change, re-executes it, and saves the program. 1. The operator identifies himself to S&T^ (DEMO), wakies up the 360, (WK) , and indicates that he is using the h6mm scanner (sU6). >L0 1 > WK 3 60 p}-ADY > DV 2. In order to measure some parameters of the image, the operator puts the system into translate-and-go mode, where each in- struction is translated and executed immediately after it is typed (XG). He then selects a window and reads it into memory (SCANM). While selecting the image, he determines that less resolution is needed so he increases the x and y scanner , , 1+ sampling increment (P:++++ and Q:++++jto 2 in each case. The next step is to find out the size in pixels of the particles 1 Underlined characters were typed by Show-and-Tell -8- he wants to count, and also to establish a gray-scale threshold which can be used to discriminate between particles and background. To do this he executes a TRACE command which displays the picture he just read in with SCMM, and also a bright spot, or cursor, which he can move around on the picture. He uses this to point to a particle on the picture. S&T records the coordinates of the particle. The next instruction, PNABE, prints out the gray-scale values of those pixels in a 6x6 neighborhood of the point indicated, using a one- character-per-pixel notation, (such that a gray-scale value of ten is typed as an A). The operator notes that the pixels in the area of the particle generally have gray-scale value higher than four and that the particle has an area of seven pixels. >XG SCANM p. 1 P ; ++++ p : ++++ ~ASC3N N. 1* 1 TRACE p. 1>C. 1>N. 1 PNABE p. 1*C. 1^6 9. 1 1^38 P 3 5671 1 57APg 2 12321 22211 1 2221 12 -9- 3. Having obtained these facts, the operator puts the system into translate mode (XL) and types in a program vhich will send a picture to the 360, (PICIN) and cause the PAX system on the 36O to put a one in picture P. 2 at each pixel whose corresponding P.l pixel had a gray- scale vaJLue greater than 5 (SLICE) and find and count all connected objects in P. 2 with an area between 3 and 10. The count is then typed by the program. The program assumes that picture P.l is already defined and has been read into core and that pictures P,2 through P.U have been defined as planes. >XL n 00 ASGN- N.2* 1 001 ASGN N. 1,0 OOP ASGN I.l,(C-l,-l),C-l,0),Cl,-l),(l,n)) 03 CALL PAX> 'PICIlx; ',?. 1 ,-i^ 0/j CALL FAX, 'SLICE %P.2,P. 1,^, 5>5 n05 LOOP: CALL PAX, ' XLI SIX ' ,P . P, C . 1 , X .^ 006 CALL PAX, 'CLt AP',p.3,n ncP^ CALL PAX, •XWRITC',P.3,C. 1 OOH CALL PAX, 'XCGK'NE ', I . l,P.^,P.p,P.3,\.2 09 CALL PAX, •ARfc,A',P. A,0,0,N.2 10 CALL PAX, 'AND', P. 2, P.?, P. -a, 1 ■ 1 1 IFGO N.2, .GT, 10, WRGSIZ 12 IFGO N.2, .LT,3, WRGSIZ 13 IvMCR N. 1, 1 1^ WRGSIZ: CALL PAX, ' NULL ' , P . 2, N . 3 15 IFGO i\.3, .EO, l,FIi\ISH 16 GOTO LOOP 17 FINISH: ASGi\ T.l,N.l .Q,L^ TEXTO 'PARTICLf CUUM=' 0'l9 TFXTO T.l 20 I-XIT -^lO- k. The program is then tested (GO), using the pic- ture currently in Illiac III core. An answer is typed (PARTICLE COUNT =5) which is unsatis- factory. The operator decides to change (CH) the rei-Ltion code in the SLICE instruction from a 5 to a U, meaning a change from 'greater than' to 'greater than or equal to'. The program is re- executed, this time with hetter results. > GO P ARTICLE C0Ui\T=5 >CH 00^ CALL PAX^ VSLICF'^P.P*?. 1,-^,^, 5 > GO PARX-tCLE C0Ui\'T=13 5. The corrected program is saved on the system device (SV) and given a file name of PCNT. The companion 360 program is terminated (KL) and the operator Logs off. >SV ^OUT-S ;PCNT >KL >LF -11- . 2. SYSTEM COMMANDS 2.1 Entering System Commands Execution of system programs such as the translator or the interpreter is controlled by typing system commands. S8sT signals that it is ready to receive a system command by typing a 'greater than' symbol (>). S&T can be put into system command mode at any time by typing CTLE, i.e., holding down the CTL key on the teletype and pressing E. S&T will then type >. 2.2 Docijmentation of System Commands In this section, underlined statements are those typed by the S&T system. The syntax notation used in this report is almost the same as the standard IBM notation described in the front of, for example, the PL/1 Language Specifications Manual, reference [6]. The only differences are (l) for emphasis, BNF-type brackets are placed around "notation variables" as in and (2) BNF- format rewrite rules are used where this presentation seems clearer. -12- •Command: CH Purpose: To change statements in a program already in the Interpretable Code Area. Execution: This command has the effect of a DL followed by an Hi. A colon is typed. The operator responds with: [, ] (see DL command). Statements entered are then translated and inserted in place of the ones just deleted. (See IN command). Command ; DL Purpose: To delete code from the Interpretable Code Area. Execution: A colon is typed. The operator's response is of the form; [, ] If is present, all statements between and including and are deleted. Otherwise, only the statement at is deleted. If a labeled statement is deleted, the label must be placed on some other statement in the program. If this is not done, execution of the program will terminate if a GOTO, IFGO or CALL to that label is attempted. -13- Command: DV Purpose: To identify which scanning device is to "be used. Execution: A request for a device code is typed: CODE; The operator selects the code from the following list and enters it, Sl+6 - i;6 mm film scanner SMS - Scanning microscope VMS - Video microscope VLF - Large format video S70 _ 70 mm film scanner 235 - 35 mm film scanner Command: GO Purpose: To execute S8eT code which has been loaded into the Interpretable Code Area "by the Loader or the Translator, Execution: The interpreter is invoked. Execution begins with the first location of the ICA. If the ICA is empty, an error message is typed and control returns to the System Command Processor. -lU- Command: IN Purpose: To insert code into a program already in the Interpretable Code Area. Execution: A Colon is typed. The operator responds with the number of the statement before vhich the code is to be inserted. The Translator is then invoked and types a carriage return and line feed. All statements entered are translated and inserted, A CTLE statement terminates the command. Command: KL Purpose: To delete the PAXDRIVR task (see section U, 'Interactive PAX' Execution: A command is sent to PAXDRIVR which causes it to terminate. -15- Command: LS Purpose: To print contents of Data Storage Lists currently at the top of the stack or the Interpretable Code Area. Execution: A colon(:) is typed. The operator enters parameters describing the item to be listed: [ ,] Each limit is of the form [.] whereis one of the Data Storage List Codes (except P), or is an S, meaning that the program in the ICA is to be printed. If . is omitted, the entire Data List or ICA is to be printed. for the ICA refers to a statement number. Example: Typing N.3, N.IO causes the contents of counters three through ten to be printed. Another example: typing S.39 causes the 39th instruction in the ICA to be printed. Command: LD Purpose: To load previously translated and saved S&T code into the Inter- pretable Code Area. Execution: The Loader is invoked. The PDP8 Disk Monitor is used to get the file Name from the Operator: * IN - The operator types the device code and file name of the file containing the saved program. (See reference [^]). Note that since the interpreter alvays begins execution at the first location of the ICA, the main-line program must be loaded before subroutines. -16- .Command: LF Purpose: Updates acco\mting data. Execution: Usage data is computed aoid entered into accounting tables. Command: L0 Purpose: Obtains a code from the operator to be used for accounting purposes. Execution: Command is automatically typed when S&T is first entered: >L0 Code : No other commands are accepted until the operator types a valid operator code. -IT- Command: SV Purpose: To save the contents of the Interpretable Code Area Execution: The PDP8 Disk Monitor is used to get a file and device name from the operator: *OUT- The operator types descriptors for the file to contain the ICA, (see reference [U]). Command: WK Purpose: To determine whether PAXDRIVR is active on the 360/75. (see section 5» "Interactive PAX'). Execution: If PAXDRIVR has not started, the message 'WAITING FOR 36O' is typed, and a WAIT loop is entered. When PAXDRIVR responds, '360 READY' is typed. -18- -Command: XG Purpose: Invokes the S&T Translator to translate one statement, then invokes the Interpreter to execute the instruction. Execution: When the translator is ready, it types a carriage return-line feed. The statement is entered by the operator, translated and interpreted. As each instruction is trans- lated, it overlays the previous one. Typing a CTLE returns control to the system command processor. Command: XL Purpose: To invoke the S8eT Translator Execution: When the S&T Trsmslator is ready, it types a carriage return followed by a line feed. Statements may then be entered for translation. The Translator Continues to accept statements until a CTLE is typed. Line numbers are automatically generated. -19- 3. S&T LANGUAGE " 3.1 Introduction An interactive, incremental translator is provided for SHOW-AND-TELL , a language for processing pictures using the S-M-V and PAU subsystems of the Illiac III. The translator is inter- active in that programs can he composed and debugged from a console typewriter and is incremental in that each statement is translated as it is entered and may be immediately executed, at the programmer's option. Alternatively, blocks of code may be translated an masse , saved, and called by the operator or by other programs. The operations in the language are classified: PAU instructions, sequence control instructions, data-manipulating instructions and input-output instructions. PAU instructions are those to be executed by the Pattern Articulation Unit of the Illiac III. To simplify the system, any operand to be processed is stored in one of eight predefined lists (see Sec. 3.2,2.5), vith each list dedicated to a single type of data. 3.2 Language Elements 3.2.1 Statement Syntax [