Resource Base
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

Processing Multiple Images/Pages

Method Description
setInput Sets an image source that will provide images to be consecutively processed.
getInput Gets the attached image source adapter object of the Capture Vision Router.
addImageSourceStateListener Registers a DSImageSourceStateListener object to be used as a callback when the status of DSImageSourceAdapter changes.
removeImageSourceStateListener Removes a DSImageSourceStateListener from the Capture Vision Router.
addResultReceiver Adds a CapturedResultReceiver object as the receiver of captured results.
removeResultReceiver Removes the specified CapturedResultReceiver object.
startCapturing Initiates a capturing process based on a specified template. This process is repeated for each image fetched from the source.
stopCapturing Stops the capturing process.
pauseCapturing Pauses the capturing process.
resumeCapturing Resumes the capturing process.
addCaptureStateListener Registers a DSCaptureStateListener to be used as a callback when capture state changes.
removeCaptureStateListener Removes a DSCaptureStateListener that has been configured for the Capture Vision Router.
addResultFilter Adds a DSCapturedResultFilter object to filter non-essential results.
removeResultFilter Removes the specified DSCapturedResultFilter object.

setInput

Sets an image source that will provide images to be consecutively processed.

  • Objective-C
  • Swift
  1. - (BOOL)setInput:(DSImageSourceAdapter *)adapter
           error:(NSError * _Nullable * _Nullable)error;
    
  2. func setInput(_ adapter: DSImageSourceAdapter) throws -> BOOL
    

Parameters

adapter: An object of DSImageSourceAdapter. You can use an internally implemented ImageSourceAdapter such as CameraEnhancer, DirectoryFetcher or FileFetcher. error: An NSError pointer. If an error occurs, it will represent the error information.

Error

Error Code Value Description
EC_CALL_REJECTED_WHEN_CAPTURING -10062 Function call is rejected when capturing in progress.

Return Value

A BOOL value that indicates whether the input is set successfully.

getInput

Gets the attached image source adapter (DSImageSourceAdapter) object of the Capture Vision Router.

  • Objective-C
  • Swift
  1. - (DSImageSourceAdapter *)getInput;
    
  2. func getInput() -> DSImageSourceAdapter
    

Return Value

The attached DSImageSourceAdapter object of the capture vision router.

addImageSourceStateListener

Registers a DSImageSourceStateListener object to be used as a callback when the status of DSImageSourceAdapter is received.

  • Objective-C
  • Swift
  1. - (BOOL)addImageSourceStateListener:(id<DSImageSourceStateListener>)listener;
    
  2. func addImageSourceStateListener(_ listener:DSImageSourceStateListener) -> BOOL
    

Parameters

listener: An object of DSImageSourceStateListener.

Return Value

A BOOL value that indicates whether the DSImageSourceStateListener is added successfully.

removeImageSourceStateListener

Removes a DSImageSourceStateListener from the Capture Vision Router.

  • Objective-C
  • Swift
  1. - (BOOL)removeImageSourceStateListener:(id<DSImageSourceStateListener>)listener;
    
  2. func removeImageSourceStateListener(_ listener:DSImageSourceStateListener) -> BOOL
    

Parameters

listener: An object of DSImageSourceStateListener.

Return Value

A BOOL value that indicates whether the DSImageSourceStateListener is removed successfully.

addResultReceiver

Adds a CapturedResultReceiver object as the receiver of captured results.

  • Objective-C
  • Swift
  1. - (BOOL)addResultReceiver:(id<DSCapturedResultReceiver>)receiver;
    
  2. func addResultReceiver(_ listener:DSCapturedResultReceiver) -> BOOL
    

Parameters

listener: An object of DSCapturedResultReceiver.

Return Value

A BOOL value that indicates whether the result receiver is added successfully.

removeResultReceiver

emoves the specified CapturedResultReceiver object.

  • Objective-C
  • Swift
  1. - (BOOL)removeResultReceiver:(id<DSCapturedResultReceiver>)receiver;
    
  2. func removeResultReceiver(_ listener:DSCapturedResultReceiver) -> BOOL
    

Parameters

listener: An object of DSCapturedResultReceiver.

Return Value

A BOOL value that indicates whether the result receiver is removed successfully.

startCapturing

Initiates a capturing process based on a specified template. This process is repeated for each image fetched from the source.

  • Objective-C
  • Swift
  1. - (void)startCapturing:(NSString*)templateName
     completionHandler:(nullable void(^)(BOOL isSuccess, NSError *_Nullable error))completionHandler;
    
  2. func startCapturing(_ templateName:String) -> BOOL
    

Parameters

templateName: Specifies a “CaptureVisionTemplate” to use. The following value are available for this parameter:

  • One of the DSPresetTemplate member. This is available only if you have never upload a new template via initSettings or initSettingsFromFile.
  • A string that represents one of the template name that you have uploaded via initSettings or initSettingsFromFile.
  • ”” (empty string) to use the default template. The first template will be used if you have uploaded a template file via initSettingsFromFile or initSettings.

completionHandler: A completion handler the system calls after it finishes the startCapturing.

  • isSuccess: A BOOL value that indicates whether the startCapturing operation is successful.
  • error: An error object if the request fails; otherwise, nil.

Error

Error Code Value Description
EC_TEMPLATE_NAME_INVALID -10036 The target template name is invalid.
EC_CALL_REJECTED_WHEN_CAPTURING -10062 Function call is rejected when capturing in progress.
EC_NO_IMAGE_SOURCE -10063 Can not start capturing before you set the input.

Return Value

A BOOL value that indicates whether the capture starts successfully.

stopCapturing

Stops the capturing process.

  • Objective-C
  • Swift
  1. - (void)stopCapturing;
    
  2. func stopCapturing()
    

pauseCapturing

Pauses the capturing process.

  • Objective-C
  • Swift
  1. - (void)pauseCapturing;
    
  2. func pauseCapturing()
    

resumeCapturing

Resumes the capturing process.

  • Objective-C
  • Swift
  1. - (void)resumeCapturing;
    
  2. func resumeCapturing()
    

addCaptureStateListener

Registers a DSCaptureStateListener to be used as a callback when capture state changes.

  • Objective-C
  • Swift
  1. - (BOOL)addCaptureStateListener:(nonnull id<DSCaptureStateListener>)listener;
    
  2. func addCaptureStateListener(_ listener:DSCaptureStateListener) -> BOOL
    

Parameters

listener: A delegate object of DSCaptureStateListener to receive the capture state.

Return Value

A BOOL value that indicates whether the capture state listener is added successfully.

removeCaptureStateListener

Removes a DSCaptureStateListener that has been configured for the Capture Vision Router via the addCaptureStateListener method.

  • Objective-C
  • Swift
  1. - (BOOL)removeCaptureStateListener:(nonnull id<DSCaptureStateListener>)listener;
    
  2. func removeCaptureStateListener(_ listener:DSCaptureStateListener) -> BOOL
    

Parameters

listener: An object of DSCaptureStateListener.

Return Value

A BOOL value that indicates whether the capture state listener is removed successfully.

addResultFilter

Adds a DSCapturedResultFilter object to filter non-essential results. Currnetly, is must be a MultiFrameCrossFilter object.

  • Objective-C
  • Swift
  1. - (BOOL)addResultFilter:(nonnull id<DSCapturedResultFilter>)filter;
    
  2. func addResultFilter(_ filter:DSCapturedResultFilter) -> BOOL
    

Parameters

filter: An object of DSCapturedResultFilter.

Return Value

A BOOL value that indicates whether the result filter is added successfully.

removeResultFilter

Removes the specified DSCapturedResultFilter object.

  • Objective-C
  • Swift
  1. - (BOOL)removeResultFilter:(nonnull id<DSCapturedResultFilter>)filter;
    
  2. func removeResultFilter(_ filter:DSCapturedResultFilter) -> BOOL
    

Parameters

filter: An object of DSCapturedResultFilter.

Return Value

A BOOL value that indicates whether the result filter is removed successfully.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 2.x
    • Version 2.2.10
    • Version 2.0.21
    • Version 2.0.20
    • Version 2.0.10
    • Version 2.2.10
    • Version 2.0.21
    • Version 2.0.20
    • Version 2.0.10
  • Version 1.x
    • Version 1.2.1
    • Version 1.2.0
    • Version 1.1.0
    • Version 1.0.0
    • Version 1.0.4
    • Version 1.0.3
    • Version 1.0.2
    • Version 1.0.1
    • Version 1.0.0
    • Version 1.1.13
    • Version 1.1.12
    • Version 1.1.11
    • Version 1.1.9
    • Version 1.1.8
    • Version 1.1.7
    • Version 1.1.6
    • Version 1.1.5
    • Version 1.1.4
    • Version 1.1.3
    • Version 1.1.2
    • Version 1.1.1
    • Version 1.1.0
    • Version 1.0.0
    • Version 1.0.4
    • Version 1.0.3
    • Version 1.0.2
    • Version 1.0.1
    • Version 1.0.0
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support