@Namespace(value="cv::text") @NoOffset @Properties(inherit=opencv_text.class) public class OCRBeamSearchDecoder extends BaseOCR
\note
- (C++) An example on using OCRBeamSearchDecoder recognition combined with scene text detection can
be found at the demo sample:
Modifier and Type | Class and Description |
---|---|
static class |
OCRBeamSearchDecoder.ClassifierCallback
\brief Callback with the character classifier is made a class.
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
OCRBeamSearchDecoder()
Default native constructor.
|
OCRBeamSearchDecoder(long size)
Native array allocator.
|
OCRBeamSearchDecoder(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
static OCRBeamSearchDecoder |
create(BytePointer filename,
BytePointer vocabulary,
GpuMat transition_probabilities_table,
GpuMat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(BytePointer filename,
BytePointer vocabulary,
Mat transition_probabilities_table,
Mat emission_probabilities_table,
int mode,
int beam_size)
\brief Creates an instance of the OCRBeamSearchDecoder class.
|
static OCRBeamSearchDecoder |
create(BytePointer filename,
BytePointer vocabulary,
UMat transition_probabilities_table,
UMat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(OCRBeamSearchDecoder.ClassifierCallback classifier,
BytePointer vocabulary,
GpuMat transition_probabilities_table,
GpuMat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(OCRBeamSearchDecoder.ClassifierCallback classifier,
BytePointer vocabulary,
Mat transition_probabilities_table,
Mat emission_probabilities_table,
int mode,
int beam_size)
\brief Creates an instance of the OCRBeamSearchDecoder class.
|
static OCRBeamSearchDecoder |
create(OCRBeamSearchDecoder.ClassifierCallback classifier,
BytePointer vocabulary,
UMat transition_probabilities_table,
UMat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(OCRBeamSearchDecoder.ClassifierCallback classifier,
String vocabulary,
GpuMat transition_probabilities_table,
GpuMat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(OCRBeamSearchDecoder.ClassifierCallback classifier,
String vocabulary,
Mat transition_probabilities_table,
Mat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(OCRBeamSearchDecoder.ClassifierCallback classifier,
String vocabulary,
UMat transition_probabilities_table,
UMat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(String filename,
String vocabulary,
GpuMat transition_probabilities_table,
GpuMat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(String filename,
String vocabulary,
Mat transition_probabilities_table,
Mat emission_probabilities_table,
int mode,
int beam_size) |
static OCRBeamSearchDecoder |
create(String filename,
String vocabulary,
UMat transition_probabilities_table,
UMat emission_probabilities_table,
int mode,
int beam_size) |
OCRBeamSearchDecoder |
position(long position) |
BytePointer |
run(GpuMat image,
GpuMat mask,
int min_confidence) |
BytePointer |
run(GpuMat image,
GpuMat mask,
int min_confidence,
int component_level) |
BytePointer |
run(GpuMat image,
int min_confidence) |
BytePointer |
run(GpuMat image,
int min_confidence,
int component_level) |
void |
run(Mat image,
BytePointer output_text) |
void |
run(Mat image,
BytePointer output_text,
RectVector component_rects,
StringVector component_texts,
FloatVector component_confidences,
int component_level)
\brief Recognize text using Beam Search.
|
BytePointer |
run(Mat image,
int min_confidence) |
BytePointer |
run(Mat image,
int min_confidence,
int component_level) |
void |
run(Mat image,
Mat mask,
BytePointer output_text) |
void |
run(Mat image,
Mat mask,
BytePointer output_text,
RectVector component_rects,
StringVector component_texts,
FloatVector component_confidences,
int component_level) |
BytePointer |
run(Mat image,
Mat mask,
int min_confidence) |
BytePointer |
run(Mat image,
Mat mask,
int min_confidence,
int component_level) |
String |
run(UMat image,
int min_confidence) |
String |
run(UMat image,
int min_confidence,
int component_level) |
String |
run(UMat image,
UMat mask,
int min_confidence) |
String |
run(UMat image,
UMat mask,
int min_confidence,
int component_level) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public OCRBeamSearchDecoder()
public OCRBeamSearchDecoder(long size)
Pointer.position(long)
.public OCRBeamSearchDecoder(Pointer p)
Pointer.Pointer(Pointer)
.public OCRBeamSearchDecoder position(long position)
public void run(@ByRef Mat image, @StdString @ByRef BytePointer output_text, RectVector component_rects, StringVector component_texts, FloatVector component_confidences, int component_level)
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.
run
in class BaseOCR
image
- Input binary image CV_8UC1 with a single text line (or word).
output_text
- Output text. Most likely character sequence found by the HMM decoder.
component_rects
- If provided the method will output a list of Rects for the individual
text elements found (e.g. words).
component_texts
- If provided the method will output a list of text strings for the
recognition of individual text elements found (e.g. words).
component_confidences
- If provided the method will output a list of confidence values
for the recognition of individual text elements found (e.g. words).
component_level
- Only OCR_LEVEL_WORD is supported.public void run(@ByRef Mat image, @StdString @ByRef BytePointer output_text)
public void run(@ByRef Mat image, @ByRef Mat mask, @StdString @ByRef BytePointer output_text, RectVector component_rects, StringVector component_texts, FloatVector component_confidences, int component_level)
public void run(@ByRef Mat image, @ByRef Mat mask, @StdString @ByRef BytePointer output_text)
@opencv_core.Str public BytePointer run(@ByVal Mat image, int min_confidence, int component_level)
@opencv_core.Str public BytePointer run(@ByVal Mat image, int min_confidence)
@opencv_core.Str public String run(@ByVal UMat image, int min_confidence, int component_level)
@opencv_core.Str public String run(@ByVal UMat image, int min_confidence)
@opencv_core.Str public BytePointer run(@ByVal GpuMat image, int min_confidence, int component_level)
@opencv_core.Str public BytePointer run(@ByVal GpuMat image, int min_confidence)
@opencv_core.Str public BytePointer run(@ByVal Mat image, @ByVal Mat mask, int min_confidence, int component_level)
@opencv_core.Str public BytePointer run(@ByVal Mat image, @ByVal Mat mask, int min_confidence)
@opencv_core.Str public String run(@ByVal UMat image, @ByVal UMat mask, int min_confidence, int component_level)
@opencv_core.Str public BytePointer run(@ByVal GpuMat image, @ByVal GpuMat mask, int min_confidence, int component_level)
@opencv_core.Str public BytePointer run(@ByVal GpuMat image, @ByVal GpuMat mask, int min_confidence)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Ptr OCRBeamSearchDecoder.ClassifierCallback classifier, @StdString BytePointer vocabulary, @ByVal Mat transition_probabilities_table, @ByVal Mat emission_probabilities_table, @Cast(value="cv::text::decoder_mode") int mode, int beam_size)
classifier
- The character classifier with built in feature extractor.
vocabulary
- The language vocabulary (chars when ASCII English text). vocabulary.size()
must be equal to the number of classes of the classifier.
transition_probabilities_table
- Table with transition probabilities between character
pairs. cols == rows == vocabulary.size().
emission_probabilities_table
- Table with observation emission probabilities. cols ==
rows == vocabulary.size().
mode
- HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment
(beam_size
- Size of the beam in Beam Search algorithm.@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Ptr OCRBeamSearchDecoder.ClassifierCallback classifier, @StdString String vocabulary, @ByVal Mat transition_probabilities_table, @ByVal Mat emission_probabilities_table, @Cast(value="cv::text::decoder_mode") int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Ptr OCRBeamSearchDecoder.ClassifierCallback classifier, @StdString String vocabulary, @ByVal UMat transition_probabilities_table, @ByVal UMat emission_probabilities_table, @Cast(value="cv::text::decoder_mode") int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Ptr OCRBeamSearchDecoder.ClassifierCallback classifier, @StdString BytePointer vocabulary, @ByVal UMat transition_probabilities_table, @ByVal UMat emission_probabilities_table, @Cast(value="cv::text::decoder_mode") int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Ptr OCRBeamSearchDecoder.ClassifierCallback classifier, @StdString BytePointer vocabulary, @ByVal GpuMat transition_probabilities_table, @ByVal GpuMat emission_probabilities_table, @Cast(value="cv::text::decoder_mode") int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Ptr OCRBeamSearchDecoder.ClassifierCallback classifier, @StdString String vocabulary, @ByVal GpuMat transition_probabilities_table, @ByVal GpuMat emission_probabilities_table, @Cast(value="cv::text::decoder_mode") int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Str BytePointer filename, @opencv_core.Str BytePointer vocabulary, @ByVal Mat transition_probabilities_table, @ByVal Mat emission_probabilities_table, int mode, int beam_size)
\overload
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Str String filename, @opencv_core.Str String vocabulary, @ByVal Mat transition_probabilities_table, @ByVal Mat emission_probabilities_table, int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Str String filename, @opencv_core.Str String vocabulary, @ByVal UMat transition_probabilities_table, @ByVal UMat emission_probabilities_table, int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Str BytePointer filename, @opencv_core.Str BytePointer vocabulary, @ByVal UMat transition_probabilities_table, @ByVal UMat emission_probabilities_table, int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Str BytePointer filename, @opencv_core.Str BytePointer vocabulary, @ByVal GpuMat transition_probabilities_table, @ByVal GpuMat emission_probabilities_table, int mode, int beam_size)
@opencv_core.Ptr public static OCRBeamSearchDecoder create(@opencv_core.Str String filename, @opencv_core.Str String vocabulary, @ByVal GpuMat transition_probabilities_table, @ByVal GpuMat emission_probabilities_table, int mode, int beam_size)
Copyright © 2020. All rights reserved.