zoukankan      html  css  js  c++  java
  • Opencv convertScaleAbs

    void cv::convertScaleAbs(
      cv::InputArray src, // 输入数组
      cv::OutputArray dst, // 输出数组
      double alpha = 1.0, // 乘数因子
      double beta = 0.0 // 偏移量
    );

    // Copyright (C) 2000-2015, Intel Corporation, all rights reserved.
    // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
    // Copyright (C) 2015, OpenCV Foundation, all rights reserved.
    // Copyright (C) 2015, Itseez Inc., all rights reserved.

    /** @brief Scales, calculates absolute values, and converts the result to 8-bit.

    On each element of the input array, the function convertScaleAbs
    performs three operations sequentially: scaling, taking an absolute
    value, conversion to an unsigned 8-bit type:
    f[ exttt{dst} (I)= exttt{saturate\_cast<uchar>} (| exttt{src} (I)* exttt{alpha} + exttt{beta} |)f]
    In case of multi-channel arrays, the function processes each channel
    independently. When the output is not 8-bit, the operation can be
    emulated by calling the Mat::convertTo method (or by using matrix
    expressions) and then by calculating an absolute value of the result.
    For example:
    @code{.cpp}
    Mat_<float> A(30,30);
    randu(A, Scalar(-100), Scalar(100));
    Mat_<float> B = A*5 + 3;
    B = abs(B);
    // Mat_<float> B = abs(A*5+3) will also do the job,
    // but it will allocate a temporary matrix
    @endcode
    @param src input array.
    @param dst output array.
    @param alpha optional scale factor.
    @param beta optional delta added to the scaled values.
    @sa Mat::convertTo, cv::abs(const Mat&)
    */
    CV_EXPORTS_W void convertScaleAbs(

      InputArray src,

      OutputArray dst,
      double alpha = 1,

      double beta = 0

    );

  • 相关阅读:
    STL堆实现
    Project Loom:Reactive模型和协程进行时(翻译)
    2020年最佳Java调试工具(翻译)
    布隆过滤器-使用场景的思考
    Logback,SLF4J,Log4J2。了解它们并学习如何使用。(翻译)
    使用Merkle树检测数据不一致(翻译)
    cassandra中的ACID,与RDBMS中的事务有何不同?
    Cassandra数据建模中最重要的事情:主键
    认证授权-学习笔记2-OpenId Connect
    jwt的思考
  • 原文地址:https://www.cnblogs.com/herd/p/9740824.html
Copyright © 2011-2022 走看看