The method allows you to recognize a business card on an image. The method loads the image, creates a processing task for the image with the specified parameters, and passes the task for processing.
Customize the following request URL according to your application processing location:
[POST] https://<PROCESSING_LOCATION_ID>.ocrsdk.com/v2/processBusinessCard
The image file is transmitted in the request body. See the list of supported input formats.
Parameters
Parameter | Is required | Default value | Description |
---|---|---|---|
language | No | "English" | Specifies recognition language of the document. This parameter can contain several language names separated with commas, for example "English,French,German". See the list of available recognition languages. |
imageSource | No | "auto" |
Specifies the source of the image. It can be either a scanned image, or a photograph created with a digital camera. Special preprocessing operations can be performed with the image depending on the selected source. For example, the system can automatically correct distorted text lines, poor focus and lighting on photos. The value of this parameter can be one of the following:
|
correctOrientation | No | "true" | Specifies whether the orientation of the image should be automatically detected and corrected. It can have one of the following values:
|
correctSkew | No | "true" | Specifies whether the skew of the image should be automatically detected and corrected. It can have either true or false value. |
exportFormat | No | "vCard" |
Specifies the export format. It can be one of the following:
|
xml:writeExtendedCharacterInfo | No | "false" | Specifies whether the additional information on the recognized characters (e.g. whether the character is recognized uncertainly) should be written to an output file in XML format. This parameter can be used only if the exportFormat parameter is set to xml. The parameter can have one of the following values:
|
xml:writeFieldComponents | No | "false" |
Specifies whether the field components should be written to an output file in XML format. For example, for the Name field the components can include first name and last name, returned separately. This parameter can be used only if the exportFormat parameter is set to xml. The parameter can have one of the following values:
|
description | No | "" | Contains the description of the processing task. Must contain no more than 255 characters. |
pdfPassword | No | "" | Contains a password for accessing password-protected images in PDF format. |
Status codes and response format
General status codes and response format of the method are described in HTTP Status Codes and Response Formats.
Output XML file format
If the exportFormat parameter is set to xml, the result of processing is returned in an XML file of the following format:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ocrsdk.com/schema/recognizedBusinessCard-1.0.xsd http://ocrsdk.com/schema/recognizedBusinessCard-1.0.xsd" xmlns="http://ocrsdk.com/schema/recognizedBusinessCard-1.0.xsd"> <businessCard imageRotation="noRotation"> <field type="Phone"> <value>783-37-00</value> </field> <field type="Fax"> <value>783-26-63</value> </field> <field type="Email"> <value>john_sm@abbyy.com</value> </field> <field type="Web"> <value>www.abbyy.com</value> </field> <field type="Address"> <value>890 Hillview Court, Suite 300, Milpitas, CA 95035, USA</value> </field> <field type="Name"> <value>John Smith</value> </field> <field type="Company"> <value>ABBYY Headquarters</value> </field> <field type="Job"> <value>Product Analyst</value> </field> <field type="Text"> <value>ABBYY ABBYY Headquarters John Smith Product Analyst ABBYY Headquarters O890 Hillview Court, Suite 300, Milpitas, CA 95035, USA john_sm@abbyy.com www.abbyy.com </value> </field> </businessCard> </document>
Note: The imageRotation attribute is supported only for the output xml format. This attribute specifies rotation that was performed upon the input image, namely:
- noRotation - this value denotes no rotation
- clockwise - rotation 90 degrees clockwise
- counterclockwise - rotation 90 degrees counterclockwise (270 degrees clockwise)
- upsideDown - rotation upside down (180 degrees).
See the XSD schema of an XML file.
Description of business card fields
Below you can see the list of the fields which can be recognized on a business card. Some of the fields can also contain field components (such as zip code and city for the address).
Field name | Possible components | Description |
---|---|---|
Name | FirstName LastName MiddleName ExtraName |
The person's name. |
Phone | PhonePrefix PhoneCountryCode PhoneCode PhoneBody PhoneExtension |
The phone number. |
Mobile | PhonePrefix PhoneCountryCode PhoneCode PhoneBody PhoneExtension |
The mobile phone number. |
Fax | PhonePrefix PhoneCountryCode PhoneCode PhoneBody PhoneExtension |
The fax number. |
Company | The company's name. | |
Job | JobPosition JobDepartment |
The person's position in the company. |
Address | ZipCode Country City StreetAddress |
This can be the company's address or the personal address. |
The e-mail address. | ||
Web | The company's or personal website. | |
Text | This field contains all the text recognized on the business card. |
Comments
0 comments
Please sign in to leave a comment.