Exemple #1
0
        private void SetNoiseEraseParam()
        {
            EraseNoiseParams        env     = new EraseNoiseParams();
            DocumentSDKDocumentType docType = (DocumentSDKDocumentType)GetEnumSelected(cmbDocType, typeof(DocumentSDKDocumentType));

            env.DocumentType = docType;
            DocumentSDKLevel level = (DocumentSDKLevel)GetEnumSelected(cmbLevel, typeof(DocumentSDKLevel));

            env.Level = level;
            DocumentSDKFastMode faseMode = (DocumentSDKFastMode)GetEnumSelected(cmbFastMode, typeof(DocumentSDKFastMode));

            env.FastMode = faseMode;
            DocumentSDKNoiseType noiseType = (DocumentSDKNoiseType)GetEnumSelected(cmbNoiseType, typeof(DocumentSDKNoiseType));

            env.NoiseType = noiseType;
            if (this.chkAutoSize.Checked)
            {
                env.MaxNoiseSize = DocumentSDKDefinition.ENSH_MDS_AUTO;
            }
            else
            {
                env.MaxNoiseSize = (short)numMaxNoiseSize.Value;
            }
            OcrSDK.SetParams(env);
        }
Exemple #2
0
        /// <summary>
        /// ノイズ除去のパラメタ変数設定
        /// </summary>
        private void InitNoiseEraseParam()
        {
            EraseNoiseParams env = OcrSDK.NoiseEnv;

            //DocumentType
            AddEnumList(this.cmbDocType, env.DocumentType);
            AddEnumList(this.cmbLevel, env.Level);
            AddEnumList(this.cmbNoiseType, env.NoiseType);
            AddEnumList(this.cmbFastMode, env.FastMode);
            if (env.IsAutoSize)
            {
                this.chkAutoSize.Checked     = true;
                this.numMaxNoiseSize.Enabled = false;
                this.numMaxNoiseSize.ResetText();
            }
            else
            {
                this.chkAutoSize.Checked     = false;
                this.numMaxNoiseSize.Enabled = true;
                this.numMaxNoiseSize.Value   = env.MaxNoiseSize;
            }
        }
Exemple #3
0
 /// <summary>
 /// パラメタを設定する
 /// </summary>
 public static void SetParams(EraseNoiseParams param)
 {
     _noiseEnv = param;
 }