-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from BlinkID/release/v3.4.0
Release/v3.4.0
- Loading branch information
Showing
103 changed files
with
8,128 additions
and
658 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
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
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
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
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
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
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
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
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
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
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
54 changes: 54 additions & 0 deletions
54
...com/microblink/libresult/extract/singapore/SingaporeIDBackRecognitionResultExtractor.java
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.microblink.libresult.extract.singapore; | ||
|
||
import android.content.Context; | ||
|
||
import com.microblink.libresult.R; | ||
import com.microblink.recognizers.BaseRecognitionResult; | ||
import com.microblink.recognizers.blinkid.singapore.back.SingaporeIDBackRecognitionResult; | ||
import com.microblink.libresult.extract.RecognitionResultEntry; | ||
import com.microblink.libresult.extract.blinkInput.BlinkOcrRecognitionResultExtractor; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by Boris on 03/05/16. | ||
*/ | ||
public class SingaporeIDBackRecognitionResultExtractor extends BlinkOcrRecognitionResultExtractor { | ||
|
||
public SingaporeIDBackRecognitionResultExtractor(Context context) { | ||
super(context); | ||
} | ||
|
||
@Override | ||
public List<RecognitionResultEntry> extractData(BaseRecognitionResult result) { | ||
|
||
if (result == null){ | ||
return mExtractedData; | ||
} | ||
|
||
if (result instanceof SingaporeIDBackRecognitionResult){ | ||
// result is obtained by scanning of Singapore ID | ||
SingaporeIDBackRecognitionResult singaporeIDResult = (SingaporeIDBackRecognitionResult) result; | ||
|
||
mExtractedData.add(mBuilder.build( | ||
R.string.PPDocumentNumber, | ||
singaporeIDResult.getCardNumber() | ||
)); | ||
|
||
mExtractedData.add(mBuilder.build( | ||
R.string.PPBloodGroup, | ||
singaporeIDResult.getBloodGroup() | ||
)); | ||
mExtractedData.add(mBuilder.build( | ||
R.string.PPIssueDate, | ||
singaporeIDResult.getDocumentDateOfIssue() | ||
)); | ||
mExtractedData.add(mBuilder.build( | ||
R.string.PPAddress, | ||
singaporeIDResult.getAddress() | ||
)); | ||
} | ||
|
||
return mExtractedData; | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
...om/microblink/libresult/extract/singapore/SingaporeIDFrontRecognitionResultExtractor.java
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package com.microblink.libresult.extract.singapore; | ||
|
||
import android.content.Context; | ||
|
||
import com.microblink.libresult.R; | ||
import com.microblink.recognizers.BaseRecognitionResult; | ||
import com.microblink.recognizers.blinkid.singapore.front.SingaporeIDFrontRecognitionResult; | ||
import com.microblink.libresult.extract.RecognitionResultEntry; | ||
import com.microblink.libresult.extract.blinkInput.BlinkOcrRecognitionResultExtractor; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by Boris on 03/05/16. | ||
*/ | ||
public class SingaporeIDFrontRecognitionResultExtractor extends BlinkOcrRecognitionResultExtractor { | ||
|
||
public SingaporeIDFrontRecognitionResultExtractor(Context context) { | ||
super(context); | ||
} | ||
|
||
@Override | ||
public List<RecognitionResultEntry> extractData(BaseRecognitionResult result) { | ||
|
||
if (result == null){ | ||
return mExtractedData; | ||
} | ||
|
||
if (result instanceof SingaporeIDFrontRecognitionResult){ | ||
// result is obtained by scanning of Singapore ID | ||
SingaporeIDFrontRecognitionResult singaporeIDResult = (SingaporeIDFrontRecognitionResult) result; | ||
|
||
mExtractedData.add(mBuilder.build( | ||
R.string.PPDocumentNumber, | ||
singaporeIDResult.getCardNumber() | ||
)); | ||
|
||
mExtractedData.add(mBuilder.build( | ||
R.string.PPFullName, | ||
singaporeIDResult.getName() | ||
)); | ||
mExtractedData.add(mBuilder.build( | ||
R.string.PPRace, | ||
singaporeIDResult.getRace() | ||
)); | ||
mExtractedData.add(mBuilder.build( | ||
R.string.PPDateOfBirth, | ||
singaporeIDResult.getDateOfBirth() | ||
)); | ||
mExtractedData.add(mBuilder.build( | ||
R.string.PPSex, | ||
singaporeIDResult.getSex() | ||
)); | ||
mExtractedData.add(mBuilder.build( | ||
R.string.PPCountryOfBirth, | ||
singaporeIDResult.getCountryOfBirth() | ||
)); | ||
} | ||
|
||
return mExtractedData; | ||
} | ||
} |
Oops, something went wrong.