drop C-API sample code
This commit is contained in:
committed by
Alexander Alekhin
parent
9c23f2f1a6
commit
329a1fb781
@@ -614,12 +614,11 @@ Note that `M.step[i] >= M.step[i+1]` (in fact, `M.step[i] >= M.step[i+1]*M.size[
|
||||
that 2-dimensional matrices are stored row-by-row, 3-dimensional matrices are stored plane-by-plane,
|
||||
and so on. M.step[M.dims-1] is minimal and always equal to the element size M.elemSize() .
|
||||
|
||||
So, the data layout in Mat is fully compatible with CvMat, IplImage, and CvMatND types from OpenCV
|
||||
1.x. It is also compatible with the majority of dense array types from the standard toolkits and
|
||||
SDKs, such as Numpy (ndarray), Win32 (independent device bitmaps), and others, that is, with any
|
||||
array that uses *steps* (or *strides*) to compute the position of a pixel. Due to this
|
||||
compatibility, it is possible to make a Mat header for user-allocated data and process it in-place
|
||||
using OpenCV functions.
|
||||
So, the data layout in Mat is compatible with the majority of dense array types from the standard
|
||||
toolkits and SDKs, such as Numpy (ndarray), Win32 (independent device bitmaps), and others,
|
||||
that is, with any array that uses *steps* (or *strides*) to compute the position of a pixel.
|
||||
Due to this compatibility, it is possible to make a Mat header for user-allocated data and process
|
||||
it in-place using OpenCV functions.
|
||||
|
||||
There are many different ways to create a Mat object. The most popular options are listed below:
|
||||
|
||||
@@ -704,10 +703,6 @@ 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 is function cv::cvarrToMat taking pointers to CvMat or
|
||||
IplImage and the optional flag indicating whether to copy the data or not.
|
||||
@snippet samples/cpp/image.cpp iplimage
|
||||
|
||||
- Use MATLAB-style array initializers, zeros(), ones(), eye(), for example:
|
||||
@code
|
||||
@@ -1641,13 +1636,6 @@ public:
|
||||
*/
|
||||
Mat operator()(const std::vector<Range>& ranges) const;
|
||||
|
||||
// //! converts header to CvMat; no data is copied
|
||||
// operator CvMat() const;
|
||||
// //! converts header to CvMatND; no data is copied
|
||||
// operator CvMatND() const;
|
||||
// //! converts header to IplImage; no data is copied
|
||||
// operator IplImage() const;
|
||||
|
||||
template<typename _Tp> operator std::vector<_Tp>() const;
|
||||
template<typename _Tp, int n> operator Vec<_Tp, n>() const;
|
||||
template<typename _Tp, int m, int n> operator Matx<_Tp, m, n>() const;
|
||||
|
||||
Reference in New Issue
Block a user