public static class OCRBeamSearchDecoder.ClassifierCallback extends Pointer
This way it hides the feature extractor and the classifier itself, so developers can write their own OCR code.
The default character classifier and feature extractor can be loaded using the utility function
loadOCRBeamSearchClassifierCNN with all its parameters provided in
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ClassifierCallback()
Default native constructor.
|
ClassifierCallback(long size)
Native array allocator.
|
ClassifierCallback(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
eval(GpuMat image,
DoubleVector recognition_probabilities,
IntVector oversegmentation) |
void |
eval(Mat image,
DoubleVector recognition_probabilities,
IntVector oversegmentation)
\brief The character classifier must return a (ranked list of) class(es) id('s)
|
void |
eval(UMat image,
DoubleVector recognition_probabilities,
IntVector oversegmentation) |
int |
getStepSize() |
int |
getWindowSize() |
OCRBeamSearchDecoder.ClassifierCallback |
position(long position) |
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 ClassifierCallback()
public ClassifierCallback(long size)
Pointer.position(long)
.public ClassifierCallback(Pointer p)
Pointer.Pointer(Pointer)
.public OCRBeamSearchDecoder.ClassifierCallback position(long position)
public void eval(@ByVal Mat image, @StdVector DoubleVector recognition_probabilities, @ByRef IntVector oversegmentation)
image
- Input image CV_8UC1 or CV_8UC3 with a single letter.recognition_probabilities
- For each of the N characters found the classifier returns a list with
class probabilities for each class.oversegmentation
- The classifier returns a list of N+1 character locations' x-coordinates,
including 0 as start-sequence location.public void eval(@ByVal UMat image, @StdVector DoubleVector recognition_probabilities, @ByRef IntVector oversegmentation)
public void eval(@ByVal GpuMat image, @StdVector DoubleVector recognition_probabilities, @ByRef IntVector oversegmentation)
public int getWindowSize()
public int getStepSize()
Copyright © 2020. All rights reserved.