araw.py 688 B

1234567891011121314
  1. # -*- coding:utf-8 -*-
  2. {"isSuccess": 1, "imgs_info":
  3. [{"img_name": "1.png", "coordinate":
  4. [[477, 127, 1282, 524], [312, 557, 1500, 618],
  5. [322, 652, 1209, 695], [325, 695, 1382, 739],
  6. [328, 741, 755, 784], [176, 870, 1539, 1899],
  7. [1588, 143, 2820, 674], [1582, 667, 2779, 898],
  8. [1539, 880, 2767, 1348], [1591, 1334, 2141, 1377],
  9. [1553, 1415, 2812, 1859]], "cost_time": "3.59s"}]}
  10. # 顶点个数:4,矩阵变成4*1*2维
  11. # OpenCV中需要将多边形的顶点坐标变成顶点数×1×2维的矩阵
  12. # 这里 reshape 的第一个参数为-1, 表示“任意”,意思是这一维的值是根据后面的维度的计算出来的