提交 6d282ddf 编写于 作者: M Maksim Shabunin

Documentation: removed mention of Mat(IplImage*) constructor

上级 d3beb755
...@@ -180,12 +180,6 @@ object in multiple ways: ...@@ -180,12 +180,6 @@ object in multiple ways:
dimension, then pass a pointer containing the size for each dimension and the rest remains the dimension, then pass a pointer containing the size for each dimension and the rest remains the
same. same.
- Create a header for an already existing IplImage pointer:
@code{.cpp}
IplImage* img = cvLoadImage("greatwave.png", 1);
Mat mtx(img); // convert IplImage* -> Mat
@endcode
- @ref cv::Mat::create function: - @ref cv::Mat::create function:
@code @code
M.create(4,4, CV_8UC(2)); M.create(4,4, CV_8UC(2));
......
...@@ -634,18 +634,12 @@ sub-matrices. ...@@ -634,18 +634,12 @@ sub-matrices.
Mat M = Mat(3, 3, CV_64F, m).inv(); Mat M = Mat(3, 3, CV_64F, m).inv();
@endcode @endcode
. .
Partial yet very common cases of this *user-allocated data* case are conversions from CvMat and Partial yet very common cases of this *user-allocated data* case are conversions from CvMat and
IplImage to Mat. For this purpose, there are special constructors taking pointers to CvMat or IplImage to Mat. For this purpose, there is function cv::cvarrToMat taking pointers to CvMat or
IplImage and the optional flag indicating whether to copy the data or not. Backward conversion from IplImage and the optional flag indicating whether to copy the data or not.
Mat to CvMat or IplImage is provided via cast operators Mat::operator CvMat() const and @dontinclude samples/cpp/image.cpp
Mat::operator IplImage(). The operators do NOT copy the data. @skip Ptr<IplImage> iplimg
@code @until is converted, while the data is shared
IplImage* img = cvLoadImage("greatwave.jpg", 1);
Mat mtx(img); // convert IplImage* -> Mat
CvMat oldmat = mtx; // convert Mat -> CvMat
CV_Assert(oldmat.cols == img->width && oldmat.rows == img->height &&
oldmat.data.ptr == (uchar*)img->imageData && oldmat.step == img->widthStep);
@endcode
- Use MATLAB-style array initializers, zeros(), ones(), eye(), for example: - Use MATLAB-style array initializers, zeros(), ones(), eye(), for example:
@code @code
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册