Changeset 148 in flair-src for trunk/lib/FlairCore/src


Ignore:
Timestamp:
Feb 28, 2017, 4:18:13 PM (8 years ago)
Author:
Sanahuja Guillaume
Message:

m

Location:
trunk/lib/FlairCore/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/cvmatrix.h

    r147 r148  
    5959  *
    6060  * \param parent parent
    61   * \param descriptor matrix description
     61  * \param descriptor matrix description, it is safe to destroy it after calling this constructor
    6262  * \param type type of matrix elements
    6363  * \param name name
  • trunk/lib/FlairCore/src/cvmatrix_impl.cpp

    r15 r148  
    3333
    3434cvmatrix_impl::cvmatrix_impl(cvmatrix *self,
    35                              const cvmatrix_descriptor *descriptor,
     35                             const cvmatrix_descriptor *inDescriptor,
    3636                             flair::core::ScalarType const &_elementDataType,
    3737                             int n)
    3838    : elementDataType(_elementDataType) {
    39   this->descriptor = descriptor;
     39  descriptor = new cvmatrix_descriptor(inDescriptor->Rows(), inDescriptor->Cols());
     40
     41  for (uint32_t i = 0; i < descriptor->Rows(); i++) {
     42    for (uint32_t j = 0; j < descriptor->Cols(); j++) {
     43      descriptor->SetElementName(i, j, inDescriptor->ElementName(i, j));
     44    }
     45  }
    4046  Init(self, n);
    4147}
  • trunk/lib/FlairCore/src/unexported/cvmatrix_impl.h

    r15 r148  
    3434  CvMat *mat;
    3535  flair::core::ScalarType const &elementDataType;
    36   // const since if element description is modified it would be a mess in the
    37   // log
    38   const flair::core::cvmatrix_descriptor *descriptor;
     36  flair::core::cvmatrix_descriptor *descriptor;
    3937
    4038private:
Note: See TracChangeset for help on using the changeset viewer.