xamarin - Pre-processing image using opencv for tesseract -
i want know methods needed process image best results, before giving ocr. also, character set should provided best result. currently, working on xamarin android app.
below image processing code.
cvinvoke.cvtcolor(img, img, colorconversion.bgr2gray); //cvinvoke.canny(gray, canny, 100, 50, 3, false); size s = new size(3, 3); cvinvoke.gaussianblur(img, img, s, 0, 0, bordertype.default); //cvinvoke.fastnlmeansdenoising(img, img, 3, 7, 21); cvinvoke.adaptivethreshold(img, img, 255, adaptivethresholdtype.meanc, emgu.cv.cvenum.thresholdtype.binary, 5, 4); cvinvoke.threshold(img, img, 0, 255, emgu.cv.cvenum.thresholdtype.otsu);
i using emgucv library processing, tesseract.
below white listed character set.
_ocr.setvariable("tessedit_char_whitelist", "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz-1234567890 :$/.?,!@#%^&*()_+=\'\";{}[]+");
i want scan receipt , new concept. please let me know thoughts.
Comments
Post a Comment