U S I N G M O B I L E C O M P O N E N T S T O F O O L - P R O O F - - PowerPoint PPT Presentation

u s i n g m o b i l e c o m p o n e n t s t o f o o l p r
SMART_READER_LITE
LIVE PREVIEW

U S I N G M O B I L E C O M P O N E N T S T O F O O L - P R O O F - - PowerPoint PPT Presentation

U S I N G M O B I L E C O M P O N E N T S T O F O O L - P R O O F T H E O C R E X P E R I E N C E K R I S T I N A T H A I I O S S O F T WA R E E N G I N E E R @ K R I S T I N A T H A I K R I S T I N A T H A I M O B I L E C O M P O N


slide-1
SLIDE 1

U S I N G M O B I L E C O M P O N E N T S T O F O O L - P R O O F T H E O C R E X P E R I E N C E

K R I S T I N A T H A I I O S S O F T WA R E E N G I N E E R

@ K R I S T I N A T H A I

slide-2
SLIDE 2

K R I S T I N A T H A I

slide-3
SLIDE 3

M O B I L E C O M P O N E N T S

slide-4
SLIDE 4
slide-5
SLIDE 5

M i n t P a y ro l l Q u i c k B o o k s

slide-6
SLIDE 6

M O B I L E C O M P O N E N T S

I m a g e C a p t u re P I N P ro d u c t S u r v e y

D o c u m e n t R e v i e w

slide-7
SLIDE 7

F O O L - P R O O F I N G O C R

slide-8
SLIDE 8

W H AT I S O C R ?

slide-9
SLIDE 9

E N D - T O - E N D O C R F L O W

I M A G E C A P T U R E C O M P O N E N T D O C U M E N T R E V I E W C O M P O N E N T D ATA E X T R A C T I O N E N G I N E

slide-10
SLIDE 10

D E M O

slide-11
SLIDE 11

T H E I M A G E C A P T U R E E X P E R I E N C E

I M A G E C A P T U R E C O M P O N E N T D ATA E X T R A C T I O N E N G I N E D O C U M E N T R E V I E W C O M P O N E N T

slide-12
SLIDE 12

P e o p l e t a k e t e r r i b l e p i c t u re s .

slide-13
SLIDE 13

T I LT / S K E W

slide-14
SLIDE 14

N O T E N O U G H L I G H T I N G

slide-15
SLIDE 15

B L U R R I N E S S / S H A K I N G

slide-16
SLIDE 16

E D G E D E T E C T I O N

slide-17
SLIDE 17

D O C U M E N T D E T E C T I O N

self.documentDetector ¡= ¡[CIDetector ¡detectorOfType:CIDetectorTypeRectangle ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡context:nil ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡options:nil]; NSArray ¡*rectFeaturesArray ¡=[_documentDetector ¡ featuresInImage:ciImage ¡ ¡ :@{CIDetectorAspectRatio:@2.0}]; ¡ NSDictionary ¡*documentCorners ¡= ¡[self ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ getDocumentCornersForFeatures:rectFeaturesArray ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡forVideoBox:clap ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡srcImage:ciImage]; ¡

slide-18
SLIDE 18

D E T E C T C O R N E R S

for ¡(CIRectangleFeature ¡*f ¡in ¡rectFeaturesArray) ¡ ¡ { ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡CGPoint ¡markerPos ¡= ¡CGPointZero; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡//topLeft ¡ ¡ ¡markerPos ¡= ¡f.topLeft; ¡ ¡ ¡//flip ¡the ¡coordinates ¡ ¡ ¡markerPos ¡= ¡CGPointApplyAffineTransform(markerPos, ¡flipTx); ¡ ¡ ¡//apply ¡correction-­‑for-­‑orientation-­‑transform ¡ ¡markerPos ¡= ¡CGPointApplyAffineTransform(markerPos, ¡ ¡ ¡ ¡ ¡ ¡correctionTransform); ¡ ¡ ¡//scale ¡to ¡screen-­‑coordinates ¡ ¡ ¡markerPos ¡= ¡CGPointMake(markerPos.x ¡* ¡xScale, ¡markerPos.y ¡* ¡yScale); ¡ ¡ ¡topLeft ¡= ¡markerPos; ¡ ¡… ¡… ¡… ¡ } ¡

slide-19
SLIDE 19

Users follow instructions in creative ways…

slide-20
SLIDE 20
slide-21
SLIDE 21

D ATA F R O M T H E D ATA E X T R A C T I O N E N G I N E

I M A G E C A P T U R E C O M P O N E N T D ATA E X T R A C T I O N E N G I N E D O C U M E N T R E V I E W C O M P O N E N T

slide-22
SLIDE 22

<employeeSsn> ¡ ¡ ¡ ¡<ns2:confidence>0.5</ns2:confidence> ¡ ¡ ¡ ¡<ns2:bottom>75</ns2:bottom> ¡ ¡ ¡ ¡<ns2:left>289</ns2:left> ¡ ¡ ¡ ¡<ns2:right>392</ns2:right> ¡ ¡ ¡ ¡<ns2:top>60</ns2:top> ¡ </employeeSsn> ¡ <employerEin> ¡ ¡ ¡ ¡ ¡<ns2:confidence>1.0</ns2:confidence> ¡ ¡ ¡ ¡ ¡<ns2:bottom>122</ns2:bottom> ¡ ¡ ¡ ¡ ¡<ns2:left>61</ns2:left> ¡ ¡ ¡ ¡ ¡<ns2:right>157</ns2:right> ¡ ¡ ¡ ¡ ¡<ns2:top>108</ns2:top> ¡ </employerEin>

C O N F I D E N C E A N D C O O R D I N AT E S

slide-23
SLIDE 23

<?xml ¡version="1.0" ¡encoding="UTF-­‑8" ¡standalone="yes"?> ¡ <FdpW2 ¡xmlns="http://schema.intuit.com/platform/document/semantic/v1" ¡ xmlns:ns2="http://schema.intuit.com/platform/document/common/v1"> ¡ ¡ ¡ ¡ ¡<taxYear>2013</taxYear> ¡ ¡ ¡ ¡ ¡<employeeSsn>333-­‑44-­‑5555</employeeSsn> ¡ ¡ ¡ ¡ ¡<employerEin>00-­‑7904153</employerEin> ¡ ¡ ¡ ¡ ¡<EmployerName> ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡<ns2:BusinessNameLine1>Rock ¡Castle ¡Construction, ¡Inc.</ ns2:BusinessNameLine1> ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡<ns2:BusinessNameLine2>Construction ¡and ¡Estimates</ns2:BusinessNameLine2> ¡ ¡ ¡ ¡ ¡</EmployerName> ¡ ¡ ¡ ¡ ¡<EmployerUSAddress> ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡<ns2:AddressLine1>1735 ¡County ¡Road</ns2:AddressLine1> ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡<ns2:City>Bayshore</ns2:City> ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡<ns2:State>CA</ns2:State> ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡<ns2:ZIPCode>94326</ns2:ZIPCode> ¡ ¡ ¡ ¡ ¡</EmployerUSAddress>

D O C U M E N T D ATA

slide-24
SLIDE 24

B U I L D I N G T H E R E V I E W C O M P O N E N T

I M A G E C A P T U R E C O M P O N E N T D ATA E X T R A C T I O N E N G I N E D O C U M E N T R E V I E W C O M P O N E N T

slide-25
SLIDE 25

C O N F I D E N C E

<employeeSsn> ¡ ¡ ¡ ¡<ns2:confidence>0.5</ns2:confidence> ¡ </employeeSsn>

slide-26
SLIDE 26

<employeeSsn> ¡ ¡ ¡ ¡<ns2:confidence>1.0</ns2:confidence> ¡ </employeeSsn>

C O N F I D E N C E

slide-27
SLIDE 27

I M A G E P O S I T I O N Z O O M I N G

<payerName> ¡ ¡ ¡<ns2:bottom>75</ns2:bottom> ¡ ¡ ¡ ¡<ns2:left>289</ns2:left> ¡ ¡ ¡ ¡<ns2:right>392</ns2:right> ¡ ¡ ¡ ¡<ns2:top>60</ns2:top> ¡ </payerName>

slide-28
SLIDE 28

M A P P I N G T H E C O N T E N T T O T H E U I

slide-29
SLIDE 29
slide-30
SLIDE 30

a Employee’s social security number

123-45-6789

Box ID Box Title Box Data

slide-31
SLIDE 31

G E N E R I C S I N G L E L I N E U I

{ ¡ ¡ ¡ ¡ ¡"DrHeaderId": ¡"a", ¡ ¡ ¡ ¡ ¡"DrBoxCellType": ¡1, ¡ ¡ ¡ ¡ ¡"DrBoxCellReuseId": ¡"DRW2SingleLineCell", ¡ ¡ ¡ ¡ ¡"DrBoxEditCellReuseId": ¡"DRW2SingleLineCell_Edit", ¡ ¡ ¡ ¡ ¡"DrHeaderTitle": ¡"Employee's ¡social ¡security ¡number", ¡ ¡ ¡ ¡ ¡"DrBoxUserApproved": ¡false, ¡ ¡ ¡ ¡ ¡"DrUIElements": ¡{ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡"DrValue1": ¡{ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡"DrXPath": ¡"//ns1:FdpW2/ns1:employeeSsn", ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡"DrIsMandatory": ¡true, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡"DrRegex": ¡"^\\d{3}-­‑\\d{2}-­‑\\d{4}$|^\\d{9}$", ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡"DrRegexFailMessage": ¡"Please ¡enter ¡a ¡valid ¡SSN ¡(9 ¡numbers)" ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡} ¡ ¡ ¡ ¡ ¡} ¡ } ¡

slide-32
SLIDE 32
  • ­‑(BOOL)validateInputInTextField:(UITextField*)textField ¡

{ ¡ BOOL ¡isInputValid ¡= ¡[super ¡ ¡ validateInputInTextField:textField]; ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡NSDictionary* ¡validationDictForThisTF ¡= ¡ ¡ self.inputValidationDictionaryForAllTextFields[@(textField.tag)]; ¡ ¡ ¡ ¡ ¡if ¡(!isInputValid) ¡{ ¡ self.valueTFErrorLabel.text ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ validationDictForThisTF[kDrRegexFailMessage]; ¡ ¡ ¡ ¡ ¡} ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡return ¡isInputValid; ¡ ¡ ¡ ¡ ¡ } ¡

slide-33
SLIDE 33

P R O S A N D C O N S

slide-34
SLIDE 34

P R O S A N D C O N S O F T H E G E N E R I C M O D E L

Build once, support many Expertise Open source model Longer development time

?

Maintaining generic model

slide-35
SLIDE 35

I N T U I T ’ S O P E N S O U R C E M O B I L E L I B R A R I E S

slide-36
SLIDE 36

Makes it easy to build advanced custom animations

  • n iOS

An Objective-C and Swift collection for iOS and OS X that stores objects grouped into sections Makes it easy to get the device's current location on iOS

slide-37
SLIDE 37

G I T H U B . C O M / I N T U I T

slide-38
SLIDE 38

T H A N K S !

@kristinathai kristina_thai@intuit.com