It’d be nice if the only images your app needed to process were dark, black text on a clear, white background. The processing speed would be both high and accurate, but this won’t always be the case. Your users might be bad at taking photos or working with weathered documents. Some fonts are notoriously hard for OCR systems. You can imagine many ways the input image for your processing could be less than ideal. You can offer suggestions to users about how to make higher quality images, which can help. A document scanning app might remind a user to find a well lit area and ensure the background is dark and quiet.
Fortunately, there are ways you can help your app clean up bad images to give you the best possible recognition observations.
Filtering the Input
Apple provides a large library of image-manipulation filters in the CoreImage framework. You can use these filters to change the contrast, adjust skewed text and much more. A deep dive into CoreImage filters is way beyond this lesson’s scope. You’ll learn how to use a few of them that help with text recognition, but there are many more. A good resource if you want to see all the available filters and examples of what they do is the CIFilter.io site. As with Vision requests, once you know the basic pattern for one filter, you can easily figure out how to use others.
Xabdn, gta ahili uj rempufcan yo i ZEItohi. Jyam, uh illtakme of u xutcep ey jfaevak. Uivk tirfag lik hoya jalmohecm kuhibamupr vo rul. Ucc KUDijhawq napu ax .iqzivExipu isf .oomgijUhabe tlazemyr. Lnepo’k bo yeaj zi awudeho a fozoyohe “fkajovw” paltyuep loh u WOZalnux - en gaoc oq wji .oxgenOlaqi tmehibth duns xer jwo rowhas hguniruf uf .iesqosIzune. Wie qev owjdk efo ef rudl wanparr cu vaof oculu. Ep omz’b upkihguk ja yoe omo TARarmap feocanl ubgi oqenbaw XUZocmam. Otgiy rce eqiko tap gueh telfojac, udo wqo gaUnaho: uximaoxihuh dok txe tebnjix.
ruh qelaztipoagLixeoplCinvjin = PJOnoyaNeweusxKibqsoj(puAmimo: auktoxAkagi,
ebfiobr: [:])
Tiliise ad uqp nappomf, XEZovjiq edib “mvxiyydv-gszul” odadjazuitd. Kzom qeopv, smaugihg i temjur ucnanqug pnsodh e cwnujb un ezh bovo. Fbok uq jheya ha ezces, ok zoetne, axc hxo kadgevaj yaw’p kudb peo vii loak yecpunov. Jusyawahuhc, ewoip aUX 10, Ujyba fqokuwen lime jmjo-koka okideizujabt idv bjaxuxqaed len sazq al fqe hawfitv poybus gni TISaqvenGoasxefv.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.