Go to file
Orest Chura 986ad4ff06
Merge pull request #18857 from OrestChura:oc/kmeans
[G-API]: kmeans() Standard Kernel Implementation

* cv::gapi::kmeans kernel implementation
 - 4 overloads:
    - standard GMat - for any dimensionality
    - GMat without bestLabels initialization
    - GArray<Point2f> - for 2D
    - GArray<Point3f> - for 3D
 - Accuracy tests:
   - for every input - 2 tests
   1) without initializing. In this case, no comparison with cv::kmeans is done as kmeans uses random auto-initialization
   2) with initialization
   - in both cases, only 1 attempt is done as after first attempt kmeans initializes bestLabels randomly

* Addressing comments
 - bestLabels is returned to its original place among parameters
 - checkVector and isPointsVector functions are merged into one, shared between core.hpp & imgproc.hpp by placing it into gmat.hpp (and implementation - to gmat.cpp)
 - typos corrected

* addressing comments
 - unified names in tests
 - const added
 - typos

* Addressing comments
 - fixed the doc note
 - ddepth -> expectedDepth, `< 0 ` -> `== -1`

* Fix unsupported cases of input Mat
 - supported: multiple channels, reversed width
 - added test cases for those
 - added notes in docs
 - refactored checkVector to return dimentionality along with quantity

* Addressing comments
 - makes chackVector smaller and (maybe) clearer

* Addressing comments

* Addressing comments
 - cv::checkVector -> cv::gapi::detail

* Addressing comments
 - Changed checkVector: returns bool, quantity & dimensionality as references

* Addressing comments
 - Polishing checkVector
 - FIXME added

* Addressing discussion
 - checkVector: added overload, separate two different functionalities
 - depth assert - out of the function

* Addressing comments
 - quantity -> amount, dimensionality -> dim
 - Fix typos

* Addressing comments
 - fix docs
 - use 2 variable's definitions instead of one (for all non-trivial variables)
2020-11-30 13:18:43 +00:00
.github ISSUE_TEMPLATE: fix typo 2020-09-06 16:53:25 -04:00
3rdparty Merge pull request #18924 from alalek:4.x-xcode12 2020-11-26 22:56:59 +00:00
apps Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-17 21:56:26 +00:00
cmake Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-27 14:08:06 +00:00
data fix files permissions 2020-04-13 04:29:55 +00:00
doc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-27 14:08:06 +00:00
include exclude opencv_contrib modules 2020-02-26 15:12:45 +03:00
modules Merge pull request #18857 from OrestChura:oc/kmeans 2020-11-30 13:18:43 +00:00
platforms Merge pull request #18924 from alalek:4.x-xcode12 2020-11-26 22:56:59 +00:00
samples Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-20 20:32:00 +00:00
.editorconfig
.gitattributes
.gitignore Merge pull request #17165 from komakai:objc-binding 2020-06-08 18:32:53 +00:00
CMakeLists.txt build: xcode 12 support, cmake fixes 2020-11-26 07:54:03 +00:00
CONTRIBUTING.md
COPYRIGHT Merge pull request #18073 from vpisarev:apache2_license 2020-08-17 11:49:11 +00:00
LICENSE Merge pull request #18073 from vpisarev:apache2_license 2020-08-17 11:49:11 +00:00
README.md Update README.md 2020-08-05 17:00:56 -07:00
SECURITY.md Added SECURITY.md 2019-11-07 13:10:42 +03:00

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.