BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes. More...
Inherits System::IDisposable.
Public Member Functions | |
int32_t | get_Timeout () |
Gets the timeout of recognition process in milliseconds. More... | |
void | set_Timeout (int32_t value) |
Sets the timeout of recognition process in milliseconds. More... | |
System::ArrayPtr< System::SharedPtr< BarCodeResult > > | get_FoundBarCodes () |
Gets recognized BarCodeResults array More... | |
int32_t | get_FoundCount () |
Gets recognized barcodes count More... | |
System::SharedPtr< Aspose::BarCode::BarCodeRecognition::QualitySettings > | get_QualitySettings () |
QualitySettings allows to configure recognition quality and speed manually. You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of QualitySettings is NormalQuality. More... | |
void | set_QualitySettings (System::SharedPtr< Aspose::BarCode::BarCodeRecognition::QualitySettings > value) |
QualitySettings allows to configure recognition quality and speed manually. You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of QualitySettings is NormalQuality. More... | |
System::SharedPtr< Aspose::BarCode::BarCodeRecognition::BarcodeSettings > | get_BarcodeSettings () |
The main BarCode decoding parameters. Contains parameters which make influence on recognized data. More... | |
void | Abort () |
Function requests termination of current recognition session from other thread. Abort is unblockable method and returns control just after calling. The method should be used when recognition process is too long. More... | |
System::ArrayPtr< System::SharedPtr< BarCodeResult > > | ReadBarCodes () |
Reads BarCodeResults from the image. More... | |
BarCodeReader () | |
Initializes a new instance of the BarCodeReader class with default values. Requires to set image (SetBitmapImage()) before to call ReadBarCodes() method. More... | |
void | SetBarCodeImage (System::SharedPtr< System::Drawing::Bitmap > value) |
Sets bitmap image for recognition. Must be called before ReadBarCodes() method. More... | |
void | SetBarCodeImage (System::SharedPtr< System::Drawing::Bitmap > value, System::ArrayPtr< System::Drawing::Rectangle > areas) |
Sets bitmap image and areas for recognition. Must be called before ReadBarCodes() method. More... | |
void | SetBarCodeImage (System::SharedPtr< System::Drawing::Bitmap > value, System::Drawing::Rectangle area) |
Sets bitmap image and area for recognition. Must be called before ReadBarCodes() method. More... | |
void | SetBarCodeImage (System::String filename) |
Sets image file for recognition. Must be called before ReadBarCodes() method. More... | |
void | SetBarCodeImage (System::SharedPtr< System::IO::Stream > stream) |
Sets image stream for recognition. Must be called before ReadBarCodes() method. More... | |
void | SetBarCodeReadType (const System::ArrayPtr< System::SharedPtr< SingleDecodeType >> &barcodeTypes) |
Sets SingleDecodeType type array for recognition. Must be called before ReadBarCodes() method. More... | |
void | SetBarCodeReadType (System::SharedPtr< BaseDecodeType > type) |
Sets decode type for recognition. Must be called before ReadBarCodes() method. More... | |
BarCodeReader (System::SharedPtr< System::Drawing::Bitmap > image) | |
Initializes a new instance of the BarCodeReader class from an image. More... | |
BarCodeReader (System::SharedPtr< System::Drawing::Bitmap > image, const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> &decodeTypes) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::Drawing::Bitmap > image, System::SharedPtr< BaseDecodeType > type) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::Drawing::Bitmap > image, System::Drawing::Rectangle area, const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> &decodeTypes) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::Drawing::Bitmap > image, System::Drawing::Rectangle area, System::SharedPtr< BaseDecodeType > type) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::Drawing::Bitmap > image, System::ArrayPtr< System::Drawing::Rectangle > areas, const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> &decodeTypes) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::Drawing::Bitmap > image, System::ArrayPtr< System::Drawing::Rectangle > areas, System::SharedPtr< BaseDecodeType > type) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::String filename) | |
Initializes a new instance of the BarCodeReader class from file. More... | |
BarCodeReader (System::String filename, const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> &decodeTypes) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::String filename, System::SharedPtr< BaseDecodeType > type) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::IO::Stream > stream) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< BaseDecodeType > type) | |
Initializes a new instance of the BarCodeReader class. More... | |
BarCodeReader (System::SharedPtr< System::IO::Stream > stream, const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> &decodeTypes) | |
Initializes a new instance of the BarCodeReader class. More... | |
void | Dispose () override |
Release resource More... | |
bool | ExportToXml (System::String xmlFile) |
Exports BarCode properties to the xml-file specified More... | |
bool | ExportToXml (System::SharedPtr< System::IO::Stream > xmlStream) |
Exports BarCode properties to the xml-stream specified More... | |
Public Member Functions inherited from System::Object | |
ASPOSECPP_SHARED_API | Object () |
Creates object. Initializes all internal data structures. More... | |
virtual ASPOSECPP_SHARED_API | ~Object () |
Destroys object. Frees all internal data structures. More... | |
ASPOSECPP_SHARED_API | Object (Object const &x) |
Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | SharedRefRemovedSafe () |
Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | RemovedSharedRefs (int count) |
Decreases shared reference count by specified value. More... | |
Detail::SmartPtrCounter * | WeakRefAdded () |
Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
void | WeakRefRemoved () |
Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
Detail::SmartPtrCounter * | GetCounter () |
Gets reference counter data structure associated with the object. More... | |
int | SharedCount () const |
Gets current value of shared reference counter. More... | |
ASPOSECPP_SHARED_API void | Lock () |
Implements C# lock() statement locking. Call directly or use LockContext sentry object. More... | |
ASPOSECPP_SHARED_API void | Unlock () |
Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More... | |
virtual ASPOSECPP_SHARED_API bool | Equals (ptr obj) |
Compares objects using C# Object.Equals semantics. More... | |
virtual ASPOSECPP_SHARED_API int32_t | GetHashCode () const |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
virtual ASPOSECPP_SHARED_API String | ToString () const |
Analog of C# Object.ToString() method. Enables converting custom objects to string. More... | |
virtual ASPOSECPP_SHARED_API ptr | MemberwiseClone () const |
Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More... | |
virtual ASPOSECPP_SHARED_API const TypeInfo & | GetType () const |
Gets actual type of object. Analog of C# System.Object.GetType() call. More... | |
virtual ASPOSECPP_SHARED_API bool | Is (const TypeInfo &targetType) const |
Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More... | |
virtual ASPOSECPP_SHARED_API void | SetTemplateWeakPtr (uint32_t argument) |
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More... | |
virtual ASPOSECPP_SHARED_API bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
For internal purposes only. More... | |
template<> | |
bool | Equals (float const &objA, float const &objB) |
template<> | |
bool | Equals (double const &objA, double const &objB) |
template<> | |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
template<> | |
bool | ReferenceEquals (String const &str1, String const &str2) |
Static Public Member Functions | |
static System::SharedPtr< Aspose::BarCode::Common::ProcessorSettings > | get_ProcessorSettings () |
Gets a settings of using processor cores. More... | |
static System::SharedPtr< BarCodeReader > | ImportFromXml (System::String xmlFile) |
Imports BarCode properties from the xml-file specified and applies them to the current BarCodeReader instance. More... | |
static System::SharedPtr< BarCodeReader > | ImportFromXml (System::SharedPtr< System::IO::Stream > xmlStream) |
Imports BarCode properties from the xml-stream specified and applies them to the current BarCodeReader instance. More... | |
Static Public Member Functions inherited from System::Object | |
static bool | ReferenceEquals (ptr const &objA, ptr const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, T const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, std::nullptr_t) |
Reference-compares value type object with nullptr. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares reference type objects in C# style. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares value type objects in C# style. More... | |
static const TypeInfo & | Type () |
Implements C# typeof(System.Object) construct. More... | |
Additional Inherited Members | |
Public Types inherited from System::Object | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | ) |
Initializes a new instance of the BarCodeReader class with default values. Requires to set image (SetBitmapImage()) before to call ReadBarCodes() method.
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::Drawing::Bitmap > | image | ) |
Initializes a new instance of the BarCodeReader class from an image.
image | A Bitmap instance containing the image |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::Drawing::Bitmap > | image, |
const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> & | decodeTypes | ||
) |
Initializes a new instance of the BarCodeReader class.
image | The image. |
decodeTypes | Decode types. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::Drawing::Bitmap > | image, |
System::SharedPtr< BaseDecodeType > | type | ||
) |
Initializes a new instance of the BarCodeReader class.
image | The image. |
type | The decode type1. It can be single or multy |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::Drawing::Bitmap > | image, |
System::Drawing::Rectangle | area, | ||
const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> & | decodeTypes | ||
) |
Initializes a new instance of the BarCodeReader class.
image | The image. |
area | The area for recognition. |
decodeTypes | Decode types. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::Drawing::Bitmap > | image, |
System::Drawing::Rectangle | area, | ||
System::SharedPtr< BaseDecodeType > | type | ||
) |
Initializes a new instance of the BarCodeReader class.
image | The image. |
area | The area for recognition. |
type | The decode type. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::Drawing::Bitmap > | image, |
System::ArrayPtr< System::Drawing::Rectangle > | areas, | ||
const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> & | decodeTypes | ||
) |
Initializes a new instance of the BarCodeReader class.
image | The image to read |
areas | The array of recognition areas |
decodeTypes | The decode types applicable for all the areas specified. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::Drawing::Bitmap > | image, |
System::ArrayPtr< System::Drawing::Rectangle > | areas, | ||
System::SharedPtr< BaseDecodeType > | type | ||
) |
Initializes a new instance of the BarCodeReader class.
image | The image to read |
areas | The array of recognition areas |
type | The decode type applicable for all the areas specified. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::String | filename | ) |
Initializes a new instance of the BarCodeReader class from file.
filename | The filename. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::String | filename, |
const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> & | decodeTypes | ||
) |
Initializes a new instance of the BarCodeReader class.
filename | The filename. |
decodeTypes | Decode types. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::String | filename, |
System::SharedPtr< BaseDecodeType > | type | ||
) |
Initializes a new instance of the BarCodeReader class.
filename | The filename. |
type | The decode type. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Initializes a new instance of the BarCodeReader class.
stream | The stream. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::IO::Stream > | stream, |
System::SharedPtr< BaseDecodeType > | type | ||
) |
Initializes a new instance of the BarCodeReader class.
stream | The stream. |
type | The decode type. |
This sample shows how to detect Code39 and Code128 barcodes.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader | ( | System::SharedPtr< System::IO::Stream > | stream, |
const System::ArrayPtr< System::SharedPtr< BaseDecodeType >> & | decodeTypes | ||
) |
Initializes a new instance of the BarCodeReader class.
stream | The stream. |
decodeTypes | Decode types. |
This sample shows how to detect Code39 and Code128 barcodes.
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::Abort | ( | ) |
Function requests termination of current recognition session from other thread. Abort is unblockable method and returns control just after calling. The method should be used when recognition process is too long.
This sample shows how to call Abort function from other thread
|
overridevirtual |
Release resource
Reimplemented from System::IDisposable.
bool Aspose::BarCode::BarCodeRecognition::BarCodeReader::ExportToXml | ( | System::String | xmlFile | ) |
Exports BarCode properties to the xml-file specified
xmlFile | The name for the file |
Whether or not export completed successfully.
Returns True in case of success; False Otherwise
bool Aspose::BarCode::BarCodeRecognition::BarCodeReader::ExportToXml | ( | System::SharedPtr< System::IO::Stream > | xmlStream | ) |
Exports BarCode properties to the xml-stream specified
xmlStream | The xml-stream for saving |
Whether or not export completed successfully.
Returns True in case of success; False Otherwise
System::SharedPtr<Aspose::BarCode::BarCodeRecognition::BarcodeSettings> Aspose::BarCode::BarCodeRecognition::BarCodeReader::get_BarcodeSettings | ( | ) |
System::ArrayPtr<System::SharedPtr<BarCodeResult> > Aspose::BarCode::BarCodeRecognition::BarCodeReader::get_FoundBarCodes | ( | ) |
Gets recognized BarCodeResults array
The recognized BarCodeResults array
This sample shows how to read barcodes with BarCodeReader
int32_t Aspose::BarCode::BarCodeRecognition::BarCodeReader::get_FoundCount | ( | ) |
Gets recognized barcodes count
The recognized barcodes count
This sample shows how to read barcodes with BarCodeReader
|
static |
Gets a settings of using processor cores.
This sample shows how to use ProcessorSettings to add maximum multi-threaded performnce
System::SharedPtr<Aspose::BarCode::BarCodeRecognition::QualitySettings> Aspose::BarCode::BarCodeRecognition::BarCodeReader::get_QualitySettings | ( | ) |
QualitySettings allows to configure recognition quality and speed manually. You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of QualitySettings is NormalQuality.
QualitySettings to configure recognition quality and speed.
This sample shows how to use QualitySettings with BarCodeReader
int32_t Aspose::BarCode::BarCodeRecognition::BarCodeReader::get_Timeout | ( | ) |
Gets the timeout of recognition process in milliseconds.
The timeout.
This sample shows how to avoid recogntion hungs with timeount on large images
|
static |
Imports BarCode properties from the xml-file specified and applies them to the current BarCodeReader instance.
xmlFile | The name for the file |
Returns True in case of success;
False Otherwise
|
static |
Imports BarCode properties from the xml-stream specified and applies them to the current BarCodeReader instance.
xmlStream | The xml-stream for loading |
Returns True in case of success;
False Otherwise
System::ArrayPtr<System::SharedPtr<BarCodeResult> > Aspose::BarCode::BarCodeRecognition::BarCodeReader::ReadBarCodes | ( | ) |
Reads BarCodeResults from the image.
This sample shows how to read barcodes with BarCodeReader
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::set_QualitySettings | ( | System::SharedPtr< Aspose::BarCode::BarCodeRecognition::QualitySettings > | value | ) |
QualitySettings allows to configure recognition quality and speed manually. You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of QualitySettings is NormalQuality.
QualitySettings to configure recognition quality and speed.
This sample shows how to use QualitySettings with BarCodeReader
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::set_Timeout | ( | int32_t | value | ) |
Sets the timeout of recognition process in milliseconds.
The timeout.
This sample shows how to avoid recogntion hungs with timeount on large images
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::SetBarCodeImage | ( | System::SharedPtr< System::Drawing::Bitmap > | value | ) |
Sets bitmap image for recognition. Must be called before ReadBarCodes() method.
value | The bitmap image for recognition. |
This sample shows how to detect Code39 and Code128 barcodes.
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::SetBarCodeImage | ( | System::SharedPtr< System::Drawing::Bitmap > | value, |
System::ArrayPtr< System::Drawing::Rectangle > | areas | ||
) |
Sets bitmap image and areas for recognition. Must be called before ReadBarCodes() method.
value | The bitmap image for recognition. |
areas | areas list for recognition |
This sample shows how to detect Code39 and Code128 barcodes.
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::SetBarCodeImage | ( | System::SharedPtr< System::Drawing::Bitmap > | value, |
System::Drawing::Rectangle | area | ||
) |
Sets bitmap image and area for recognition. Must be called before ReadBarCodes() method.
value | The bitmap image for recognition. |
area | area for recognition |
This sample shows how to detect Code39 and Code128 barcodes.
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::SetBarCodeImage | ( | System::String | filename | ) |
Sets image file for recognition. Must be called before ReadBarCodes() method.
filename | The image file for recogniton. |
This sample shows how to detect Code39 and Code128 barcodes.
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::SetBarCodeImage | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Sets image stream for recognition. Must be called before ReadBarCodes() method.
stream | The image stream for recogniton. |
This sample shows how to detect Code39 and Code128 barcodes.
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::SetBarCodeReadType | ( | const System::ArrayPtr< System::SharedPtr< SingleDecodeType >> & | barcodeTypes | ) |
Sets SingleDecodeType type array for recognition. Must be called before ReadBarCodes() method.
barcodeTypes | The SingleDecodeType type array to read. |
This sample shows how to detect Code39 and Code128 barcodes.
void Aspose::BarCode::BarCodeRecognition::BarCodeReader::SetBarCodeReadType | ( | System::SharedPtr< BaseDecodeType > | type | ) |
Sets decode type for recognition. Must be called before ReadBarCodes() method.
type | The type of barcode to read. |
This sample shows how to detect Code39 and Code128 barcodes.