AIM : ATARI IMAGE MANAGER The image processing program AIM 2.3 for the ATARI ST has been developed by Frans Groen and Robert de Vries of the Delft University of Technology. Frans is a scientific staff member of of the section "Pattern Recogni tion" of the vakgroep Signal / System Techniques (ST), Robert is a student of another section of the same vakgroep. AIM runs in high-resolution and low-resolution mode. The medium-resolu tion mode is not supported. AIM has been written in the C-language using the Lattice C-compiler. The purpose of the program is to experiment with digital image processing. User interface The user interface of AIM consists of: -GEM interface. Operations and parameters can be selected by means of dialog boxes and drop-down menus. A choice from a menu results in a command which is passed to the command interpreter. Image displays can be moved and sized. -Command interpreter. Sequences of commands can be put together in a command file. When the logging is on, commands which are entered are also stored in a log command file. A command file may be called within another command file up to 16 levels deep. Images in AIM Four image memories are available in AIM 2.3. The image memories are 8 bit wide and have a maximum size of 65536 pixels. Standard aim images have a the size of 256 x 256 pixels. These image memories are displayed at the ATARI screen. The windows are designated with 'A', 'B', 'C' and 'D'. The position of the windows is obtained from a setup file. Image windows can be moved and sized. A colour image consists of 4 memories with a maximum of 16384 pixels respectively for the intensity, red, green and blue sub-images. This maximum size is the result from the current 1M byte memory restriction of the Atari ST. When the memory increases, larger colour images could be supported. Standard aim colour images have a size of 4 times 128 x 128 pixels. They occupy the same area as an grey-value image of size 256 x 256. Most of the (colour) image operations are applied to all sub-images of a colour image. Some image operations (gradx, grady, equal ) are performed on the intensity sub-image of a colour image. After such an operation the red, green and blue colour values are updated according to the new intensity value. The 8 bitplanes of the grey-value images can also be used as 8 binary images. Binary and Cellular Logic operations can be performed on these bitplanes. The bitplanes are numbered from 1 to 8. When an image is read from disk all 8 bitplanes are read simultaneously. The same holds when an image is written to disk. An image is displayed in the grey-value mode when the extension is .IM and in color mode when the extension is .COL. The display of color images is only supported in the low-resolution mode. Also DEGAS and Neochrome images can be read or written. With the read command these pictures are converted to 320 x 200 grey-value images. With the cread command they are converted to colour images of size 160 x 100. When the extension is .PI1 or .PI3 a DEGAS file is read or written, when the extension is .NEO a neochrome file is read or written. Examples are given in @democ4. Great care should be taken by storing images in degas or neochrome format. In these formats a limited number of grey values or colours is used (palette), so a drastic reduction of information takes place, which limits the possibility of further image processing. Images are stored in full grey or colour resolution in the AIM format. In the high resolution mode a standard grey-value image is represented by 256 x 256 black and white dots. (there are only 2 grey values possible: white and black). A sigma-delta technique is used to obtain a local density of the dots representing as good as possible the grey-values in the image. In a binary display 0 gives a black dot and 1 a white dot. In the low resolution mode a standard grey-value image is represented by 128 x 128 pixels in 8 grey-values. Again a sigma-delta technique is used to represent as good as possible the original 256 grey values. As the standard images have a size of 256 x 256 pixels, in the low-resolution mode only 1 pixel out of each 2x2 pixel neighbourhood is displayed. In the default binary low-resolution mode (don 1) a black dot is displayed when all pixels of a 2x2 neighbourhood are '0' and a white dot is displayed when all pixels in a 2x2 neighbourhood are '1'. In all other cases a grey dot is displayed. A standard color image is displayed in 128 x 128 pixels with 16 different colors. An optimum palette is chosen for the currently displayed image. So the palettes of other images are no longer correct. The palette of the image which is on top is displayed. Clicking on another window brings it on top with the correct palette. Standard grey-value images on disk (extension .IM) consist of 256 lines of 256 pixels (unsigned characters) of 1 byte. So an image consists of 65536 bytes in total. The sequence is line by line from top left to bottom right. Standard color images on disk (extension .COL) consist of a sequence of 4 sub-images of 128 lines of 128 pixels (unsigned characters) of 1 byte. The sub-images are intensity, red, green and blue respectively. When an image does not have a standard format a header is needed (extension .HD), describing the image width and height. The header used is the header of the Centre for Image Processing Delft and is given in the Appendix. When an image is written in the AIM format always a header is written. Command interpreter It is not necessary to give the complete command name. The smallest number of letters which gives no ambiguity is sufficient. It is possible to edit your commands in a simple way. The delete- or backspace-key delete the last character. CONTROL-X deletes the whole line. A sequence of commands which perform a certain operation may be grouped to a command file and stored on disk. The extension of command files is .AIM. When the logging is on all the entered commands are stored. When the logging is switched off a log command file is written to disc. Command files are executed by typing @name (without the extension). A new command file can be called from a command file and may be nested up to 16 levels deep. So typing @command-file-name instead of a command executes the command-file. ESC stops the execution of a commandfile and asks the user to go on or not. Default values are used when a parameter is not given. When an erroneous value of a parameter is given, the command interpreter asks for a correct value. If in this case a return is given, the default value is used. This gives the possibility to ask for a parameter value when a command-file is executed, instead of using a fixed value. In the commandfile for instance a question mark (?) can be used instead of the parameter value to obtain this feature. A question mark (?) instead of a command gives a list of all available commands. A star (*) indicates that the remainder of the commandline consists of comments. GEM-INTERFACE Operations marked with a star (*) are only available in the command interpreter. Dialog boxes Parameters are entered in the dialog boxes by first pushing the ESC button to delete the default value and to go to the first position. Only at the first position minus signs are allowed. There are two special dialog-boxes. One is for the threshold command. The default threshold value is computed each time a new input-image is selected. The other special box is for the palette. If a color is chosen the color coefficients are shown in the editable text line underneath. If the coefficients are changed and any other color-box is clicked the effect of the changes are visible. The three coefficients represent the red, green and blue, and may vary from 0 to 7. Higher values are cast to 7. OPERATIONS IN AIM FILE OPERATIONS readf[ile]: reads an image from disk. The first command parameter is the image name, the second optional parameter is the image memory (A,B,C,D). Default is image memory A. The extension of an grey-value image file is .IM. Available standard images are : TRUI.IM, CERMET.IM, TUD.IM and ASBEST.IM. When no extension is given .IM is assumed. (When the extension is .COL a colour image is read in). When no header file is present a standard image size is assumed, otherwise the description from the header file is used. When the extension is .PI1 or .PI3 a DEGAS file is converted to a grey- value image of 320 x 200 pixels. When the extension is .NEO a neochrome file is converted to a grey-value image of 320 x 200 pixels. command : readf image-file, image default : readf trui , A range : - , creadf[ile]: reads a colour image from disk. The first command parameter is the image name, the second optional parameter is the image memory (A,B,C,D). Default is image memory A. The extension of a color image is .COL. Available color images are : MANDRIL.COL, MAID.COL, GIRL.COL and ARLES.COL. When no extension is given .COL is assumed. (When the extension is .IM a grey-value image is read in). When no header file is present a standard image size is assumed. otherwise the description from the header file is used. When the extension is .PI1 a DEGAS file is converted to a colour image of 160 x 100 pixels. When the extension is .NEO a neochrome file is converted to a colour image of 160 x 100 pixels. command : creadf image-file, image default : creadf mandril , A range : - , writf[ile]: writes an image to disk. The first command parameter is the image memory (A,B,C,D). The second parameter is the name of the image-file. When no extension is given .IM is assumed. Besides the image file also a header file is written (extension .HD). The header structure is given in the Appendix. When the extension is .PI1 or .PI3 a DEGAS file is written. When the extension is .NEO a neochrome file is written. command : writf image, image-file default : writf A , dummy range : , load setup This command loads a setup file. The setup file describes the path of the image files (read/write), the commandfiles, the helpfiles, the aspect and align-flags and the position of the windows. save setup This command saves the current settings (paths and window positions) in a setup files. Macro : selects and starts a commandfile. @filename is a command file. An @ starts the command file. Command files may be nested up to 16 levels. An example is given in @demo. The extension of command files is .AIM. These extensions are added to the command file name by AIM. When infinite = -1 the commandfile is infinitely repeated. command : @name.AIM,infinite default : - , 0 range : - , <-1,0> Logging When the logging is on all entered commands are stored. When the logging is switched off, the stored commands are written in a log file. In this way automatically command files can be created. exit : ends the program. This action can also be obtained by typing Control-C or by clicking the close-box of the command-window. command : exit ARITHMETIC GREY-VALUE OPERATIONS copy : copies an image. The command parameters are the input image and the output image (A,B,C,D). command : copy input-image , output-image default : copy A , B range : , add : adds two images. The first command parameter is the input-image. The second parameter is the output-image to which the input-image is added. output-image = (input-image + output-image )/2 command : add input-image , output-image default : add A , B range : , sub : subtracts two images. The first parameter is the input-image. The second parameter is the output-image from which the input-image is subtracted. The third parame ter is a constant which can be added to the image. As the image cannot become negative, the resulting value is clipped below 0 and above 255. output-image = (output-image - input-image ) + constant command : sub input-image , output-image , constant default : sub A , B , 0 range : , , <-255,255> mul : multiplies two images. The output-image (second parameter) is multiplied by the input-image (first parameter). output-image = (input-image * output-image )/256 command : mul input-image , output-image default : mul A , B range : , div : divides two images. The output-image (second parameter) is divided by the input-image (first parameter). output-image = (output-image / input-image ) command : div input-image , output-image default : div A , B range : , (*) minimum : minimum of two images. The output-image (second parameter) is the minimum of the output-image and the input-image (first parameter). output-image = minimum (input-image, output-image ) command : minimum input-image , output-image default : minimum A , B range : , (*) maximum : maximum of two images. The output-image (second parameter) is the maximum of the output-image and the input-image (first parameter). output-image = maximum (input-image, output-image ) command : maximum input-image , output-image default : maximum A , B range : , (*) mindev : take input value with minimum deviation. The output pixel value is that value of one of the two input images, that differs the least from the output pixel value. if |output value - input1 value| < |output value - input2 value| output = input1 else output = input2 command : mindev input1-image , input2-image, output-image default : mindev A , B , C range : , , cadd : adds a constant to an image. The first command parameter is the image. The second parameter is the constant which is added to the image. command : cadd image , constant default : cadd A , 0 range : , <-255,255> cmul : multiplies an image by a constant. The first command parameter is the image. The second parameter is the multiplication constant. command : cmul image , constant default : cmul A , 1 range : , <-255,255> cdiv : divides an image by a constant. The first command parameter is the image. The second parameter is the division constant. command : cdiv image , constant default : cdiv A , 1 range : , <-255,255> GREY-VALUE FILTERS A pixel value in the output image is determined by the value of the pixel in the input image together with the pixel values in a local neighbour hood around the pixel. Both linear and non-linear operations can be applied to such a neighbourhood. LINEAR A linear filter can be realized by multiplying a pixel and its neighbourhood by coefficients. The result is the sum of these multiplica tions and is called a convolution. Examples of linear filters are the 'laplace' and 'gradient' filters. In AIM the size of linear filters is limited to a 3x3 neighbourhood. 'Filter' is a rotation-symmetrical 3x3 filter of which the coefficients can be specified by the user. In the the 'laplace' and 'gradient' filters the coefficients are fixed. The coefficients are : -1 0 -1 -1 -2 -1 0 -1 0 cd chv cd -2 0 -2 0 0 0 -1 5 -1 chv cc chv -1 0 -1 -1 -2 -1 0 -1 0 cd chv cd x-gradient y-gradient laplace filter laplace : linear filter for image enhancement. The first command parameter is the input-image and the second parameter is the output-image. Defaults are: A for the input-image and B for the output-image. command : laplace input-image , output-image default : laplace A , B range : , gradx : horizontal gradient filter. The first parameter is the input-image (default A) and the second parameter is the output-image (default B). The output-image may be multiplied by a factor (multiply/1024) and a constant (add) may be added to the result. output-image = gradx(input-image ) * (multiply / 1024) + add command : gradx input-image , output-image , multiply, add default : gradx A , B , 1024 , 128 range : , ,<1-10000>,<-255-255> grady : vertical gradient filter. The first parameter is the input-image (default A) and the second parameter is the output-image (default B). The output-image may be multiplied by a factor (multiply/1024) and a constant (add) may be added to the result. output-image = grady(input-image ) * (multiply / 1024) + add command : grady input-image , output-image , multiply, add default : grady A , B , 1024 , 128 range : , ,<1-10000>,<-255-255> filter : 3x3 rotation-symmetrical filter. This filter performs a general 3x3 rotation-symmetrical convolution. Parameters are the input-image, the output-image and the 3 different coefficients in a 3x3 neighbourhood. The coefficient of the central pixel is cc, the coefficients of the horizontal and vertical neighbours are chv and the coefficients of the diagonal neighbours are cd. The result may be multiplied by a factor (multiply / 1024) and a constant (add) may be added to the result. output-image = filter(input-image ) * (multiply/1024) + add command : filter input-image, output-image, cd, chv, cc, multiply, add default : filter A , B , 0 , -1 , 4 , 2048 , 0 range : , , <-/+1000> , <10000> ,<-+255> unif : uniform filter. This filter determines for each pixel the average of a local neighbour hood in the input-image. This average becomes the pixel value in the output-image. The first parameter is the input-image, the second parameter is the output-image. The third parameter is the size of the local neighbourhood. This size is an odd value between 1 and 63. command : unif input-image ,output-image , neighbourhood size default : unif A , B , 3 range : , , <1,63> NON-LINEAR Non-linear filters perform image operations which are impossible with linear filters. Noise can be suppressed with a non-linear filter without deteriorating edges in an image. Only the median filter, the minimum and the maximum filter are implemented in AIM. medi : median filter. The median filter determines for each pixel the median (the middle) value of a local (3x3) neighbourhood in the input-image. This median value becomes the pixel value in the output-image. This filter suppresses noise. The first parameter is the input-image, the second parameter is the output-image. command : medi input-image ,output-image default : medi A , B range : , lmin : local minimum filter. The minimum filter determines for each pixel the minimum of a local neighbourhood in the input-image. This minimum becomes the pixel value in the output-image. This operation results in an extension of the dark parts in an image. This operation is also called grey-value erosion. The first parameter is the input-image, the second parameter is the output-image. The third parameter is the size of the local neighbourhood. This size is an odd value between 1 and 63. The operation is illustrated in @demo5 and @demo7. command : lmin input-image ,output-image , neighbourhood size default : lmin A , B , 3 range : , , <1,63> lmax : local maximum filter. The maximum filter determines for each pixel the maximum of a local neighbourhood in the input-image. This maximum becomes the pixel value in the output-image. This operation results in an extension of the bright parts of an image. This operation is also called grey-value dilation. The first parameter is the input-image, the second parameter is the output-image. The third parameter is the size of the local neighbourhood. This size is an odd value between 1 and 63. command : lmax input-image ,output-image , neighbourhood size. default : lmax A , B , 3 range : , , <1,63> (*)hara : non-linear edge filter. The filter hara performs a variant (Lucas van Vliet) of the 3x3 Lee- Haralick edge filter (Patt. Rec. Conf., Paris '86). This filter is based upon the weighted difference between the original image and the local minimum and local maximum filtered images. The first command parameter is the input-image and the second parameter is the output-image. Defaults are: A for the input-image and B for the output-image. command : hara input-image , output-image default : hara A , B range : , (*)have : non-linear laplace like filter. The filter have performs a non-linear laplace like-like operation inspired by the 3x3 Lee- Haralick edge filter (Patt. Rec. Conf., Paris '86). Adding the have result to the original gives sharpening as in the linear laplace filter. This filter is based upon the weighted difference between the original image and the local minimum and local maximum filtered images. The first command parameter is the input-image and the second parameter is the output-image. Defaults are: A for the input-image and B for the output-image. command : have input-image , output-image default : have A , B range : , equal(ization) : histogram equalization. This operation reassigns the grey-values in an image and results in an "optimum" use of the available grey-values. The grey-value histogram of the output image is as flat as possible (given the necessary requantiza tion). An example is given in @demo1. command : equal input-image , output-image default : equal A , B range : , thresh[olding]: transforms a grey-value image in a binary image. The binary image is obtained by thresholding the input image. After thresholding binary image operations may be applied. Pixels with a grey- value above the threshold get the binary value '1' and thus become white. Pixels with a grey-value below the threshold get the binary value '0' and become black. The default value of the threshold is obtained from the grey-value histogram with the method of Ridler & Calvert. command : thresh input-image , output-image , bitplane, threshold default : thresh A , B , 1 , automatic range : , , <1,8> , <0,255> CELLULAR LOGIC (BINARY) OPERATIONS These operations can be applied to the 8 bitplanes of an image. The bitplanes are numbered from 1 to 8. A black pixel has the value '0', a white pixel has the value '1'. The edge value of the image can be set to '0' or '1' in all operations. The default value of the image edge is black (0). The given number of iterations is a maximum. The iterations stop when no changes in the pixel values occur anymore. The number of iterations is shown in that case. erosion : erodes white objects. One layer of the white objects is peeled off in each iteration. White objects which are smaller than the number of iterations * 2 will disappear. The connectivity determines which white pixels belong to a layer to be peeled off. When the connectivity is 4 this layer consists of those white pixels that have a horizontal or vertical black neighbour. When the connectivity is 8 a layer consists of those white pixels that have a horizontal, vertical or diagonal black neighbour. When the connectivity is 6 for the odd iterations a 4-connectivity is used and for the even iterations an 8-connectivity is used. The erosion is illustrated in @demo6. command : erosion #iterations , bitplane, connectivity, edge ,image default : erosion 1 , 1 , 6 , 0 , B range : <1,512> , <1,8> , <4,6,8> , <0,1>, dilation : extends white objects. One layer is added to the white objects in each iteration. Black parts such as holes which are smaller than the number of iterations * 2 will disappear. The connectivity determines which black pixels belong to a layer to be added. When the connectivity is 4 this layer consists of those white pixels that have a horizontal or vertical white neighbour. When the connectivity is 8 a layer consists of those black pixels that have a horizontal, vertical or diagonal white neighbour. When the connectivity is 6 for the odd iterations a 4-connectivity is used and for the even iterations an 8-connectivity is used. command : dilation #iterations, bitplane, connectivity, edge, image default : dilation 1 , 1 , 6 , 0 , B range : <1,512> , <1,8> , <4,6,8> ,<0,1>, propag[ation]: dilates a bitplane under a mask. The propagation strongly resembles the dilation. However, the black pixels are only added when they are white (1) in the mask bitplane. The propagation can be used to find the original shapes of objects which remained after a number of erosion iterations. This application is also shown in @demo6. The first parameter is the number of iterations. The second parameter is the bitplane of which the dilation takes place (seed bitplane). The third parameter is the mask bitplane. The other parameters are again the connectivity and the image edge value. When the edge value is 0 only the seed bitplane is propagated. When the edge value is 1 only the edge is propagated and when the edge value is 2 both the edge and the seed bitplane are propagated. command : propag #iterations,bitplane,maskbitplane,connectiv, edge,image default : propag 1 , 1 , 2 , 6 , 0 , A range : <1,512> , <1,8> , <1,8> , <4,6,8> ,<0,2>, skelet : skeleton with endpixels. The skeleton is an 1 pixel thick line in the middle of white objects. The skeleton operation resembles the erosion, but in this case pixels of a layer are only deleted, when their deletion does not change the topology of the image. (They are not break pixels). An additional restriction is that a pixel may not be deleted at the end of a skeleton(line). The number of iterations must be sufficiently large to find the complete skeleton (the biggest diameter of the white objects divided by 2). The operation stops when the number of iterations is reached or when no pixels change anymore. An example is given in @demo3. command : skelet #iterations , bitplane, edge value, image default : skelet 100 , 1 , 0 , B range : <1,512> , <1,8> , <0,1> , -skelet : skeleton without endpixels The skeleton without endpixels is the same as the previous skeleton operation, but endpixels may be deleted in this case. Solid objects will result in single pixels and holes in objects will result in rings. This is illustrated by the skeleton of the background (exo-skeleton) in @demo4. command : -skelet #iterations , bitplane, edge value, image default : -skelet 100 , 1 , 0 , B range : <1,512> , <1,8> , <0,1> , contour : determines the contours of objects. The result is the edges of white objects. This means all white pixels with one or more black neighbours. command : contour bitplane, edge value, image default : contour 1 , 0 , B range : <1,8> , <0,1> , majority : performs a majority voting. The central pixel of a 3x3 neighbourhood becomes black or white depending upon the majority of the neighbourhood. command : majority bitplane, edge value, image default : majority 1 , 0 , B range : <1,8> , <0,1> , remove[noise]: removes pepper and salt noise. A white pixel in a complete black 3x3 neighbourhood becomes black. A black pixel in a complete white 3x3 neighbourhood becomes white. command : remove bitplane, edge value, image default : remove 1 , 0 , B range : <1,8> , <0,1> , life : game of life The well-known game of life is also a cellular logic operation ! command : life #iterations , bitplane, edge value, image default : life 1 , 1 , 0 , B range : <1,512> , <1,8> , <0,1> , SPECIAL LINEFIGURE PIXELS sinpix[els] : determines isolated white pixels These white pixels have no white neighbour in a 3x3 neighbourhood. command : sinpix bitplane, edge value, image default : sinpix 1 , 0 , B range : <1,8> , <0,1> , endpix[els]: determines endpixels of a linefigure. These white pixels have only one white neighbour in a 3x3 neighbourhood. command : endpix bitplane, edge value, image default : endpix 1 , 0 , B range : <1,8> , <0,1> , linkpix[els]: determines white pixels with two white neighbours. These white pixels have two white neighbours in a 3x3 neighbourhood. command : linkpix bitplane, edge value, image default : linkpix 1 , 0 , B range : <1,8> , <0,1> , vertices: determines the vertices in a linefigure. These white pixels have more than two white neighbours in a 3x3 neighbourhood. command : vertices bitplane, edge value, image default : vertices 1 , 0 , B range : <1,8> , <0,1> , BIT OPERATIONS bcopy : copies a bitplane. The command parameters are the input-bitplane and the output-bitplane. command : bcopy input-bitplane,output-bitplane,input-image,output-image default : bcopy 1 , 3 , B , B range : <1,8> , <1,8> , , and : AND-function of two bitplanes. The command parameters are the input-bitplanes of which the AND- function is taken and the output-bitplane. command : and bitplane in 1 , bitplane in 2 , bitplane out, image default : and 1 , 2 , 2 , B range : <1,8> , <1,8> , <1,8> , or : OR-function of two bitplanes The command parameters are the input-bitplanes of which the OR- function is taken and the output-bitplane. command : or bitplane in 1 , bitplane in 2 , bitplane out, image default : or 1 , 2 , 2 , B range : <1,8> , <1,8> , <1,8> , exor : EXOR-function of two bitplanes The command parameters are the input-bitplanes of which the EXOR-function is taken and the output-bitplane. command : exor bitplane in 1 , bitplane in 2 , bitplane out, image default : exor 1 , 2 , 2 , B range : <1,8> , <1,8> , <1,8> , invert : inverts a bitplane The first command parameter is the bitplane. The second command parameter is the image. command : invert bitplane, image default : invert 1 , B range : <1,8> , set : sets a bitplane, so makes it white (1). The first command parameter is the bitplane. The second command parameter is the image command : set bitplane, image default : set 1 , B range : <1,8> , reset : resets a bitplane, so makes it black (0). The first command parameter is the bitplane. The second command parameter is the image. command : reset bitplane, image default : reset 1 , B range : <1,8> , label : labels connected components. This command labels the connected components within a binary image. The maximum number of labels is 255. (In low resolution the best display is obtained by: don,3 followed by bdisp.) command : input-image, output-image, input bitplane, connectivity default : B , A , 1 , 8 range : , , <1-8> , <4,6,8> UTILITIES (*)don : Automatic display on When the automatic display is on, after each operation the result is shown. An optional parameter gives the type of display in the low-resolution mode. An example is given in @democ5. 0 : display off (same as doff) 1 : When all pixels of a 2x2 neighbourhood in the original bitplane are '0' a black dot is displayed. When all pixels of a 2x2 neighbourhood in the bitplane are '1' a white dot is displayed. In all other cases a grey dot is displayed. 2 : The bitplane is sampled depending upon the GEM window size. When the first pixel of a sample region is '0' a black dot is displayed. When the first pixel is '1' a white dot is displayed. 3 : Multiple bitplane display. Bitplanes are sampled depending upon the GEM windowsize. Bitplane 1 is displayed in red, bitplane 2 in blue and bitplane 3 in green. When all three lowest bitplanes are '0', the 3 highest bitplanes are shown as grey-value. 4 : Multiple bitplane display. Bitplanes are sampled depending upon the GEM windowsize. Bitplane 8 is displayed in red, bitplane 7 is displayed in blue and bitplane 6 is displayed in green. command : don, display_type default : don, 1 range : don, < 0,4> (*)doff : Automatic display off When the automatic display is off, only an image is displayed after a gdisp or bdisp command. command : doff (*)ton : Timer on The execution time of each command is displayed when the timer is on. command : ton (*)toff : Timer off Sets timer off. command : toff gdisp : Grey-value / color display of an image. This routine displays a grey-value image as 256x256 black or white dots in high resolution. In low resolution 128 x 128 pixels of 8 grey-values are displayed. Images are always displayed with maximum contrast. When the image is a color image it is displayed in color in the low resolution mode. Parameter is the image (A to D). command : gdisp image default : gdisp A range : bdisp : Displays one of the 8 bitplanes of an image. First command parameter is the image (default A). Second parameter is the bitplane (default 1). In high resolution black or white pixels are displayed. The type of display in low resolution is determined by the (optional) don parameter. command : bdisp image,bitplane default : bdisp A , 1 range : , <1,8> hist : calculates the histogram of an image. The histogram is displayed in overlay in the appropriate image window (A to D). A threshold is calculated from the histogram to segment the image ( for the thresh command). The command parameter is the image (default A). command : hist image default : hist A range : Palette : Change the palette interactively. This option is only supported in the low-resolution mode. Preferences: Change preferences. When the image windows are sized, the aspects ratio can be preserved or not. The images can be aligned to byte boundaries or not. help : gives help information. command : help command APPENDIX : File header structure /* call the headerfile *.hd, this file contains the structure with all parameters of the corresponding image file *.im. */ typedef struct { short *address; /* image_address in memory */ short format; /* format */ short sizex; /* dimension 1 */ short sizey; /* dimension 2 */ short sizez; /* dimension 3 */ unsigned short commsz; /* size of comment in bytes */ short data[16]; /* user image dependent data*/ } HEADER; #define F_WORDS 0 /* format words in the image */ #define F_BYTES 1 /* format bytes in the image */ #define F_FOBIT 2 /* four bits image, packed in 4 pix/word */ #define F_TWBIT 3 /* two bits image, packed in 8 pix/word */ #define F_SBITS 4 /* format single bits in the image */ ACKNOWLEDGEMENT The following people contributed to AIM: Frans Groen (TUD) : image processing. Robert de Vries (TUD) : GEM interface. Igor Weber (University of Zagreb, YU) : low-resolution and colour display. Gert van Antwerpen (CBD) : lmin, lmax, unif, label Piet Verbeek (TUD) : hara, have filter Lucas van Vliet and : erosion, dilation, propagation, Ben Verwer (TUD) skeleton Jaap Joosten (TUD) : tests and evaluation. Rijswijk, 1 July 1987. Please send remarks and comments to : Frans Groen Applied Physics Department Delft University of Technology Lorentzweg 1 2628 CJ Delft The Netherlands tel (31) 15-781416