opencv各种类的定义

Helper Objects

The cv::TermCriteria class

  • 算法的终止类(Many algorithms require a stopping condition to know when to quit)
  • 三个参数:int type, int maxCount, double epsilon
  • cv::TermCriteria::COUNT与cv::TermCriteria::MAX_ITER相同。
  • 设定了EPS后,算法的聚合(收敛?)低于该值时停止。

The cv::Range class

  • 用于指定一个连续的整数序列
  • 两个参数:int start, int end
  • 举例:Range(0,4):0,1,2,3

The cv::Ptr template and Garbage Collection 101

  • 智能指针?
  • cv::Ptr p = makePtr()或cv::Ptr p
  • 有和普通指针一样的功能,根据引用计数器释放内存
  • addref() and release():计数增加与减少
  • empty() :
    1. 对象已经被释放时释放指针
    2. 智能指针内部的对象指针正好为NULL时触发(etc. 调用的函数正好返回NULL)
  • delete_obj():引用计数为零时自动被调用(用于释放指针?)。必要时需要自定义内容

The cv::Exception class and exception handling

  • 异常类,和标准库的异常类似
  • 成员:
    1. code: 数字表示的错误代码
    2. err:string指示生成异常的错误的性质
    3. func:string表示发生异常的函数名称
    4. file:string表示发生异常的文件名
    5. line:int表示错误发生的行数
  • CV_Error( errorcode, description ):用一种固定的文本描述生成异常
  • CV_Error_( errorcode, printf_fmt_str, [printf-args] ):使用printf格式输出
  • CV_Assert( condition ) and CV_DbgAssert( condition ):测试条件不满足时抛出异常

The cv::DataType<> template

  • 数据模板,用于函数间传递特殊的数据类型
  • 同时包含该类型的运行时信息和在编译时指向相同类型
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值