DSCaptureVisionRouter
The DSCaptureVisionRouter class is what a user uses to interact with image-processing and semantic-processing products in their applications. It accepts an image source and returns processing results which may contain Final results or Intermediate Results.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSCaptureVisionRouter : NSObjectclass CaptureVisionRouter : NSObject
Constructor
| Method | Description |
|---|---|
init |
Creates an instance of CaptureVisionRouter. |
Single-File Processing
| Method | Description |
|---|---|
captureFromFile |
Processes an image file to derive important information. |
captureFromFileBytes |
Processes an image file in memory to derive important information. |
captureFromBuffer |
Processes an ImageData object to derive important information. |
captureFromImage |
Processes an UIImage to derive important information. |
Multiple-File Processing
| Method | Description |
|---|---|
setInput |
Sets up an image source to provide images for continuous processing. |
getInput |
Returns the image source object. |
addImageSourceStateListener |
Registers a DSImageSourceStateListener to get callback when the status of DSImageSourceAdapter changes. |
removeImageSourceStateListener |
Removes a DSImageSourceStateListener. |
removeAllImageSourceStateListeners |
Removes all user-added ImageSourceStateListeners. |
addResultReceiver |
Registers a DSCapturedResultReceiver to get callback when DSCapturedResult output. |
removeResultReceiver |
Removes a DSCapturedResultReceiver. |
removeAllResultReceivers |
Removes all user-added CapturedResultReceivers. |
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 Capture Vision Router. |
resumeCapturing |
Resumes the Capture Vision Router. |
addCaptureStateListener |
Registers a DSCaptureStateListener to get callback when capture state changes. |
removeCaptureStateListener |
Removes a DSCaptureStateListener. |
removeAllCaptureStateListeners |
Removes all user-added CaptureStateListeners. |
addResultFilter |
Adds a CaptureResultFilter object to filter non-essential results. |
removeResultFilter |
Removes the specified CaptureResultFilter object. |
removeAllResultFilters |
Removes all user-added CapturedResultFilters. |
switchCapturingTemplate |
Switch the image processing settings with the CaptureVisionTemplate name during the image processing workflow. |
Settings
| Method | Description |
|---|---|
initSettings |
Initialize the Capture Vision settings with a JSON String. |
initSettingsFromFile |
Initialize the Capture Vision settings with a JSON file. |
getSimplifiedSettings |
Retrieves a simplified version of the Capture Vision settings for a specific template. |
updateSettings |
Update Capture Vision settings with an object of DSSimplifiedCaptureVisionSettings. |
resetSettings |
Resets all templates to factory settings. |
outputSettings |
Output the targeting Capture Vision settings to a JSON string. |
outputSettingsToFile |
Output the targeting Capture Vision settings to a JSON file. |
clearDLModelBuffers |
Clear the buffered deep learning models to release the memory. |
setGlobalIntraOpNumThreads |
Sets the global number of threads used internally for model execution. |
getTemplateNames |
Retrieves the names of all the currently available templates. |
Intermediate Result
| Method | Description |
|---|---|
getIntermediateResultManager |
Gets the object of IntermediateResultManager. |
Buffered Items
| Method | Description |
|---|---|
getBufferedItemsManager |
Gets the object of BufferedItemsManager. |