CRawTextLine
The class CRawTextLine
of Dynamsoft Label Recognizer represents a recognized raw text line in an image. It can be in one of the following states:
RTLS_LOCALIZED
: Localized but recognition not performed.RTLS_RECOGNITION_FAILED
: Recognition failed.RTLS_RECOGNITION_SUCCEEDED
: Successfully recognized.
Definition
Namespace: dynamsoft::dlr::intermediate_results
Assembly: DynamsoftLabelRecognizer
class CRawTextLine
Methods
Method | Description |
---|---|
GetText |
Gets the recognized text. |
GetConfidence |
Gets the confidence level of the recognized text. |
GetCharacterResultsCount |
Gets the number of individual character recognition results in the line. |
GetCharacterResult |
Gets the character recognition result at the specified index. |
GetLocation |
Gets the location of the text line. |
GetRowNumber |
Gets the row number of the text line within the image. |
GetSpecificationName |
Gets the name of the text line specification that generated this element. |
GetStatus |
Gets the status of the text line. |
SetText |
Sets the recognized text. |
SetLocation |
Set the location of the text line. |
SetRowNumber |
Set the row number of the text line within the image. |
SetSpecificationName |
Sets the name of the text line specification that generated this element. |
Release |
Decreases the reference count of the CRawTextLine object. |
Clone |
Clone the CRawTextLine object. |
SetCharacterResults |
Sets the character recognition results. |
GetText
Gets the recognized text.
const char* GetText() const
Return value
Returns a pointer to the recognized text.
GetConfidence
Gets the confidence level of the recognized text.
int GetConfidence() const
Return value
Returns an integer value representing the confidence level of the recognized text.
GetCharacterResultsCount
Gets the number of individual character recognition results in the line.
int GetCharacterResultsCount() const
Return value
Returns an integer value representing the number of individual character recognition results.
GetCharacterResult
Gets the character recognition result at the specified index.
const CCharacterResult* GetCharacterResult(int index) const
Parameters
[in] index
The index of the character recognition result to retrieve.
Return value
Returns a pointer to the character recognition result.
GetLocation
Gets the location of the text line.
CQuadrilateral GetLocation() const
Return value
Returns a CQuadrilateral object which represents the location of the text line.
GetRowNumber
Gets the row number of the text line within the image.
int GetRowNumber() const
Return value
Returns an integer value representing the row number of the text line within the image.
GetSpecificationName
Gets the name of the text line specification that generated this element.
const char* GetSpecificationName() const
Return value
Returns the name of the text line specification.
GetStatus
Gets the status of the text line.
RawTextLineStatus GetStatus() const
Return value
Returns the status of the text line.
See also
SetText
Sets the recognized text.
void SetText(const char* text)
Parameters
[in] text
The text to be set.
SetLocation
Set the location of the text line.
int SetLocation(const CQuadrilateral& location)
Parameters
[in] location
The location of the text line.
** Return value**
Returns 0 if successful; otherwise returns an error code.
SetRowNumber
Set the row number of the text line within the image.
void SetRowNumber(int rowNumber)
Parameters
[in] rowNumber
The row number of the text line within the image.
SetSpecificationName
Sets the name of the text line specification that generated this element.
void SetSpecificationName(const char* specificationName)
Parameters
[in] specificationName
The name of the text line specification.
Release
Decreases the reference count of the CRawTextLine object.
void Release()
Clone
Clone the CRawTextLine object.
CRawTextLine* Clone() const
Return value
Returns a pointer to the cloned CRawTextLine object.
Remarks
Don’t forget to call Release
after you have finished using the cloned CRawTextLine object.
SetCharacterResults
Sets the character recognition results.
int SetCharacterResults(const CCharacterResult* charArray, int charArrayLength)
Parameters
[in] charArray
The character result array.
[in] charArrayLength
The length of the character result array.
Return value
Returns 0 if successful; otherwise returns an error code.