opencv/modules
Vadim Levin 16b9514543 feat: update conversion logic for std::vector<T> in Python bindings
`PyObject*` to `std::vector<T>` conversion logic:
- If user passed Numpy Array
  - If array is planar and T is a primitive type (doesn't require
    constructor call) that matches with the element type of array, then
    copy element one by one with the respect of the step between array
    elements. If compiler is lucky (or brave enough) copy loop can be
    vectorized.
    For classes that require constructor calls this path is not
    possible, because we can't begin an object lifetime without hacks.
  - Otherwise fall-back to general case
- Otherwise - execute the general case:
  If PyObject* corresponds to Sequence protocol - iterate over the
  sequence elements and invoke the appropriate `pyopencv_to` function.

`std::vector<T>` to `PyObject*` conversion logic:
- If `std::vector<T>` is empty - return empty tuple.
- If `T` has a corresponding `Mat` `DataType` than return
  Numpy array instance of the matching `dtype` e.g.
  `std::vector<cv::Rect>` is returned as `np.ndarray` of shape `Nx4` and
  `dtype=int`.
  This branch helps to optimize further evaluations in user code.
- Otherwise - execute the general case:
  Construct a tuple of length N = `std::vector::size` and insert
  elements one by one.

Unnecessary functions were removed and code was rearranged to allow
compiler select the appropriate conversion function specialization.
2021-09-01 13:00:21 +03:00
..
calib3d calib3d: Update documentation of calibrateCamera 2021-04-30 20:34:04 +02:00
core feat: update conversion logic for std::vector<T> in Python bindings 2021-09-01 13:00:21 +03:00
cudaarithm cuda: fix inplace condition in cv::cuda::flip 2021-04-01 02:26:59 +00:00
cudabgsegm fix test failure on Jetson TX2 2020-04-15 23:25:12 +09:00
cudacodec cudacodec(build): fix detection in CMake, cleanup duplicate includes 2020-06-17 09:09:40 +00:00
cudafeatures2d
cudafilters remove danger race condition 2021-02-15 21:01:41 +09:00
cudaimgproc Remove compiler warnings 2020-08-21 23:52:30 +09:00
cudalegacy Merge pull request #19390 from tomoaki0705:fixCudaLegacyCalib3d 2021-01-25 13:32:43 +00:00
cudaobjdetect suppress noisy warning 2019-08-08 21:49:32 +09:00
cudaoptflow fix getDefaultName() 2021-02-15 19:21:53 +06:00
cudastereo cuda::StereoBM - fix hanging and racing issue 2019-02-18 06:03:12 +00:00
cudawarping
cudev Merge pull request #16150 from alalek:cmake_avoid_deprecated_link_private 2019-12-13 17:52:40 +03:00
dnn Merge pull request #20586 from alalek:issue_20585 2021-08-21 17:22:58 +00:00
features2d Add Thickness parameter in drawMatches function 2021-06-07 12:52:48 -03:00
flann Remove static initializers caused by templated static member. 2021-05-07 12:53:14 -07:00
highgui fix scale problem in DefaultViewPort::controlImagePosition() 2021-07-07 12:35:11 +08:00
imgcodecs EXR reading: support Z channel if no Y channel 2021-06-02 15:53:32 +03:00
imgproc add note about Python's dsize to doc 2021-08-12 14:40:40 +03:00
java java: force using of 'Ptr<>' for OpenCV classes 2021-07-02 21:20:08 +00:00
js Bugfix on import script with web worker. 2021-07-18 10:12:39 +02:00
ml fix testSaveLoad 2021-08-11 21:52:39 +09:00
objdetect Merge pull request #20150 from rogday:svm_detector_test 2021-06-01 13:31:12 +00:00
photo Update contrast_preserve.hpp 2021-04-20 12:59:36 +02:00
python feat: update conversion logic for std::vector<T> in Python bindings 2021-09-01 13:00:21 +03:00
shape python: discover tests from module/misc/python/test paths 2019-04-10 18:35:35 +00:00
stitching fix loop boundary condition 2021-04-20 22:08:01 -04:00
superres
ts Merge pull request #20146 from asmorkalov:as/java_test_filter 2021-06-02 17:50:29 +00:00
video Merge pull request #19993 from danielenricocahall:fix-compute-ecc-issue 2021-04-30 17:20:52 +00:00
videoio Merge pull request #20541 from iyadahmed:video_capture_timeout_prop 2021-08-12 19:51:02 +03:00
videostab backport: fixed warnings produced by clang-9.0.0 2019-09-23 18:36:18 +03:00
viz Added to Camera constructor parameter description 2020-04-26 00:17:39 -06:00
world
CMakeLists.txt