MultiFrameResultCrossFilter
The MultiFrameResultCrossFilter class is an officially implemented CapturedResultFilter that provides:
- Overlapping: Improves the read rate of multi-barcode scanning.
- Cross Verification: Improves the accuracy.
- Deduplication: Removes the duplicated results.
Definition
Assembly: dynamsoft_capture_vision_flutter
class MultiFrameResultCrossFilter
Methods
| Method | Description |
|---|---|
destroy |
Destroys the MultiFrameResultCrossFilter instance and releases the related resources on the native side. |
enableLatestOverlapping |
Enables or disables the latest overlap result filtering. |
enableResultCrossVerification |
Enables or disables result cross verification for the specified result item types. |
enableResultDeduplication |
Enables or disables result deduplication for the specified result item types. |
getDuplicateForgetTime |
Returns the amount of time that the deduplication filter takes effect for the specified result item type(s). |
getMaxOverlappingFrames |
Returns the maximum number of overlapping frames to check for the specified result item type(s). |
isLatestOverlappingEnabled |
Checks if the latest overlapping filter is on for the specified result item type(s). |
isResultCrossVerificationEnabled |
Checks if the cross verification filter is on for the specified result item type(s). |
isResultDeduplicationEnabled |
Checks if the deduplication filter is on for the specified result item type(s). |
setDuplicateForgetTime |
Defines the amount of time that the deduplication filter takes effect for the specified result item type(s). |
setMaxOverlappingFrames |
Sets the maximum number of overlapping frames to check when the latest overlap filter is on. |
destroy
Destroys the MultiFrameResultCrossFilter instance and releases the related resources on the native side.
Future<void> destroy()
enableLatestOverlapping
Enables or disables the latest overlap result filtering. Latest overlap filtering helps in managing results that overlap in the most recent frames.
Future<void> enableLatestOverlapping(int resultItemTypes, bool enable)
Remarks
resultItemTypes is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType. enable determines whether to enable or disable the filter process.
enableResultCrossVerification
Enables or disables result cross verification for the specified result item types (represented as a combination of EnumCapturedResultItemType). Cross verification helps in validating results across multiple frames, improving accuracy as a result.
Future<void> enableResultCrossVerification(int resultItemTypes, bool enable)
Remarks
resultItemTypes is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType. enable determines whether to enable or disable the filter process.
enableResultDeduplication
Enables or disables result deduplication for the specified result item types (represented as a combination of EnumCapturedResultItemType). If this filter is activated, the library will not scan a barcode for an amount of time again after it is scanned successfully for the first time. In order to set the amount of time that the barcode is remembered, please refer to setDuplicateForgetTime.
Future<void> enableResultDeduplication(int resultItemTypes, bool enable)
Remarks
resultItemTypes is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType. enable determines whether to enable or disable the filter process.
getDuplicateForgetTime
Returns the amount of time, in milliseconds, that the deduplication filter takes effect for the specified result item type(s).
Future<int> getDuplicateForgetTime(int type)
Remarks
type is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType.
getMaxOverlappingFrames
Returns the maximum number of overlapping frames to check for the specified result item type(s) when the latest overlap filter is on.
Future<int> getMaxOverlappingFrames(int type)
Remarks
type is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType.
isLatestOverlappingEnabled
Checks if the latest overlapping filter is on for the specified result item type(s).
Future<bool> isLatestOverlappingEnabled(int type)
Remarks
type is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType.
isResultCrossVerificationEnabled
Checks if the cross verification filter is on for the specified result item type(s).
Future<bool> isResultCrossVerificationEnabled(int type)
Remarks
type is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType.
isResultDeduplicationEnabled
Checks if the deduplication filter is on for the specified result item type(s).
Future<bool> isResultDeduplicationEnabled(int type)
Remarks
type is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType.
setDuplicateForgetTime
Defines the amount of time, in milliseconds, that the deduplication filter takes effect for the specified result item type(s). During this time, the library will not scan a certain barcode for the specified time after it has been scanned successfully for the first time.
Future<void> setDuplicateForgetTime(int resultItemTypes, int time)
Remarks
resultItemTypes is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType. time specifies the target time in milliseconds.
Sets the maximum number of overlapping frames to check when the latest overlap filter is on for the specified result item type(s).
Future<void> setMaxOverlappingFrames(int resultItemTypes, int maxFramesToCheck)
Remarks
resultItemTypes is a bitmask representing the result item types to apply the filter to - this value can be a combined value of EnumCapturedResultItemType. maxFramesToCheck specifies the target number of frames that the filter should not exceed.
Code Snippet
final MultiFrameResultCrossFilter _multiFilter = MultiFrameResultCrossFilter();
_multiFilter.enableResultCrossVerification(EnumCapturedResultItemType.barcode.value, true);
_multiFilter.enableResultDeduplication(EnumCapturedResultItemType.barcode.value, true);
_multiFilter.enableLatestOverlapping(EnumCapturedResultItemType.barcode.value, true);
_multiFilter.setMaxOverlappingFrames(EnumCapturedResultItemType.barcode.value, 5);
_multiFilter.setDuplicateForgetTime(EnumCapturedResultItemType.barcode.value, 5000);
_cvr.addResultFilter(_multiFilter);