Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
6d282ddf
Commit
6d282ddf
authored
Dec 02, 2014
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation: removed mention of Mat(IplImage*) constructor
parent
d3beb755
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
mat_the_basic_image_container.markdown
...ic_image_container/mat_the_basic_image_container.markdown
+0
-6
mat.hpp
modules/core/include/opencv2/core/mat.hpp
+6
-12
No files found.
doc/tutorials/core/mat_the_basic_image_container/mat_the_basic_image_container.markdown
View file @
6d282ddf
...
...
@@ -180,12 +180,6 @@ object in multiple ways:
dimension, then pass a pointer containing the size for each dimension and the rest remains the
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:
@code
M.create(4,4, CV_8UC(2));
...
...
modules/core/include/opencv2/core/mat.hpp
View file @
6d282ddf
...
...
@@ -634,18 +634,12 @@ sub-matrices.
Mat M = Mat(3, 3, CV_64F, m).inv();
@endcode
.
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 and the optional flag indicating whether to copy the data or not. Backward conversion from
Mat to CvMat or IplImage is provided via cast operators Mat::operator CvMat() const and
Mat::operator IplImage(). The operators do NOT copy the data.
@code
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
Partial yet very common cases of this *user-allocated data* case are conversions from CvMat and
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.
@dontinclude samples/cpp/image.cpp
@skip Ptr<IplImage> iplimg
@until is converted, while the data is shared
- Use MATLAB-style array initializers, zeros(), ones(), eye(), for example:
@code
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment