SmartScan Xpress ICR/OCR/OMR v4 FAQ

Contact Support



Q1How can I determine if I have the latest version of a Pegasus control?
Q2What do the acronyms ICR, OCR, MICR, and OMR stand for?
Q3What are runtimes? How do I pay for them?
Q4Does the Smartscan Xpress ICR/OCR/OMR product include the ImagXpress control?
Q5What format does the image need to be in for the SmartScan Xpress ICR/OCR/OMR control to process?
Q6Why can't I download the SmartScan Xpress OCR/OMR toolkit separately from the SmartScan Xpress ICR/OCR/OMR toolkit?
Q7I am trying to analyze a non 1 bit per pixel image and am getting an error that says, "Only 1 bit images are supported." Why?
Q8How do I distribute my application (in .NET, Delphi, VB etc.)?
Q9What are the steps to successfully license the SmartScan Xpress control on a client web application running within Internet Explorer?
Q10What version of the SmartScan Xpress, ImagXpress and NotateXpress assemblies are needed in order to use the Forms Editor?
Q11What version of the .NET Framework is necessary to use the Forms Editor application?
Q12Where is the source code to the Forms Editor application located?
Q13How do I evaluate the SmartScan Xpress v4 control in a "Windowless" environment (for example, a DLL or Windows Service)?
Q14How do I set the type of data that I want to analyze and what are the available options?
Q15What is segmentation and how is it used?
Q16What Languages are supported and how do I tell the control what languages I want to recognize?
Q17How do I create a simple OCR application without using an FDL file to analyze a single field on the image?
Q18How do I create a simple application to match forms to a template image?
Q19How do I create a simple application to perform OMR analysis without using an FDL on a single field?
Q20Which SmartScan Xpress ICR/OCR/OMR installation files do I distribute with my application?
Q21The data is not being correctly recognized by the SmartScan control. How can I resolve this?
Q22How do I prevent GDI leaks with the control?
Q23I am using the ImagXpress 8 .NET control. How do I load the image data into the SmartScan Xpress ICR control?

Q1: How can I determine if I have the latest version of a Pegasus control?
Please download the PegConnect utility program from the following link: PegConnect
or reference the Latest Builds page.

Q2: What do the acronyms ICR, OCR, MICR, and OMR stand for?
ICR - Intelligent Character Recognition: handwriting recognition
OCR - Optical Character Recognition: the recognition of machine printed text
OMR - Optical Mark Recognition: the evaluation of Marksense forms (that require a number two pencil to fill in circles for answers, like those used for standardized testing and state lotteries). This is done without the specialized scanners normally required.
MICR - Magnetic Ink Character Recognition: the banking industry standard for check numbering, a subset of OCR

Q3: What are runtimes? How do I pay for them?
SmartScan Xpress runtimes are licensed per installation. A runtime license fee is owed for each installation. Licensing requirements for Smartscan Xpress are documented on the product page here: SmartScan Xpress ICR/OCR/OMR v4

SmartScan Xpress runtime licensing is available in two methods:

1) If installations are an irregular event (fewer than ten events annually) then licenses are purchased from Pegasus Imaging as needed. Pegasus Imaging provides a signed license for each runtime purchased. To purchase runtime licenses, go to the product page at http://www.pegasusimaging.com/smartscanicr.htm and select the "Upgrade" button for a list of license purchasing options.

2) If installations are a regular event (more than ten events annually) then you are classified as a SmartScan Xpress Reseller, or sub-licensor. The total numbers of SmartScan Xpress installations are reported to Pegasus Imaging quarterly. License fees are paid at that time, in arrears. This method allows for quantities to be grouped for discounts as well.

Contact sales@jpg.com for additional assistance.

Q4: Does the Smartscan Xpress ICR/OCR/OMR product include the ImagXpress control?
No, it does not. ImagXpress can be purchased separately. Please refer to the following link for more information on ImagXpress: http://www.pegasusimaging.com/imagxpresspe.htm

A discount is offered if the ImagXpress control is purchased at the same time as the SmartScan Xpress ICR/OCR/OMR control. Click on the "Upgrade" button on the SmartScan Xpress ICR/OCR/OMR web page for the special discount offer.

Q5: What format does the image need to be in for the SmartScan Xpress ICR/OCR/OMR control to process?
The image needs to be in 1 bit per pixel format (a black and white image). Color depth conversion of images is trivial when using the ImagXpress control in your application. Please refer to the following link for more information on ImagXpress: http://www.pegasusimaging.com/imagxpresspe.htm

Q6: Why can't I download the SmartScan Xpress OCR/OMR toolkit separately from the SmartScan Xpress ICR/OCR/OMR toolkit?
The SmartScan Xpress ICR/OCR/OMR toolkit and the SmartScan Xpress OCR/OMR toolkit utilize a common ActiveX control and managed .NET assembly to provide image recognition functionality. The SmartScan Xpress OCR/OMR toolkit is functionally equivalent to the SmartScan Xpress ICR/OCR/OMR toolkit with only OCR features unlocked.

To test OCR/OMR only, download the SmartScan Xpress ICR/OCR/OMR toolkit and set the FormFieldDefaultType property or the FieldType property to FIELDTYPE_OCR.

Q7: I am trying to analyze a non 1 bit per pixel image and am getting an error that says, "Only 1 bit images are supported." Why?
The reason is that the image needs to be in 1 bit per pixel format (a black and white image). Color depth conversion of images is trivial when using the ImagXpress control in your application. Please refer to the following link for more information on ImagXpress: http://www.pegasusimaging.com/imagxpresspe.htm

Q8: How do I distribute my application (in .NET, Delphi, VB etc.)?
PLEASE NOTE: You must have received your unlock codes in order to distribute your applications. These are received when runtimes are purchased as mentioned in Q2 above. If you have not received them you may purchase them online by clicking on the "Upgrade" button at http://www.pegasusimaging.com/smartscanicr.htm or by contacting sales@jpg.com. Once these runtimes are purchased, and you have received your unlock codes, please do the following:

1) Add a declaration to the IntegratorKey method when your program starts up and pass the 4 unlock codes as the parameters to the method.

2) If you are using .NET as your development tool you must do #1 AND call the UnlockPICSSXICR.PS_Unlock function and pass as the parameters the same 4 unlock codes that are passed as the parameters to the IntegratorKey method. Please refer to the code sample below for the specific .NET development environments (if you are using Delphi, please skip this step and go to #3):

For C# Developers:
Call the static PS_Unlock function in the class constructor BEFORE the generated call to InitializeComponent () as follows public FormMain()
{
UnlockPICSSXICR.PS_Unlock(1234, 1234, 1234, 1234);
InitializeComponent();
}

For Visual Basic .NET Developers:
Call the static PS_Unlock function in the class constructor (i.e. New function) BEFORE the generated call to InitializeComponent () as follows:
Public Sub New ()
MyBase.New ()
UnlockPICSSXICR.PS_Unlock(1234, 1234, 1234, 1234)
IntializeComponent ()
End Sub

3) If you are using Delphi as your development tool you must do part 1 of Q7 and declare the PS_Unlock function as outlined below:

procedure PS_Unlock(pw1, pw2, pw3, pw4: LongInt); stdcall external ' SSICRXpr4.dll';
begin
Application.Initialize;
PS_Unlock(123456789,123456789,987654321,12345);
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

4) If you are using the SmartScan Xpress ICR/OCR/OMR control as a COM object in VB you must do #1 AND declare the PS_Unlock function as outlined below:

    a) Add a reference to the SmartScan Xpress ICR/OCR/OMR control via Project|References.

    b) Declare the PS_Unlock function as follows:

    Private Declare Sub ControlUnlock Lib "ssicrxpr4" Alias "PS_Unlock" (ByVal pw1 As Long, ByVal pw2 As Long, ByVal
    pw3 As Long, ByVal pw4 As Long)

    c) Dim the SmartScan Xpress ICR/OCR/OMR control object as follows:

    Dim ss As SSXICR4Lib.SSICRXpr

    d) Call the unlock method:

    ControlUnlock 1234, 1234, 1234, 1234

    Set ss = New SSXICR4Lib.SSICRXpr

5) If you are using the control within HTML you must obtain a web license string. This web license string is received from our sales department when the web license is purchased. The web license string is passed as the parameter to the IntegratorWeb method. Please refer to http://www.pegasusimaging.com/weblicfaq.htm for more information on using the control within a web environment.

6) If you are using the SmartScan Xpress ICR/OCR/OMR ActiveX Control open your project with your development tool (Visual Basic or Delphi) and rebuild the EXE. The new registration information will be automatically incorporated in the new executable.

Q9: What are the steps to successfully license the SmartScan Xpress control on a client web application running within Internet Explorer?
Please review Pegasus Imaging's Web Licensing FAQ's.

Q10: What version of the SmartScan Xpress, ImagXpress and NotateXpress assemblies are needed in order to use the Forms Editor?
The Forms Editor application requires the following assemblies and versions (or more recent). File versions less than these will cause a file load exception to occur by the .NET CLR loader.
PegasusImaging.WinForms.SSXICR4.dll - Version 4.0.43.0
PegasusImaging.WinForms.ImagXpress7.dll - Version 7.0.37.0
PegasusImaging.WinForms.NotateXpress7.dll - Version 7.0.17.0

Q11: What version of the .NET Framework is necessary to use the Forms Editor application?
The Microsoft .NET Framework 1.1 is required in order to use the Forms Editor.

Q12: Where is the source code to the Forms Editor application located?
The source code is located in the Samples directory as: DotNet/C#/FormsEditor/FormsEditor.

Q13: How do I evaluate the SmartScan Xpress v4 control in a "Windowless" environment (for example, a DLL or Windows Service)?
The EvalMode property needs to be set to EVAL_Watermark (1). This will suppress the Trial Version dialog.

Q14: How do I set the type of data that I want to analyze and what are the available options?
The type of data is set via the FieldType property or the FormFieldDefaultType property. The available options are ICR, OCR, OMR, IMAGE and MarkBox.

Q15: What is segmentation and how is it used?
Segmentation is the process of taking an image and splitting it up into smaller bitmaps. Each of these smaller bitmaps is supposed to contain the pixels put there by a single character or glyph. The first step is to do a horizontal pixel histogram (sum the pixels in each row) and look for minima (or runs of scan lines where the pixel count is below a given threshold). The next step is to do the same for columns of pixels and look for stretches where the vertical histogram values are below a given threshold. The result of this is a set of "regions of interest". The coordinates are determined by the starting and ending lines and columns at which the horizontal and vertical pixel histograms are above threshold. Segmentation occurs early in the processing of ICR and OCR fields. Segmentation as discussed here is not performed for OMR fields.

"Do multiple lines" - means do a horizontal pixel histogram to find multiple lines in the field. If this is set, then "minimum line separation pixels" must be set to some value (if two horizontal peaks are separated by less than this then they are counted as a single line's pixels - this was added to handle multiple 'iiiiiii' so the dots don't show up as their own line).

"Detect blanks" - means compare the ending and starting X values of successive regions of interest; if this gap is >= "minimum blank width" then a ' ' is created and inserted into the region list. If "compress blanks" is set to TRUE, then even if more than one blank will fit in the gap only one will be created.

"Separate overlapping characters" - addresses the condition where the bounding rectangles of two characters overlap yet the glyph themselves do not touch.

"Separate merged characters" - specifies the mechanics and parameters for separating characters that, due to poor image quality, have bled into each other.

Segmentation affects recognition performance, since the recognizer operates on a bitmap of what it hopes is a single character (with accents). If characters are bled together in the image, or if they overlap so that the recognizer gets a glyph that's really two characters (or more), then the recognizer will not perform well.

There are two types of segmentation used in SmartScan Xpress ICR/OCR/OMR dealing with overlapping characters and merged characters.




In the text above, the 'a' and the 'l' overlap each other (look at the serifs) as do the 't' and 'h' and the 'r' and 'e' in 'Care'. Think of it as "the bounding rectangles overlap." In the word 'Care' the 'a' and 'r' are actually touching.

Segmentation of (the breaking up of) overlapping characters will resolve most of the recognition failures. In the above case it will pull apart the 'a' and 'l', the 't' and 'h', and the 'ar' and 'e'. Merged character segmentation will resolve the remainder of the failures, since it breaks the 'ar' into 'a' and 'r'.

If you are processing a document with both overlapping (kerned) and merged character segmentation disabled, and your images have overlapping characters or merged characters the character count will be off. For example, instead of the 10 characters we expect above we could possibly get back 3 characters.

Q16: What Languages are supported and how do I tell the control what languages I want to recognize?
The initial releases focused on English language recognition, German language recognition, digits, English language punctuation, arithmetic symbols, and American and European currency symbols. Support is now provided for Spanish, Italian, Portuguese, and French language recognition. Planned product improvements will focus on additional language (and associated punctuation where applicable) support. Additional language support will be provided in staged deliveries beginning with European formatting for digits, Scandinavian (Danish, Norwegian, Swedish, Finnish), Croatian, Turkish.

Q17: How do I create a simple OCR application without using an FDL file to analyze a single field on the image?
Please refer to the sample code listed below.

Note: If you were performing ICR analysis the FieldType property would be set to FIELDTYPE_ICR.

1) Pass the image to the SmartScan control and create the form.

ssx.ImageSource = IMGSRC_DIB
ssx.hDIB = Xpress.CopyDIB
ssx.CreateForm "MyForm"

2) Set Default Segmentation Parameters

ssx.SetFormBounds 0, 0, Xpress.IWidth, Xpress.IHeight
ssx.AddFormField "MyField"
ssx.SetFieldSegProperty_Bool SEG_DETECT_BLANKS__BOOL, True
ssx.SetFieldSegProperty_Bool SEG_COMPRESS_BLANKS__BOOL, False
ssx.SetFieldSegProperty_Bool SEG_MULTIPLE_LINES__BOOL, True
ssx.SetFieldSegProperty_Bool SEG_SPLIT_MERGED__BOOL, True
ssx.SetFieldSegProperty_Bool SEG_SPLIT_OVERLAPPING__BOOL, True
ssx.SetFieldSegProperty_Bool SEG_SPLIT_OVERLAPPING__BOOL, True

ssx.SetFieldSegProperty_Long SEG_HORIZONTAL_THRESHOLD__LONG, 1
ssx.SetFieldSegProperty_Long SEG_VERTICAL_THRESHOLD__LONG, 1
ssx.SetFieldSegProperty_Long SEG_MAX_SPECK_HEIGHT__LONG, 4
ssx.SetFieldSegProperty_Long SEG_MIN_BLANK_WIDTH__LONG, 10
ssx.SetFieldSegProperty_Long SEG_MIN_LINE_HEIGHT__LONG, 15
ssx.SetFieldSegProperty_Long SEG_MIN_LINE_HEIGHT_PCT__LONG, 0
ssx.SetFieldSegProperty_Long SEG_MIN_LINE_SEPARATION__LONG, 15

3) Define the field boundaries, set the field type and character set

ssx.SetFieldBounds 25,50,75,100
ssx.FieldType = FIELDTYPE_OCR
ssx.FieldRecCharacterSet = CHARSET_SS_LowerCaseAlpha + CHARSET_SS_UpperCaseAlpha + CHARSET_SS_Digits

4) Start processing the image and retrieve the results for the defined field.

ssx.StartFormProcessing
ssx.SelectFormField "MyField"
MsgBox ssx.FieldResultStr
ssx.RemoveForm "MyForm"

Q18: How do I create a simple application to match forms to a template image?
Please refer to the sample code listed below which loads 3 blank template images using the AddTemplateImage method and the uses the MatchTemplate method. If a template is successfully matched with the current image a "dropout" version (the images with the matching form removed) becomes the control's current preprocessed image.

sub test()
Dim MatchedConfidence as Long
SmartScan.AddPreprocessImageAction -1, PP_DESPECKLE, "2,2"
SmartScan.AddPreprocessImageAction -1, PP_DESKEW, ""
SmartScan.AddPreprocessImageAction -1, PP_DELETE_BLACK_BORDER, ""

loadTemplate "blankForm1.tif", "Form1"
loadTemplate "blankForm2.tif", "Form2"
loadTemplate "blankForm3.tif", "Form3"

Xpress1.FileName = "realForm1.tif"

SmartScan.hDIB = Xpress1.CopyDIB

SmartScan.PreprocessImage

matchName = SmartScan.MatchTemplate (True, False, 10, 60, lMatchedConfidence)
MsgBox matchName

end sub

sub loadTemplate (fileName as string, templateName as string)

Xpress1.FileName = fileName
SmartScan.hDIB = Xpress1.CopyDIB
SmartScan.PreprocessImage
SmartScan.AddTemplateImage templateName

end sub

Q19: How do I create a simple application to perform OMR analysis without using an FDL on a single field?
Please refer to the sample code listed below:

1) Pass the image to the SmartScan control and create the form.

ssx.ImageSource = IMGSRC_DIB
ssx.hDIB = Xpress.CopyDIB
ssx.CreateForm "OMRForm"
ssx.SetFormBounds 0, 0, Xpress.IWidth, Xpress.IHeight

2) Set the field boundaries and the various OMR settings.

ssx.AddFormField "OMR"
ssx.SetFieldBounds 203, 1018, 156, 457
ssx.FieldType = FIELDTYPE_OMR
ssx.FieldOMRBubbleShape = OMRBUBBLESHAPE_CIRCLE
ssx.FieldOMRBubbleReadOrder = OMRREADORDER_HORIZONTAL
ssx.FieldOMRMarkThreshold = 25
ssx.FieldOMRColumns = 5
ssx.FieldOMRRows = 8

3) Set the string values to return for the filled in bubbles.

For col = 1 To 5
  charint = Chr$(Asc("A") + col - 1)
  For row = 1 To 8
   ssx.SetFieldOMRBubbleValue row, col, charint

  Next
Next

4) Start processing the image and retrieve the results for the defined field.

ssx.StartFormProcessing
Me.Caption = ssx.SSError
MsgBox ssx.FieldResultStr

Q20: Which SmartScan Xpress ICR/OCR/OMR installation files do I distribute with my application?
For .NET Windows Forms Control Applications:
The following file must be distributed with the .NET Windows Forms control:
PegasusImaging.WinForms.SSXICR4.dll

In addition, if you are performing ICR analysis then the following data files need to be distributed:
Chardim.txt
Gs130mac.pat
Gs130ush.pat
Gs130mcr.ewf

For ActiveX, COM, and VCL Applications:
SSICRXpr4.dll
SSICRX4.dll

Please note that your installation program must register SSICRXpr4.dll.

Q21: The data is not being correctly recognized by the SmartScan control. How can I resolve this?
If an image is being scanned with SmartScan Xpress ICR/OCR/OMR and the results aren't satisfactory, please scan the image with the demo application that is shipped with the product. If the product was installed to the default location, the SmartScan Xpress demo can be found at:

C:\Program Files\Pegasus Imaging\SmartScan Xpress ICR-OCR-OMR\V4.0\Samples\ActiveX-COM\VB6\Demo\Smartscan Xpress ICR Demo.exe

If the results improve, please review the code for the demo and note any differences between the original project and the demo application. If the results of the scan are still unsatisfactory, please submit a support request to support@jpg.com and attach the image in a Zip file.

Q22: How do I prevent GDI leaks with the control?
Each time the StartFormProcess method is called a GDI object is created for each field in the form (a bitmap).To avoid running out of GDI objects one of two options can be used:

1)Set the FormFieldRetainImage property to false. (Please use this option if you do not need access to the images created by processing the field).

2)Call the RemoveForm method for each form created o ther RemoveFormField method for each field in the form.

Q23: I am using the ImagXpress 8 .NET control. How do I load the image data into the SmartScan Xpress ICR control?
To copy an image from the ImagXpress 8 .NET control, you can use the ToHdib method of the ImageX class as outlined in the code samples below. The sample code assumes the image data is in 1 bit per pixel format.

For C# Developers:
PegasusImaging.WinForms.ImagXpress8.ImagXpress ix = new PegasusImaging.WinForms.ImagXpress8.ImagXpress();
PegasusImaging.WinForms.ImagXpress8.ImageX theImageX = PegasusImaging.WinForms.ImagXpress8.ImageX.FromFile("c:\\Pegasus.tif");
picssxicr1.hDIB = theImageX.ToHdib(false).ToInt32();

For Visual Basic. NET Developers:
Dim ix As New PegasusImaging.WinForms.ImagXpress8.ImagXpress()
Dim theImageX As PegasusImaging.WinForms.ImagXpress8.ImageX
theImageX = PegasusImaging.WinForms.ImagXpress8.ImageX.FromFile("c:\Pegasus.tif")
Picssxicr1.hDIB = theImageX.ToHdib(False).ToInt32()


Sitemap | © 2008 Pegasus Imaging Corporation. All Rights Reserved. | Privacy Statement.