SimplifiedCaptureVisionSettings
The SimplifiedCaptureVisionSettings
class contains settings for capturing and recognizing images with the CaptureVisionRouter
class.
Definition
Namespace: com.dynamsoft.cvr
Assembly: DynamsoftCaptureVisionRouter.aar
class SimplifiedCaptureVisionSettings
Methods & Attributes
Method | Description |
---|---|
toJSON |
Generate the current SimplifiedCaptureVisionSettings object to a JSON string. |
fromJSON |
Generate a SimplifiedCaptureVisionSettings object from a JSON string. |
Attribute | Type | Description |
---|---|---|
capturedResultItemTypes |
int | Specifies the type(s) of CapturedItem(s) that will be captured. |
roi |
Quadrilateral | Specifies the region of interest (ROI) of the image or frame where the capture and recognition will take place. |
roiMeasuredInPercentage |
boolean | Specifies whether the ROI is measured in pixels (false) or as a percentage of the image dimensions (true). |
maxParallelTasks |
int | Specifies the maximum number of parallel tasks that can be used for image capture and recognition. |
minImageCaptureInterval |
int | Set the minimum capture interval, measured in milliseconds. |
timeout |
int | Specifies the maximum time (in milliseconds) allowed for image capture and recognition. |
barcodeSettings |
SimplifiedBarcodeReaderSettings | Specifies the settings for the DynamsoftBarcodeReader task. |
labelSettings |
SimplifiedLabelRecognizerSettings | Specifies the settings for the DynamsoftLabelRecognizer task. |
documentSettings |
SimplifiedDocumentNormalizerSettings | Specifies the settings for the DynamsoftDocumentNormalizer task. |
toJSON
Transform the current SimplifiedCaptureVisionSettings
object to a JSON string.
String toJSON();
Return Value
The JSON string format of the current SimplifiedCaptureVisionSettings
object.
fromJSON
Generate a SimplifiedCaptureVisionSettings
object from a JSON string.
static SimplifiedCaptureVisionSettings fromJSON(String jsonString);
Return Value
The generated SimplifiedCaptureVisionSettings
object.
capturedResultItemTypes
Specifies the type(s) of CapturedItem(s) that will be returned by the Capture Vision Router.
@EnumCapturedResultItemType
int capturedResultItemTypes;
Remarks
You can specify multiple types. For example, you can use the following code to add CRIT_ORIGINAL_IMAGE
to the captured results of PT_READ_BARCODES
template.
try {
SimplifiedCaptureVisionSettings settings = cvr.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES);
settings.capturedResultItemTypes = EnumCapturedResultItemType.CRIT_BARCODE | EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE;
cvr.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings);
} catch (CaptureVisionRouterException e) {
throw new RuntimeException(e);
}
View
EnumCapturedResultItemType
to learn of all supported result item types.
roi
Specifies the region of interest (ROI) of the image or frame where the capture and recognition will take place.
Quadrilateral roi;
roiMeasuredInPercentage
Specifies whether the ROI is measured in pixels (false) or as a percentage of the image dimensions (true).
boolean roiMeasuredInPercentage;
maxParallelTasks
Specifies the maximum number of parallel tasks that can be used for image capture and recognition.
int maxParallelTasks;
minImageCaptureInterval
Set the minimum capture interval (in milliseconds) between consecutive frames when capturing via video. In other words, it is a measure of the frequency in which frames are fetched.
int minImageCaptureInterval;
Remarks
If you find that the battery consumption when using any of the Dynamsoft Capture Vision products, we recommend setting this parameter to a higher value. Please see this article for more info on how to reduce battery consumption.
timeout
Specifies the maximum time (in milliseconds) allowed for image capture and recognition.
int timeout;
barcodeSettings
Specifies the settings for the DynamsoftBarcodeReader
task with a SimplifiedBarcodeReaderSettings
object.
SimplifiedBarcodeReaderSettings barcodeSettings;
labelSettings
Specifies the settings for the DynamsoftLabelRecognizer
task with a SimplifiedLabelRecognizerSettings
object.
SimplifiedLabelRecognizerSettings labelSettings;
documentSettings
Specifies the settings for the DynamsoftDocumentNormalizer
task with a SimplifiedDocumentNormalizerSettings
object.
SimplifiedDocumentNormalizerSettings documentSettings;