cv2.fillPoly画矩形
时间: 2023-10-19 13:01:08 浏览: 184
cv2.fillPoly函数用于填充多边形。虽然函数名中包含了"Poly",但实际上它可以用来填充不规则的多边形,包括矩形。要使用cv2.fillPoly函数来画一个矩形,需要先定义矩形的四个顶点坐标,然后将这些坐标组织成一个数组作为函数的参数。例如,要画一个左上角坐标为(100, 100),
#### 引用[.reference_title]
- *1* *3* [OpenCV学习笔记(5):绘制图形:直线、矩形、圆、椭圆、多边形](https://blog.csdn.net/m0_63993933/article/details/124779234)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [cv2.fillConvexPoly( )和fillPoly( )填充矩形、图片外围](https://blog.csdn.net/weixin_43525427/article/details/105317567)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文