【问题标题】:Convert a IplImage* type to CvMat将 IplImage* 类型转换为 CvMat
【发布时间】:2011-12-28 01:49:03
【问题描述】:

我想将 Image 从 IplImage* 转换为 CvMat* 以使用 cvCountNonZero.. 在黑白图像中查找白色区域,而不是使用两个 for 循环(这很慢)..

【问题讨论】:

    标签: c++ opencv


    【解决方案1】:

    发现代码 sn-p here:

    CvMat stub, *dst_mat;
    dst_mat = cvGetMat(src_img, &stub, 0, 0);
    

    【讨论】:

      猜你喜欢
      • 2011-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多