public class opencv_text extends opencv_text
Modifier and Type | Field and Description |
---|---|
static int |
ERFILTER_NM_IHSGrad
enum cv::text::
|
static int |
ERFILTER_NM_RGBLGrad
enum cv::text::
|
static int |
ERGROUPING_ORIENTATION_ANY
enum cv::text::erGrouping_Modes
|
static int |
ERGROUPING_ORIENTATION_HORIZ
enum cv::text::erGrouping_Modes
|
static int |
OCR_CNN_CLASSIFIER
enum cv::text::classifier_type
|
static int |
OCR_DECODER_VITERBI
enum cv::text::decoder_mode
|
static int |
OCR_KNN_CLASSIFIER
enum cv::text::classifier_type
|
static int |
OCR_LEVEL_TEXTLINE
enum cv::text::
|
static int |
OCR_LEVEL_WORD
enum cv::text::
|
static int |
OEM_CUBE_ONLY
enum cv::text::ocr_engine_mode
|
static int |
OEM_DEFAULT
enum cv::text::ocr_engine_mode
|
static int |
OEM_TESSERACT_CUBE_COMBINED
enum cv::text::ocr_engine_mode
|
static int |
OEM_TESSERACT_ONLY
enum cv::text::ocr_engine_mode
|
static int |
PSM_AUTO
enum cv::text::page_seg_mode
|
static int |
PSM_AUTO_ONLY
enum cv::text::page_seg_mode
|
static int |
PSM_AUTO_OSD
enum cv::text::page_seg_mode
|
static int |
PSM_CIRCLE_WORD
enum cv::text::page_seg_mode
|
static int |
PSM_OSD_ONLY
enum cv::text::page_seg_mode
|
static int |
PSM_SINGLE_BLOCK
enum cv::text::page_seg_mode
|
static int |
PSM_SINGLE_BLOCK_VERT_TEXT
enum cv::text::page_seg_mode
|
static int |
PSM_SINGLE_CHAR
enum cv::text::page_seg_mode
|
static int |
PSM_SINGLE_COLUMN
enum cv::text::page_seg_mode
|
static int |
PSM_SINGLE_LINE
enum cv::text::page_seg_mode
|
static int |
PSM_SINGLE_WORD
enum cv::text::page_seg_mode
|
Constructor and Description |
---|
opencv_text() |
Modifier and Type | Method and Description |
---|---|
static void |
computeNMChannels(GpuMat _src,
GpuMatVector _channels) |
static void |
computeNMChannels(GpuMat _src,
GpuMatVector _channels,
int _mode) |
static void |
computeNMChannels(GpuMat _src,
MatVector _channels) |
static void |
computeNMChannels(GpuMat _src,
MatVector _channels,
int _mode) |
static void |
computeNMChannels(GpuMat _src,
UMatVector _channels) |
static void |
computeNMChannels(GpuMat _src,
UMatVector _channels,
int _mode) |
static void |
computeNMChannels(Mat _src,
GpuMatVector _channels) |
static void |
computeNMChannels(Mat _src,
GpuMatVector _channels,
int _mode) |
static void |
computeNMChannels(Mat _src,
MatVector _channels) |
static void |
computeNMChannels(Mat _src,
MatVector _channels,
int _mode)
\brief Compute the different channels to be processed independently in the N&M algorithm \cite Neumann12.
|
static void |
computeNMChannels(Mat _src,
UMatVector _channels) |
static void |
computeNMChannels(Mat _src,
UMatVector _channels,
int _mode) |
static void |
computeNMChannels(UMat _src,
GpuMatVector _channels) |
static void |
computeNMChannels(UMat _src,
GpuMatVector _channels,
int _mode) |
static void |
computeNMChannels(UMat _src,
MatVector _channels) |
static void |
computeNMChannels(UMat _src,
MatVector _channels,
int _mode) |
static void |
computeNMChannels(UMat _src,
UMatVector _channels) |
static void |
computeNMChannels(UMat _src,
UMatVector _channels,
int _mode) |
static ERFilter |
createERFilterNM1(BytePointer filename) |
static ERFilter |
createERFilterNM1(BytePointer filename,
int thresholdDelta,
float minArea,
float maxArea,
float minProbability,
boolean nonMaxSuppression,
float minProbabilityDiff)
\brief Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm
from the provided path e.g.
|
static ERFilter |
createERFilterNM1(ERFilter.Callback cb) |
static ERFilter |
createERFilterNM1(ERFilter.Callback cb,
int thresholdDelta,
float minArea,
float maxArea,
float minProbability,
boolean nonMaxSuppression,
float minProbabilityDiff)
\brief Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm \cite Neumann12.
|
static ERFilter |
createERFilterNM1(String filename) |
static ERFilter |
createERFilterNM1(String filename,
int thresholdDelta,
float minArea,
float maxArea,
float minProbability,
boolean nonMaxSuppression,
float minProbabilityDiff) |
static ERFilter |
createERFilterNM2(BytePointer filename) |
static ERFilter |
createERFilterNM2(BytePointer filename,
float minProbability)
\brief Reads an Extremal Region Filter for the 2nd stage classifier of N&M algorithm
from the provided path e.g.
|
static ERFilter |
createERFilterNM2(ERFilter.Callback cb) |
static ERFilter |
createERFilterNM2(ERFilter.Callback cb,
float minProbability)
\brief Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm \cite Neumann12.
|
static ERFilter |
createERFilterNM2(String filename) |
static ERFilter |
createERFilterNM2(String filename,
float minProbability) |
static Mat |
createOCRHMMTransitionsTable(BytePointer vocabulary,
StringVector lexicon) |
static void |
createOCRHMMTransitionsTable(BytePointer vocabulary,
StringVector lexicon,
GpuMat transition_probabilities_table) |
static void |
createOCRHMMTransitionsTable(BytePointer vocabulary,
StringVector lexicon,
Mat transition_probabilities_table)
\brief Utility function to create a tailored language model transitions table from a given list of words (lexicon).
|
static void |
createOCRHMMTransitionsTable(BytePointer vocabulary,
StringVector lexicon,
UMat transition_probabilities_table) |
static Mat |
createOCRHMMTransitionsTable(String vocabulary,
StringVector lexicon) |
static void |
detectRegions(GpuMat image,
ERFilter er_filter1,
ERFilter er_filter2,
PointVectorVector regions) |
static void |
detectRegions(GpuMat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects) |
static void |
detectRegions(GpuMat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbability) |
static void |
detectRegions(GpuMat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects,
int method,
String filename,
float minProbability) |
static void |
detectRegions(Mat image,
ERFilter er_filter1,
ERFilter er_filter2,
PointVectorVector regions) |
static void |
detectRegions(Mat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects) |
static void |
detectRegions(Mat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbability)
\brief Extracts text regions from image.
|
static void |
detectRegions(Mat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects,
int method,
String filename,
float minProbability) |
static void |
detectRegions(UMat image,
ERFilter er_filter1,
ERFilter er_filter2,
PointVectorVector regions) |
static void |
detectRegions(UMat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects) |
static void |
detectRegions(UMat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbability) |
static void |
detectRegions(UMat image,
ERFilter er_filter1,
ERFilter er_filter2,
RectVector groups_rects,
int method,
String filename,
float minProbability) |
static void |
erGrouping(GpuMat image,
GpuMat channel,
PointVectorVector regions,
RectVector groups_rects) |
static void |
erGrouping(GpuMat image,
GpuMat channel,
PointVectorVector regions,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(GpuMat image,
GpuMat channel,
PointVectorVector regions,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(GpuMat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(GpuMat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(GpuMat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(GpuMat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(GpuMat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(GpuMat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(GpuMat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(GpuMat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(GpuMat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(Mat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(Mat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(Mat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(Mat image,
Mat channel,
PointVectorVector regions,
RectVector groups_rects) |
static void |
erGrouping(Mat image,
Mat channel,
PointVectorVector regions,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(Mat image,
Mat channel,
PointVectorVector regions,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(Mat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(Mat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity)
\brief Find groups of Extremal Regions that are organized as text blocks.
|
static void |
erGrouping(Mat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(Mat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(Mat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(Mat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(UMat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(UMat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(UMat img,
GpuMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(UMat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(UMat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(UMat img,
MatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(UMat image,
UMat channel,
PointVectorVector regions,
RectVector groups_rects) |
static void |
erGrouping(UMat image,
UMat channel,
PointVectorVector regions,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(UMat image,
UMat channel,
PointVectorVector regions,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static void |
erGrouping(UMat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects) |
static void |
erGrouping(UMat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
BytePointer filename,
float minProbablity) |
static void |
erGrouping(UMat img,
UMatVector channels,
ERStatVectorVector regions,
PointVectorVector groups,
RectVector groups_rects,
int method,
String filename,
float minProbablity) |
static ERFilter.Callback |
loadClassifierNM1(BytePointer filename)
\brief Allow to implicitly load the default classifier when creating an ERFilter object.
|
static ERFilter.Callback |
loadClassifierNM1(String filename) |
static ERFilter.Callback |
loadClassifierNM2(BytePointer filename)
\brief Allow to implicitly load the default classifier when creating an ERFilter object.
|
static ERFilter.Callback |
loadClassifierNM2(String filename) |
static OCRBeamSearchDecoder.ClassifierCallback |
loadOCRBeamSearchClassifierCNN(BytePointer filename)
\brief Allow to implicitly load the default character classifier when creating an OCRBeamSearchDecoder object.
|
static OCRBeamSearchDecoder.ClassifierCallback |
loadOCRBeamSearchClassifierCNN(String filename) |
static OCRHMMDecoder.ClassifierCallback |
loadOCRHMMClassifier(BytePointer filename,
int classifier)
\brief Allow to implicitly load the default character classifier when creating an OCRHMMDecoder object.
|
static OCRHMMDecoder.ClassifierCallback |
loadOCRHMMClassifier(String filename,
int classifier) |
static OCRHMMDecoder.ClassifierCallback |
loadOCRHMMClassifierCNN(BytePointer filename)
Deprecated.
use loadOCRHMMClassifier instead
|
static OCRHMMDecoder.ClassifierCallback |
loadOCRHMMClassifierCNN(String filename) |
static OCRHMMDecoder.ClassifierCallback |
loadOCRHMMClassifierNM(BytePointer filename)
Deprecated.
loadOCRHMMClassifier instead
|
static OCRHMMDecoder.ClassifierCallback |
loadOCRHMMClassifierNM(String filename) |
static void |
MSERsToERStats(GpuMat image,
PointVectorVector contours,
ERStatVectorVector regions) |
static void |
MSERsToERStats(Mat image,
PointVectorVector contours,
ERStatVectorVector regions)
\brief Converts MSER contours (vector\
|
static void |
MSERsToERStats(UMat image,
PointVectorVector contours,
ERStatVectorVector regions) |
map
public static final int ERFILTER_NM_RGBLGrad
public static final int ERFILTER_NM_IHSGrad
public static final int ERGROUPING_ORIENTATION_HORIZ
public static final int ERGROUPING_ORIENTATION_ANY
public static final int OCR_LEVEL_WORD
public static final int OCR_LEVEL_TEXTLINE
public static final int PSM_OSD_ONLY
public static final int PSM_AUTO_OSD
public static final int PSM_AUTO_ONLY
public static final int PSM_AUTO
public static final int PSM_SINGLE_COLUMN
public static final int PSM_SINGLE_BLOCK_VERT_TEXT
public static final int PSM_SINGLE_BLOCK
public static final int PSM_SINGLE_LINE
public static final int PSM_SINGLE_WORD
public static final int PSM_CIRCLE_WORD
public static final int PSM_SINGLE_CHAR
public static final int OEM_TESSERACT_ONLY
public static final int OEM_CUBE_ONLY
public static final int OEM_TESSERACT_CUBE_COMBINED
public static final int OEM_DEFAULT
public static final int OCR_DECODER_VITERBI
public static final int OCR_KNN_CLASSIFIER
public static final int OCR_CNN_CLASSIFIER
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM1(@opencv_core.Ptr ERFilter.Callback cb, int thresholdDelta, float minArea, float maxArea, float minProbability, @Cast(value="bool") boolean nonMaxSuppression, float minProbabilityDiff)
cb
- : Callback with the classifier. Default classifier can be implicitly load with function
loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xmlthresholdDelta
- : Threshold step in subsequent thresholds when extracting the component treeminArea
- : The minimum area (% of image size) allowed for retreived ER'smaxArea
- : The maximum area (% of image size) allowed for retreived ER'sminProbability
- : The minimum probability P(er|character) allowed for retreived ER'snonMaxSuppression
- : Whenever non-maximum suppression is done over the branch probabilitiesminProbabilityDiff
- : The minimum probability difference between local maxima and local minima ERs
The component tree of the image is extracted by a threshold increased step by step from 0 to 255, incrementally computable descriptors (aspect_ratio, compactness, number of holes, and number of horizontal crossings) are computed for each ER and used as features for a classifier which estimates the class-conditional probability P(er|character). The value of P(er|character) is tracked using the inclusion relation of ER across all thresholds and only the ERs which correspond to local maximum of the probability P(er|character) are selected (if the local maximum of the probability is above a global limit pmin and the difference between local maximum and local minimum is greater than minProbabilityDiff).
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM1(@opencv_core.Ptr ERFilter.Callback cb)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM2(@opencv_core.Ptr ERFilter.Callback cb, float minProbability)
cb
- : Callback with the classifier. Default classifier can be implicitly load with function
loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xmlminProbability
- : The minimum probability P(er|character) allowed for retreived ER's
In the second stage, the ERs that passed the first stage are classified into character and non-character classes using more informative but also more computationally expensive features. The classifier uses all the features calculated in the first stage and the following additional features: hole area ratio, convex hull ratio, and number of outer inflexion points.
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM2(@opencv_core.Ptr ERFilter.Callback cb)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM1(@opencv_core.Str BytePointer filename, int thresholdDelta, float minArea, float maxArea, float minProbability, @Cast(value="bool") boolean nonMaxSuppression, float minProbabilityDiff)
\overload
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM1(@opencv_core.Str BytePointer filename)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM1(@opencv_core.Str String filename, int thresholdDelta, float minArea, float maxArea, float minProbability, @Cast(value="bool") boolean nonMaxSuppression, float minProbabilityDiff)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM1(@opencv_core.Str String filename)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM2(@opencv_core.Str BytePointer filename, float minProbability)
\overload
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM2(@opencv_core.Str BytePointer filename)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM2(@opencv_core.Str String filename, float minProbability)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter createERFilterNM2(@opencv_core.Str String filename)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter.Callback loadClassifierNM1(@opencv_core.Str BytePointer filename)
filename
- The XML or YAML file with the classifier model (e.g. trained_classifierNM1.xml)
returns a pointer to ERFilter::Callback.
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter.Callback loadClassifierNM1(@opencv_core.Str String filename)
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter.Callback loadClassifierNM2(@opencv_core.Str BytePointer filename)
filename
- The XML or YAML file with the classifier model (e.g. trained_classifierNM2.xml)
returns a pointer to ERFilter::Callback.
@Namespace(value="cv::text") @opencv_core.Ptr public static ERFilter.Callback loadClassifierNM2(@opencv_core.Str String filename)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal Mat _src, @ByVal MatVector _channels, int _mode)
_src
- Source image. Must be RGB CV_8UC3.
_channels
- Output vector\_mode
- Mode of operation. Currently the only available options are:
ERFILTER_NM_RGBLGrad** (used by default) and **ERFILTER_NM_IHSGrad**.
In N&M algorithm, the combination of intensity (I), hue (H), saturation (S), and gradient magnitude channels (Grad) are used in order to obtain high localization recall. This implementation also provides an alternative combination of red (R), green (G), blue (B), lightness (L), and gradient magnitude (Grad).
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal Mat _src, @ByVal MatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal Mat _src, @ByVal UMatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal Mat _src, @ByVal UMatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal Mat _src, @ByVal GpuMatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal Mat _src, @ByVal GpuMatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal UMat _src, @ByVal MatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal UMat _src, @ByVal MatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal UMat _src, @ByVal UMatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal UMat _src, @ByVal UMatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal UMat _src, @ByVal GpuMatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal UMat _src, @ByVal GpuMatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal GpuMat _src, @ByVal MatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal GpuMat _src, @ByVal MatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal GpuMat _src, @ByVal UMatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal GpuMat _src, @ByVal UMatVector _channels)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal GpuMat _src, @ByVal GpuMatVector _channels, int _mode)
@Namespace(value="cv::text") public static void computeNMChannels(@ByVal GpuMat _src, @ByVal GpuMatVector _channels)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
img
- Original RGB or Greyscale image from wich the regions were extracted.
channels
- Vector of single channel images CV_8UC1 from wich the regions were extracted.
regions
- Vector of ER's retrieved from the ERFilter algorithm from each channel.
groups
- The output of the algorithm is stored in this parameter as set of lists of indexes to
provided regions.
groups_rects
- The output of the algorithm are stored in this parameter as list of rectangles.
method
- Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ,
ERGROUPING_ORIENTATION_ANY.
filename
- The XML or YAML file with the classifier model (e.g.
samples/trained_classifier_erGrouping.xml). Only to use when grouping method is
ERGROUPING_ORIENTATION_ANY.
minProbablity
- The minimum probability for accepting a group. Only to use when grouping
method is ERGROUPING_ORIENTATION_ANY.@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal MatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal UMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat img, @ByVal GpuMatVector channels, @ByRef ERStatVectorVector regions, @Cast(value="std::vector<std::vector<cv::Vec2i> >*") @ByRef PointVectorVector groups, @ByRef RectVector groups_rects, int method, @StdString String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat image, @ByVal Mat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects, int method, @opencv_core.Str BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat image, @ByVal Mat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal Mat image, @ByVal Mat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects, int method, @opencv_core.Str String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat image, @ByVal UMat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects, int method, @opencv_core.Str String filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat image, @ByVal UMat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal UMat image, @ByVal UMat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects, int method, @opencv_core.Str BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat image, @ByVal GpuMat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects, int method, @opencv_core.Str BytePointer filename, float minProbablity)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat image, @ByVal GpuMat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void erGrouping(@ByVal GpuMat image, @ByVal GpuMat channel, @ByVal PointVectorVector regions, @ByRef RectVector groups_rects, int method, @opencv_core.Str String filename, float minProbablity)
@Namespace(value="cv::text") public static void MSERsToERStats(@ByVal Mat image, @ByRef PointVectorVector contours, @ByRef ERStatVectorVector regions)
image
- Source image CV_8UC1 from which the MSERs where extracted.
contours
- Input vector with all the contours (vector\regions
- Output where the ERStat regions are stored.
It takes as input the contours provided by the OpenCV MSER feature detector and returns as output
two vectors of ERStats. This is because MSER() output contains both MSER+ and MSER- regions in a
single vector\
An example of MSERsToERStats in use can be found in the text detection webcam_demo:
@Namespace(value="cv::text") public static void MSERsToERStats(@ByVal UMat image, @ByRef PointVectorVector contours, @ByRef ERStatVectorVector regions)
@Namespace(value="cv::text") public static void MSERsToERStats(@ByVal GpuMat image, @ByRef PointVectorVector contours, @ByRef ERStatVectorVector regions)
@Namespace(value="cv::text") public static void detectRegions(@ByVal Mat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef PointVectorVector regions)
@Namespace(value="cv::text") public static void detectRegions(@ByVal UMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef PointVectorVector regions)
@Namespace(value="cv::text") public static void detectRegions(@ByVal GpuMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef PointVectorVector regions)
@Namespace(value="cv::text") public static void detectRegions(@ByVal Mat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects, int method, @opencv_core.Str BytePointer filename, float minProbability)
image
- Source image where text blocks needs to be extracted from. Should be CV_8UC3 (color).er_filter1
- Extremal Region Filter for the 1st stage classifier of N&M algorithm \cite Neumann12er_filter2
- Extremal Region Filter for the 2nd stage classifier of N&M algorithm \cite Neumann12groups_rects
- Output list of rectangle blocks with textmethod
- Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY.filename
- The XML or YAML file with the classifier model (e.g. samples/trained_classifier_erGrouping.xml). Only to use when grouping method is ERGROUPING_ORIENTATION_ANY.minProbability
- The minimum probability for accepting a group. Only to use when grouping method is ERGROUPING_ORIENTATION_ANY.
@Namespace(value="cv::text") public static void detectRegions(@ByVal Mat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void detectRegions(@ByVal Mat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects, int method, @opencv_core.Str String filename, float minProbability)
@Namespace(value="cv::text") public static void detectRegions(@ByVal UMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects, int method, @opencv_core.Str String filename, float minProbability)
@Namespace(value="cv::text") public static void detectRegions(@ByVal UMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void detectRegions(@ByVal UMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects, int method, @opencv_core.Str BytePointer filename, float minProbability)
@Namespace(value="cv::text") public static void detectRegions(@ByVal GpuMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects, int method, @opencv_core.Str BytePointer filename, float minProbability)
@Namespace(value="cv::text") public static void detectRegions(@ByVal GpuMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects)
@Namespace(value="cv::text") public static void detectRegions(@ByVal GpuMat image, @opencv_core.Ptr ERFilter er_filter1, @opencv_core.Ptr ERFilter er_filter2, @ByRef RectVector groups_rects, int method, @opencv_core.Str String filename, float minProbability)
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRHMMDecoder.ClassifierCallback loadOCRHMMClassifierNM(@opencv_core.Str BytePointer filename)
filename
- The XML or YAML file with the classifier model (e.g. OCRHMM_knn_model_data.xml)
The KNN default classifier is based in the scene text recognition method proposed by Lukás Neumann & Jiri Matas in [Neumann11b]. Basically, the region (contour) in the input image is normalized to a fixed size, while retaining the centroid and aspect ratio, in order to extract a feature vector based on gradient orientations along the chain-code of its perimeter. Then, the region is classified using a KNN model trained with synthetic data of rendered characters with different standard font types.
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRHMMDecoder.ClassifierCallback loadOCRHMMClassifierNM(@opencv_core.Str String filename)
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRHMMDecoder.ClassifierCallback loadOCRHMMClassifierCNN(@opencv_core.Str BytePointer filename)
filename
- The XML or YAML file with the classifier model (e.g. OCRBeamSearch_CNN_model_data.xml.gz)
The CNN default classifier is based in the scene text recognition method proposed by Adam Coates & Andrew NG in [Coates11a]. The character classifier consists in a Single Layer Convolutional Neural Network and a linear classifier. It is applied to the input image in a sliding window fashion, providing a set of recognitions at each window location.
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRHMMDecoder.ClassifierCallback loadOCRHMMClassifierCNN(@opencv_core.Str String filename)
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRHMMDecoder.ClassifierCallback loadOCRHMMClassifier(@opencv_core.Str BytePointer filename, int classifier)
filename
- The XML or YAML file with the classifier model (e.g. OCRBeamSearch_CNN_model_data.xml.gz)
classifier
- Can be one of classifier_type enum values.
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRHMMDecoder.ClassifierCallback loadOCRHMMClassifier(@opencv_core.Str String filename, int classifier)
@Namespace(value="cv::text") public static void createOCRHMMTransitionsTable(@StdString @ByRef BytePointer vocabulary, @ByRef StringVector lexicon, @ByVal Mat transition_probabilities_table)
vocabulary
- The language vocabulary (chars when ASCII English text).lexicon
- The list of words that are expected to be found in a particular image.transition_probabilities_table
- Output table with transition probabilities between character pairs. cols == rows == vocabulary.size().
The function calculate frequency statistics of character pairs from the given lexicon and fills the output transition_probabilities_table with them. The transition_probabilities_table can be used as input in the OCRHMMDecoder::create() and OCRBeamSearchDecoder::create() methods.
\note
- (C++) An alternative would be to load the default generic language transition table provided in the text module samples folder (created from ispell 42869 english words list) :
@Namespace(value="cv::text") public static void createOCRHMMTransitionsTable(@StdString @ByRef BytePointer vocabulary, @ByRef StringVector lexicon, @ByVal UMat transition_probabilities_table)
@Namespace(value="cv::text") public static void createOCRHMMTransitionsTable(@StdString @ByRef BytePointer vocabulary, @ByRef StringVector lexicon, @ByVal GpuMat transition_probabilities_table)
@Namespace(value="cv::text") @ByVal public static Mat createOCRHMMTransitionsTable(@opencv_core.Str BytePointer vocabulary, @ByRef StringVector lexicon)
@Namespace(value="cv::text") @ByVal public static Mat createOCRHMMTransitionsTable(@opencv_core.Str String vocabulary, @ByRef StringVector lexicon)
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRBeamSearchDecoder.ClassifierCallback loadOCRBeamSearchClassifierCNN(@opencv_core.Str BytePointer filename)
filename
- The XML or YAML file with the classifier model (e.g. OCRBeamSearch_CNN_model_data.xml.gz)
The CNN default classifier is based in the scene text recognition method proposed by Adam Coates & Andrew NG in [Coates11a]. The character classifier consists in a Single Layer Convolutional Neural Network and a linear classifier. It is applied to the input image in a sliding window fashion, providing a set of recognitions at each window location.
@Namespace(value="cv::text") @opencv_core.Ptr public static OCRBeamSearchDecoder.ClassifierCallback loadOCRBeamSearchClassifierCNN(@opencv_core.Str String filename)
Copyright © 2024. All rights reserved.