Commit Graph

152 Commits

Author SHA1 Message Date
catree
c9fe6f1afe Add Java and Python code for the following tutorials:
- Changing the contrast and brightness of an image!
      - Operations with images
2018-07-11 20:14:58 +02:00
catree
481af5c469 Add Java and Python code for AKAZE local features matching tutorial. Fix incorrect uses of Mat.mul() in Java code.
Uniform Lowe's ratio test in the code.
2018-07-02 15:10:53 +02:00
catree
7469981d1a Add Java and Python code for Image Segmentation with Distance Transform and Watershed Algorithm tutorial. Use more Pythonic code. 2018-06-27 18:48:32 +02:00
catree
a11ef2650e Add Java and Python code for the following imgproc tutorials: Finding contours in your image, Convex Hull, Creating Bounding boxes and circles for contours, Creating Bounding rotated boxes and ellipses for contours, Image Moments, Point Polygon Test. 2018-06-10 23:57:11 +02:00
catree
afa5b0cc93 Add Java and Python code for cascade classifier and HDR tutorials. 2018-06-08 19:30:30 +02:00
Alexander Alekhin
dcb9bc2544 python: eliminate pylint warnings
Tested with:
- pylint 1.9.1
2018-06-04 17:58:06 +03:00
catree
ade21f142e Add Java and Python code for the following features2d tutorials: Harris corner detector, Shi-Tomasi corner detector, Creating your own corner detector, Detecting corners location in subpixels, Feature Detection, Feature Description, Feature Matching with FLANN, Features2D + Homography to find a known object. Use Lowe's ratio test to filter the matches. 2018-05-29 10:35:57 +02:00
catree
4c1c3147d9 Add Java and Python code for the following imgproc tutorials: Affine Transformations, Histogram Equalization, Histogram Calculation, Histogram Comparison, Back Projection. 2018-05-24 01:11:28 +02:00
Alexander Alekhin
af5f40a80e Merge pull request #11543 from catree:add_tutorial_imgproc_java_python 2018-05-22 12:26:34 +00:00
catree
9f6108ae7a Add Java and Python code for the following imgproc tutorials: Canny, Remap, threshold and threshold inRange. Use HSV colorspace instead of RGB for inRange threshold tutorial. 2018-05-18 20:11:53 +02:00
catree
9fc0cabdf5 Add Java and Python code for trackbar tutorial. 2018-05-18 11:29:41 +02:00
catree
7e3490959a Add Java and Python code for morphology tutorials. 2018-05-16 14:19:48 +02:00
Alexander Alekhin
78f205ffa5 python: better Python 3 support 2018-05-11 17:32:04 +03:00
Alexander Alekhin
df02fe0615 Merge pull request #11445 from cclauss:file-long-raw_input-xrange 2018-05-11 13:28:53 +00:00
cclauss
8a79b167b8 Define execfile, file, long, raw_input, xrange for Python 3 2018-05-03 09:19:05 +02:00
cclauss
05c1a3d160 print() is a function in Python 3 2018-05-03 07:12:12 +02:00
Sui Libin
1ad814a191 fix faster_rcnn sample crashed at PoolingInvoker on Windows7(x64). (#10724)
* fix faster_rcnn sample crashed at PoolingInvoker operator() of pooling_layer.

* find_odj onmouse bug about find matched point status.

* reverted AutoBuffer back to std::vector
2018-02-12 16:07:56 +03:00
luz.paz
dbb57cd0ae Misc. ./samples typos
Found via `codespell -q 3 --skip="./3rdparty" -I ../opencv-whitelist.txt`
2018-02-08 05:52:08 -05:00
Jozef Mlich
7a472d85ef Merge pull request #10663 from jmlich:master
* hogsvm compatibility with python3
2018-01-24 17:03:23 +03:00
catree
59ec224009 Update left_intrinsics.yml file with chessboard square_size=0.025 and with extrinsic parameters. Add camera_calibration_show_extrinsics.py, a Python sample that allows to display the extrinsics saved during the camera calibration process (cpp-example-calibration). 2017-12-20 12:06:08 +01:00
Alexander Alekhin
5560db73bf python: 'cv2.' -> 'cv.' via 'import cv2 as cv' 2017-12-11 13:46:55 +03:00
Wei Hao
f2b3e5f517
Update houghlines.py
Fix a code indent bug:   cv2.imshow("detected lines", cdst)
2017-11-27 14:36:51 +08:00
Alexander Alekhin
807f5e33ad Merge pull request #10055 from mabdullahrafique:patch-1 2017-11-26 12:00:16 +00:00
Muhammad Abdullah
c180047bc1 update digits_video.py
Following were the errors in the digits_video.py
     1 ) The code was not working because data type of x was float however in "cv2.rectangle" we require integer .
     2 ) After pressing the "esc" button the image windows did not destroy
So I amended following things:
     1 ) ~converted data type of x to int.~ Used Python integer division (//)
     2 ) used cv2.destroyAllWindows() to close all windows after the press of "esc" by user.
2017-11-23 19:20:37 +00:00
Arthur Pastel
2feb0c2f61 Merge pull request #9895 from art049:parrallel_calibration_py
* Adding threading in calibrate.py

* samples: update calibrate.py
2017-11-23 21:27:11 +03:00
tribta
9a2317e063 Tutorial Hough Lines 2017-10-05 14:17:38 +03:00
tribta
d99ced6ec8 Tutorial Hough Circles 2017-10-05 14:17:38 +03:00
tribta
9ff33dacfc Tutorial Make Border 2017-10-05 14:17:38 +03:00
tribta
a6f5e1f0ca Tutorial Filter2D 2017-10-05 14:17:38 +03:00
tribta
08515281b9 Tutorial Image Pyramids 2017-10-05 14:17:38 +03:00
tribta
f7d85bfed8 Tutorial Sobel Derivatives 2017-10-05 14:17:36 +03:00
tribta
3250f11f0c Tutorial Laplace Operator 2017-10-05 14:14:04 +03:00
tribta
d068e27420 Tutorial Morph Lines Detection 2017-10-05 14:14:04 +03:00
tribta
18bc4db75c Tutorial Hit-or-Miss 2017-10-05 14:14:04 +03:00
tribta
bc18fb481f Tutorial Smoothing Images 2017-10-05 14:14:03 +03:00
Deric Crago
a0d7cf89f2 Fixed 'boundary' spelling 2017-09-26 23:42:48 -04:00
Vadim Pisarevsky
bc09d1ba3b Merge pull request #9406 from Cartucho:update_core_tutorials 2017-09-13 14:09:39 +00:00
tribta
45afd29b72 Tutorial Mask Operations on Matrices 2017-09-09 15:20:21 +01:00
tribta
954e2f9b9c Tutorial Discrete Fourier Transform 2017-09-09 15:10:18 +01:00
tribta
13317bdfda Tutorial Basic Geometric Drawing 2017-09-09 15:02:51 +01:00
tribta
c4c1e94088 Tutorial Adding Images 2017-09-09 15:02:51 +01:00
Alexander Alekhin
717b2f496f Merge pull request #9139 from Cartucho:improve_match_template_py
GSoC - Improving code match_template.py
2017-08-24 19:51:09 +00:00
Alexander Alekhin
a2f7132648 Merge pull request #9460 from Cartucho:pylint_samples_py 2017-08-24 19:46:54 +00:00
tribta
7555ab194f Samples Python:
* Unused variables
* Bad identation
2017-08-24 17:45:14 +01:00
tribta
7c65f7ef11 Fixing Bad identations (line 18 to 96)
Adding _ to the unused variables for clarity (line 77)
2017-07-11 11:59:22 +01:00
tribta
d53a5210a8 Improving codes of the tutorial: mat_mask_oprations
*Fixing typos;
*Making codes more similar to the main one, in C++;
*Adding Grayscale option to the Python and Java codes;
*Fixing python identation, whitespaces and redundancies.
2017-06-30 12:38:24 +01:00
Alexander Alekhin
2186ec7665 Merge pull request #8754 from berak:fix_py_hog_svm_tut 2017-05-22 13:41:10 +00:00
berak
2af63c2bf1 fix py_svm_opencv sample 2017-05-21 07:39:05 +02:00
Cartucho
2055bcc807 Extending template_matching tutorial with Java (#8043)
* Extending template_matching tutorial with Java

* adding mask to java version of the tutorial

* adding the python toggle and code

* updating table of content

* adding py and java to table of content

* adding mask to python

* going back to markdown with duplicated text

* non duplicated text
2017-05-12 00:42:04 +03:00
berak
7b05d52f7b py_samples: fix digits.py 2017-05-11 08:34:21 +02:00
Mark Szumowski
94d63d4281 Update research paper link in Python sample
The docstring for one of the Python sample programs includes a link to the research paper describing the main algorithm. That link is no longer valid (results in a 404 error) so this update replaces it with another link from the same institution which is currently valid.
2017-04-01 10:58:07 +11:00
catree
e357e2c1b7 Fix typos in py_houghlines tutorial. Extract the python code in a specific folder. 2017-01-17 16:09:27 +01:00
Vadim Pisarevsky
75eeb25c1e Merge pull request #7866 from alalek:update_waitKey 2016-12-16 12:25:11 +00:00
StevenPuttemans
6d34d6b47e update samples: waitKey() usage
Original commit is a5f19f7dd6
2016-12-15 15:39:47 +03:00
Cartucho
fcddfa4f86 GSoC 2016 - Adding ALIASES for tutorial (#7041)
* GSoC 2016 - Adding toggle files to be used by tutorials.

Add a toggle option for tutorials.
* adds a button on the HTML tutorial pages to switch between blocks
* the default option is for languages: one can write a block
for C++ and another one for Python without re-writing the tutorial

Add aliases to the doxyfile.
* adding alises to make a link to previous and next tutorial.
* adding alias to specify the toggle options in the tutorials index.
* adding alias to add a youtube video directly from link.

Add a sample tutorial (mat_mask_opertaions) using the developed aliases:
* youtube alias
* previous and next tutorial alias
* buttons
* languages info for tutorial table of content
* code referances with snippets (and associated sample code files)

* Removing the automatic ordering.
Adding specific toggles for cpp, java and python.
Move all the code to the footer / header and Doxyfile.
Updating documentation.
2016-12-15 15:32:12 +03:00
Vladislav Sovrasov
21683a550a Update MSER python sample 2016-12-12 14:17:25 +03:00
danil-tolkachev
50d02b9f84 supress numpy future warning with None comparison 2016-09-14 21:39:11 +03:00
Vadim Pisarevsky
abbc988fb5 Merge pull request #6812 from aleksandaratanasov:master 2016-07-19 17:21:09 +00:00
Alexander Alekhin
ddc0b42bc3 migration: github.com/opencv/opencv 2016-07-12 12:51:12 +03:00
Simon Hänisch
6489d8a96f update watershed.py: check if windows are still open
change the `while` loop to check if the two windows created by this example still exist, stop the program otherwise
2016-06-27 17:03:37 +02:00
Aleksandar Atanasov
0637ca21dc Update houghlines.py 2016-06-13 09:00:42 +02:00
Aleksandar Atanasov
4fa86dad26 Update houghcircles.py 2016-06-13 09:00:29 +02:00
Aleksandar Atanasov
445349dd7d Same fix as with the houghcircles
Moved second `imshow()` inside the if-statement to prevent error when no lines have been found and the function is called with an empty `cdst`.
2016-06-12 12:55:29 +02:00
Aleksandar Atanasov
c5bbc0353c Added small fix when circles are not detected
I noticed that I missed the fact that `cimg` is used in the second `imshow()` call. Changed the scope of the second function call to be within the if-statement. Otherwise in cases where have not been detected the second `imshow()` will attempt to use `cimg` which will be empty leading to an error.
2016-06-12 12:54:16 +02:00
Aleksandar Atanasov
25e2e8aa3c Removed trailing spaces at line 32 2016-06-09 07:18:47 +02:00
Aleksandar Atanasov
14deab252b Fix houghlines.py when no lines found
In the C++ equivalent of this example a check is made whether the vector (here in Python we have a list) actually has any lines in it that is whether the Hough lines function has managed to find any in the given image. This check is missing for the Python example and if no lines are found the application breaks.
2016-06-02 11:00:23 +02:00
Aleksandar Atanasov
cf0df733da Fix houghcircles.py when no circles found
In the C++ equivalent of this example a check is made whether the vector (here in Python we have a list) actually has any circles in it that is whether the Hough circles function has managed to find any in the given image. This check is missing for the Python example and if no circles are found the application breaks.
2016-06-02 10:58:46 +02:00
Maksim Shabunin
36477fdefa Merge pull request #6344 from anatolix:kalmanpyfix 2016-04-12 15:55:55 +00:00
Fraser Harris
0634808bf3 Added description of the AR model 2016-03-31 17:57:55 -07:00
Anatoly Orlov
1740218ee0 small platform compatability fix for ESC key 2016-03-29 20:02:35 +03:00
Anatoly Orlov
2be805ce29 kalman.py was broken totally
1. Following condition is True on each iteration becuase -1 % 0xFF is 255 not -1

code = cv2.waitKey(100) % 0x100
if code != -1:
   break

this were resetting point position on each cycle not on key press as intended

2. Previous small bug were masking serious bug with matrix operation on matrices of incorrect size.
   As the result on 2nd iteration of internal cycle program has crushed.

   I have fixed it too, matrix operation was taken from examples/cpp/kalman.cpp where it looks like
   randn( processNoise, Scalar(0), Scalar::all(sqrt(KF.processNoiseCov.at<float>(0, 0))));
   which is something totally different from previous code here.

   Example behave as it should now, i.e. point moving by circle trajectory as in C++ example.
2016-03-29 18:27:35 +03:00
Vladislav Sovrasov
1f8fd5382c Replace of some synthetic scenes in python samples 2016-03-24 20:05:26 +03:00
Vladislav Sovrasov
87fc75c6d7 Improvements in tests, bugfix in digits_video sample 2016-03-03 11:06:21 +03:00
Vladislav Sovrasov
54c07ba0ff Add 2 new tests, bugfixed in old tests 2016-03-03 11:06:21 +03:00
Vladislav Sovrasov
86868176a2 Fix py3 comatibility 2016-03-03 11:06:21 +03:00
Vladislav Sovrasov
e90dc20361 Update letter_recog sample to current version of opencv interfaces 2016-03-03 11:06:21 +03:00
Vladislav Sovrasov
d579f08093 Fix mouse control in asift and find_obj samples 2016-03-03 11:06:21 +03:00
Vladislav Sovrasov
3a51cae208 Fix rectangle selection in some of python samples 2016-03-03 11:06:21 +03:00
Vladislav Sovrasov
ab4d375349 Add new tests on python 2016-03-03 11:06:20 +03:00
BinMatrix
c7481c55f7 Fix the mouse bug and the problem of collapse 2016-01-13 19:04:17 +08:00
Alexander Alekhin
613b289325 python: add launch script for winpack python demo 2015-12-18 15:59:02 +03:00
Alexander Alekhin
a8e2922467 rename samples/{python2 -> python} 2015-12-18 11:00:32 +03:00
Alexander Alekhin
81d4d4948e Merge pull request #17105 from benji1123:pointPolygonTest_demo 2020-04-19 17:38:23 +00:00
Ben
041da57e87 fix tuple error 2020-04-19 10:36:59 -04:00
jshiwam
d4fc302c7e
Merge pull request #16795 from jshiwam:qrsample
Added a sample file for qrcode detection in python

* sample python file for qrcode detection added in samples/python

* input taken using argparse and the indents were removed

* Removed unused variables

* updated the format and removed unused variables

Removed the use of global variables and used parameterised contructor instead

=set multi detection true by default

* added detection from camera

* samples(python): coding style in qrcode.py
2020-04-17 12:16:39 +00:00
Andrey Kamaev
f886651cf0 Drop old python samples and tests 2013-04-12 19:37:40 +04:00
marina.kolpakova
285d6320be add #/usr/bin/env python to all python files 2012-11-23 22:57:22 +04:00
OpenCV Buildbot
04384a71e4 Normalize line endings and whitespace 2012-10-17 15:32:23 +04:00
Andrey Kamaev
639bbec44a svn repository web references are replaced with links to git 2012-08-24 15:59:43 +04:00
Gary Bradski
a4de511eb7 Added cv.DestroyAllWindows() to file close 2012-03-18 23:21:54 +00:00
Gary Bradski
5878ab6a0f added destroyAllWindows at end 2012-03-18 23:12:55 +00:00
Gary Bradski
8a48b8dffd added destroy all windows 2012-03-18 23:07:39 +00:00
Gary Bradski
c29f0dfdfa added destroy all windows 2012-03-18 23:01:31 +00:00
Alexander Shishkov
be63ce723f #1672
updated links in cheatsheet
renamed directory for Mat tutorial 
changed links from willow docs to opencv.itseez.com, from Trac to current Redmine
2012-03-11 14:35:46 +00:00
Alexander Shishkov
f3be34934e minor changes in chessboard.py sample #1492 2012-02-17 08:48:06 +00:00
Alexander Shishkov
a6602dd75c fixed #1492 2012-02-17 08:42:58 +00:00
Vadim Pisarevsky
569b1ad582 embeded cv Python module into cv2. 2011-07-12 12:56:03 +00:00
Vadim Pisarevsky
3c8cff3d7e fixed ellipse orientation in fitellipse.py 2011-06-14 09:23:29 +00:00
Ethan Rublee
89b5f40ce3 Reverting the boost::python bindings, moving dev to out of trunk. 2011-05-24 22:01:41 +00:00
Ethan Rublee
44e9fdaa2d Initial pass at some boost python bindings. 2011-05-23 17:26:58 +00:00