zoukankan      html  css  js  c++  java
  • python中的opencv

    cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) → None

    img – Image.
    pt1 – Vertex of the rectangle.
    pt2 – Vertex of the rectangle opposite to pt1 .
    color – Rectangle color or brightness (grayscale image).
    thickness – Thickness of lines that make up the rectangle. Negative values, like CV_FILLED , mean that the function has to draw a filled rectangle.
    lineType – Type of the line. See the line() description.
    8 (or omitted) - 8-connected line.
    4 - 4-connected line.
    CV_AA - antialiased line.
    shift – Number of fractional bits in the point coordinates.

    pt1:(x1,y1)

    pt2:(x2,y2)

    Python-OpenCV 图像叠加or图像混合加权实现
    函数说明
    cv2.addWeighted(src1, alpha, src2, beta, gamma[, dst[, dtype]]) → dst
    1
    参数说明
    src1 – first input array.
    alpha – weight of the first array elements.
    src2 – second input array of the same size and channel number as src1.
    beta – weight of the second array elements.
    dst – output array that has the same size and number of channels as the input arrays.
    gamma – scalar added to each sum.
    dtype – optional depth of the output array; when both input arrays have the same depth, dtype can be set to -1, which will be equivalent to src1.depth().
    此函数可以用一下矩阵表达式来代替:

    dst = src1 * alpha + src2 * beta + gamma;

  • 相关阅读:
    SQL CHECKOUT
    Adobe CS4 " Licensing for this product has expired " FIX!!!
    sizeof()用法汇总
    Command
    EXP_FULL_DATABASE,IMP_FULL_DATABASE,DBA,CONNECT,RESOURCE
    inet_addr函数处理IP地址需要注意的问题 (转)
    Oracle:外键关联导致数据无法删除
    三范式
    Wireshark界面上展开数据帧
    我的HTML学习记录(三)
  • 原文地址:https://www.cnblogs.com/hai5111/p/11625318.html
Copyright © 2011-2022 走看看