Commit Graph

228 Commits

Author SHA1 Message Date
Lukas Weber
1bab920cf5
remove static con_thresh for adjuster 2022-08-11 18:04:28 +02:00
Jeremy Ephron
54693cf7b1
Update stitching_detailed.py
###  Critical bugs fixed:
- `seam_finder.find()` returns None and overwrites `masks_warped`
- `indices` is only 1-dimensional

### Nice-to-have bugs fixed:
- avoid invalid value in sqrt and subsequent runtime warning
- avoid printing help string on each run (use argparse builtin behavior)

### New features:
- added graphcut seam finder support

### Test Summary:
Tested on Ubuntu 20.04 with python 3.8.10 and opencv-python-contrib 4.5.5.62
2022-03-02 11:01:53 -08:00
Alexander Alekhin
d573472a86 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-01-31 12:53:45 +00:00
Suleyman TURKMEN
2647902fee Update python samples 2022-01-24 11:13:56 +03:00
Alexander Alekhin
a1ec4ea3a9 Merge pull request #21361 from alalek:sample_fix_tracking 2022-01-17 22:26:59 +00:00
berak
5602d2c7bb
Update stitching_detailed.py
resolves: #21406

use constructors consistently
2022-01-09 12:26:24 +01:00
Alexander Alekhin
7f075b0b15 samples(python): update tracker.py 2021-12-29 01:30:13 +00:00
Alexander Alekhin
217fea9667 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-24 16:48:07 +00:00
APrigarina
ada16fd188 prevent index error in find_obj sample 2021-12-23 11:29:27 +03:00
Alexander Alekhin
c78a8dfd2d fix 4.x links 2021-12-22 13:24:30 +00:00
Sinitsina Maria
d8b1fc45aa
Merge pull request #20934 from SinM9:spectrogram_samples
AudioIO: add spectrogram samples for C++/python
2021-12-14 17:33:26 +00:00
Alexander Alekhin
d24befa0bc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-11 15:18:57 +00:00
UncleLLD
62a010a25d
Merge pull request #21224 from UncleLLD:fix-cvtColor-error
fix cvtColor-error

* fix gray image channel error

* fix gray image channel error

* fix cvtColor error after the video end

* fix cvtColor error after the video end and change next variable

* fix cvtColor error after the video end

* reset next variable

* fix cvtColor error after the video end

* fix cvtColor error after the video end
2021-12-09 19:11:05 +00:00
Alexander Alekhin
57ee14d62d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-27 16:50:55 +00:00
Christian Clauss
ebe4ca6b60 Fix typos discovered by codespell 2021-11-26 12:29:56 +01:00
Alexander Alekhin
824392a1c2 Merge pull request #20910 from lukasalexanderweber:sift_fix 2021-10-20 09:48:20 +00:00
Lukas Weber
9379e85e23 changed no longer patented SIFT 2021-10-20 09:07:48 +02:00
Alexander Alekhin
6fbfc58602 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-08-21 17:25:18 +00:00
Alexander Panov
d6306f8ccb
Merge pull request #20564 from AleksandrPanov:update_kalman_sample
Update kalman sample

* updated view and comments, fixed dims

* updated view and comments, added statePost
2021-08-20 10:57:05 +00:00
Lukas-Alexander Weber
863ab0e72e
fix TypeError when specifying compose_megapix
without rounding the composed image sizes (variable "sz") they will be odly fractions of a pixel (e.g. (5300.965, 3772.897)) and therefore cause a "TypeError: integer argument expected, got float" in line

456        roi = warper.warpRoi(sz, K, cameras[i].R)
2021-07-20 10:59:15 +02:00
APrigarina
0f24d4d2a1 fix samples 2021-07-01 18:26:17 +03:00
Alexander Alekhin
8fad85edda Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-07-01 10:52:31 +00:00
APrigarina
5e80bd3cc9 fix samples 3.4 2021-06-30 12:50:21 +03:00
Anna Prigarina
478663b08c
Merge pull request #20036 from APrigarina:tracking_api
Tracking API: added DaSiamRPN tracker

* added dasiamrpn tracker

* dasiamrpn: add test, rewrite sample

* change python samples

* fix tests

* fix params
2021-05-31 20:23:37 +00:00
deniz.aksayli
dbd65a3b01 fix seam finder 2021-04-27 11:10:41 +03:00
Lukas-Alexander Weber
6c53af8e41
Merge pull request #19931 from lukasalexanderweber:patch-1
Stitching Detailed Tutorial Improvements

* Add Vertical Wave Correction

The user has the possibility to pass "vert" as wave_correct parameter. However, in the code "cv.detail.WAVE_CORRECT_HORIZ" ist fixed. This change proposes changes so that the wave correction is done vertically if the user passes "vert" as wave_correct parameter. The variable "do_wave_correct" is replaced by None which is passed to the variable "wave_correct" if the user chooses "no" for wave correction.

* Correct fixed conf_thresh

According to the documentation, [cv.detail.leaveBiggestComponent](https://docs.opencv.org/4.5.1/d7/d74/group__stitching__rotation.html#ga855d2fccbcfc3b3477b34d415be5e786) takes features, the pairwise_matches and the conf_threshold as input.
In the tutorial, however, conf_threshold is fixed at 0.3 even though the user can pass conf_thresh as parameter which is 1 by default. Fixing this parameter at 0.3 causes the script to include images into the panorama which are not part of it.
2021-04-26 14:47:50 +00:00
Anastasia M
ad333e0d22
Merge pull request #17801 from LupusSanctus:am/pytorch_tf_segm
[GSoC] Added TF and PyTorch segmentation conversion cases

* WIP: Added conversion of segmentation models

* Added tutorial mds

* remove unused
2021-04-01 20:42:08 +00:00
Lukas-Alexander Weber
7c4b873ba3
Merge pull request #19762 from lukasalexanderweber:master
* Error Message for SURF if not implemented

In OpenCV 4.5.1 

import cv2 as cv
cv.xfeatures2d_SURF.create

will not create an AttributeError, even if the function is excluded (no nonfree option)

In Line 305 (now 306) however ´finder = FEATURES_FIND_CHOICES[args.features]()´ will raise an 

error: OpenCV(4.5.1) ..\opencv_contrib\modules\xfeatures2d\src\surf.cpp:1029: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SURF::create'

So we should check with cv.xfeatures2d_SURF.create() correctly if SURF is available
2021-03-24 15:02:20 +00:00
Alexander Alekhin
e0265c67c6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-27 17:41:57 +00:00
Suleyman TURKMEN
9b399f3960 Update python samples 2021-02-21 23:02:16 +03:00
Alexander Alekhin
e5d78960c6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-12 21:34:49 +00:00
Suleyman TURKMEN
2387813428 Update imageSegmentation.cpp, imageSegmentation.py 2021-02-07 17:42:52 +03:00
Alexander Alekhin
2b787eb4b8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-01-31 17:44:15 +00:00
Ixarias
3f14341629 Change Keymap wording for gray image in curve mode
Instead of being a copy of line 76, line 79 instead correctly indicates that it will show a histogram for a gray image in curve mode, as given by the code block at line 103 referencing image "gray" instead of image "im".
2021-01-26 16:30:50 -06:00
Alexander Alekhin
d3bc563c6e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-01-12 18:34:33 +00:00
Alexander Reynolds
e3856dfe5d hotfix: call isOpened() in python bg sub tutorial
https://github.com/opencv/opencv/issues/19299
2021-01-11 14:04:56 -08:00
Alexander Alekhin
0105f8fa38 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-20 20:32:00 +00:00
Christos Malliaridis
3c25fd1ba5 Update and expand erosion / dilation tutorial
- Add python explanation for erosion and dilation
- Add java explanation for erosion and dilation
- Restructure and reword specific sections
2020-11-18 13:32:24 +01:00
Alexander Alekhin
aab6362705
Merge pull request #18838 from alalek:video_tracking_api
Tracking API: move to video/tracking.hpp

* video(tracking): moved code from opencv_contrib/tracking module

- Tracker API
- MIL, GOTURN trackers
- applied clang-format

* video(tracking): cleanup unused code

* samples: add tracker.py sample

* video(tracking): avoid div by zero

* static analyzer
2020-11-18 11:04:15 +00:00
Aitik Gupta
d9c5b85671 Use in-place sort 2020-11-13 09:00:54 +05:30
Alexander Alekhin
0428dce27d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-09-01 20:59:00 +00:00
dmici
6876f3b91d fix missing 0.5 factor in anisotropic segmentation tutorial 2020-08-30 10:17:50 +02:00
Maksym Ivashechkin
a66f61748f
Merge pull request #17683 from ivashmak:homography
[GSoC] New RANSAC. Homography part

* change enum and squash commits

* add small improvements

* change function to static, update magsac

* remove path from samples, remove license, small updates

* update pnp solver, small improvements

* fix warnings

* add tutorial, comments

* fix markdown warnings

* fix markdown warnings

* fix markdown warnings
2020-08-14 22:42:26 +00:00
Jan Lebert
5906b49bd1 Fix '--help' of stitching_detailed.py sample
Fixes the help for `--features`, previously listed all possible values as default value.

Also adds the default value to the help for two other arguments
2020-06-05 19:37:02 +02:00
Alexander Alekhin
7722a2b8a8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-06-04 17:58:34 +00:00
Vadim Pisarevsky
5489735258
Merge pull request #17436 from vpisarev:fix_python_io
* fixed #17044
1. fixed Python part of the tutorial about using OpenCV XML-YAML-JSON I/O functionality from C++ and Python.
2. added startWriteStruct() and endWriteStruct() methods to FileStorage
3. modifed FileStorage::write() methods to make them work well inside sequences, not only mappings.

* try to fix the doc builder

* added Python regression test for FileStorage I/O API ([TODO] iterating through long sequences can be very slow)

* fixed yaml testing
2020-06-01 11:33:09 +00:00
Alexander Alekhin
593af7287b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-05-18 17:50:16 +00:00
Alexander Alekhin
65b3209441 Merge pull request #17055 from vnikoofard:patch-1 2020-05-14 12:17:26 +00:00
Alexander Alekhin
152e6476d9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-24 19:02:39 +00:00
Alexander Alekhin
a327418767 features2d(sift): move SIFT tests / headers / build fixes 2020-04-23 08:45:22 +00:00