python - 如何通过opencv匹配纸张

标签 python c++ algorithm opencv matching

我有一些纸张类型,我正在用 opencv 编写 python 脚本来识别相同的纸张以进行分类。我被困在如何找到相同类型的纸张上。例如,我附上了两张照片。图1是模板,图2是某种纸,我需要知道它是否与模板匹配。我不需要匹配文本,我只需要匹配表格。我需要在许多纸张中对同一张纸进行分类。

我已经调整了纸张的倾斜并检测到一些线条,但我不知道如何匹配这些线条并判断这张纸与模板是否相同。

有没有人可以给我一个匹配算法的建议? This is the paper sheet template This is the paper sheet I need to match with the template Need matching the lines

最佳答案

我不确定这种纸质表格是否足够丰富视觉信息来解决这个问题,但我认为你应该从特征检测和单应性计算开始(opencv 教程:Features2D + Homography)。从那里您可以尝试针对您的问题调整 2D 特征。

关于python - 如何通过opencv匹配纸张,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39203011/

相关文章:

python - pip 如何在 windows 7 x64 python 2.7 上安装 pylzma

c++ - 用 std/boost 算法替换 C++ while 循环

algorithm - 这个密码算法是如何工作的?

c - 最大直径小车可操纵

python - 从 Microsoft Word 获取拼写错误的单词

python - 理解 __getitem__ 方法

c++ - Windows API函数是否可以被覆盖并在其后调用?

c++ - 是否可以在 C++ 中重载运算符 "..."?

c++ - Minimax 算法究竟是如何工作的?

python - 弃用警告 : use options instead of chrome_options error using ChromeDriver and Chrome through Selenium on Windows 10 system