python - 如何从源代码查看opencv方法中的枚举器?
问题描述
我想在OpenCV-python的源码中找到特定方法的关键字参数的枚举类型常量。例如,cv2 中的“插值”。resize() 在官网上点击“interpolationflags”很容易找到,但是在源码中好像找不到“interpolationflags”。
解决方案
enum InterpolationFlags{
/** nearest neighbor interpolation */
INTER_NEAREST = 0,
/** bilinear interpolation */
INTER_LINEAR = 1,
/** bicubic interpolation */
INTER_CUBIC = 2,
/* resampling using pixel area relation. It may be a preferred method for image decimation, as it gives moire-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method. */
INTER_AREA = 3,
/** Lanczos interpolation over 8x8 neighborhood */
INTER_LANCZOS4 = 4,
/** Bit exact bilinear interpolation */
INTER_LINEAR_EXACT = 5,
/** Bit exact nearest neighbor interpolation. This will produce same results as
the nearest neighbor method in PIL, scikit-image or Matlab. */
INTER_NEAREST_EXACT = 6,
/** mask for interpolation codes */
INTER_MAX = 7,
/** flag, fills all of the destination image pixels. If some of them correspond to outliers in the
source image, they are set to zero */
WARP_FILL_OUTLIERS = 8,
/** flag, inverse transformation
For example, #linearPolar or #logPolar transforms:
- flag is __not__ set: \f$dst( \rho , \phi ) = src(x,y)\f$
- flag is set: \f$dst(x,y) = src( \rho , \phi )\f$
*/
WARP_INVERSE_MAP = 16
};
推荐阅读
- c++ - 无法让海洋光学 OmniDriver 工作
- laravel - Laravel:如何在一对多关系中在父子模型上使用 where 子句
- javascript - 为什么第一个代码有效而第二个无效?
- javascript - D3-Chord:和弦路径鼠标悬停上的流动圆形元素
- html - 大于动态宽度父项时,弹性项目上的滚动条
- xml - 在 XSLT 1.0 中查找两个日期时间之间的 MS 差异
- c++ - 解除分配时
- java - 如何从 jar 中读取 adb 响应?
- python - 在 matplotlib 中分隔两组条形图
- icons - “高分辨率图标不存在” - realfavicongenerator