Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you should definitely NOT invent a new class, but rather use one of the various ways already possible, to achieve that

  1. just use std::vector<Mat>. (probably the most easy one)
  2. put your 3rd dimension into the "channels", e.g.: cvMat(10,10,CV_32FC(17)); // [10x10x17];
  3. use a 3 (or more) dimensional cv::Mat:

    int sz[] = {17, 10, 10};

    cv::Mat(3, sz,CV_32F); // a 3d volume of 17 10x10 planes

you should definitely NOT invent a new class, but rather use one of the various ways already possible, to achieve that

  1. just use std::vector<Mat>. (probably the most easy one)
  2. put your 3rd dimension into the "channels", e.g.: cvMat(10,10,CV_32FC(17)); // [10x10x17];
  3. use a 3 (or more) dimensional cv::Mat:

    int sz[] = {17, 10, 10};

    cv::Mat(3, sz,CV_32F); // a 3d volume of 17 10x10 planes

(p.s: the main reason i want to steer you away making a new class is:

reinventing the wheel might feel easy, but matching existing expectations to your creature is terribly hard!)

you should definitely NOT invent a new class, but rather use one of the various ways already possible, to achieve that

  1. just use std::vector<Mat>. (probably the most easy one)
  2. put your 3rd dimension into the "channels", e.g.: cvMat(10,10,CV_32FC(17)); // [10x10x17];
  3. use a 3 (or more) dimensional cv::Mat:

    int sz[] = {17, 10, 10};

    cv::Mat(3, sz,CV_32F); // a 3d volume of 17 10x10 planes

(p.s: the main reason i want to steer you away making a new class is:

reinventing the wheel might feel easy, but matching existing expectations (how it should behave) to your creature is terribly hard!)

you should definitely NOT invent a new class, but rather use one of the various ways already possible, to achieve that

  1. just use std::vector<Mat>. (probably the most easy one)one, (and on top of this list for a reason))
  2. put your 3rd dimension into the "channels", e.g.: cvMat(10,10,CV_32FC(17)); // [10x10x17];
  3. use a 3 (or more) dimensional cv::Mat:

    int sz[] = {17, 10, 10};

    cv::Mat(3, sz,CV_32F); // a 3d volume of 17 10x10 planes

(p.s: the main reason i want to steer you away making a new class is:

reinventing the wheel might feel easy, but matching existing expectations (how it should behave) to your creature is terribly hard!)

you should definitely NOT invent a new class, but rather use one of the various ways already possible, to achieve that

  1. just use std::vector<Mat>. (probably the most easy one, (and on top of this list for a reason))
  2. put your 3rd dimension into the "channels", e.g.: cvMat(10,10,CV_32FC(17)); // [10x10x17];
  3. use a 3 (or more) dimensional cv::Mat:

    int sz[] = {17, 10, 10};

    cv::Mat(3, sz,CV_32F); // a 3d volume of 17 10x10 planes

(p.s: the main reason i want to steer you away making a new class is:

reinventing the wheel might feel easy, easy (initially), but matching existing expectations (how it should behave) to your creature is terribly hard!)