home *** CD-ROM | disk | FTP | other *** search
/ Computerworld 1996 March / Computerworld_1996-03_cd.bin / idg_cd3 / grafika / aplikace / hubble22 / tutorial.txt < prev    next >
Text File  |  1995-05-01  |  20KB  |  355 lines

  1.  
  2.                         TUTORIAL.TXT for HUBBLE 2.20
  3.  
  4. 1. USES OF SOME IMAGE PROCESSING OPERATION.
  5.  
  6.    -  A NOTES ON 24-BITS TRUE COLOR IMAGE
  7.       When displaying a 24-bits true color image, there can be two
  8.       versions to be displayed. By default, If the display adapter
  9.       is not capable of displaying true color, the ditherred version
  10.       (can be turn on and off from "Option Menu") will be displayed.
  11.       However, in some instances, when displaying a ditherred version, 
  12.       some tiny stray image may be visible at some edge, this will not 
  13.       effect the correctness of the image's subsequent operation.
  14.    
  15.    - EQUALIZATION
  16.      This method of image processing can help obtaining image with
  17.      more desirable intensity distribution. The easiest is to use the
  18.      default equalization to obtain better contrast. However, if the result 
  19.      is still not good enough, users can choose "Customized Contrast Control"
  20.      from the "Process Menu". Under this method, users can interactively
  21.      adjust the intensity distribution of the image. If two standard 
  22.      equalization method still cannot give the desired result, A "Customized"
  23.      mothod can be use. If users choose this method, different intensity
  24.      distribution can be specified by just click or drag the mouse on the
  25.      intensity distribution histogram. Resulting effect can be observed
  26.      immediately after users release the mouse button. Users can easily
  27.      and precisely achieve this intensity re-distribution at will without
  28.      having to know the theory behind the operation.
  29.      
  30.    - TONE AND COLOR ADJUSTMENT
  31.      This is similar to EQUALIZATION mention above, except that users
  32.      adjust the intensity level instead of the intensity itself. However,
  33.      this method may not give noticeable result for pure color image.
  34.  
  35.    - COLOR CONVERSION AND DITHERING
  36.      See below.
  37.  
  38.    - FILTERING OPERATION
  39.      In case users don't like the result because it's too bright or too dark,
  40.      a scaling factor can be used. Right shift mean multiply by 2, left shift 
  41.      mean devide by two. Remember, if used multiply or devide as a scaling 
  42.      method, do not use a value of zero.
  43.  
  44.    - BIBLIOGRAPHY
  45.      1. Practical Image Processing in C, Published by Johon Wiley and Son.
  46.         (sorry about Author's name, I forgot, Will be included next time)
  47.      2. Supercharged Bitmapped Graphics, By Steve Rimmer. 
  48.         Windcrest/McGraw-Hill.
  49.      3. Programmer's Guide to PC & PS/2 VIDEO SYSTEM, By Richard Wilton.
  50.         Microsoft Press.
  51.      4. Image Processing in C, by Dwayne Phillips, Prentice Hall.
  52.         (Long running articles in C user's Journal, beginning on '90)
  53.  
  54. 2. USE OF DESKTOP PUBLISHING FEATURES IN DOCUMENT BASED PROCESSING
  55.  
  56.    A. A Tour Through Sample HUBBLE Document File
  57.  
  58.       A.1 Switch to [Document Based Processing] from [Option Menu] (Alt-O, D)
  59.       A.2 Load HUBBLE document file *HUBBLE.PUB* Using [File Menu] (Alt-F, O)
  60.       A.3 After the HUBBLE document is loaded, Users can edit paragraph text 
  61.           of the document using cursor keys, <enter> keys, <Del> key, etc.,
  62.           or add text to a paragraph text.
  63.       A.4 To manipulate other graphic element, choose one of the menu commands
  64.           or click on a toolbox icon.
  65.       A.5 To Manipulate (Move/Resize/Delete) bitmap image, choose (Alt-E, M) 
  66.           from the [Edit Menu]. Move mouse cursor on or around the bitmap
  67.           image, a hand cursor means users can move the image, a cross-arrow
  68.           means users can resize the image. Drag mouse (move mouse while left
  69.           button is down) to move or resize. Use <Del> key to delete the image.
  70.       A.6 Press [Esc] key to return to normal default operation. (Text input)
  71.       A.7 Click on [Drawing Tools] icon (The one with line, square, and circle)
  72.           To move, resize, add, or delete drawings.
  73.           E.g. Click on <SIZE> button to resize or move the current drawing.
  74.           Press <Enter> key to signal the operation (move/resize) is completed.
  75.           Click on <Cancel> to return to normal default operation.
  76.       A.8 Users can also reposition relative top-bottom placement of graphic 
  77.           elements or drawings from [Edit Menu] (Alt-E, n) (Edit, Reposition).
  78.           Use <TAB> key to select current drawing, up-arrow to reposition the 
  79.           drawing to the top, use down-arrow to reposition drawing bottom of
  80.           the drawing stack. Press [Esc] key to return to normal default 
  81.           operation. (Text input)
  82.  
  83.    B. Document Resolution and Printing
  84.  
  85.       B.1 Users can customize page layout and paragraph format from
  86.           [Option Menu] (Alt-O, P). A Page and Paragraph Format Dialog
  87.           is invoked. One item in the dialog box is the setting of 
  88.           document resolution. This setting only affect the printing
  89.           quality of the document.
  90.       B.2 The best result is when the resolution setting is the same 
  91.           as the printer's resolution. However, if the printer 
  92.           resolution is too high, HUBBLE may not be able to handle
  93.           (It consume too much memory). In this case, choose a lower
  94.           resolution. In general, choose a resolution between 100 
  95.           to 200 pixels/inch.
  96.       B.3 Choose [Print Preview] for several resolution settings to
  97.           determine best resolution setting.
  98. 2. USE OF DESKTOP PUBLISHING FEATURES IN DOCUMENT BASED PROCESSING (Cont'd)
  99.  
  100.    C. Available Fonts Style and Size
  101.  
  102.       C.1 Most elements of HUBBLE document, drawings, image, etc. can be 
  103.           move or resized. However, "Fonts Size and Style" for paragraph
  104.           text input is limited to those installed on the Windows.
  105.       C.2 There is a way to customize paragraph text "Fonts SIZE" when
  106.           printing. The trick is to use [Page and Paragraph Format] from
  107.           [Edit Menu] to define document page size. However, when printing, 
  108.           users can reduce or enlarge the printing page.
  109.       C.3 For example, users define a document page of 4" by 5". However,
  110.           when printing, users can chose the printing page size (from
  111.           [print Dialog]) to be 8" by 10". In effect, users are printing
  112.           the document page which a "Fonts SIZE" twice the size of those
  113.           available from the fonts installed on the system.
  114.  
  115. 3. USE OF TOOLBOX:(GENERAL) AND OTHER IMAGE OR DOCUMENT EDITING COMMANDS
  116.  
  117.    A. %%%%%%%%%%%%%%% IMPORTANT SPECIAL NOTICES %%%%%%%%%%%%%%%%%%%
  118.  
  119.       A.1 *** BRUSH SELECTION and LINE SELECTION *** from [Option Menu]
  120.           LINE SELECTION affect the attributes of drawing tools.
  121.                         (Tools with icon of a line, a circle, a square)
  122.           BRUSH SELECTION affect the attributes of pencil tool. 
  123.                         (freehand drawing, Tools with icon a pencil)
  124.       A.2 Generally, users signal the end of an operation by
  125.           pressing the <Enter> key.
  126.       A.3 Usually, there may be several image editing elelments (drawings,
  127.           bitmap image, etc.) available at the same time. Depend on specific
  128.           tools or commands used, users may be able to know which editing
  129.           element is the current (active) one by making one of the following
  130.           observation:
  131.           A.3.1 By moving the mouse cursor, a hand-shaped cursor will appear
  132.                 above the active editing element.
  133.           A.3.2 Color of the editing element is inverted. This situation is
  134.                 is typical for MOVE/RESIZE operation.
  135.           A.3.3 By changing the editing element's attribute, e.g. by toggling
  136.                 between OPAQUE and TRANSPARENT mode.
  137. 3. USE OF TOOLBOX:(GENERAL) AND OTHER IMAGE OR DOCUMENT EDITING COMMANDS (Cont'd)
  138.  
  139.    B. GENERAL CONCEPT
  140.       B.1 Users access to toolbox by clicking on the appropriate
  141.           <TOOLBOX> icon. A set of <PUSH BUTTON> will appear on the 
  142.           status line from which users can choose to perform or fine 
  143.           tune the operations. After users perform a task, such as 
  144.           enter text lines or make drawings, the program still allow users 
  145.           to make further adjustment. Commonly available feature are 
  146.           <SIZE> (resize and move), <FG> changing the foreground color, 
  147.           <BG> changing the background color, etc.     
  148.           Modifications made to the image are grouped in **logical units**
  149.           of operation, such as a drawing, a line of text, or a group 
  150.           of pixels. Hence <SIZE>, <FG>, <BG>, etc. are applied to the
  151.           whole unit of operation. Users can have many unit of operation
  152.           (e.g. many geometric drawings) at the same time, and can change
  153.           focus to different unit by using <TAB> key of push <TAB>button
  154.           on the status line.
  155.       NOTES:
  156.           All change made by toolbox are still not committed to 
  157.           the image (changes have to be committed to the image to become
  158.           part of the image) until users click on the <WRT> (write) or 
  159.           <OK> push button.
  160.           Please refer to online help for detail.
  161.           -- users can click on <cancel> push button to end the operation. --
  162.  
  163.    C. Notes on TOOLBOX:(RECTANGLE) and TOOLBOX:(Image Patching)
  164.       C.1 Similarity and Difference
  165.           TOOLBOX:(RECTANGLE) allow users to define a rectangular
  166.           area on the image and then users can either <COPY>,
  167.           <CUT>, <SCALE>, or <Stitch or Image Patching>
  168.           (push <OK> button).
  169.           TOOLBOX:(Image Patching) only allow users to do
  170.           <Stitch or Image Patching> but allow users to select 
  171.           different shapes for the selected area.
  172.       C.2 Current Limitation
  173.           Some limitation for TOOLBOX:(Image Patching) may restrict
  174.           its use. Please read the file Newinfo.txt.
  175.       C.3 <COPY-RECTANGLE> function is also available through [Edit-Menu].
  176.  
  177.    D. Notes on TOOLBOX:(RECTANGLE) and [Edit Menu]-[Trim Image]
  178.       Trim image is an alternate implementation of <COPY-RECTANGLE> in
  179.       TOOLBOX:(RECTANGLE). However, its using keyboard to defined the 
  180.       selected rectangle.
  181.  
  182.    E. Current Limitation
  183.       Please read the file Newinfo.txt.
  184.  
  185. 4. USE OF TOOLBOX:(Image Patching) 
  186.    4.1 A Typical scenarios and steps of using TOOLBOX:(Image Patching)
  187.        a.) Support we want to change text on HUBBLE.BMP from "version 1.08"
  188.            to "version 2.20"
  189.        b.) Open HUBBLE.BMP, adjust display window to portion the image,
  190.            e.g. maximize the window.
  191.        c.) Click on TOOLBOX:(Image Patching) icon.
  192.        d.) Click on <RECT> on the status line.
  193.        e.) Draw a rectangle on the right of "version 1.08" to select an area.
  194.        f.) Click on <SIZE> on the status line to adjust the selected rectangle.
  195.        g.) Click on <Put> on the status line to move the selected area to
  196.            the left until it cover text "1.08" as follow:
  197.            g.1) Move mouse cursor over the selected area. (mouse cursor will
  198.                 change to hand shape cursor.
  199.            g.2) Drag mouse to the left (move mouse while left button is down)
  200.                 until the selected area cover text "1.08".
  201.            g.3) Click on <WRT> on the status line.
  202.                 Now, text "1.08" will be replaced with background image.
  203.        h.) Click on <Cancel> on the status line to exit TOOLBOX:(Image Patching).
  204.        i.) Click on TOOLBOX:TEXT icon.
  205.        j.) Enter "2.20" at the location which previously display text "1.08".
  206.        k.) Click on <TRAN> on the status line to show image background.
  207.        l.) Click on <SIZE> on the status line to adjust the location and size
  208.            of the text entered.
  209.        m.) Push [RETURN] after finish adjust text entered in l.)
  210.        n.) Click on <WRT> on the status line.
  211.        o.) Click on <Cancel> on the status line to exit TOOLBOX:TEXT.
  212.            
  213.    4.2 
  214.  
  215. 5. USE OF TOOLBOX:(PENCIL) and TOOLBOX:(DRAWING)
  216.    A. Basic Differences (Brush Style and Line Style)
  217.       TOOLBOX:(PENCIL) is a pixel editing tools, while
  218.       TOOLBOX:(DRAWING) is a line drawing tools. Hence,
  219.       shape and size of pixel using TOOLBOX:(PENCIL) are
  220.       controlled by brush style (from Option menu), and
  221.       shape and size of drawing using TOOLBOX:(DRAWING) 
  222.       are controlled by line style (also from Option menu).
  223.    B. Logical Unit of Operation.
  224.       A geometric drawing is considered a unit of operation.
  225.       For freehand drawing (either from TOOLBOX:(PENCIL) or
  226.       TOOLBOX:(DRAWING)), all drawing entered from initial
  227.       drawing until users push the [RETURN] key are considered
  228.       a logical unit. 
  229.       Users can modify a drawing unit by clicking on the <SIZE> 
  230.       button, then drag mouse on the image to move or resize the
  231.       drawings. For freehand drawing, users can modify the pixel
  232.       boundary after a group is formed by pushing the [SPACE BAR], 
  233.       and push [RETURN] to complete the operation.
  234. 6. CUSTOM COLOR CONVERSION AND DITHERING
  235.    6.0 Users can convert an image without using -Dithering- technique.
  236.        If dithering is disabled, operation speed will be much faster.
  237.    6.1 Display Update
  238.        To get updated display on source or target image on "Custom Conversion"
  239.        dialog box, click on the respective image display areas.
  240.    6.2 A Typical steps of using Custom Color Conversion
  241.        a.) Open an image file from File Menu.
  242.        b.) Select Custom Color Conversion and Dithering from Transform Menu.
  243.        c.) Select dithering technique such as "Error Diffusion" from the
  244.            "Dithering Method" listbox. (Other dithering techniques may have 
  245.            more restriction on palette which can be selected).
  246.        d.) Select "Color" from Target Quality and choose number of color
  247.            such as 256 or 16 colors.
  248.        e.) Click on "Build Palette >>" to make palette selection.
  249.        f.) Click on "Disable Dithering" check box to match the target image
  250.            with source image without using dithering technique. (This step is 
  251.            advised to be done last and is recommended if the target image is 
  252.            to be used for further editing such as area fill operation)
  253.        g.) Click on "TEST" or "OK" button.
  254. ***6.3 Scenarios where Custom Color Conversion and Dithering can be used
  255.        a.) When users want to merge two images or stitch one image over another
  256.            but can not be done because the two image are not compatible either
  257.            because they have different number of color or using different set
  258.            of color palette. e.g. imageA has 256-colors and 
  259.            imageB is a true-color image.
  260.            imageA = IBM$4A.BMP, imageB=IBM$4B.BMP
  261.            a1.) open imageA
  262.            a2.) Paste the image (imageA) to clipboard. 
  263.                 (to make palette of imageA available through clipboard)
  264.            a3.) Open imageB.
  265.            a4.) Select Custom Color Conversion and Dithering from 
  266.                 Transform Menu.
  267.            a5.) Select dithering technique such as "Error Diffusion" from the
  268.                 "Dithering Method" listbox. (Other dithering techniques may 
  269.                 have more restriction on palette which can be selected).
  270.            a6.) Select "Color" from Target Quality and choose 256-color.
  271.            a7.) Click on "Build Palette >>" to make palette selection.
  272.            a8.) Select "Clipboard Palette" the click on "OK".
  273.            a9.) Click on "Disable Dithering" check box to match the target 
  274.                 image with source image without using dithering technique. 
  275.                 (This step is advised to be done last and is recommended if 
  276.                 the target image is to be used for further editing such as 
  277.                 area fill operation)
  278.            a10.) Click on "OK" button.
  279.            ==> the resulting image can be used to merge or stitch with imageA.
  280.    6.4 NOTES
  281.        a.) Sometime it's better disabled dithering Technique for some kind
  282.            of subsequent processing.
  283.        b.) At the build palette menu, there is a checkbox to limit
  284.            palette selection.
  285.        c.) If after the palette is built, <OK> button may still be disabled,
  286.            this is because the selected dithering method is not compatible
  287.            with current selected palette. Choose other dithering method from
  288.            the listbox or change to other set of palette. (users may also
  289.            have to uncheck the "Disable Dithering" checkbox to enable the
  290.            dithering method listbox)
  291.         (** A somewhat intertwined selections to make everything compatible **)
  292. 7. GRAYSCALE/COLOR CONVERSION, -VS- CUSTOM COLOR CONVERSION AND DITHERING
  293.    7.1 GRAYSCALE CONVERSION
  294.        Are used to change image to color format with higher number of 
  295.        grayscale levels and/or convert color image to grayscale image
  296.        by averaging intensity of all color components using a pre-specified
  297.        formular.
  298.    7.2 GRAYSCALE/COLOR CONVERSION
  299.        Are used to change image to color format with higher number of colors.
  300.    7.3 CUSTOM COLOR CONVERSION AND DITHERING
  301.        Are used to convert the color format of an image to a different/new
  302.        set of color palette with the same or reduced number of colors. Without
  303.        dithering, the conversion is carried out using nearest color matching
  304.        method. With dithering, a wide range of methods are available (depending
  305.        on users preferences and suitability to specific needs) to approximate
  306.        the original image and give users the illusion that the image has
  307.        more colors than those available from the color palette used.
  308.  
  309. 8. HOW MAKE IMAGE COMPATIBLE
  310.    8.1 If the image is from clipboard, paste the image from clipboard.
  311.    8.2 suppose IMAGEa is the image with desired palette, and we want to
  312.        convert IMAGEb to be compatible (for merging and stitching)
  313.        with IMAGEa.
  314.    8.3 Copy IMAGEa to clipboard to make the palette available.
  315.    8.4 Use GRAYSCALE/COLOR CONVERSION (usually COLOR CONVERSION) to convert
  316.        IMAGEb to have the same (or even higher) number of colors than IMAGEa.
  317.    8.5 Use CUSTOM COLOR CONVERSION AND DITHERING and using the palette from 
  318.        clipboard (copied from step 6.3).
  319.    8.6 Disable dithering.
  320.    8.7 Complete the CUSTOM COLOR CONVERSION AND DITHERING process.
  321.    8.8 Also see --> 
  322.        (4). GRAYSCALE/COLOR CONVERSION, -VS- CUSTOM COLOR CONVERSION AND DITHERING
  323.        (5). CUSTOM COLOR CONVERSION AND DITHERING
  324.    
  325. 9. Stitch Image From Clipboard
  326.    If the clipboard image is not compatible to the base image (current
  327.    image which users want to have clipboard image stitch on).
  328.    9.1 Convert clipboard image to become compatible
  329.        Users should "Paste Image (Edit menu)" to a window first, then "Copy
  330.        base image to clipboard" (To make base image's palette available).
  331.        Next, users should use "CUSTOM CONVERSION and DITHERING" to convert
  332.        make the newly pasted image by using palette from clipboard as
  333.        its new palette. The method is explained in TUTORIAL.TXT, HUBBLE.DOC, 
  334.        and HUBBLE online help.
  335.    9.2 Convert base image to become compatible with clipboard image 
  336.        Users should "Paste Image (Edit menu)" to a window first, then 
  337.        use "CUSTOM CONVERSION and DITHERING" to convert base image to 
  338.        have palette compatible with the clipboard image. Users then
  339.        use this newly converted image as the base image to 
  340.        "Stitch Image From Clipboard". See TUTORIAL.TXT, HUBBLE.DOC, 
  341.        and HUBBLE online help on "CUSTOM CONVERSION and DITHERING" .
  342.  
  343. 10. HOW TO USE THE PROGRAM
  344.       A. Help will always be available by pressing the F1 key.  *********
  345.       B. If your scanner manufacturer do not supply TWAIN compatible driver,
  346.           you can use your scanner software to acquire image, save it in
  347.           BMP, PCX, or TIFF formats. Then use HUBBLE for further processing.
  348.       C. Use <DEL> key to delete current item of drawing, area fill, 
  349.           modification, etc. in TOOLBOX.
  350.      ENERAL NOTES
  351.          By default, A <Reduced Image> window will be displayed, and may be used
  352.          as a place for performing various house-keeping chores and for setting
  353.          up global variables, etc.
  354.  
  355.