@Namespace(value="cv::dnn") @Properties(inherit=opencv_dnn.class) public class TextRecognitionModel extends Model
Model.Impl
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
TextRecognitionModel() |
TextRecognitionModel(BytePointer model) |
TextRecognitionModel(BytePointer model,
BytePointer config)
\brief Create text recognition model from network represented in one of the supported formats
Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method
|
TextRecognitionModel(long size)
Native array allocator.
|
TextRecognitionModel(Net network)
\brief Create Text Recognition model from deep learning network
Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method
|
TextRecognitionModel(Pointer p)
Pointer cast constructor.
|
TextRecognitionModel(String model) |
TextRecognitionModel(String model,
String config) |
Modifier and Type | Method and Description |
---|---|
BytePointer |
getDecodeType()
\brief Get the decoding method
|
TextRecognitionModel |
getPointer(long i) |
StringVector |
getVocabulary()
\brief Get the vocabulary for recognition.
|
TextRecognitionModel |
position(long position) |
BytePointer |
recognize(GpuMat frame) |
void |
recognize(GpuMat frame,
GpuMatVector roiRects,
StringVector results) |
void |
recognize(GpuMat frame,
MatVector roiRects,
StringVector results) |
void |
recognize(GpuMat frame,
UMatVector roiRects,
StringVector results) |
BytePointer |
recognize(Mat frame)
\brief Given the \p input frame, create input blob, run net and return recognition result
|
void |
recognize(Mat frame,
GpuMatVector roiRects,
StringVector results) |
void |
recognize(Mat frame,
MatVector roiRects,
StringVector results)
\brief Given the \p input frame, create input blob, run net and return recognition result
|
void |
recognize(Mat frame,
UMatVector roiRects,
StringVector results) |
String |
recognize(UMat frame) |
void |
recognize(UMat frame,
GpuMatVector roiRects,
StringVector results) |
void |
recognize(UMat frame,
MatVector roiRects,
StringVector results) |
void |
recognize(UMat frame,
UMatVector roiRects,
StringVector results) |
TextRecognitionModel |
setDecodeOptsCTCPrefixBeamSearch(int beamSize) |
TextRecognitionModel |
setDecodeOptsCTCPrefixBeamSearch(int beamSize,
int vocPruneSize)
\brief Set the decoding method options for
"CTC-prefix-beam-search" decode usage |
TextRecognitionModel |
setDecodeType(BytePointer decodeType)
\brief Set the decoding method of translating the network output into string
|
TextRecognitionModel |
setDecodeType(String decodeType) |
TextRecognitionModel |
setVocabulary(StringVector vocabulary)
\brief Set the vocabulary for recognition.
|
asNet, enableWinograd, getImpl, getImplRef, getNetwork_, predict, predict, predict, predict, predict, predict, predict, predict, predict, put, setInputCrop, setInputMean, setInputParams, setInputParams, setInputScale, setInputSize, setInputSize, setInputSwapRB, setPreferableBackend, setPreferableTarget
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public TextRecognitionModel(Pointer p)
Pointer(Pointer)
.public TextRecognitionModel(long size)
Pointer.position(long)
.public TextRecognitionModel()
public TextRecognitionModel(@Const @ByRef Net network)
network
- [in] Net objectpublic TextRecognitionModel(@StdString BytePointer model, @StdString BytePointer config)
model
- [in] Binary file contains trained weightsconfig
- [in] Text file contains network configurationpublic TextRecognitionModel(@StdString BytePointer model)
public TextRecognitionModel(@StdString String model, @StdString String config)
public TextRecognitionModel(@StdString String model)
public TextRecognitionModel position(long position)
public TextRecognitionModel getPointer(long i)
getPointer
in class Model
@ByRef public TextRecognitionModel setDecodeType(@StdString BytePointer decodeType)
decodeType
- [in] The decoding method of translating the network output into string, currently supported type:
- "CTC-greedy"
greedy decoding for the output of CTC-based methods
- "CTC-prefix-beam-search"
Prefix beam search decoding for the output of CTC-based methods@ByRef public TextRecognitionModel setDecodeType(@StdString String decodeType)
@StdString public BytePointer getDecodeType()
@ByRef public TextRecognitionModel setDecodeOptsCTCPrefixBeamSearch(int beamSize, int vocPruneSize)
"CTC-prefix-beam-search"
decode usagebeamSize
- [in] Beam size for searchvocPruneSize
- [in] Parameter to optimize big vocabulary search,
only take top \p vocPruneSize tokens in each search step, \p vocPruneSize <= 0 stands for disable this prune.@ByRef public TextRecognitionModel setDecodeOptsCTCPrefixBeamSearch(int beamSize)
@ByRef public TextRecognitionModel setVocabulary(@Const @ByRef StringVector vocabulary)
vocabulary
- [in] the associated vocabulary of the network.@Const @ByRef public StringVector getVocabulary()
@StdString public BytePointer recognize(@ByVal Mat frame)
frame
- [in] The input image@StdString public String recognize(@ByVal UMat frame)
@StdString public BytePointer recognize(@ByVal GpuMat frame)
public void recognize(@ByVal Mat frame, @ByVal MatVector roiRects, @ByRef StringVector results)
frame
- [in] The input imageroiRects
- [in] List of text detection regions of interest (cv::Rect, CV_32SC4). ROIs is be cropped as the network inputsresults
- [out] A set of text recognition results.public void recognize(@ByVal Mat frame, @ByVal UMatVector roiRects, @ByRef StringVector results)
public void recognize(@ByVal Mat frame, @ByVal GpuMatVector roiRects, @ByRef StringVector results)
public void recognize(@ByVal UMat frame, @ByVal MatVector roiRects, @ByRef StringVector results)
public void recognize(@ByVal UMat frame, @ByVal UMatVector roiRects, @ByRef StringVector results)
public void recognize(@ByVal UMat frame, @ByVal GpuMatVector roiRects, @ByRef StringVector results)
public void recognize(@ByVal GpuMat frame, @ByVal MatVector roiRects, @ByRef StringVector results)
public void recognize(@ByVal GpuMat frame, @ByVal UMatVector roiRects, @ByRef StringVector results)
public void recognize(@ByVal GpuMat frame, @ByVal GpuMatVector roiRects, @ByRef StringVector results)
Copyright © 2024. All rights reserved.