Explore the release highlights and key improvements here.
π New:
General:
Added the option to update the configuration object at runtime via a new updateConfiguration function.
Document Scanner:
Added DocumentEnhancer with a straighten method that removes crinkles, creases, folds, and curl from document photos. It is enabled by default in the RTU UI and automatically applied in auto-cropping flows. See the Document Enhancer documentation for details.
Support for recognizing cropped documents. DocumentScannerParameters now includes alreadyCroppedScoreThreshold, and DocumentDetectionScores now includes alreadyCroppedScore. In single-shot mode, if no document is detected and the score exceeds this threshold, a new DocumentDetectionStatus value OK_BUT_ALREADY_CROPPED is returned, along with a quad (points) corresponding to the image corners. This feature is supported by all downstream components of the Document Scanner (Check Scanner, Credit Card Scanner, Document Classifier, Document Data Extractor, and Medical Certificate Scanner).
Document Quality Analyzer:
A new Document Quality Analyzer algorithm was introduced. The result object's quality property can now be ACCEPTABLE, UNACCEPTABLE, or UNCERTAIN, indicating whether a user-provided document image meets the required quality standard. Advanced configuration is available using the qualityAnalysisModel parameter, which allows the Document Quality Analyzer to be fine-tuned for specific use cases using an external script. This capability is currently in closed beta. To request access and obtain the script, sign up here.
Added a threshold parameter for categorizing documents into three classes: ACCEPTABLE, UNACCEPTABLE, and UNCERTAIN.
Added the inputScales option to run the model at multiple resolutions and automatically select the best result.
Added the inputScaleThresholdToProcessEntireImage option to run the Document Quality Analyzer on the entire image, even when minProcessedFraction and maxProcessedFraction are not equal to 1 for small input scales.
The resulting bestInputScale is now included in the output.
Added compatibilityMode property to DocumentQualityAnalyzerConfiguration to allow running the legacy (v8) document quality analysis engine.
Check Scanner:
Added support for more USA check formats. Newly supported formats: (TT)xxx(TT)xxxx(UU)xxx(UU), and the ones enumerated in the MICR line identification documentation.
Added support for xxx-xxx-x account number format for Canadian checks.
Credit Card Scanner:
Introduced a Credit Card Scanner view for scanning credit cards in live mode.
Barcode Scanner:
Added a TwoDDecodingMode to the barcode configuration. It defaults to HIGH_EFFORT and can be set to LOW_EFFORT for very low-power devices requiring higher frame rates.
π Improvements:
Document Scanner:
Updated document detector models with improved accuracy.
Partially visible documents are now supported in all processing modes. Auto and single-shot modes now return the ERROR_PARTIALLY_VISIBLE document status when only 1β3 document corners are visible in the input image and the scanner is configured with allowPartiallyVisibleDocuments = true.
Document Quality Analyzer:
Increased the default threshold for minRequiredOrientationConfidence to 0.9, reducing false positives in orientation estimation.
Orientation detection now considers text at any angle, not just within Β±10Β° of 0Β°, 90Β°, 180Β°, or 270Β°. For orientation estimation, text at any angle is rounded to the nearest multiple of 90Β° β for example, a 30Β° angle yields a predicted orientation of 0Β°.
Improved performance on very bright or very dark images.
Speed improvements for non-SIMD builds.
OCR Engine:
Improved Γ/αΊ recognition.
Increased accuracy without increasing inference time.
Text Pattern Scanner:
Increased detection frequency, resulting in more onTextDetected result calls and more frequent validation of results (validationSuccessful = true).
VIN Scanner:
Increased detection frequency, resulting in more onTextDetected result calls and more frequent validation of results (validationSuccessful = true).
Live or single-shot mode, derived from the input image, is now propagated to the internal barcode scanner.
Document Data Extractor:
Document types are now classified using an ML model, resulting in higher quality and faster recognition.
Check Scanner:
For Canadian checks, the scanner now allows more whitespace characters in the MICR line.
Credit Card Scanner:
Various improvements to check digit validation and aspect ratio handling.
Barcode Scanner:
Reduced the false positive rate for barcode formats EAN-8, EAN-13, and UPC-A when enableOneDBlurScanner is enabled (now the default).
Improved recall and precision for barcode formats EAN-8, EAN-13, UPC-A, and UPC-E when ink spread is present.
Data Matrix codes can now be scanned under harsher conditions. With HIGH_EFFORT enabled, scanning works even on curved surfaces or when the code is partially occluded.
π Bug fixes:
General:
Fixed an issue where the flashlight remained on after leaving the camera screen.
Document Quality Analyzer:
Fixed ProcessByTileConfiguration.enabled being ignored regardless of its value.
Document Data Extractor:
Fixed an issue where documents containing Cyrillic text were sometimes classified incorrectly.
Check Scanner:
Fixed missing support for longer check number fields on Canadian checks.
Barcode Scanner:
Fixed an arithmetic exception occurring when processing images with very small heights (lower than 5 px) in single-shot mode.
Fixed the orientation of quads for barcode formats DataBar and DataBar Expanded with multiple stacks.
Fixed a rare issue with the DataBar barcode format, which could lead to a crash.
β οΈ Breaking changes:
General:
All APIs that receive or return normalized coordinates of points assume that normalization is performed by dividing image coordinates by (width - 1, height - 1) instead of (width, height). This ensures that rotation operations that are performed on the normalized coordinates are mathematically correct. Callers that call functions that receive normalized coordinates or process results with normalized points and perform conversion on their own should adjust their implementations.
Revamped core camera change logic:
CameraFacingMode enum now contains options environment and user instead of back and front.
Removed the swapCameraFacing mode function. The API functions are now setFacingMode and switchCamera.
Removed setFinderVisible function. Use updateConfiguration instead to update the finder.visible property of the configuration object.
Document Scanner:
The RTU UI has three properties: acceptWhenAcceptableButton, retakeButton, and proceedAnywayButton.
Renamed the style field to title in TextWithBadgeButtonMode and the text field to title in TextButtonMode.
Updated the Acknowledge Screen logic in the RTU UI Document Scanner to properly handle document quality scenarios. The unacceptableQuality acknowledgment mode now shows the Acknowledge Screen for "document not found" cases when documentNotFoundWarning.visible is configured to true. This may change the behavior for applications relying on the previous logic where "document not found" cases were always bypassed in unacceptableQuality mode.
Removed AcknowledgementScreenConfiguration.badImageHint. Use documentNotFoundWarning, uncertainQualityWarning, and unacceptableQualityWarning parameters to control the hints shown in the Acknowledge Screen.
Strings were introduced for the Acknowledge Screen in the RTU UI Document Scanner to support the new document quality scenarios. Update custom translations for the Acknowledge Screen to include these strings: proceedAnywayButtonDocumentNotFound, proceedAnywayButtonUnacceptableQuality, proceedAnywayButtonUncertainQuality, acknowledgementWarningDocumentNotFound, acknowledgementWarningUnacceptableQuality, and acknowledgementWarningUncertainQuality.
PDF & TIFF Generation:
When adding a PNG file to a PDF, the image is now always re-encoded as JPEG. Previously, this occurred only in specific situations.
sdk.releaseObject has been replaced by sdk.discardTiff and sdk.discardPdf.
Document Quality Analyzer:
The configuration properties qualityThresholds and qualityIndices have been renamed to qualityLevelThresholds and qualityLevelIndices. The renamed properties are now deprecated; use the new qualityAnalysisModel property instead.
The detectOrientation option has been removed. Orientation detection now always runs.
The inspectSmallText option has been removed.
Document Data Extractor:
When initialized with no accepted document types, or only invalid ones, and with MRZ fallback disabled, an InvalidArgument error is now thrown.
Check Scanner:
Leading and trailing whitespace for all USA check fields is now trimmed.
A group of numbers in the Canadian check account number section preceding the first dash is now treated as a designation number only if its length is 4. Previously, a sequence of any length was treated as a designation number. Dashes present in the MICR line are preserved in the Account Number parsed field.
β οΈ Deprecations:
Document Quality Analyzer:
The DocumentQuality enum and result object property are deprecated; use DocumentQualityAssessment instead.
The DocumentQualityAnalyzerResult.documentFound property is now deprecated. This deprecated property indicates if too few characters are detected. The new DocumentQualityAssessment will be reported as UNCERTAIN in this situation. If this is not suitable for your use case, consider using the Document Scanner instead to determine if an image contains a document. In the RTU UI Document Scanner, the documentNotFoundWarning case is now based on the Document Scanner output.
qualityLevelThresholds and qualityLevelIndices are deprecated (see Breaking changes).
π Under the hood:
Updated magic_enum to version 0.9.7.
Added a new barcode decoding model, increasing SDK size by approximately 650 KB.
RTU UI: Implemented a new unified navigation bar; all scanners now include a camera switch button.
Document Scanner:
Added FIT_IN support for cameraPreviewMode.
Added an option to disable automatic cropping.
Image Processing:
New ColorDocumentShadowRemovalFilter capable of removing shadows from documents without damaging text, barcodes, or images.
PDF Generation:
Added a binarization option.
Document Quality Analyzer:
Added an option to explicitly enable/disable by tile processing via ProcessByTileConfiguration.
Text Pattern Scanner:
Added the option optimizeSingleLine to TextPatternScannerConfiguration. Enable this option when scanning
a single line or a single word that is hard to scan reliably. Disabled by default.
Document Data Extractor:
Introduced PersonalId common field type.
Added support for Romanian, Italian, Turkish, and Polish ID cards.
Barcode Scanner:
Added the fpsLimit property to limit the frames per second for scanning. This can be used to reduce CPU usage on low-end devices.
All 1D barcode formats can be configured with a new oneDConfirmationMode which is THOROUGH by default.
Setting it to MINIMAL or NONE could lead to higher recall in difficult scenarios, but could also cause more false positives.
π Improvements:
General:
Improved default camera selection heuristics for devices with multiple cameras.
Added explicit enum definitions for document model configuration options that accept enum values.
Document Quality Analyzer:
Tiling is now enabled by default to reduce peak memory usage.
If the provided configuration is invalid, an error will be returned instead of changing invalid fields to default values.
OCR Engine:
New model with better performance for German diacritics and the Γ character.
Added support for TR, PO, IT, and RO alphabets.
Document Data Extractor:
Reduced the likelihood of reading incorrect values for eye color on German ID cards (e.g., GRUN instead of GRΓN).
Check Scanner:
Support a wider range of USA check formats.
Barcode Scanner:
Clean barcodes (QR Code, DataMatrix, and all 1D formats) are detected faster in single-shot mode and can be detected without a quiet zone.
Improved recognition of DataMatrix codes under challenging conditions.
Significantly improved decoding performance for truncated PDF417 barcodes.
Reduced false-positives rate for Code 128.
π Bug fixes:
General:
Fixed an issue where the grace period of expired licenses was not respected.
Fixed an issue where setting the finder visibility to false in the scanner configuration did not hide the viewfinder.
Fixed an issue where a black screen was shown in case of camera permission error.
Fixed an issue where the front camera and/or external camera was not selected on some devices with multiple cameras.
Document Scanner:
Fixed the Cropping Screen image not being centered horizontally on larger screens.
Classic UI: Fixed the incorrect image being loaded from storage.
RTU UI: Fixed an issue where the scanner went into manual mode after opening the file selector dialog.
RTU UI: Fixed an issue where the underlying view could be scrolled beneath the scanner view on Safari.
RTU UI: Fixed the rotation not being applied to the detected document.
RTU UI: Fixed the incorrect "processing" state when rapidly clicking the shutter button multiple times.
RTU UI: autoRotateImages should now work properly in all cases.
PDF Generation:
Fixed an issue where empty pages were generated for images when resampling was used in certain cases.
Fixed an issue where invalid sandwich PDFs were generated.
MRZ Scanner:
Fixed a rare crash with inverted text.
Document Data Extractor:
Fixed an issue where scanning illegible documents could cause the scanner to return OkButInvalidDocument status.
Check Scanner:
Fixed an issue where scanning was not resumed after being paused.
β οΈ Breaking changes:
Image Processing:
ColorDocumentFilter: Removed unused parameters.
Document Quality Analyzer:
The minProcessedFraction, maxProcessedFraction, minNumberOfRequiredSymbols, and tileSize options are moved into the separate ProcessByTileConfiguration.
Document Data Extractor:
Document type enum values are now static properties of the document type, e.g. AAMVADocumentType is now AAMVA.DOCUMENT_TYPE.
Barcode Scanner:
RTU UI: The scanner objects now accept an entire scannerConfiguration property of type BarcodeScannerConfiguration.
Reduced the number of false-positive Codabar barcodes when scanning in live mode and the barcode is only partially visible.
Removed enableOneDBlurScanner option from common config objects.
The option enableOneDBlurScanner is now disabled by default for UPC/EAN barcodes.
The barcodeFormats property has been replaced by barcodeFormatConfigurations, which allows more fine-grained configuration of each barcode format.
Previous functionality can be replicated as follows: barcodeFormatConfigurations = [ new ScanbotSDK.Config.BarcodeFormatCommonConfiguration({ formats: ["PDF_417", ...] })].
Reviewed security policy and updated to the new and improved wasm-unsafe-eval CSP header standard.
The more comprehensive unsafe-eval exception is no longer required.
Document Scanner:
Can now detect partially visible documents where all four corners are not visible.
Introduced a new PartiallyVisibleDocumentConfiguration object to determine how partially visible documents
are aggregated and tracked. This feature is disabled by default.
Added two new DocumentDetectionStatus values:
ERROR_PARTIALLY_VISIBLE
ERROR_PARTIALLY_VISIBLE_TOO_CLOSE
The DocumentDetectionResult now includes two new properties to indicate the direction towards the center of a partially visible document:
displacementVector
displacement
Barcode Scanner
A new algorithm is used for recognition of 1D symbologies, improving the blurred and distant barcode use cases. This feature is enabled by default, but might be disabled via the enableOneDBlurScanner on low-power devices if needed.
Added a new BarcodeScannerEngineMode: NEXT_GEN_MAX_DISTANCE, which is optimized for scanning from far distances on very high-power devices with a 4K video stream.
Introduced 4K stream support: BarcodeScannerViewConfiguration.enable4kStream. Should be enabled for high-powered
devices and complex and/or distant barcodes. Can cause memory issues on low-end devices. Disabled by default.
BarcodeItem has a new field rawBytesEncodings that contains the precise character encoding information of rawBytes.
BarcodeItem has a new field structuredAppendInfo for messages split across multiple barcodes.
BarcodeScannerConfiguration has a new field accumulationConfig which allows the accumulation of barcodes over multiple frames in live mode.
BarcodeItem has a new field globalIndex to identify a barcode across multiple frames.
MRZ Scanner:
Added a property to MrzScannerConfiguration that allows setting whether crops should be returned. (Default: false).
Document Quality Analyzer:
Added an option (inspectSmalltext property) to detect small text. Ignored by default.
Added cumulativeContrastHistogram and cumulativeTextSizeHistogram for text contrast and text size estimation.
Added orientationConfidence of the document as a new analysis property.
π Improvements
General:
All OCR-based features now benefit from new OCR models that are optimized for speed and accuracy.
Improved error messages when a feature is accessed that is not available in the loaded flavor of the SDK.
The definition of DeepPartial has been improved so that it now requires _type for polymorphic types.
Document Scanner
Increased performance for Document Scanner algorithms.
Improved storage performance and reliability.
PDF Generator with OCR layer now handles non-ASCII characters correctly.
Aspect ratio scores are now symmetrical, and low scores are more consistent.
PDF Generation:
PDF generation now supports binarized images. Binarized images are stored in the PDF with an optimized compression algorithm,
PDF Generator with OCR layer now handles non-ASCII characters correctly.
resulting in extremely small file sizes.
Document Quality Analyzer:
Speed improvements. Note: document quality scores may slightly change for the same input images when compared to the previous version of the DoQA.
Barcode Scanner
Boarding pass document parser now supports up to version 8 of the IATA-BCBP standard.
vCard document parser was improved.
GS1 Composite codes are now processed faster in Scan from Image mode.
MRZ Scanner:
On US border crossing permits, the document number is now returned in the correct field.
Dates in MRZ now also support parsedData correctly.
Text Pattern Scanner:
General speed improvements.
Now supports XNNPACK for faster inference.
OCR-based features:
Improved handling of special characters like umlauts when frame accumulation is used.
π Bug fixes
Document Scanner
Fixed a rare division by zero crash.
Now correctly returns ERROR_TOO_DARK when nothing is detected and the image brightness is below the threshold.
MRZ Scanner
RTU-UI v2: Fixed issue where preset overlay was not shown in some cases.
Fixed a rare division by zero crash.
Fixed an issue causing null to be returned as a confidence of empty fields.
Barcode Scanner:
The carrier identifier for MaxiCode mode 3 might be encoded by using different codewords. Now, all possible codewords are checked.
vCard document parser now correctly processes the FN key as FormattedName.
β οΈ Breaking Changes
General
Adopted a new API design model: Results retrieved from ScanbotSDK scanners are now suffixed with *Result.
Unified scanner view configuration's scanner configurations under *ViewConfiguration.scannerConfiguration.
Removed recognizeURL from various still image scan services. Use our new Image class API to fetch images from URLs.
Image operations (rotate, resize, crop, filter) are now located under the ImageProcessor service (sdk.createImageProcessor()).
Document Scanner
The still image detection function detectAndCropDocument returns DocumentScannerScanResponse,
which contains the original image as well as DocumentScanningResult.
Exposed the more comprehensive and unified DocumentScannerConfiguration to the corresponding classic component
instead of DocumentScannerParameters. The parameter object is now a property of the configuration object.
Renamed DocumentDetectionResult to DocumentScanningResult.
processingMode has been moved from DocumentScannerParameters to DocumentScannerConfiguration.
Deprecated CroppedDetectionResult in favor of DocumentScannerScanResponse.
Removed DocumentScannerViewConfiguration.ignoreBadAspectRatio. Please use DocumentScannerViewConfiguration's
scannerConfiguration.parameters.aspectRatios and scannerConfiguration.parameters.acceptedAspectRatioScore.
RTU-UI v2: Removed the ERROR_TOO_NOISY and OK_BUT_OFF_CENTERDocumentDetectionStatus values.
Image Processing:
Filters: The ColorDocumentFilter now works slightly differently by default. To get the previous behavior, set paperWhitening=0 and paperWhiteningBias=64.
MRZ Scanner
Removed SimpleMrzRecognizer (createSimpleMRZRecognizer) in favor of the new unified MrzScanner (createMrzScannerEngine).
Added minimumInsets and preferredHeight to ViewFinderConfiguration in order to change its size and location.
RTU-UI: Added the option to insert HTML links directly into camera permission denied screen.
Added pattern grammar to pattern content validation. Selectable grammars are: WILDCARD and REGEX.
Added onComplete callback to InitializationOptions to allow better handling of deferred initialization.
Added option to programmatically cancel RTU UI controllers: await ScanbotSDK.UI.abortScanner().
π Improvements:
Slightly changed ViewFinder default size and positioning in order to accommodate the aforementioned new API.
Slightly improved PDF417 barcode recognition.
RTU UI: Introduction screen is now always shown when showAutomatically is set to true.
RTU UI: Improved Barcode Scanner multi-line text handling.
π Bug fixes:
Disabled Clear All button by default in sheet view of Multi Barcode Scanner.
Fixed niche iOS 16 issue where SIMD was supported but Extended Constant Expressions were not, causing the scanner to freeze.
Fixed a bug for Code 93 in case of stripCheckdigits=false (which is the new default behavior) and in case a check digit was an extension character.
RTU UI: Fixed the value of requiredAspectRatios parameter being ignored.
β οΈ Breaking changes:
Renamed the engine modes NEXT_GEN_AR to NEXT_GEN_FAR_DISTANCE and NEXT_GEN_LOW_POWER_AR to NEXT_GEN_LOW_POWER_FAR_DISTANCE.
They were already optimized to scan from far distance. Now, both have been improved so that they can also scan from a short distance.
Removed live property from Barcode Scanner and Document Scanner configs.
MrzScannerView now returns unvalidated (by frame accumulation configuration) results.
Unvalidated results can be filtered out via the success flag.
The MRZ Scanner has new configuration options under MrzScannerConfiguration.recognizerConfiguration.
DocumentScannerViewConfiguration now has a new field detectionParameters of type DocumentScannerParameters,
which incorporates and replaces the parameters acceptedBrightnessThreshold, acceptedAngleScore and acceptedSizeScore.
Additionally, this object allows the configuration of a rectangleOfInterest and an acceptedBrightnessThreshold.
Classic Document Scanner component now returns a DocumentDetectionResult, which has a few new informative fields,
such as the detectionScores and aspectRatio. With these one can fine-tune which scan results are deemed acceptable.
Added an option to configure the Document Detector's aspect ratio tolerance: acceptedAspectRatioScore.
Classic Barcode Scanner: The new BarcodeScannerConfiguration type allows a more fine-grained configuration of the barcode detection process.
For each type of barcode, several parameters can now be controlled, e.g. the minimum quiet zone around 1D barcodes, a regex-filter, etc.
This is only available for the Classic UI, not the Ready-to-Use UI.
Classic and Ready-To-Use Barcode-Scanner: BarcodeItem has a new sizeScore field with a value between 0 and 1 that represents the relative size of the barcode compared
to the size of the input image. All barcode configurations have a new float minimumSizeScore that is set to 0 by default.
All barcodes with sizeScore < minSizeScore are ignored. Note that minSizeScore can be chosen differently for each barcode format.
Classic Barcode Scanner: The BarcodeScannerConfiguration has a new flag onlyAcceptDocuments. If this flag is enabled,
we only return barcodes that were parsed as barcode documents in the list of acceptedDocumentFormats
(if this list is empty, we return all detected barcodes independent of the flag).
Introduced support for new barcode formats that are used in the pharmaceutical industry: PHARMA_CODE, PHARMA_CODE_TWO_TRACK and PZN (Pharmazentralnummer).
Barcode & Document Ready-To-Use UI: Added new camera configuration property idealPreviewResolution. This is directly translated to the ideal property of the videoConstraints object.
Added barcode document parsing to the Ready-To-Use UI Barcode Scanner.
The VIN Scanner now has the option to scan VINs from barcodes.
The Document Quality Analyzer can now also return the orientation of the document in steps of 90 degrees.
Enabled by setting DocumentQualityAnalyzerConfiguration.detectOrientation to true.
Added a new image filter preset - PRESET_5, an improved version of PRESET_4, that also works well on documents with barcodes.
π Improvements:
Improved error handling: Edge cases that prevented the SDK to load in certain scenarios now produce better error messages.
Images from the various API functions are no longer returned as encoded JPEG but as a RawImage.
RawImage objects can be converted to JPEGs using the new function sdk.imageToJpeg.
This speeds up all the API functions that return images, because the slow image-encoding step is now only done on demand.
Most API functions that take images as input now also allow the input to be a RawImage.
The ScanbotSDK.Config namespace now bundles almost all configuration classes of the SDK.
sdk.detectDocument now takes a DocumentDetectorParameters argument, instead of individual parameters.
Classic and Ready-to-Use UI Barcode Scanner: The gs1Handling property now has more fine-grained validation options.
Classic and Ready-to-Use UI Barcode Scanner: Added new EngineMode options called NEXT_GEN_LOW_POWER_AR
and NEXT_GEN_AR which are optimized for detecting multiple barcodes in live mode.
The Barcode Ready-to-Use UI MultipleScanningMode has a new option allowEmptySubmission which defaults to false.
Classic Barcode Scanner: A new flag addAdditionalQuietZone can be set. This flag should be used to scan sharp/tight crops of a barcode.
Classic and Ready-to-Use UI Barcode Scanner: Improved quiet zone handling for the barcode formats ITF, CODE_11, MSI_PLESSEY, IATA_2_OF_5, INDUSTRIAL_2_OF_5 and CODE_25.
sdk.createDocumentQualityAnalyzer configuration object has been revamped.
This new configuration object has many more options to trade off analysis speed vs. accuracy.
The Document Quality Analyzer has been added to the "document-scanner" flavor of the SDK.
The VIN Scanner config now contain a new field detectionConfiguration of type VinScannerConfiguration that
incorporates/replaces most of the previous configuration fields.
The VIN Scanner now returns a VinScannerResult, which contains more detailed information about each
recognized word and character. It also contains information about the scanned barcode (if enabled).
Added optional container property to all Classic scanners, allowing the container element itself to be passed to the SDK,
which solves cases where the document cannot be found by its id, e.g. in case of shadow DOM.
For devices with multiple cameras, we improved our code that decides which camera is chosen for a scanner.
This aims to reduce the number of devices for which a "fish-eye" or telelense camera is picked, which are usually not desirable for scanning.
Improved internal memory management. This should reduce peak memory usage and avoid memory-related crashes on some old devices.
getLicenseInfo now also reports the date when the license will expire.
π Bug fixes:
For ITF, we fixed the usage of minimumTextLength. Before, we used it to check the number of symbols instead of the true text length.
Fixed a bug where AR overlay was not correctly positioned when the video was mirrored.
β οΈ Breaking changes:
The Document Quality Analyzer no longer returns the value NO_DOCUMENT. It now returns null if no document is found.
The old DocumentDetectionResult has been refactored and replaced by CroppedDetectionResult, which now extends a new DocumentDetectionResult.
In SDK initialization, engine has been renamed to enginePath. Note that this parameter is now mandatory.
Removed applyFilter, rotateImageCcw and cropAndRotateImageCcw. Use the new functions imageFilter, imageRotate and imageCrop instead.
The image filter configuration objects have been moved from ScanbotSDK.imageFilters.* to ScanbotSDK.Config.ParametricFilter.*.
sdk.beginTiff signature changed and now takes a TiffGeneratorParameters argument, which has more options than before,
e.g. jpegQuality, the ability to add user-defined fields in the TIFF file, etc.
sdk.beginPdf signature changed and now takes a PdfConfiguration argument, which has more options than before.
Specifically, the ability to add custom attributes in the final PDF file.
Classic Component: Type rename: MrzScannerConfiguration -> MrzScannerViewConfiguration.
The MRZ Scanner returns a MrzScannerResult, which contains a GenericDocument. This result type has a slightly different structure
than before, but provides more detailed information about the recognized MRZ.
MrzScannerConfiguration's accumulatedFrameVerificationConfiguration was moved to MrzScannerConfiguration.recognizerConfiguration.
Classic Component: Type rename: DocumentScannerConfiguration -> DocumentScannerViewConfiguration.
Classic Document Scanner component: The default acceptedSizeScore changed from 75 to 80.
DocumentDetectionStatus and HintTextConfiguration names have changed slightly,
e.g. Error_Brightness was renamed to ERROR_TOO_DARK. Also, the new state OK_BUT_TOO_DARK was added.
Classic Barcode Scanner: Type rename: BarcodeScannerConfiguration -> BarcodeScannerViewConfiguration.
Classic Barcode Scanner: BarcodeScannerViewConfiguration also contains a detectionParameters field of type BarcodeScannerConfiguration
which incorporates & replaces the parameters barcodesRegexFilter, gs1Handling, engineMode, returnBarcodeImage and barcodeFormats.
sdk.detectBarcodes now takes a BarcodeScannerConfiguration argument, instead of individual parameters.
Classic and Ready-to-Use UI Barcode Scanner: The barcode detection result's parsedDocument has been renamed to extractedDocument.
Classic and Ready-to-Use UI Barcode Scanner: The barcode detection result's rawBytes now contains a Uint8Array instead of a base64 string.
Classic and Ready-to-Use UI Barcode Scanner: The regexFilter option for barcode detection now requires that the entire scanned code matches the regex.
Previously, it was enough if a substring matched the regex.
The Barcode Ready-to-Use UI result types BarcodeScannerResult and BarcodeScannerItem have been renamed to BarcodeScannerUiResult and BarcodeScannerUiItem.
The mode parameter of the function sdk.createOcrEngine has been removed.
OcrEngine.performOcr now returns an OcrTypes.Page object. This structures OCR results into text-blocks containing text-lines containing words.
Each of these objects is annotated with positions and a confidence score. This allows for a more detailed analysis of the OCR results.
sdk.createTextDataScanner has been renamed to sdk.createTextPatternScanner. Associated types have also been renamed.
Classic Component: Type rename: TextDataScannerConfiguration -> TextPatternScannerViewConfiguration.
TextLineScanner and associated types have been renamed to TextPatternScanner.
TextPatternScanner now return a TextPatternScannerResult, which contains more detailed information about each recognized word and character.
TextPatternScannerViewConfiguration now contains a new property ocrConfiguration of type TextPatternScannerConfiguration
that incorporates/replaces most of the previous configuration fields.
TextPatternScannerConfiguration.supportedLanguages has been removed.
In TextPatternScannerViewConfiguration, validationPattern, matchSubstring and allowedCharacters have been moved to
PatternContentValidator, which is one possible value of the TextPatternScannerViewConfiguration.ocrConfiguration.validator field.
The parameter names for image rotation have been renamed. They are now called NONE instead of ROTATION_NONE,
CLOCKWISE_90 instead of ROTATION_90_CLOCKWISE, etc.
The Document Quality Analyzer now returns a DocumentQualityAnalyzerTypes.DocumentQualityAnalyzerResult object, instead of a string.
ImageProcessor has been removed. Instead, there are now the functions imageRotate, imageFilter,
imageCrop and imageResize, which can be used to process images.
Type rename: VinScannerConfiguration -> VinScannerViewConfiguration.
Renamed createVINScanner to createVinScanner.
VIN Scanner config field onTextDetected has been renamed to onVinDetected.
LicenseInfo.description has be renamed to LicenseInfo.licenseStatusMessage. LicenseInfo.status values are now in screaming-snake case (e.g. FailureExpired is now FAILURE_EXPIRED).
Added more options to the text data scanner: validationPattern, matchSubstring and allowedCharacters.
π Improvements:
Large performance increase thanks to improved multi-threading.
WASM loading & camera opening now happen in parallel, resulting in a reduced time-to-scan. If WASM is still loading when the camera is already opened, a spinner is shown.
WASM and JS files will now be requested with an additional cache-busting query parameter to ensure the latest version is always used.
E.g., instead of ScanbotSDK.Asm.wasm, the file will now be requested as ScanbotSDK.Asm.wasm?5.1.0.
This behavior can be configured or disabled using the requestSuffix config option during SDK initialization.
ImageProcessor: JPEG reading and writing is substantially faster thanks to multithreading.
Error and Erasure Correction to improve PDF_417, MICRO_PDF_417, and GS1_COMPOSITE.
Image filters: Antialiasing now requires significantly less memory.
Trimmed frames of MSI_PLESSEY, ITF, and CODABAR were likely scanned as false positives since the quiet zone requirement
was not appropriately handled. Now, in live mode, we require a certain distance to the boundary and an additional quiet zone check.
Revamped ViewFinder with new styling options, including cornered or stroked style,
strokeColor and -Width and configurable cornerRadius.
β οΈ Breaking changes:
Barcode.parsedText is now called Barcode.parsedDocument and has a slightly different structure.
Support for jsdelivr CDN has been deprecated and will be removed in one of the next versions.
Please host the SDK files on your own server or use a CDN of your own.
A workaround for certain webpack configurations (most notably that of create-react-app) has been removed.
If you run into webpack errors when importing from scanbot-web-sdk/webpack, please switch to importing directly from scanbot-web-sdk and handle the hosting of the WASM files manually.
Multi-threading now requires the HTTP header Cross-Origin-Resource-Policy of value cross-origin to be set for the bundle/bin/*/*.js files. Before, a value of same-origin was also acceptable for that header.