Contributions
- 2.1KViews0likes0Comments
extracting strikeout text from image
I'm using vbscript in test complete. I need to identify some text from an image. I'm able to do it using OCR . OCR is able to identify text fonts which are "bold", but there is one text which has "strikeout " property, which OCR is not able to identify, it is giving some gibberish value. Is there a way to identify text from images which are striked out? The following is the code I've used and is not working: Set Rect = Aliases.npApp.wndNP6Class.Picture.GetRect(5,47,234,520) Set OCRObj = OCR.CreateObject(Rect) Set ocrOpt = OCRObj.CreateOptions Set Font = ocrOpt.Fonts.Add Set Font = ocrOpt.Fonts.Add Font.Name="Arial" Font.Styles.Add 2 ' Choosing bold font type Font.Styles.Add 8 ' Choosing strike out font type ocrOpt.ExactSearch=false ocrOpt.GrayScaleBinarization=true ocrOpt.SkipFragmentation=false ocrOpt.BinarizationThreshold =100 'Low threshold value to capture text from image vTempStr1 = OCRObj.GetText(ocrOpt) Is there an alternative to OCR, i.e. some other way of extracting text from image without using OCR Thank you.26KViews0likes2Comments