mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
core: remove constructors from C API structures
POD structures can't have constructors.
This commit is contained in:
@@ -4,20 +4,24 @@
|
||||
|
||||
// glue
|
||||
|
||||
CvMatND::CvMatND(const cv::Mat& m)
|
||||
CvMatND cvMatND(const cv::Mat& m)
|
||||
{
|
||||
cvInitMatNDHeader(this, m.dims, m.size, m.type(), m.data );
|
||||
CvMatND self;
|
||||
cvInitMatNDHeader(&self, m.dims, m.size, m.type(), m.data );
|
||||
int i, d = m.dims;
|
||||
for( i = 0; i < d; i++ )
|
||||
dim[i].step = (int)m.step[i];
|
||||
type |= m.flags & cv::Mat::CONTINUOUS_FLAG;
|
||||
self.dim[i].step = (int)m.step[i];
|
||||
self.type |= m.flags & cv::Mat::CONTINUOUS_FLAG;
|
||||
return self;
|
||||
}
|
||||
|
||||
_IplImage::_IplImage(const cv::Mat& m)
|
||||
_IplImage cvIplImage(const cv::Mat& m)
|
||||
{
|
||||
_IplImage self;
|
||||
CV_Assert( m.dims <= 2 );
|
||||
cvInitImageHeader(this, m.size(), cvIplDepth(m.flags), m.channels());
|
||||
cvSetData(this, m.data, (int)m.step[0]);
|
||||
cvInitImageHeader(&self, cvSize(m.size()), cvIplDepth(m.flags), m.channels());
|
||||
cvSetData(&self, m.data, (int)m.step[0]);
|
||||
return self;
|
||||
}
|
||||
|
||||
namespace cv {
|
||||
|
||||
Reference in New Issue
Block a user