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
453f384b
Commit
453f384b
authored
Feb 19, 2015
by
theodore
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding documentation for the findnonzero() function
parent
4a1adab9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
core.hpp
modules/core/include/opencv2/core.hpp
+23
-2
No files found.
modules/core/include/opencv2/core.hpp
View file @
453f384b
...
...
@@ -545,8 +545,29 @@ The function returns the number of non-zero elements in src :
*/
CV_EXPORTS_W
int
countNonZero
(
InputArray
src
);
/** @brief returns the list of locations of non-zero pixels
@todo document
/** @brief Returns the list of locations of non-zero pixels
The function returns the coordinates of the location of non-zero pixels in src.
The result array can be both type of Mat or vector<Point>. For example:
@code{.cpp}
cv::Mat binaryImage; // input, binary image
cv::Mat locations; // output, locations of non-zero pixels
cv::findNonZero(binaryImage, locations);
// access pixel coordinates
Point pnt = locations.at<Point>(i);
@endcode
or
@code{.cpp}
cv::Mat binaryImage; // input, binary image
vector<Point> locations; // output, locations of non-zero pixels
cv::findNonZero(binaryImage, locations);
// access pixel coordinates
Point pnt = locations[i];
@endcode
@param src single-channel array
@param idx output array with the non-zero pixel points
*/
CV_EXPORTS_W
void
findNonZero
(
InputArray
src
,
OutputArray
idx
);
...
...
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