Where can i find documentation or any info on how to use/what is CV_MAT_MAGIC_VAL?

asked 2013-10-11 13:32:43 -0600

joeish80829 gravatar image

I looked all over google for an hour but nothing came up for CV_MAT_MAGIC_VAL ive seen it used in typedef structs for cvMat and in declaring types for matrices created with cvCreateMat i/e here (not a very good example but best i could find)

  void affinity::initialize(void)
  {
    AA = cvCreateMat(6, 6, CV_32FC1);
    X  = cvCreateMat(6, 1, CV_32FC1);
    B  = cvCreateMat(6, 1, CV_32FC1);
    type = CV_32FC1;

    type = CV_MAT_MAGIC_VAL | CV_MAT_CONT_FLAG | CV_MAT_TYPE(type);
    cols = 3;
    rows = 3;
    step = cols * CV_ELEM_SIZE(type);
    data.ptr = (uchar*)new float[cols * rows];
    refcount = NULL;

    cvmSet(2, 0, 0.);
    cvmSet(2, 1, 0.);
    cvmSet(2, 2, 1.);
  }

but what is it doing...How does the bitwise or operation affect the type of the matrix or if u can provide a simpler explanation to an advanced beginner

the above is just a function the whole code is here in case it helps www.ljudmila.org/~julian/tmp/git/The-Artvertiser/starter/geometry/affinity.cpp ....if you can post an online resource too so others like myself wont be stuck without info on this part of opencv ...i do know that CV_MAT_TYPE gets the matrix type though...

edit retag flag offensive close merge delete

Comments

1

one short answer is: you don't want to know.

what you want to do is: move over to the c++ api asap. c-api support will go away very soon.

berak gravatar imageberak ( 2013-10-11 14:15:33 -0600 )edit