-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
TirtaGunawan
committed
Sep 3, 2024
1 parent
1d73310
commit 7e5bbaa
Showing
1 changed file
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
# Best-iOS-KTP-OCR | ||
|
||
[![CI Status](https://img.shields.io/travis/TirtaGunawan/Best-iOS-KTP-OCR.svg?style=flat)](https://travis-ci.org/TirtaGunawan/Best-iOS-KTP-OCR) | ||
[![Version](https://img.shields.io/cocoapods/v/Best-iOS-KTP-OCR.svg?style=flat)](https://cocoapods.org/pods/Best-iOS-KTP-OCR) | ||
[![License](https://img.shields.io/cocoapods/l/Best-iOS-KTP-OCR.svg?style=flat)](https://cocoapods.org/pods/Best-iOS-KTP-OCR) | ||
[![Platform](https://img.shields.io/cocoapods/p/Best-iOS-KTP-OCR.svg?style=flat)](https://cocoapods.org/pods/Best-iOS-KTP-OCR) | ||
OCR ID Card Indonesia use iOS Vision | ||
|
||
## Example | ||
|
||
To run the example project, clone the repo, and run `pod install` from the Example directory first. | ||
|
||
|
||
## Requirements | ||
iOS 13 and above | ||
|
||
## Installation | ||
|
||
|
@@ -20,9 +16,46 @@ it, simply add the following line to your Podfile: | |
pod 'Best-iOS-KTP-OCR' | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
```python | ||
import OCRforEKTP | ||
|
||
# returns KTP Values From Image | ||
let library = OCRforEKTPLibrary() | ||
let ocrResult = library.scanEKTP(image!) | ||
let name = ocrResult.result.nama | ||
let NIK = ocrResult.result.nik | ||
let gender = ocrResult.result.jenisKelamin | ||
let province = ocrResult.result.provinsi | ||
let birthPlace = ocrResult.result.tempatLahir | ||
let birthDate = ocrResult.result.tanggalLahir | ||
let nationality = ocrResult.result.kewarganegaraan | ||
let religion = ocrResult.result.agama | ||
let maritalStatus = ocrResult.result.statusPerkawinan | ||
let village = ocrResult.result.kelurahan | ||
let subdistrict = ocrResult.result.kecamatan | ||
let city = ocrResult.result.kota | ||
let occupation = ocrResult.result.pekerjaan | ||
let address = ocrResult.result.alamat | ||
let rtrw = ocrResult.result.rtrw | ||
|
||
|
||
# Open EKTP Layout | ||
let ocrViewController = EKTPScanViewController() | ||
ocrViewController.delegate = self | ||
self.present(ocrViewController, animated: true, completion: nil) | ||
|
||
func didScanFinish(scanResult: OCRforEKTP.ScanResult) { | ||
let name = ocrResult.result.nama | ||
let nik = ocrResult.result.nik | ||
} | ||
``` | ||
|
||
## Author | ||
|
||
TirtaGunawan, [email protected] | ||
tirtavium, [email protected] | ||
|
||
## License | ||
|
||
|