python从图像

时间:2017-06-20 07:36:47

标签: python opencv

我有一个多边形顶点坐标列表:

polygon = [(1389, 176), (1165, 63), (965, 93), (819, 224), (692, 473), (590, 673), 
(590, 858), (541, 1073), (531, 1272), (512, 1492), (463, 1779), 
(483, 1935), (863, 1672), (1233, 1701), (1560, 1794), (1828, 1770), 
(2111, 1896), (2165, 2111), (2179, 2243), (2267, 2179), (2316, 1658), 
(2233, 1277), (2169, 707), (2072, 395), (1862, 166), (1662, 102)]

这可以映射到某个图像(像素阵列)。如果我只想保留图像的多边形区域,我应该怎么做python?

0 个答案:

没有答案