home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / m / mask / !Mask / !Help < prev    next >
Text File  |  1993-09-17  |  19KB  |  418 lines

  1. Version=1.11  You may copy this program for non-commercial reasons only.
  2. summary:
  3. !Mask is an application which allows you select certain items of a picture.
  4. For example you can isolate yellow text from a blue-ish picture. The program
  5. also offers some image processing possibilities like photomorphing.
  6. Input files are always clear or sprite files, output files are always clear
  7. files. In the clear format you have a 24 bit palette or full 24 bit color.
  8. You can translate clears<>sprites using !Translator, see below.
  9.  
  10. Main features:
  11. 1)Selecting & isolating objects in an image, based on its color, hue, etc.
  12. 2)Erasing objects in an image
  13. 3)Changing the color of objects in an image
  14. 4)Morphing one picture gradually into another
  15.  
  16. *********************************GETTING STARTED***************************
  17. Give the program as much memory as possible, but leave enough screenmemory.
  18. Press the select button over an object in the top-left window. For example
  19. the M of 'megadeth'. Than press menu in the top-left window or press it
  20. above the vertical bar. A mask will be made in about 0.6 (arm2) or
  21. 0.15 (arm3) seconds.
  22. *********************************MASKING***********************************
  23. Making masks from r,b,g values in the original image:
  24. grey:
  25.     Compares grey values of pixels and target pixel.
  26.     rule: (r+g+b)-(Tr+Tg+Tb)<d
  27. rgb:
  28.     Compares distance of the rgb vector of a pixel and target pixel.
  29.     rule: (r-Tr)²+(g-Tg)²+(b-Tb)²<d²
  30. color:
  31.     Compares 'color' of pixels. This is the best choice in most cases.
  32.     Note that masking this way will also select black (rgb=0,0,0) and
  33.     possibly other dark colors. This option is of no use to monochrome
  34.     images.
  35.     rule: v=r+g+b:t=Tr+Tg+Tb:(r*t-Tr*v)²+(g*t-Tg*v)²+(b*t-Tb*v)²<d²*v²*t²
  36. edge:
  37.     Tries to find edges in the picture. Rather slow.
  38.     rule: Er²+Eg²+Eb²>d² ,with Er,Eg,Eb the edginess of a point, defined
  39.     by sobelX²+sobelY².
  40. hue:
  41.     Compares color of pixels, but in another way than 'color'.
  42.     The hue of a pixel is not depending on its brightness, nor its
  43.     'whiteness'. So it may do well in overexposed images.
  44.     rule:(h(target)-h(pixel))mod (2*PI)<d , with h(r,g,b)=
  45.     arctan2(r-2/3*sqr(3)*(g+b) , 1/2*g-1/2*b). This is not (and probably
  46.     will never be) implemented for full 24 bit files.
  47.  
  48. (Tr,Tg,Tb) is the color of the target (selected) pixel.
  49.  
  50. You can activate the mask routines by pressing menu in the top-left window,
  51. or elsewere, or by selecting a new mask-button.
  52.  
  53. You can change the value of 'd' by dragging the bar in the middle of the
  54. screen. Dragging with the menu-button will start calculation immediately.
  55.  
  56. To set the target pixel, use the select-button in the top-left window.
  57.  
  58. You can make a rectangular mask by setting a rectangle with the adjust-
  59. button in the top-left window.
  60.  
  61. You can edit pixels by using menu (setting) and adjust (removing) in the
  62. down-left window.
  63.  
  64. Selecting groups:
  65.     By clicking select on a 4-connected group in the down-left window will
  66.     select this group as the current mask.
  67.     Shift-clicking select on a group that is not masked out, will remove
  68.     that group from the current mask.
  69.     Shift-clicking select on a masked out group, will add that group to the
  70.     current mask.
  71.     N.b. both groups that are in and out the mask are considered to be
  72.     groups.
  73.  
  74. *********************************MASK PROCESSING***************************
  75. binary operations:
  76.     not   :z=not x
  77.     and   :z=x and y
  78.     eor   :z=x eor y
  79.     or    :z=x or y
  80.     andnot:z=x and not y
  81.     =     :z=x
  82.     0     :z=0
  83.     1     :z=1
  84.     where z is the current mask, (yellow frame) and x and y have to be
  85.     selected, and may be equal to z.
  86.  
  87. seed x:
  88.     selects all 4-connected objects in the current mask, that are pointed
  89.     at by the pixels in mask x. There is a maximum of pixels that will be
  90.     used as seed. This operation may fail if there is not enough memory.
  91.     
  92. large x:
  93.     select all 4-connected objects in the current mask, that are thicker
  94.     (in both directions) than x.
  95.     
  96. noise x:
  97.     removes noise (pixels with less than x 8-connected neighbours)
  98.     if x=8 then this is equivalent to erodating the image.
  99.     Setting x to 3 removes all thin lines in the image.
  100.  
  101. dilation x:
  102.     adds pixel if it has at least x 8-connected neighbours.
  103.     nb. dilation(image,x)=not(noise(not image,9-x))
  104.  
  105. *********************************INPUT/OUTPUT******************************
  106. loading:
  107.     Enter a filename or enter return to abort loading.
  108.  
  109. load options:
  110.     pic     load a clear or sprite file as the main picture. All 2, 4, 16
  111.             and 256 color sprites are supported, including 256 grey-level
  112.             sprites. If no palette is given, the desktop colors are used
  113.             instead. If a sprite has a mask, this will be loaded and used
  114.             as the currently selected mask. If there is not enough memory
  115.             for the image, it can happen that the program has to quit.
  116.             Loading 2,4 and 16 color sprites may be slow.
  117.     mask    load a binary clear file as the current mask. The file has to
  118.             have the same size as the main picture.
  119.     back    replaces the masked out part of the main picture by the file
  120.             loaded. The loaded file must have the same size (x & y) as
  121.             the current picture. Currently this option works only if both
  122.             the current and loaded picture are full 24 bit images.
  123.  
  124. saving:
  125.     Enter a filename or enter return to abort saving.
  126.  
  127. save options:
  128.     pic     save whole picture (masked). Masked out parts of the picture
  129.             are replaced by the nearest color in the images palette.
  130.     smpic   make the picture as small as possible and than save it.
  131.     mask    save the current mask as a binary clear file.
  132.  
  133. *********************************IMAGE PROCESSING**************************
  134. Image processing options:
  135.  
  136. Map:
  137.     Loads a color transformation file, and than transforms the colors,
  138.     according to this file. You can make the file yourself, by editing
  139.     !Mask.GenMap
  140.     options: entering return will give you the default file:<Mask$Dir>.Maps.
  141.                                                                       Mymap
  142.              entering 'last' will give you the last used map
  143.              or enter the name of the file.
  144.              
  145. InvM:
  146.     Inverts the color of the part of the image that is in the mask.
  147.  
  148. ⇦⇨:
  149.     Flips image in y-axes.
  150.  
  151. ⇩⇧:
  152.     Flips image in x-axes.
  153.  
  154. 24b:
  155.     Converts paletted images to full 24 bit images. This can be useful as
  156.     some options in this program only work with 24 bit images. This operation
  157.     may destroy some masks, without warning. The masks will be compressed and
  158.     stored in the scrap-directory.
  159.  
  160. Erase:
  161.     Removes the selected part from the image. The removed part of the
  162.     image is filled up with colors, totally depending on the edge of the
  163.     mask. In some cases it is possible to remove something out of the
  164.     image without leaving visible traces. The method used for filling
  165.     up the image is Gauss-Seidel iteration. Currently a slow implementation
  166.     is used for which execution time is about equal to c*P² , with c
  167.     some constant depending on your machine and the shape of the mask and
  168.     P is the number of pixels involved. The calculations take place in the
  169.     smallest rectangle, surrounding the mask. If you get the message:'doing
  170.     800 iterations', the calculation will take about 3 minutes on an arm3.
  171.     So make the mask as small as possible! This works only for 24 bit
  172.     images.
  173.  
  174. Col:
  175.     Changes the color of the pixels in the mask. The resulting image will
  176.     be monochrome. Options:
  177.     C  :the new color will be the some as that of the currently selected
  178.         pixel
  179.     N  :enter values for red, green and blue. The values must a positive
  180.         number (like 0.71 or 4000)
  181.     A  :Abort operation
  182.  
  183. Grey:
  184.     Changes the grey-value of the pixels in the mask by a specified factor.
  185.  
  186. Gamma:
  187.     Performs gamma-correction on the pixels in the mask. Gamma < 1 makes
  188.     the picture darker, gamma >1 makes it lighter. Darker parts are affected
  189.     more than light parts. Rule: dest=source^(1/gamma). It can also be
  190.     used on overexposed images: First