Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I create a simple application to match forms to a template image?

0
Posted

How do I create a simple application to match forms to a template image?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123