• step[0]是矩阵中一行元素的字节数
  • step[1]是矩阵中一个元素的字节数(elemSize)
  • step1 = step / elemSize1,elemSize1是元素的每个通道所占的字节数
    • step1(0)是矩阵一行元素的通道数(不是很贴切)
    • step1(1)是矩阵一个元素的通道数(channel())

示例

    Mat img(3, 4, CV_16UC4, Scalar_<uchar>(1, 2, 3, 4));

    cout << img << endl;
    cout << "step:" << img.step << endl;
    cout << "step[0]:" << img.step[0] << endl;
    cout << "step[1]:" << img.step[1] << endl;
    cout << "step1(0):" << img.step1(0) << endl;
    cout << "step1(1):" << img.step1(1) << endl;

结果

OpenCV__cv::Mat::step

相关文章:

  • 2022-01-19
  • 2022-12-23
  • 2022-01-18
  • 2021-08-23
  • 2021-06-11
  • 2021-08-23
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2021-07-14
  • 2021-06-18
  • 2022-01-30
  • 2021-12-08
相关资源
相似解决方案