Mentalix Logo


Pixel!FX 2000

Maintenance
Options

Fed Submit
Application Note
Index

Pixel!FX Application
Note Index

Links by Subject
Links by Platform
Links by Scanner

Y2K Compliance

Pixel!FX 2000
Release Info

View Guided
Product Tours

Site Index




Mentalix Application Note #10047
Sample Pixel!ENGINE OCR Script
Example 1: Convert faxes to text

#################################################################
#                                                               #
# This script can be used to convert faxes to text. You can     #
# invoke the script with the command:                           #
#                                                               #
#     engine ocrfax.tcl <image filename>                        #
#                                                               #
#################################################################
 
if {$argc >= 1} {
  set ifile $argv
  set img [image]
  $img load $ifile 

  # If this is a low-resolution fax image, then it 
  # should be scaled to get the best OCR results. 
  if { ([$img getxres] == 204) && ([$img getyres] == 98) } {
    set height [$img getheight]
    set newheight [expr $height * 2]
    $img scale [$img getwidth] $newheight
  }
  $img ocr /tmp/ocr.txt
} else {
  puts "Usage: $argv0 <image file pathname>"
}

For additional information or assistance, please call Mentalix Technical Support at (972) 423-9377 Ext. 33.