home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / UT / UT115.ZIP / MANUAL.DOC < prev    next >
Text File  |  1990-04-29  |  22KB  |  500 lines

  1.  
  2.       PROFESSIONAL OPTICAL CHARACTER RECOGNITION   -   PRO-CR<tm>
  3.       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.  
  5.       Copyright 1989, 1990, David P. Gray, Gray Design Associates
  6.                  All Rights Reserved
  7.  
  8.         Member, Association of Shareware Professionals
  9.  
  10.  
  11.  
  12.  
  13. -------------------------------[ C O N T E N T S ]------------------------------
  14.  
  15.  
  16.         1.      Specification
  17.         2.      System Requirements
  18.         3.      Files Distributed
  19.         4.      Revision History
  20.         5.      Future Versions
  21.  
  22.         6.      USER GUIDE
  23.             6.1     Start-Up Procedure
  24.             6.2     Using the Menus
  25.             6.3     Top Level Menu
  26.             6.4     Options Menu
  27.             6.5     Getting a Good Scan
  28.             6.6     The Sample Image
  29.             6.7     Error Messages
  30.  
  31.         7.      Virus Protection
  32.         8.      Site Licenses
  33.         9.      Comments to the Author
  34.         10.     Association of Shareware Professionals
  35.         11.     Miscellaneous
  36.  
  37.  
  38.  
  39.  
  40. -----------------------------[ 1.  SPECIFICATION ]------------------------------
  41.  
  42.  
  43.     *  Reads 8 to 30 point mono and proportional fonts
  44.     *  No font selection required
  45.     *  Up to 260 words per minute
  46.     *  Supports HP ScanJet directly
  47.     *  Supports other scanners producing TIFF or PCX files
  48.     *  Selectable resolution, including 200 (fax) and 300 dpi
  49.     *  Preview and online-correction modes with graphics adapter
  50.     *  Real-time viewing of text during processing
  51.     *  Continuous scanning if auto document feeder attached
  52.     *  Mis-recognitions flagged with selectable character
  53.     *  Menu driven or non-interactive mode from DOS command line
  54.     *  Callable from within other programs (Requires License)
  55.     *  Virus protection
  56.  
  57.  
  58.  
  59.  
  60. --------------------------[ 2.  SYSTEM REQUIREMENTS ]---------------------------
  61.  
  62. PRO-CR<tm> performs Optical Character Recognition on an IBM PC or compatible.
  63. The program will run on an XT or AT, however an AT is strongly recommended due
  64. to the highly cpu-intensive nature of the program.
  65.  
  66. A graphics adapter is not required for basic character recognition, but is
  67. needed for the preview and online-correction functions.  If a graphics adapter
  68. is used, it should be CGA, HERCULES, EGA or VGA.  (Note for Hercules users:
  69. a Microsoft Hercules driver is included.  Run MSHERC.COM once before running
  70. PRO-CR<tm>).
  71.  
  72. The minimum memory requirement is about 100Kb (512Kb is recommended), although
  73. the program adapts itself to use as much conventional memory as available.
  74. A temporary disk-file is used for virtual memory for images too large to fit
  75. into memory in one go.
  76.  
  77.  
  78.  
  79.  
  80. ---------------------------[ 3.  FILES DISTRIBUTED ]----------------------------
  81.  
  82.     OCR.EXE                 :       The PRO-CR<tm> program
  83.     README.DOC              :       Important information
  84.     HELP1.DOC               :       Text file used for online help
  85.     HELP2.DOC               :       Text file used for online help
  86.     MANUAL.DOC              :       This file
  87.     SAMPLE.TIF              :       Example TIFF file for processing
  88.     MSHERC.COM              :       Hercules driver
  89.  
  90.  
  91.  
  92.  
  93. ----------------------------[ 4.  REVISION HISTORY ]----------------------------
  94.  
  95.     1.0     05/16/89        :       Baseline version.
  96.     1.01    05/18/89        :       Fixed character editing in font edit
  97.                     function, caused by bug in compiler's
  98.                     loop optimizer.
  99.     1.02    05/31/89        :       Don't reject TIFFs with no bits_per_
  100.                     sample tag.  Assume a value of 1.
  101.     1.03    06/19/89        :       Don't reject TIFFs with no resolution
  102.                     tags.
  103.     1.04    08/28/89        :       Fixed bug in learn-mode.
  104.     1.05    11/29/89        :       Fixed bug in Auto sheet feeder control.
  105.  
  106.     2.00    04/30/90        :       Removed font-dependence.  Rewrote
  107.                     recognition algorithms.  Removed learn
  108.                     and edit functions.  Added preview and
  109.                     online correction functions.  Added
  110.                     support for 200 dpi, compressed TIFFs
  111.                     and PCX files.  Added "unknown" char
  112.                     feature.  Installed virus protection.
  113.                     Added DOS command line interface.
  114.  
  115.  
  116.  
  117.  
  118. -----------------------------[ 5. FUTURE VERSIONS ]-----------------------------
  119.  
  120. Direct support of the Logitech SCANMAN is expected in the not too distant
  121. future.
  122.  
  123.  
  124.  
  125.  
  126. --------------------------[ 6.  U S E R    G U I D E ]--------------------------
  127.  
  128.  
  129.  
  130.  
  131. --------------------------[ 6.1  START-UP PROCEDURE ]---------------------------
  132.  
  133. 1.  For the interactive Menu driven interface:
  134.         From the DOS prompt, type:  ocr
  135.         (but see also the options below)
  136.  
  137. 2.  For the non-interactive DOS command line interface:
  138.         From the DOS prompt, type any of the following options:
  139.         ocr -exec -in=IN -out=OUT -unk=X -dpi=NNN -mode=M
  140.  
  141.     Note that all the above options (apart from -exec and -mode) are available
  142.     when starting up in method 1. above.  The -exec option is the one that
  143.     determines whether PRO-CR<tm> starts up in the menu or non-interactive mode.
  144.     None of the options are mandatory.
  145.  
  146.  
  147. IN.................is the name of the image source to be processed.  This may
  148. be a file name, e.g. image.tif or fred.pcx which is the file name produced by
  149. your scanner software.  Note that both compressed and uncompressed TIFF files
  150. are supported.  The TIFF compression methods supported are types 2 and 3 (CCITT
  151. group 3 FAX) and 32773 (Macintosh PACKBITS).  Alternatively, enter the word
  152. SCANNER to process directly from your scanner.  For HP ScanJet owners with the
  153. automatic document feeder, enter AUTO to process directly using the feeder.
  154. The scan will continue until the auto sheet feeder runs out of material to scan.
  155.  
  156. OUT................is the name of the file to write the processed ascii text to.
  157. If this file does not exist, it will be created.  If this file does exist, text
  158. will be appended to it so that you may scan several times to the same file.
  159.  
  160. X..................is the character to use if a mis-recognition occurs.  A
  161. suitable character would be a "*" or a "~".  Not all mis-recognitions can be
  162. flagged in this way, there will always be a certain number where PRO-CR<tm>
  163. believes it has correctly identified the character.
  164.  
  165. NNN................is the resolution to use when scanning directly from your
  166. scanner or when processing from a PCX image file.  (The PCX format does not
  167. provide useable resolution information).  The resolution is entered in units
  168. of dots per inch.  The range is 100 to 400, but see section 6.4 for help on
  169. choosing the correct dpi.
  170.  
  171. M..................is the graphics mode number to specify.  PRO-CR<tm> inspects
  172. your graphics adapter and selects a suitable graphics mode to operate the
  173. preview and online correction modes.  In general it chooses the mode with the
  174. highest number of colors that has at least 640 pixels horizontally.  You may
  175. force it to choose another mode by using the -mode option.  The IBM graphics
  176. modes are:
  177.  
  178.       _TEXTBW40       0   /* 40-column text, 16 grey */
  179.       _TEXTC40        1   /* 40-column text, 16/8 color */
  180.       _TEXTBW80       2   /* 80-column text, 16 grey */
  181.       _TEXTC80        3   /* 80-column text, 16/8 color */
  182.       _MRES4COLOR     4   /* 320 x 200, 4 color */
  183.       _MRESNOCOLOR    5   /* 320 x 200, 4 grey */
  184.       _HRESBW         6   /* 640 x 200, BW */
  185.       _TEXTMONO       7   /* 80-column text, BW */
  186.       _HERCMONO       8   /* 720 x 348, BW for HGC */
  187.       _MRES16COLOR    13  /* 320 x 200, 16 color */
  188.       _HRES16COLOR    14  /* 640 x 200, 16 color */
  189.       _ERESNOCOLOR    15  /* 640 x 350, BW */
  190.       _ERESCOLOR      16  /* 640 x 350, 4 or 16 color */
  191.       _VRES2COLOR     17  /* 640 x 480, BW */
  192.       _VRES16COLOR    18  /* 640 x 480, 16 color */
  193.       _MRES256COLOR   19  /* 320 x 200, 256 color */
  194.       _ORESCOLOR      64  /* 640 x 400, 1 of 16 colors (Olivetti) */
  195.  
  196.       Note that only modes with 80 column text or at least 640 pixels horizont-
  197.       ally produce a readable display.
  198.  
  199.       Hercules users (mode 8) may need to run the supplied driver MSHERC.COM
  200.       once before running PRO-CR<tm>.
  201.  
  202.       Notice: PRO-CR<tm> may NOT be incorporated into any other program (i.e.
  203.       called from within any other program or batch file) and redistributed
  204.       without the express written permission from the author.
  205.  
  206.  
  207.  
  208.  
  209. ---------------------------[ 6.2  USING THE MENUS ]----------------------------
  210.  
  211. The following paragraphs show how to navigate PRO-CR's menus and read the
  212. status line at the bottom of the display.
  213.  
  214.  
  215. THE MENU BARS......Use the arrow keys to select the required option from the
  216. menu bar and hit return when the option is highlighted.  Alternatively, hit the
  217. highlighted key in the required option to directly select that option.
  218.  
  219.  
  220. THE STATUS LINE....The line of text on the last line of the screen shows you
  221. what parameters you have selected in the options menu and also gives an
  222. indication of the percentage completion of the current scan.  It looks like
  223. this:
  224.  
  225.       0%   <ESC=abort>   input_file->output_file   dpi=200   <PC*>   SCANJET
  226.  
  227.       <ESC=abort> indicates that you may hit the Escape key during processing
  228.       to abort the recognition phase.
  229.  
  230.       The next two fields "input_file->output_file" indicate both the source of
  231.       the image to be processed (either from an image file or "SCANNER" if from
  232.       a direct scan) and the output text file to receive the processed ascii
  233.       text.
  234.  
  235.       Next is the resolution in dots per inch.  This must be set if scanning
  236.       directly or reading from a PCX file.
  237.  
  238.       Next is a block of 3 parameters inside angle brackets <PC*>.  The "P", if
  239.       present, indicates that the image "preview" function is active.  The "C",
  240.       if present, indicates that the online correction function is active.  The
  241.       final character is the "unknown character", i.e. the character to output
  242.       if a mis-recognition occurs.  See the help text for the options menu for
  243.       details of these functions.
  244.  
  245.       Finally, the last field indicates the selected scanner type.
  246.  
  247.  
  248.  
  249.  
  250. ----------------------------[ 6.3  TOP LEVEL MENU ]-----------------------------
  251.  
  252. Top level menu options:
  253.  
  254. Select "Start" to start the recognition process.
  255.  
  256. Select "Auto" to start recognition using the auto sheet feeder.
  257. (Note: this option only appears if you are scanning directly and you have the
  258. HP ScanJet auto sheet feeder attached)
  259.  
  260. Select "Options" to setup parameters for the recognition process.
  261. Options that you need to set up are:
  262.       - the source of the image to be processed, either a file or the scanner
  263.       - the resolution of the image in dots per inch (dpi)
  264.  
  265. Note that the dpi may be automatically available if you are processing a TIFF
  266. file since the majority of TIFF software includes this.  (A warning is given
  267. for TIFF files that do not provide this).  Otherwise, if you are scanning
  268. directly or reading a PCX file, then you need to set the dpi correctly.
  269. PRO-CR<tm> has been optimized for the range 200 to 300 dots per inch.
  270.  
  271.  
  272.  
  273.  
  274. -----------------------------[ 6.4  OPTIONS MENU ]------------------------------
  275.  
  276. Select from the following options:
  277.  
  278.  
  279. INPUT..............Enter the source of the image to be processed.  This may
  280. be either directly from your scanner (if it is one of the supported types)
  281. or an intermediate image file produced by your scanner software.  To select
  282. direct scanning, enter the word "SCANNER" here.  To select a file, enter the
  283. name of the image file produced by your scanner software.  Currently
  284. supported types are TIFF (both compressed and uncompressed) and PCX
  285. (PC Paintbrush) files.  Be sure to include the extension in the file name
  286. (i.e. .TIF or .PCX) so that PRO-CR<tm> can determine the file type.  For the
  287. case of PCX files, it is necessary for you to set the resolution that the
  288. image was scanned at (since the majority of PCX producing software does not
  289. include this in the file).  Use the "dpi" option to set this.
  290.  
  291.  
  292. OUTPUT.............Enter the name of the file you wish PRO-CR<tm> to write the
  293. ascii text into.  Note that PRO-CR<tm> will create the specified file if it does
  294. not already exist, and will append text to the specified file if it does exist.
  295.  
  296.  
  297. DPI................Enter the resolution in dots per inch.  There are 2 cases
  298. when this is important.  (1) When you are scanning directly.  This tells the
  299. scanner what resolution to scan at.  (2) When you are processing an image file
  300. and the file does not contain the image resolution.  This is always true of
  301. PCX files and is sometimes true of naughty TIFF files.  (It is rare for TIFF
  302. software to omit the resolution and you may assume it is present unless
  303. PRO-CR<tm> warns you otherwise.  Never assume a PCX file contains the image
  304. resolution though !).
  305.  
  306.       Knowing how to set the right dpi for DIRECT SCANNING:
  307.       PRO-CR<tm> has been written to run best at 200 to 300 dpi.  200 dpi
  308.       covers the fax standard and most hand scanners.  (Some popular hand
  309.       scanners claim 300 and 400 dpi modes, however many simply duplicate
  310.       pixels to match printer resolutions and therefore add no more information
  311.       to the scan for OCR purposes). For reasonably sized text 200 dpi should
  312.       be adequate, but if the text is tightly spaced (runs together) then 300
  313.       dpi should help.  PRO-CR<tm> allows a range of 100 to 400 dpi for
  314.       experimentation purposes.  In general, try 200 dpi first and then 300.
  315.  
  316.  
  317. UNKNOWN CHAR.......Enter the character you wish to be embedded in the output
  318. text to flag characters that could not be recognized.  This is useful if you
  319. use an editor after the recognition phase to correct mis-recognitions.  It
  320. allows you to search for this character to speed up the correction phase.
  321. Use of a spelling checker should also prove helpful.
  322.  
  323.  
  324. PREVIEW............This function is active if a check mark appears next to it
  325. in the menu.  The function is toggled on and off by repeatedly selecting it.
  326. When active, as much of the image as can fit on the screen is displayed prior
  327. to being processed.  This is useful to examine the quality of the scan, for
  328. skewed paper, lack of contrast, suitable resolution etc.  This function is
  329. only available for users with a suitable graphics adapter.
  330.  
  331.  
  332. CORRECT...........This function is active if a check mark appears next to it
  333. in the menu.  The function is toggled on and off by repeatedly selecting it.
  334. When active, you will be allowed to correct mis-recognitions online during the
  335. OCR processing phase.  You will be prompted for the correct character(s) when
  336. a mis-recognition occurs.  At the lower right hand side of the screen an image
  337. of the mis-recognized character(s) will appear for you to correct.  If you are
  338. unable to recognize the text, hit return and the text will be replaced by the
  339. "unknown" character mentioned above.  You may also hit Escape to abort the
  340. processing.  This function is only available to users with a suitable graphics
  341. adapter.
  342.  
  343. SCANNER TYPE......Select your scanner type from the list.  At the time of
  344. writing, only the HP ScanJet is directly supported, however I have had a large
  345. number of requests for the Logitech SCANMAN and plan to support this.
  346.  
  347.  
  348.  
  349.  
  350. --------------------------[ 6.5  GETTING A GOOD SCAN ]--------------------------
  351.  
  352. To get the best scan, several factors must be taken into account.
  353.  
  354. 1.  Make sure the text is scanned in a straight line.  This is especially
  355.     crucial for users of hand scanners.  The lines of text should appear as
  356.     horizontal and level as possible when previewed.  If lines are skewed, or
  357.     rotated, not only is the recognition accuracy impaired but it may cause
  358.     PRO-CR<tm> to mistakenly run lines together.  This is not so much a problem
  359.     for flat bed scanners since they have guides for inserting the paper.  Even
  360.     so, some printers may print sloping lines which are not perpendicular to
  361.     the sides of the paper.  Hand scanners have the additional problem of
  362.     matching up "strips" when scanning in several passes.  I would suggest that
  363.     1 strip at a time be processed in this case.
  364.  
  365. 2.  Make sure the scanner's contrast is set to a suitable value.  This is not a
  366.     problem for the HP ScanJet which has an auto-contrast feature.  With other
  367.     scanners, preview the image and look for broken or faded characters or
  368.     extraneous "noise" as a result of poor contrast.  Best results are obtained
  369.     when the background is clear and the characters appear sharp.
  370.  
  371. 3.  Select a suitable dpi.  Use preview to inspect the image.  If possible,
  372.     select a dpi which causes the characters to appear separate.  If too many
  373.     characters run together, the recognition accuracy will be impaired.  If you
  374.     cannot separate the characters using a higher dpi (inspection of the
  375.     original copy will show that the characters are indeed joined together)
  376.     then select the online-correction mode and you will be prompted to enter
  377.     the unrecognized portion of each scanned line during the recognition phase.
  378.     If you do not select the online correction mode then PRO-CR<tm> will
  379.     attempt to separate characters that are joined together up to a maximum of 3.
  380.     For mono-spaced fonts this strategy works pretty well, but for proportional
  381.     fonts results are less desirable.  Note that for some near letter quality
  382.     dot matrix fonts, lowering the dpi will actually improve results.  The
  383.     reason is that the dots making up the characters will appear to join up and
  384.     become united.  PRO-CR<tm> cannot read draft dot matrix fonts since the
  385.     dots making up the characters are disjointed.  For the same reason,
  386.     PRO-CR<tm> will not read characters that appear broken.  Broken characters
  387.     lose their essential features which PRO-CR<tm> relies upon for recognition.
  388.  
  389.  
  390.  
  391.  
  392. ---------------------------[ 6.6  THE SAMPLE IMAGE ]----------------------------
  393.  
  394. A sample image is supplied with which you can experiment with PRO-CR's features.
  395. The image is in the file SAMPLE.TIF and is in compressed TIFF format.  Make sure
  396. the status line shows sample.tif as the image source.  Select the online
  397. correction feature and process the image.  Notice that the "mm" in the word
  398. "common" and "qu" from the word "quality" are presented for correction.  This is
  399. because these characters are joined together and cause a mis-recognition.  After
  400. the scan, deselect the online correction feature and reprocess the image.
  401. Notice that PRO-CR<tm> successfully separates the "mm" by itself but fails with
  402. the "qu", only recognizing the "q" correctly.
  403.  
  404.  
  405.  
  406.  
  407. -----------------------------[ 6.7  ERROR MESSAGES ]----------------------------
  408.  
  409. The following error codes may be seen, to do with TIFF files.
  410.  
  411.     1    :   Could not find the input file.
  412.     2    :   Non-Intel byte order.  The TIFF file is possibly a Mac file.
  413.     3    :   Wrong value for bits_per_sample tag.
  414.     4    :   Unsupported Compressed TIFF file.
  415.     5    :   Wrong value for photometric_interpretation tag.
  416.     6    :   Wrong value for fill_order tag.
  417.     7    :   Wrong picture orientation.
  418.     8    :   Wrong value for samples_per_pixel tag.
  419.     9    :   Wrong value for minimum_sample tag.
  420.     10   :   Wrong value for maximum_sample tag.
  421.     11   :   Wrong value for planar_configuration tag.
  422.     12   :   Missing bits_per_sample tag.
  423.     13   :   Missing image_width tag.
  424.     14   :   Missing image_length tag.
  425.     15   :   Missing image_pointer tag.
  426.     16   :   Missing X_resolution tag.
  427.     17   :   Missing Y_resolution tag.
  428.  
  429.     In addition, there are several self explanatory warnings and other
  430.     error messages.
  431.  
  432.  
  433.  
  434.  
  435. ----------------------------[ 7.  VIRUS PROTECTION ]----------------------------
  436.  
  437. PRO-CR<tm> provides a measure of protection for itself against virus infection
  438. and accidental corruption during downloads from bulletin boards.  Note that
  439. no program can provide total protection by itself and this program makes no
  440. guarantee of 100% protection from virus.  Users should be aware that any
  441. program's self protection scheme can be defeated given sufficient time and
  442. motivation.
  443.  
  444.  
  445.  
  446. ------------------------------[ 8.  SITE LICENSE ]------------------------------
  447.  
  448. COMPANIES please note that only ONE USER at ONE LOCATION may use and operate
  449. PRO-CR<tm>.
  450.  
  451. Additional computers, users and locations should be registered separately,
  452. by volume, or by obtaining a site license.
  453.  
  454. DISCOUNT RATES are offered to companies registering for a site license or by
  455. volume.   Please write to Gray Design Associates, P.O. Box 333, Northboro,
  456. MA 01532, USA for a rate schedule.
  457.  
  458.  
  459.  
  460.  
  461. ------------------------[ 9.  COMMENTS TO THE AUTHOR ]--------------------------
  462.  
  463. Any feedback would be greatly appreciated.  Please direct any comments to the
  464. author personally via mail to David P. Gray, Gray Design Associates,
  465. P.O. Box 333, Northboro, MA 01532, USA.
  466.  
  467.  
  468.  
  469.  
  470. -----------------[ 10.  ASSOCIATION OF SHAREWARE PROFESSIONALS ]----------------
  471.  
  472. This software is produced by David P. Gray who is a member of the Association
  473. of Shareware Professionals (ASP).  ASP wants to make sure that the shareware
  474. principle works for you.  If you are unable to resolve a shareware-related
  475. problem with an ASP member by contacting the member directly, ASP may be able
  476. to help.
  477.  
  478. The ASP Ombudsman can help you resolve a dispute or problem with an ASP member,
  479. but does not provide technical support for members' products.  Please write to
  480. the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006, USA or send a CompuServe
  481. message via easyplex to ASP Ombudsman 70007,3536.
  482.  
  483.  
  484.  
  485.  
  486. -----------------------------[ 11.  MISCELLANEOUS ]-----------------------------
  487.  
  488. PRO-CR<tm> is written entirely using Microsoft QuickC version 2 and consists
  489. of 4600 lines of C code.
  490.  
  491.  
  492.  
  493. HP and ScanJet are registered trade marks of Hewlett Packard.
  494. ScanMan is a registered trade mark of Logitech inc.
  495.  
  496.  
  497.  
  498.  
  499. ----------------------------[ END OF MANUAL.DOC ]-------------------------------
  500.