class Abbyy::Models::ProcessImageRequest
Overview
Request object for /processImage API-method.
Included Modules
Defined in:
abbyy/models/process_image_request.crConstant Summary
-
ALLOWED_EXPORT_FORMATS =
ExportFormat.values - [ExportFormat::V_Card, ExportFormat::Csv]
-
ALLOWED_PROFILES =
Profile.values - [Profile::FieldLevelRecognition]
-
ALLOWED_TEXT_TYPES =
TextType.values - [TextType::Handprinted]
-
DEFAULT_CORRECT_ORIENTATION =
true
-
DEFAULT_CORRENT_SKEW =
true
-
DEFAULT_DESCRITION =
""
-
DEFAULT_EXPORT_FORMAT =
ExportFormat::Rtf
-
DEFAULT_IMAGE_SOURCE =
ImageSource::Auto
-
DEFAULT_LANGUAGE =
Language::English
-
DEFAULT_PDF_PASSWORD =
""
-
DEFAULT_PDF_WRITE_TAGS =
PdfWriteTag::Auto
-
DEFAULT_PROFILE =
Profile::DocumentConversion
-
DEFAULT_READ_BARCODES =
true
-
DEFAULT_TEXT_TYPE =
TextType::Normal
-
DEFAULT_XML_WRITE_RECOGNITION_VARIANTS =
false
Constructors
Instance Method Summary
-
#correct_orientation : Bool | Nil
Specifies whether the orientation of the image should be automatically detected and corrected.
-
#correct_orientation=(correct_orientation : Bool | Nil)
Specifies whether the orientation of the image should be automatically detected and corrected.
-
#correct_skew : Bool | Nil
Specifies whether the skew of the image should be automatically detected and corrected.
-
#correct_skew=(correct_skew : Bool | Nil)
Specifies whether the skew of the image should be automatically detected and corrected.
-
#description : String | Nil
Contains the description of the processing task.
- #description=(description : String | Nil)
-
#export_format : ExportFormat | Array(ExportFormat) | Nil
Specifies the export format.
- #export_format=(export_format : ExportFormat | Array(ExportFormat) | Nil)
-
#image_source : ImageSource | Nil
Specifies the source of the image.
-
#image_source=(image_source : ImageSource | Nil)
Specifies the source of the image.
-
#language : Language | Array(Language) | Nil
Specifies recognition language of the document.
-
#language=(language : Language | Array(Language) | Nil)
Specifies recognition language of the document.
- #params : Hash(String, String)
-
#pdf_password : String | Nil
Contains a password for accessing password-protected images in PDF format.
-
#pdf_password=(pdf_password : String | Nil)
Contains a password for accessing password-protected images in PDF format.
-
#pdf_write_tags : PdfWriteTag | Nil
Specifies whether the result must be written as tagged PDF.
-
#pdf_write_tags=(pdf_write_tags : PdfWriteTag | Nil)
Specifies whether the result must be written as tagged PDF.
-
#profile : Profile | Nil
Specifies a profile with predefined processing settings.
- #profile=(profile : Profile | Nil)
-
#read_barcodes : Bool | Nil
Specifies whether barcodes must be detected on the image, recognized and exported to the result file.
-
#read_barcodes=(read_barcodes : Bool | Nil)
Specifies whether barcodes must be detected on the image, recognized and exported to the result file.
-
#text_type : TextType | Array(TextType) | Nil
Specifies the type of the text on a page.
- #text_type=(text_type : TextType | Array(TextType) | Nil)
-
#xml_write_recognition_variants : Bool | Nil
Specifies whether the variants of characters recognition should be written to an output file in XML format.
-
#xml_write_recognition_variants=(xml_write_recognition_variants : Bool | Nil)
Specifies whether the variants of characters recognition should be written to an output file in XML format.
Instance methods inherited from module Abbyy::Models::FileBody
body : HTTP::Client::BodyType
body,
file_path : String
file_path,
file_path=(file_path : String)
file_path=
Constructor methods inherited from module Abbyy::Models::FileBody
new(file_path : String)
new
Instance methods inherited from class Abbyy::Models::BaseRequest
body : HTTP::Client::BodyType
body,
params : Hash(String, String)
params
Constructor Detail
Instance Method Detail
Specifies whether the orientation of the image should be automatically detected and corrected. It can have one of the following values:
- true The page orientation is automatically detected, and if it differs from normal the image is rotated.
- false The page orientation detection and correction is not performed.
This parameter is not required.
Default value is true.
Specifies whether the orientation of the image should be automatically detected and corrected. It can have one of the following values:
- true The page orientation is automatically detected, and if it differs from normal the image is rotated.
- false The page orientation detection and correction is not performed.
This parameter is not required.
Default value is true.
Specifies whether the skew of the image should be automatically detected and corrected. It can have either true or false value.
This parameter is not required.
Default value is true.
Specifies whether the skew of the image should be automatically detected and corrected. It can have either true or false value.
This parameter is not required.
Default value is true.
Contains the description of the processing task. Cannot contain more than 255 characters.
This parameter is not required.
Specifies the export format. This parameter can contain up to three export formats, in an array for example:
[ExportFormat::Pdfa, ExportFormat::Txt, ExportFormat::Xml]
The available formats are:
ExportFormat::Txt
The recognized text is exported to the file line by line from left to right. E.g. if the text was originally put in columns, the first lines of every column will be saved, then the second lines, etc. Please take into account the fact that in this format only text will be saved. No images or barcodes will remain in the output file. If you want to save the barcode recognition results in the exported file, use theExportFormat::TxtUnstructured
format.ExportFormat::TxtUnstructured
The exported file contains the text that was saved according to the order of the original blocks.ExportFormat::Rtf
ExportFormat::Docx
ExportFormat::Xlsx
ExportFormat::Pptx
ExportFormat::PdfSearchable
The entire image is saved as a picture, the recognized text is put under it.ExportFormat::PdfTextAndImages
The recognized text is saved as text, and the pictures are saved as pictures.- `ExportFormat::Pdfa The file is saved in the PDF/A-1b format, with the entire image saved as a picture, and recognized text put under it.
ExportFormat::Xml
- `ExportFormat::XmlForCorrectedImage The same as Xml, but all coordinates written into the output XML file relate to the corrected image, not the original.
ExportFormat::Alto
If either of XML export formats is selected, barcodes are recognized on the image and saved to output XML no matter which profile is used for recognition.
Please note that setting multiple export formats does not affect the cost of task processing.
This parameter is not required.
Default value is ExportFormat::Rtf
.
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:
ImageSource::Auto
The image source is detected automatically.ImageSource::Photo
ImageSource::Scanner
This parameter is not required.
Default value is ImageSource::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:
ImageSource::Auto
The image source is detected automatically.ImageSource::Photo
ImageSource::Scanner
This parameter is not required.
Default value is ImageSource::Auto
.
Specifies recognition language of the document. This parameter can contain one language or several languages in an array, for example:
request.language = Language::Spanish
# or
request.language = [
Language::English,
Language::French,
Language::German,
]
See the list of available recognition languages.
This parameter is not required.
Default value is Language::English
.
Specifies recognition language of the document. This parameter can contain one language or several languages in an array, for example:
request.language = Language::Spanish
# or
request.language = [
Language::English,
Language::French,
Language::German,
]
See the list of available recognition languages.
This parameter is not required.
Default value is Language::English
.
Contains a password for accessing password-protected images in PDF format.
This parameter is not required.
Contains a password for accessing password-protected images in PDF format.
This parameter is not required.
Specifies whether the result must be written as tagged PDF. This parameter can be used only if the exportFormat parameter contains one of the values for export to PDF. It can have one of the following values:
PdfWriteTag::Auto
Automatic selection: the tags are written into the output PDF file if it must comply with PDF/A-1a standard, and are not written otherwise.PdfWriteTag::Write
PdfWriteTag::DontWrite
This parameter is not required.
Default value is PdfWriteTag::Auto
.
Specifies whether the result must be written as tagged PDF. This parameter can be used only if the exportFormat parameter contains one of the values for export to PDF. It can have one of the following values:
PdfWriteTag::Auto
Automatic selection: the tags are written into the output PDF file if it must comply with PDF/A-1a standard, and are not written otherwise.PdfWriteTag::Write
PdfWriteTag::DontWrite
This parameter is not required.
Default value is PdfWriteTag::Auto
.
Specifies a profile with predefined processing settings. It can be one of the following:
Profile::DocumentConversion
Profile::DocumentArchiving
Profile::TextExtraction
Profile::BarcodeRecognition
This parameter is not required.
Default value is Profile::DocumentConversion
.
Specifies whether barcodes must be detected on the image, recognized and exported to the result file. It can have either true or false value.
This parameter is not required.
Default value is true for Xml export format and false in other cases.
Specifies whether barcodes must be detected on the image, recognized and exported to the result file. It can have either true or false value.
This parameter is not required.
Default value is true for Xml export format and false in other cases.
Specifies the type of the text on a page. This parameter may also contain several text types in an array, for example:
[TextType::Normal, TextType::Matrix]
The following values can be used:
- TextType::Normal
- TextType::Typewriter
- TextType::Matrix
- TextType::Index
- TextType::OcrA
- TextType::OcrB
- TextType::E13b
- TextType::Cmc7
- TextType::Gothic
This parameter is not required.
Default value is TextType::Normal
.
Specifies whether the variants of characters recognition should be written
to an output file in XML format. This parameter can be used only if the
#export_format
parameter contains ExportFormat::Xml
value.
The parameter can have one of the following values:
- true
- false
Specifies whether the variants of characters recognition should be written
to an output file in XML format. This parameter can be used only if the
#export_format
parameter contains ExportFormat::Xml
value.
The parameter can have one of the following values:
- true
- false