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
e4b5e9b9
Commit
e4b5e9b9
authored
Jul 10, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11931 from catree:add_doc_eye_ones
parents
e9bb2626
d7bd662c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
mat.hpp
modules/core/include/opencv2/core/mat.hpp
+5
-1
No files found.
modules/core/include/opencv2/core/mat.hpp
View file @
e4b5e9b9
...
...
@@ -1324,7 +1324,7 @@ public:
/** @brief Returns a zero array of the specified size and type.
The method returns a Matlab-style zero array initializer. It can be used to quickly form a constant
array as a function parameter, part of a matrix expression, or as a matrix initializer
.
:
array as a function parameter, part of a matrix expression, or as a matrix initializer:
@code
Mat A;
A = Mat::zeros(3, 3, CV_32F);
...
...
@@ -1360,6 +1360,8 @@ public:
The above operation does not form a 100x100 matrix of 1's and then multiply it by 3. Instead, it
just remembers the scale factor (3 in this case) and use it when actually invoking the matrix
initializer.
@note In case of multi-channels type, only the first channel will be initialized with 1's, the
others will be set to 0's.
@param rows Number of rows.
@param cols Number of columns.
@param type Created matrix type.
...
...
@@ -1387,6 +1389,8 @@ public:
// make a 4x4 diagonal matrix with 0.1's on the diagonal.
Mat A = Mat::eye(4, 4, CV_32F)*0.1;
@endcode
@note In case of multi-channels type, identity matrix will be initialized only for the first channel,
the others will be set to 0's
@param rows Number of rows.
@param cols Number of columns.
@param type Created matrix type.
...
...
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