python opencv获取图像坐标_如何利用opencv获取扫描图像的边缘坐标?

我有一张图片,是扫描像这样的硬拷贝文件的结果:

wyA4s.jpg

如你所见,有一个空格,每个角上还有四个矩形。在

我需要找到每个矩形边的坐标,这样我就可以裁剪它了。在

我用opencv,怎么用opencv呢?在

如何利用opencv获取扫描图像的边缘坐标?在

这是我想要达到的结果

y6ixy.jpg

如果我有那个坐标,我可以用我从互联网上得到的代码来裁剪它:# USAGE

# python transform_example.py --image images/example_01.png --coords "[(73, 239), (356, 117), (475, 265), (187, 443)]"

# python transform_example.py --image images/example_02.png --coords "[(101, 185), (393, 151), (479, 323), (187, 441)]"

# python transform_example.py --image images/example_03.png --coords "[(63, 242), (291, 110), (361, 252), (78, 386)]"

# import the necessary packages

from pyimagesearch.transform import four_point_transform

import numpy a

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值