OpenCV中的形态重建 [英] Morphological Reconstruction in OpenCV

查看:169
本文介绍了OpenCV中的形态重建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OpenCV中进行图像处理时遇到一些问题.我的图像上有文字,并且在使用打开操作时,没有得到正确的输出.该问题与本文提供的问题非常相似: http ://www.cpe.eng.cmu.ac.th/wp-content/uploads/CPE752_06part2.pdf .

I'm having some problems during image processing in OpenCV. I have text on my image, and during using opening operation, I'm getting not proper output. The issue is quite similar to that provided in this article: http://www.cpe.eng.cmu.ac.th/wp-content/uploads/CPE752_06part2.pdf.

我看到的是,人们建议在这种情况下使用重建手术.我的问题是OpenCV中是否有任何内置机制或实现此目的的某些已知库/代码?谢谢您的帮助.

What I can see, people suggest to use reconstruction operations in that cases. My question is if there is any build-in mechanism in OpenCV or some known library/code that implement this? Thank you for help.

推荐答案

这个答案迟到了,但这是欠重构的基本算法:

This answer arrives late, but here is the basic algorithm for under-reconstruction:

  1. 输入是两幅图像:ImReference和ImMarker,标记为< =参考
  2. 中间图像:ImRec
  3. 输出图像:ImResult
  4. 将ImMarker复制到ImRec
  5. 将ImRec复制到ImResult
  6. ImDilated = Dilation(ImResult)
  7. ImRec =最小值(ImDilated,ImReference)
  8. 如果ImRec!= ImResult,则返回到步骤5.

这不是最佳算法,但仅使用基本操作.

It's not the most optimal algorithm, but it uses only basic operations.

这篇关于OpenCV中的形态重建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆