🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.text
Class Text
- java.lang.Object
-
- org.opencv.text.Text
-
public class Text extends java.lang.Object
-
-
フィールドの要約
フィールド Modifier and Type Field Description static intERFILTER_NM_IHSGradstatic intERFILTER_NM_RGBLGradstatic intERGROUPING_ORIENTATION_ANYstatic intERGROUPING_ORIENTATION_HORIZstatic intOCR_CNN_CLASSIFIERstatic intOCR_DECODER_VITERBIstatic intOCR_KNN_CLASSIFIERstatic intOCR_LEVEL_TEXTLINEstatic intOCR_LEVEL_WORDstatic intOEM_CUBE_ONLYstatic intOEM_DEFAULTstatic intOEM_TESSERACT_CUBE_COMBINEDstatic intOEM_TESSERACT_ONLYstatic intPSM_AUTOstatic intPSM_AUTO_ONLYstatic intPSM_AUTO_OSDstatic intPSM_CIRCLE_WORDstatic intPSM_OSD_ONLYstatic intPSM_SINGLE_BLOCKstatic intPSM_SINGLE_BLOCK_VERT_TEXTstatic intPSM_SINGLE_CHARstatic intPSM_SINGLE_COLUMNstatic intPSM_SINGLE_LINEstatic intPSM_SINGLE_WORD
-
コンストラクタの要約
コンストラクタ Constructor Description Text()
-
メソッドの要約
全メソッド 静的メソッド 具象メソッド 非推奨メソッド Modifier and Type Method Description static voidcomputeNMChannels​(Mat _src, java.util.List<Mat> _channels)Compute the different channels to be processed independently in the N&M algorithm CITE: Neumann12.static voidcomputeNMChannels​(Mat _src, java.util.List<Mat> _channels, int _mode)Compute the different channels to be processed independently in the N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM1​(java.lang.String filename)Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM1​(java.lang.String filename, int thresholdDelta)Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea)Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea)Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea, float minProbability)Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression)Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression, float minProbabilityDiff)Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM1​(ERFilter_Callback cb)Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM1​(ERFilter_Callback cb, int thresholdDelta)Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea)Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea)Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea, float minProbability)Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression)Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression, float minProbabilityDiff)Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM2​(java.lang.String filename)Reads an Extremal Region Filter for the 2nd stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM2​(java.lang.String filename, float minProbability)Reads an Extremal Region Filter for the 2nd stage classifier of N&M algorithm from the provided path e.g.static ERFiltercreateERFilterNM2​(ERFilter_Callback cb)Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm CITE: Neumann12.static ERFiltercreateERFilterNM2​(ERFilter_Callback cb, float minProbability)Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm CITE: Neumann12.static MatcreateOCRHMMTransitionsTable​(java.lang.String vocabulary, java.util.List<java.lang.String> lexicon)Utility function to create a tailored language model transitions table from a given list of words (lexicon).static voiddetectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, java.util.List<MatOfPoint> regions)Converts MSER contours (vector<Point>) to ERStat regions.static voiddetectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects)Extracts text regions from image.static voiddetectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects, int method)Extracts text regions from image.static voiddetectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects, int method, java.lang.String filename)Extracts text regions from image.static voiddetectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects, int method, java.lang.String filename, float minProbability)Extracts text regions from image.static voiddetectTextSWT​(Mat input, MatOfRect result, boolean dark_on_light)Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates.static voiddetectTextSWT​(Mat input, MatOfRect result, boolean dark_on_light, Mat draw)Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates.static voiddetectTextSWT​(Mat input, MatOfRect result, boolean dark_on_light, Mat draw, Mat chainBBs)Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates.static voiderGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects)Find groups of Extremal Regions that are organized as text blocks.static voiderGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects, int method)Find groups of Extremal Regions that are organized as text blocks.static voiderGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects, int method, java.lang.String filename)Find groups of Extremal Regions that are organized as text blocks.static voiderGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects, int method, java.lang.String filename, float minProbablity)Find groups of Extremal Regions that are organized as text blocks.static ERFilter_CallbackloadClassifierNM1​(java.lang.String filename)Allow to implicitly load the default classifier when creating an ERFilter object.static ERFilter_CallbackloadClassifierNM2​(java.lang.String filename)Allow to implicitly load the default classifier when creating an ERFilter object.static OCRBeamSearchDecoder_ClassifierCallbackloadOCRBeamSearchClassifierCNN​(java.lang.String filename)Allow to implicitly load the default character classifier when creating an OCRBeamSearchDecoder object.static OCRHMMDecoder_ClassifierCallbackloadOCRHMMClassifier​(java.lang.String filename, int classifier)Allow to implicitly load the default character classifier when creating an OCRHMMDecoder object.static OCRHMMDecoder_ClassifierCallbackloadOCRHMMClassifierCNN​(java.lang.String filename)Deprecated.use loadOCRHMMClassifier insteadstatic OCRHMMDecoder_ClassifierCallbackloadOCRHMMClassifierNM​(java.lang.String filename)Deprecated.loadOCRHMMClassifier instead
-
-
-
フィールドの詳細
-
OCR_LEVEL_WORD
public static final int OCR_LEVEL_WORD
- 関連項目:
- 定数フィールド値
-
OCR_LEVEL_TEXTLINE
public static final int OCR_LEVEL_TEXTLINE
- 関連項目:
- 定数フィールド値
-
ERFILTER_NM_RGBLGrad
public static final int ERFILTER_NM_RGBLGrad
- 関連項目:
- 定数フィールド値
-
ERFILTER_NM_IHSGrad
public static final int ERFILTER_NM_IHSGrad
- 関連項目:
- 定数フィールド値
-
OCR_KNN_CLASSIFIER
public static final int OCR_KNN_CLASSIFIER
- 関連項目:
- 定数フィールド値
-
OCR_CNN_CLASSIFIER
public static final int OCR_CNN_CLASSIFIER
- 関連項目:
- 定数フィールド値
-
OCR_DECODER_VITERBI
public static final int OCR_DECODER_VITERBI
- 関連項目:
- 定数フィールド値
-
ERGROUPING_ORIENTATION_HORIZ
public static final int ERGROUPING_ORIENTATION_HORIZ
- 関連項目:
- 定数フィールド値
-
ERGROUPING_ORIENTATION_ANY
public static final int ERGROUPING_ORIENTATION_ANY
- 関連項目:
- 定数フィールド値
-
OEM_TESSERACT_ONLY
public static final int OEM_TESSERACT_ONLY
- 関連項目:
- 定数フィールド値
-
OEM_CUBE_ONLY
public static final int OEM_CUBE_ONLY
- 関連項目:
- 定数フィールド値
-
OEM_TESSERACT_CUBE_COMBINED
public static final int OEM_TESSERACT_CUBE_COMBINED
- 関連項目:
- 定数フィールド値
-
OEM_DEFAULT
public static final int OEM_DEFAULT
- 関連項目:
- 定数フィールド値
-
PSM_OSD_ONLY
public static final int PSM_OSD_ONLY
- 関連項目:
- 定数フィールド値
-
PSM_AUTO_OSD
public static final int PSM_AUTO_OSD
- 関連項目:
- 定数フィールド値
-
PSM_AUTO_ONLY
public static final int PSM_AUTO_ONLY
- 関連項目:
- 定数フィールド値
-
PSM_AUTO
public static final int PSM_AUTO
- 関連項目:
- 定数フィールド値
-
PSM_SINGLE_COLUMN
public static final int PSM_SINGLE_COLUMN
- 関連項目:
- 定数フィールド値
-
PSM_SINGLE_BLOCK_VERT_TEXT
public static final int PSM_SINGLE_BLOCK_VERT_TEXT
- 関連項目:
- 定数フィールド値
-
PSM_SINGLE_BLOCK
public static final int PSM_SINGLE_BLOCK
- 関連項目:
- 定数フィールド値
-
PSM_SINGLE_LINE
public static final int PSM_SINGLE_LINE
- 関連項目:
- 定数フィールド値
-
PSM_SINGLE_WORD
public static final int PSM_SINGLE_WORD
- 関連項目:
- 定数フィールド値
-
PSM_CIRCLE_WORD
public static final int PSM_CIRCLE_WORD
- 関連項目:
- 定数フィールド値
-
PSM_SINGLE_CHAR
public static final int PSM_SINGLE_CHAR
- 関連項目:
- 定数フィールド値
-
-
メソッドの詳細
-
detectTextSWT
public static void detectTextSWT​(Mat input, MatOfRect result, boolean dark_on_light, Mat draw, Mat chainBBs)
Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates. It also chain them by proximity and size, saving the result in chainBBs.- 引数:
input- 3チャンネルの入力画像。result- テキストが見つかる確率が高いバウンディングボックスを格納した結果のベクトルdark_on_light- テキストが背景より暗いか明るいかを示す真偽値。Scharrオペレータから得られる勾配を反転させるために用いられ、結果に大きく影響することが観察されている。draw- 検出された文字をバウンディングボックスで可視化する、CV_8UC3型の省略可能なMat。chainBBs- 論文中のヒューリスティクスに従って文字候補を連結し、テキストが現れる可能性が高いすべての領域を返す省略可能な引数。
-
detectTextSWT
public static void detectTextSWT​(Mat input, MatOfRect result, boolean dark_on_light, Mat draw)
Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates. It also chain them by proximity and size, saving the result in chainBBs.- 引数:
input- 3チャンネルの入力画像。result- テキストが見つかる確率が高いバウンディングボックスを格納した結果のベクトルdark_on_light- テキストが背景より暗いか明るいかを示す真偽値。Scharrオペレータから得られる勾配を反転させるために用いられ、結果に大きく影響することが観察されている。draw- 検出された文字をバウンディングボックスで可視化する、CV_8UC3型の省略可能なMat。
-
detectTextSWT
public static void detectTextSWT​(Mat input, MatOfRect result, boolean dark_on_light)
Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates. It also chain them by proximity and size, saving the result in chainBBs.- 引数:
input- 3チャンネルの入力画像。result- テキストが見つかる確率が高いバウンディングボックスを格納した結果のベクトルdark_on_light- テキストが背景より暗いか明るいかを示す真偽値。Scharrオペレータから得られる勾配を反転させるために用いられ、結果に大きく影響することが観察されている。
-
loadOCRHMMClassifierNM
@Deprecated public static OCRHMMDecoder_ClassifierCallback loadOCRHMMClassifierNM​(java.lang.String filename)
Deprecated.loadOCRHMMClassifier insteadAllow to implicitly load the default character classifier when creating an OCRHMMDecoder object.- 引数:
filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: OCRHMM_knn_model_data.xml)。デフォルトのKNN分類器は、Lukás Neumann & Jiri Matas が [Neumann11b] で提案したシーンテキスト認識手法に基づく。基本的には、入力画像中の領域 (輪郭) を重心とアスペクト比を保持したまま固定サイズに正規化し、その周囲のチェーンコードに沿った勾配方向に基づく特徴ベクトルを抽出する。次に、さまざまな標準フォントでレンダリングした文字の合成データで学習したKNNモデルを用いて領域を分類する。- 戻り値:
- 自動生成
-
loadOCRHMMClassifierCNN
@Deprecated public static OCRHMMDecoder_ClassifierCallback loadOCRHMMClassifierCNN​(java.lang.String filename)
Deprecated.use loadOCRHMMClassifier insteadAllow to implicitly load the default character classifier when creating an OCRHMMDecoder object.- 引数:
filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: OCRBeamSearch_CNN_model_data.xml.gz)。デフォルトのCNN分類器は、Adam Coates & Andrew NG が [Coates11a] で提案したシーンテキスト認識手法に基づく。文字分類器は単層の畳み込みニューラルネットワークと線形分類器から構成される。これを入力画像にスライディングウィンドウ方式で適用し、各ウィンドウ位置で一連の認識結果を提供する。- 戻り値:
- 自動生成
-
loadOCRHMMClassifier
public static OCRHMMDecoder_ClassifierCallback loadOCRHMMClassifier​(java.lang.String filename, int classifier)
Allow to implicitly load the default character classifier when creating an OCRHMMDecoder object.- 引数:
filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: OCRBeamSearch_CNN_model_data.xml.gz)classifier- classifier_type enumの値のいずれか。- 戻り値:
- 自動生成
-
createOCRHMMTransitionsTable
public static Mat createOCRHMMTransitionsTable​(java.lang.String vocabulary, java.util.List<java.lang.String> lexicon)
Utility function to create a tailored language model transitions table from a given list of words (lexicon).- 引数:
vocabulary- 言語の語彙 (ASCII英語テキストの場合は文字)。lexicon- 特定の画像中に出現すると想定される単語のリスト。この関数は与えられた語彙集 (lexicon) から文字ペアの頻度統計を計算し、出力の transition_probabilities_table をそれで埋める。transition_probabilities_table は OCRHMMDecoder::create() および OCRBeamSearchDecoder::create() メソッドの入力として使用できる。覚え書き: - (C++) 代替手段として、textモジュールのsamplesフォルダに用意されているデフォルトの汎用言語遷移テーブル (ispellの42869語の英単語リストから作成) を読み込む方法もある : <https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/OCRHMM_transitions_table.xml>- 戻り値:
- 自動生成
-
loadOCRBeamSearchClassifierCNN
public static OCRBeamSearchDecoder_ClassifierCallback loadOCRBeamSearchClassifierCNN​(java.lang.String filename)
Allow to implicitly load the default character classifier when creating an OCRBeamSearchDecoder object.- 引数:
filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: OCRBeamSearch_CNN_model_data.xml.gz)。デフォルトのCNN分類器は、Adam Coates & Andrew NG が [Coates11a] で提案したシーンテキスト認識手法に基づく。文字分類器は単層の畳み込みニューラルネットワークと線形分類器から構成される。これを入力画像にスライディングウィンドウ方式で適用し、各ウィンドウ位置で一連の認識結果を提供する。- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression, float minProbabilityDiff)
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml 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).- 引数:
cb- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成minProbability- 自動生成nonMaxSuppression- 自動生成minProbabilityDiff- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression)
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml 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).- 引数:
cb- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成minProbability- 自動生成nonMaxSuppression- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea, float minProbability)
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml 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).- 引数:
cb- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成minProbability- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea, float maxArea)
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml 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).- 引数:
cb- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(ERFilter_Callback cb, int thresholdDelta, float minArea)
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml 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).- 引数:
cb- 自動生成thresholdDelta- 自動生成minArea- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(ERFilter_Callback cb, int thresholdDelta)
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml 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).- 引数:
cb- 自動生成thresholdDelta- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(ERFilter_Callback cb)
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml 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).- 引数:
cb- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM2
public static ERFilter createERFilterNM2​(ERFilter_Callback cb, float minProbability)
Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xml 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.- 引数:
cb- 自動生成minProbability- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM2
public static ERFilter createERFilterNM2​(ERFilter_Callback cb)
Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm CITE: Neumann12. loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xml 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.- 引数:
cb- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression, float minProbabilityDiff)
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml- 引数:
filename- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成minProbability- 自動生成nonMaxSuppression- 自動生成minProbabilityDiff- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea, float minProbability, boolean nonMaxSuppression)
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml- 引数:
filename- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成minProbability- 自動生成nonMaxSuppression- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea, float minProbability)
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml- 引数:
filename- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成minProbability- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea, float maxArea)
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml- 引数:
filename- 自動生成thresholdDelta- 自動生成minArea- 自動生成maxArea- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(java.lang.String filename, int thresholdDelta, float minArea)
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml- 引数:
filename- 自動生成thresholdDelta- 自動生成minArea- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(java.lang.String filename, int thresholdDelta)
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml- 引数:
filename- 自動生成thresholdDelta- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM1
public static ERFilter createERFilterNM1​(java.lang.String filename)
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml- 引数:
filename- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM2
public static ERFilter createERFilterNM2​(java.lang.String filename, float minProbability)
Reads an Extremal Region Filter for the 2nd stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM2.xml- 引数:
filename- 自動生成minProbability- 自動生成- 戻り値:
- 自動生成
-
createERFilterNM2
public static ERFilter createERFilterNM2​(java.lang.String filename)
Reads an Extremal Region Filter for the 2nd stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM2.xml- 引数:
filename- 自動生成- 戻り値:
- 自動生成
-
loadClassifierNM1
public static ERFilter_Callback loadClassifierNM1​(java.lang.String filename)
Allow to implicitly load the default classifier when creating an ERFilter object.- 引数:
filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: trained_classifierNM1.xml)。ERFilter::Callback へのポインタを返す。- 戻り値:
- 自動生成
-
loadClassifierNM2
public static ERFilter_Callback loadClassifierNM2​(java.lang.String filename)
Allow to implicitly load the default classifier when creating an ERFilter object.- 引数:
filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: trained_classifierNM2.xml)。ERFilter::Callback へのポインタを返す。- 戻り値:
- 自動生成
-
computeNMChannels
public static void computeNMChannels​(Mat _src, java.util.List<Mat> _channels, int _mode)
Compute the different channels to be processed independently in the N&M algorithm CITE: Neumann12.- 引数:
_src- 入力画像。RGBのCV_8UC3でなければならない。_channels- 計算されたチャンネルを格納する出力 vector<Mat>。_mode- 動作モード。現在利用できるオプションは ERFILTER_NM_RGBLGrad (デフォルトで使用) と ERFILTER_NM_IHSGrad のみである。N&Mアルゴリズムでは、高い局在化再現率を得るために、強度 (I)、色相 (H)、彩度 (S)、勾配強度チャンネル (Grad) の組み合わせを使用する。この実装では、赤 (R)、緑 (G)、青 (B)、明度 (L)、勾配強度 (Grad) という別の組み合わせも提供する。
-
computeNMChannels
public static void computeNMChannels​(Mat _src, java.util.List<Mat> _channels)
Compute the different channels to be processed independently in the N&M algorithm CITE: Neumann12.- 引数:
_src- 入力画像。RGBのCV_8UC3でなければならない。_channels- 計算されたチャンネルを格納する出力 vector<Mat>。ERFILTER_NM_RGBLGrad (デフォルトで使用) と ERFILTER_NM_IHSGrad。N&Mアルゴリズムでは、高い局在化再現率を得るために、強度 (I)、色相 (H)、彩度 (S)、勾配強度チャンネル (Grad) の組み合わせを使用する。この実装では、赤 (R)、緑 (G)、青 (B)、明度 (L)、勾配強度 (Grad) という別の組み合わせも提供する。
-
erGrouping
public static void erGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects, int method, java.lang.String filename, float minProbablity)
Find groups of Extremal Regions that are organized as text blocks.- 引数:
regions- 各チャンネルに対してERFilterアルゴリズムから取得したER (Extremal Region) のベクトル。提供された領域。groups_rects- アルゴリズムの出力は矩形のリストとしてこの引数に格納される。method- グループ化手法 (text::erGrouping_Modes を参照)。ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY のいずれかを指定できる。filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: samples/trained_classifier_erGrouping.xml)。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。minProbablity- グループを受け入れる最小確率。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。image- 自動生成channel- 自動生成
-
erGrouping
public static void erGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects, int method, java.lang.String filename)
Find groups of Extremal Regions that are organized as text blocks.- 引数:
regions- 各チャンネルに対してERFilterアルゴリズムから取得したER (Extremal Region) のベクトル。提供された領域。groups_rects- アルゴリズムの出力は矩形のリストとしてこの引数に格納される。method- グループ化手法 (text::erGrouping_Modes を参照)。ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY のいずれかを指定できる。filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: samples/trained_classifier_erGrouping.xml)。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。手法が ERGROUPING_ORIENTATION_ANY。image- 自動生成channel- 自動生成
-
erGrouping
public static void erGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects, int method)
Find groups of Extremal Regions that are organized as text blocks.- 引数:
regions- 各チャンネルに対してERFilterアルゴリズムから取得したER (Extremal Region) のベクトル。提供された領域。groups_rects- アルゴリズムの出力は矩形のリストとしてこの引数に格納される。method- グループ化手法 (text::erGrouping_Modes を参照)。ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY のいずれかを指定できる。samples/trained_classifier_erGrouping.xml)。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。手法が ERGROUPING_ORIENTATION_ANY。image- 自動生成channel- 自動生成
-
erGrouping
public static void erGrouping​(Mat image, Mat channel, java.util.List<MatOfPoint> regions, MatOfRect groups_rects)
Find groups of Extremal Regions that are organized as text blocks.- 引数:
regions- 各チャンネルに対してERFilterアルゴリズムから取得したER (Extremal Region) のベクトル。提供された領域。groups_rects- アルゴリズムの出力は矩形のリストとしてこの引数に格納される。ERGROUPING_ORIENTATION_ANY。samples/trained_classifier_erGrouping.xml)。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。手法が ERGROUPING_ORIENTATION_ANY。image- 自動生成channel- 自動生成
-
detectRegions
public static void detectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, java.util.List<MatOfPoint> regions)
Converts MSER contours (vector<Point>) to ERStat regions.- 引数:
image- MSERが抽出された元の入力画像 CV_8UC1。regions- ERStat領域が格納される出力。OpenCVのMSER特徴検出器が提供する輪郭を入力として受け取り、ERStatの2つのベクトルを出力として返す。これは、MSER()の出力がMSER+領域とMSER-領域の両方を単一の vector<Point> に含むためで、この関数はそれらを2つの異なるベクトルに分離する (これは、ERStatが2つの異なるチャンネルから抽出されたかのようになる)。MSERsToERStatsの使用例は、テキスト検出のwebcam_demoにある : <https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/webcam_demo.cpp>er_filter1- 自動生成er_filter2- 自動生成
-
detectRegions
public static void detectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects, int method, java.lang.String filename, float minProbability)
Extracts text regions from image.- 引数:
image- テキストブロックを抽出する元となる入力画像。CV_8UC3(カラー)である必要がある。er_filter1- N&Mアルゴリズム CITE: Neumann12 の第1段階分類器用のExtremal Region Filterer_filter2- N&Mアルゴリズム CITE: Neumann12 の第2段階分類器用のExtremal Region Filtergroups_rects- テキストを含む矩形ブロックの出力リストmethod- グループ化手法 (text::erGrouping_Modes を参照)。ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY のいずれかを指定できる。filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: samples/trained_classifier_erGrouping.xml)。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。minProbability- グループを受け入れるための最小確率。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。
-
detectRegions
public static void detectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects, int method, java.lang.String filename)
Extracts text regions from image.- 引数:
image- テキストブロックを抽出する元となる入力画像。CV_8UC3(カラー)である必要がある。er_filter1- N&Mアルゴリズム CITE: Neumann12 の第1段階分類器用のExtremal Region Filterer_filter2- N&Mアルゴリズム CITE: Neumann12 の第2段階分類器用のExtremal Region Filtergroups_rects- テキストを含む矩形ブロックの出力リストmethod- グループ化手法 (text::erGrouping_Modes を参照)。ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY のいずれかを指定できる。filename- 分類器モデルが記述されたXMLまたはYAMLファイル (例: samples/trained_classifier_erGrouping.xml)。グループ化手法が ERGROUPING_ORIENTATION_ANY の場合にのみ使用する。
-
detectRegions
public static void detectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects, int method)
Extracts text regions from image.- 引数:
image- テキストブロックを抽出する元となる入力画像。CV_8UC3(カラー)である必要がある。er_filter1- N&Mアルゴリズム CITE: Neumann12 の第1段階分類器用のExtremal Region Filterer_filter2- N&Mアルゴリズム CITE: Neumann12 の第2段階分類器用のExtremal Region Filtergroups_rects- テキストを含む矩形ブロックの出力リストmethod- グループ化手法 (text::erGrouping_Modes を参照)。ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY のいずれかを指定できる。
-
detectRegions
public static void detectRegions​(Mat image, ERFilter er_filter1, ERFilter er_filter2, MatOfRect groups_rects)
Extracts text regions from image.- 引数:
image- テキストブロックを抽出する元となる入力画像。CV_8UC3(カラー)である必要がある。er_filter1- N&Mアルゴリズム CITE: Neumann12 の第1段階分類器用のExtremal Region Filterer_filter2- N&Mアルゴリズム CITE: Neumann12 の第2段階分類器用のExtremal Region Filtergroups_rects- テキストを含む矩形ブロックの出力リスト
-
-