public final class SpenSignatureVerification extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SpenSignatureVerification.ResultListener
This listener interface provides callback methods for getting signature recognition results.
Register this listener to get results for the request(List) method. |
| Modifier and Type | Field and Description |
|---|---|
static int |
VERIFICATION_LEVEL_HIGH
High level security for signature verification.
|
static int |
VERIFICATION_LEVEL_LOW
Low level security for signature verification.
|
static int |
VERIFICATION_LEVEL_MEDIUM
Medium level security for signature verification.
|
| Modifier and Type | Method and Description |
|---|---|
void |
completeRegistration()
Apply registering signature.
The method confirms the signature registration after the minimum number of registration is satisfied. |
int |
getMinimumRequiredCount()
Get the minimum number of signatures required for the signature engine to verify a signature.
Signatures required can vary from engine to engine. |
int |
getRegisteredCount()
Get the number of registered signatures.
|
int |
getVerificationLevel()
Get the current security level for signature verification.
|
boolean |
isRegistrationCompleted()
Check if the registered signature exists.
|
boolean |
isRegistrationPrepared()
Check if the registration counts is satisfied with the minimum required registration count.
|
void |
prepareRegistration(List<SpenObjectStroke> stroke)
Add a signature to train signature model.
This method adds one signature to train signature model. |
void |
register(List<SpenObjectStroke> stroke)
Register a signature.
This method registers one signature at a time. |
void |
request(List<SpenObjectStroke> stroke)
Verify the specified stroke input and request the results.
The response for this method is returned asynchronously. |
void |
setResultListener(SpenSignatureVerification.ResultListener listener)
Set the
SpenSignatureVerification.ResultListener instance to receive results for the request(List) method.You can call request(List) after setting the listener. |
void |
setVerificationLevel(int level)
Set the specified security level for signature verification.
Higher levels provide more security. |
void |
unregisterAll()
Remove all the registered signatures.
You cannot remove a signature selectively. |
public static final int VERIFICATION_LEVEL_LOW
public static final int VERIFICATION_LEVEL_MEDIUM
public static final int VERIFICATION_LEVEL_HIGH
public int getMinimumRequiredCount()
IllegalStateException - Thrown if the signature verification plug-in cannot be loaded.public void register(List<SpenObjectStroke> stroke) throws Exception
stroke - The list of strokes of the signature that you want to registered.IllegalStateException - Thrown when the signature verification plug-in is not loaded.IllegalArgumentException - Thrown when the stroke passed is invalid.InvocationTargetException - Thrown when the signature verification engine returns an error.ExceptiongetMinimumRequiredCount(),
unregisterAll()public void unregisterAll()
throws Exception
IllegalStateException - Thrown when the signature verification engine is not loaded yet.InvocationTargetException - Thrown if the recognition engine returns an error.Exceptionregister(List)public int getRegisteredCount()
IllegalStateException - Thrown when the signature verification engine is not loaded yet.register(List),
getMinimumRequiredCount()public void setVerificationLevel(int level)
level - The security level for signature verification.IllegalStateException - Thrown when the signature verification plug-in is not loaded yet.getVerificationLevel(),
VERIFICATION_LEVEL_HIGH,
VERIFICATION_LEVEL_MEDIUM,
VERIFICATION_LEVEL_LOWpublic int getVerificationLevel()
IllegalStateException - Thrown when the signature verification plug-in is not loaded yet.setVerificationLevel(int)public void request(List<SpenObjectStroke> stroke) throws Exception
SpenSignatureVerification.ResultListener instance.stroke - The list of input strokes for signature verification.IllegalStateException - Thrown when the signature verification engine is not loaded.InvocationTargetException - Thrown when the engine returns an error.ExceptionsetResultListener(ResultListener)public void setResultListener(SpenSignatureVerification.ResultListener listener) throws Exception
SpenSignatureVerification.ResultListener instance to receive results for the request(List) method.request(List) after setting the listener.listener - The ResultListener instance to receive results for the request(List) method.InvocationTargetException - Thrown when the engine returns an error.Exceptionrequest(List)public void prepareRegistration(List<SpenObjectStroke> stroke) throws Exception
completeRegistration()
to store signature model after the minimum number of signatures are added.stroke - The list of strokes of the signature that you want to registered.Exception - Thrown when the engine returns an error.InvocationTargetException - Thrown if the recognition engine returns an error.completeRegistration()public boolean isRegistrationPrepared()
throws Exception
IllegalStateException - Thrown when the engine returns an error.InvocationTargetException - Thrown if the recognition engine returns an error.Exceptionregister(List),
getRegisteredCount()public void completeRegistration()
throws Exception
Exception - Thrown when the engine returns an error.InvocationTargetException - Thrown if the recognition engine returns an error.register(List)public boolean isRegistrationCompleted()
InvocationTargetException - Thrown if the recognition engine returns an error.#completeRegistration(List),
getRegisteredCount()