opencv-python遇到的问题

cv2.putText函数用于在图像上绘制文本。它接受图像、文本字符串、起始坐标、字体类型、字体缩放、颜色、线条厚度和行类型作为参数。无法用指定字体渲染的字符将被替换为问号。该函数适用于图像处理和计算机视觉中的文本标注。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

输出cv2.putText方法的doc文档

print(cv2.putText.__doc__)

输出

putText(img, text, org, fontFace, fontScale, color[, thickness[, lineType[, bottomLeftOrigin]]]) -> img
.   @brief Draws a text string.
.
.   The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered
.   using the specified font are replaced by question marks. See #getTextSize for a text rendering code
.   example.
.
.   @param img Image.
.   @param text Text string to be drawn.
.   @param org Bottom-left corner of the text string in the image.
.   @param fontFace Font type, see #HersheyFonts.
.   @param fontScale Font scale factor that is multiplied by the font-specific base size.
.   @param color Text color.
.   @param thickness Thickness of the lines used to draw a text.
.   @param lineType Line type. See #LineTypes
.   @param bottomLeftOrigin When true, the image data origin is at the bottom-left corner. Otherwise,
.   it is at the top-left corner.
@brief绘制一个文本字符串。
。
。函数cv::putText在图像中呈现指定的文本字符串。无法呈现的符号
。使用指定的字体将被问号代替。查看#getTextSize获取文本渲染代码
。的例子。
。
。@param img的形象。
。要绘制的文本字符串。
。@param org图像中文本字符串的左下角。
。@param fontFace字体类型,见#HersheyFonts。
。@param fontScale字体比例系数乘以特定字体的基础大小。
。@param color文本颜色
。宽度用于绘制文本的线条的厚度。
。@param lineType行类型。看到#线型
。@param bottomLeftOrigin当为true时,图像的数据来源在左下角。否则,
。它在左上角

cap = cv2.VideoCapture(0).read()摄像头读取图片用法

功能:读取一帧的图片
参数:无
返回值:flag:bool值:True:读取到图片,
           False:没有读取到图片
    img_rd:一帧的图片

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值