View Source Evision.Text.OCRBeamSearchDecoder (Evision v0.1.26-rc0)
Link to this section Summary
Functions
Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
Recognize text using Beam Search.
Variant 1:
run
Link to this section Types
@type t() :: %Evision.Text.OCRBeamSearchDecoder{ref: reference()}
Type that represents an Text.OCRBeamSearchDecoder
struct.
ref.
reference()
The underlying erlang resource variable.
Link to this section Functions
create(classifier, vocabulary, transition_probabilities_table, emission_probabilities_table)
View Source@spec create( Evision.Text.OCRBeamSearchDecoder.ClassifierCallback.t(), binary(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in() ) :: t() | {:error, String.t()}
Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
Positional Arguments
classifier:
Evision.Text.OCRBeamSearchDecoder.ClassifierCallback
.The character classifier with built in feature extractor.
vocabulary:
string
.The language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier.
transition_probabilities_table:
Evision.Mat
.Table with transition probabilities between character pairs. cols == rows == vocabulary.size().
emission_probabilities_table:
Evision.Mat
.Table with observation emission probabilities. cols == rows == vocabulary.size().
Keyword Arguments
mode:
text_decoder_mode
.HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (http://en.wikipedia.org/wiki/Viterbi_algorithm).
beam_size:
int
.Size of the beam in Beam Search algorithm.
Return
- retval:
Evision.Text.Evision.Text.OCRBeamSearchDecoder
Python prototype (for reference only):
create(classifier, vocabulary, transition_probabilities_table, emission_probabilities_table[, mode[, beam_size]]) -> retval
create(classifier, vocabulary, transition_probabilities_table, emission_probabilities_table, opts)
View Source@spec create( Evision.Text.OCRBeamSearchDecoder.ClassifierCallback.t(), binary(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil ) :: t() | {:error, String.t()}
Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
Positional Arguments
classifier:
Evision.Text.OCRBeamSearchDecoder.ClassifierCallback
.The character classifier with built in feature extractor.
vocabulary:
string
.The language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier.
transition_probabilities_table:
Evision.Mat
.Table with transition probabilities between character pairs. cols == rows == vocabulary.size().
emission_probabilities_table:
Evision.Mat
.Table with observation emission probabilities. cols == rows == vocabulary.size().
Keyword Arguments
mode:
text_decoder_mode
.HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (http://en.wikipedia.org/wiki/Viterbi_algorithm).
beam_size:
int
.Size of the beam in Beam Search algorithm.
Return
- retval:
Evision.Text.Evision.Text.OCRBeamSearchDecoder
Python prototype (for reference only):
create(classifier, vocabulary, transition_probabilities_table, emission_probabilities_table[, mode[, beam_size]]) -> retval
@spec run(t(), Evision.Mat.maybe_mat_in(), integer()) :: t() | {:error, String.t()}
Recognize text using Beam Search.
Positional Arguments
self:
Evision.Text.Evision.Text.OCRBeamSearchDecoder.t()
image:
Evision.Mat
.Input binary image CV_8UC1 with a single text line (or word).
min_confidence:
int
Keyword Arguments
component_level:
int
.Only OCR_LEVEL_WORD is supported.
Return
- retval:
String
Takes image on input and returns recognized text in the output_text parameter. Optionally provides also the Rects for individual text elements found (e.g. words), and the list of those text elements with their confidence values.
Python prototype (for reference only):
run(image, min_confidence[, component_level]) -> retval
@spec run(t(), Evision.Mat.maybe_mat_in(), integer(), [{atom(), term()}, ...] | nil) :: t() | {:error, String.t()}
@spec run(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), integer()) :: t() | {:error, String.t()}
Variant 1:
run
Positional Arguments
- self:
Evision.Text.Evision.Text.OCRBeamSearchDecoder.t()
- image:
Evision.Mat
- mask:
Evision.Mat
- min_confidence:
int
Keyword Arguments
- component_level:
int
.
Return
- retval:
String
Python prototype (for reference only):
run(image, mask, min_confidence[, component_level]) -> retval
Variant 2:
Recognize text using Beam Search.
Positional Arguments
self:
Evision.Text.Evision.Text.OCRBeamSearchDecoder.t()
image:
Evision.Mat
.Input binary image CV_8UC1 with a single text line (or word).
min_confidence:
int
Keyword Arguments
component_level:
int
.Only OCR_LEVEL_WORD is supported.
Return
- retval:
String
Takes image on input and returns recognized text in the output_text parameter. Optionally provides also the Rects for individual text elements found (e.g. words), and the list of those text elements with their confidence values.
Python prototype (for reference only):
run(image, min_confidence[, component_level]) -> retval
@spec run( t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), integer(), [{atom(), term()}, ...] | nil ) :: t() | {:error, String.t()}
run
Positional Arguments
- self:
Evision.Text.Evision.Text.OCRBeamSearchDecoder.t()
- image:
Evision.Mat
- mask:
Evision.Mat
- min_confidence:
int
Keyword Arguments
- component_level:
int
.
Return
- retval:
String
Python prototype (for reference only):
run(image, mask, min_confidence[, component_level]) -> retval