0
点赞
收藏
分享

微信扫一扫

在图像上绘制图形

 

2.1 
cv. tine( img, start , end , color, thickness) 
• Start,end: 
• color: 
• Thickness:

 

2 . 2 绘 制 圆 形 
CV• ( ir ( 亻 in ‰ centerpoint, 
参 数 . 
· img : 要 绘 制 塑 形 的 图 像 
· Centerpoint , r: 圆 心 和 半 径 
. color: 线 条 的 颜 色 
( 0100 
thickness) 
· Thickness: 线 条 宽 度 , 为 . 1 时 生 成 闭 合 图 并 填 充 顔 色

 

2.3 
cv. rectang img, leftupper , rightdown,co lor , thickness) 
• Leftupper, rightdown: 
• color. 
Thickness: 
2.4 
cv. putText( Ing, text, station, font, fontsize,color, thickness, LINE_AA) 
• img: 
• text: 
• station: 
• tont: 
• Fontsize

1. imread( CV2.1MGRAD_GRAYSCALE) 
2. cvtCotor(src, code, cist) 
—.ftift. (0. 1. 1å+ffiO. m A-ffi255) 
threshold(src , thresh , maxvat)

cv2. , rgb) ; 
cv2. , gray) ; 
threshvale , bitgray=cv2. threshold(gray , 100 , 255 , O) ; 
imghstack=np . hstack( (gray , bitgray) ) 
#hstack 
cv2. imshow(" gray-bit" , imghstack) 
#cv2. destroyAt LIVIndows ; 
i. 34 
- 43

举报

相关推荐

0 条评论