android - how to use noise filter with ocr for google vision library -
looking ocr filter
i want improve quality of text recognition. want use filter can able ignore noise during recognition. tried many sites not solution.
here code
textrecognizer textrecognizer = new textrecognizer.builder(getapplicationcontext()).build(); if (!textrecognizer.isoperational()) { log.w("mainactivity", "detector dependencies not yet available"); } else { camerasource = new camerasource.builder(getapplicationcontext(), textrecognizer) .setfacing(camerasource.camera_facing_back) .setrequestedpreviewsize(1280,1024) .setrequestedfps(2.0f) .setautofocusenabled(true) .build(); cameraview.getholder().addcallback(new surfaceholder.callback() { @override public void surfacecreated(surfaceholder surfaceholder) { try { if (activitycompat.checkselfpermission(getapplicationcontext(), manifest.permission.camera) != packagemanager.permission_granted) { activitycompat.requestpermissions(mainactivity.this, new string[]{manifest.permission.camera}, requestcamerapermissionid); return; } camerasource.start(cameraview.getholder()); } catch (ioexception e) { e.printstacktrace(); } } @override public void surfacechanged(surfaceholder surfaceholder, int i, int i1, int i2) { } @override public void surfacedestroyed(surfaceholder surfaceholder) { camerasource.stop(); } }); textrecognizer.setprocessor(new detector.processor<textblock>() { @override public void release() { }
Comments
Post a Comment