Changeset 148 in flair-src for trunk/lib/FlairCore/src/cvmatrix_impl.cpp


Ignore:
Timestamp:
02/28/17 16:18:13 (5 years ago)
Author:
Sanahuja Guillaume
Message:

m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}
Note: See TracChangeset for help on using the changeset viewer.