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.Prepr