【问题标题】:How do i use the Emgu CV _SmoothGausian Method我如何使用 Emgu CV _SmoothGausian 方法
【发布时间】:2012-08-13 02:53:55
【问题描述】:

我试图让 OCR 示例应用程序识别一些小文本,而我的做法是调整图像大小。一旦我调整了图像的大小,它都是'pixel-ee'

我想使用SmothGaussian方法清理它,但每次执行该方法都会出错

代码如下:

Image<Bgr, Byte> image = new Image<Bgr, byte>(openImageFileDialog.FileName);

           using (Image<Gray, byte> gray = image.Convert<Gray, Byte>().Resize(800, 600, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR, true))
           {

               gray.Convert<Gray, Byte>()._SmoothGaussian(4);



              _ocr.Recognize(gray);
              Tesseract.Charactor[] charactors = _ocr.GetCharactors();
              foreach (Tesseract.Charactor c in charactors)
              {
                  image.Draw(c.Region, drawColor, 1);
              }

              imageBox1.Image = image;

              //String text = String.Concat( Array.ConvertAll(charactors, delegate(Tesseract.Charactor t) { return t.Text; }) );
              String text = _ocr.GetText();
              ocrTextBox.Text = text;
           }

图片如下:

【问题讨论】:

  • 试试这个:image = image.SmoothGaussian(13,13,2,0);
  • 为什么你的图像已经是&lt;Gray, Byte&gt; 格式了?这并不重要,但似乎没有必要。

标签: c#-4.0 gaussian emgucv computer-vision


【解决方案1】:

_SmoothGaussian 只能处理奇数作为内核大小,因此请尝试使用 3 或 5 作为参数。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-30
    相关资源
    最近更新 更多