fix 4.x links

This commit is contained in:
Alexander Alekhin
2021-12-22 13:01:26 +00:00
parent be110d0464
commit c78a8dfd2d
134 changed files with 334 additions and 332 deletions
@@ -51,7 +51,7 @@ The results as well as the input data are shown on the screen.
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/video/bg_sub.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/video/bg_sub.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/video/bg_sub.cpp
@@ -59,7 +59,7 @@ The results as well as the input data are shown on the screen.
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/video/background_subtraction/BackgroundSubtractionDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/video/background_subtraction/BackgroundSubtractionDemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/video/background_subtraction/BackgroundSubtractionDemo.java
@@ -67,7 +67,7 @@ The results as well as the input data are shown on the screen.
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/video/background_subtraction/bg_sub.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/video/background_subtraction/bg_sub.py)
- **Code at glance:**
@include samples/python/tutorial_code/video/background_subtraction/bg_sub.py
@@ -96,7 +96,7 @@ more details or check out the references in the Additional Resources section.
Haar-cascade Detection in OpenCV
--------------------------------
OpenCV provides a training method (see @ref tutorial_traincascade) or pretrained models, that can be read using the @ref cv::CascadeClassifier::load method.
The pretrained models are located in the data folder in the OpenCV installation or can be found [here](https://github.com/opencv/opencv/tree/master/data).
The pretrained models are located in the data folder in the OpenCV installation or can be found [here](https://github.com/opencv/opencv/tree/4.x/data).
The following code example will use pretrained Haar cascade models to detect faces and eyes in an image.
First, a @ref cv::CascadeClassifier is created and the necessary XML file is loaded using the @ref cv::CascadeClassifier::load method.
@@ -104,19 +104,19 @@ Afterwards, the detection is done using the @ref cv::CascadeClassifier::detectMu
@add_toggle_cpp
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/objectDetection/objectDetection.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/objectDetection/objectDetection.cpp)
@include samples/cpp/tutorial_code/objectDetection/objectDetection.cpp
@end_toggle
@add_toggle_java
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/objectDetection/cascade_classifier/ObjectDetectionDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/objectDetection/cascade_classifier/ObjectDetectionDemo.java)
@include samples/java/tutorial_code/objectDetection/cascade_classifier/ObjectDetectionDemo.java
@end_toggle
@add_toggle_python
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py)
@include samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py
@end_toggle
+4 -4
View File
@@ -42,19 +42,19 @@ Source Code
@add_toggle_cpp
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/photo/hdr_imaging/hdr_imaging.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/photo/hdr_imaging/hdr_imaging.cpp)
@include samples/cpp/tutorial_code/photo/hdr_imaging/hdr_imaging.cpp
@end_toggle
@add_toggle_java
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/photo/hdr_imaging/HDRImagingDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/photo/hdr_imaging/HDRImagingDemo.java)
@include samples/java/tutorial_code/photo/hdr_imaging/HDRImagingDemo.java
@end_toggle
@add_toggle_python
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/photo/hdr_imaging/hdr_imaging.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/photo/hdr_imaging/hdr_imaging.py)
@include samples/python/tutorial_code/photo/hdr_imaging/hdr_imaging.py
@end_toggle
@@ -62,7 +62,7 @@ Sample images
-------------
Data directory that contains images, exposure times and `list.txt` file can be downloaded from
[here](https://github.com/opencv/opencv_extra/tree/master/testdata/cv/hdr/exposures).
[here](https://github.com/opencv/opencv_extra/tree/4.x/testdata/cv/hdr/exposures).
Explanation
-----------
@@ -102,7 +102,7 @@ Source Code
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp
@@ -110,7 +110,7 @@ Source Code
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ml/introduction_to_pca/IntroductionToPCADemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/ml/introduction_to_pca/IntroductionToPCADemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/ml/introduction_to_pca/IntroductionToPCADemo.java
@@ -118,13 +118,13 @@ Source Code
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/introduction_to_pca/introduction_to_pca.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/ml/introduction_to_pca/introduction_to_pca.py)
- **Code at glance:**
@include samples/python/tutorial_code/ml/introduction_to_pca/introduction_to_pca.py
@end_toggle
@note Another example using PCA for dimensionality reduction while maintaining an amount of variance can be found at [opencv_source_code/samples/cpp/pca.cpp](https://github.com/opencv/opencv/tree/master/samples/cpp/pca.cpp)
@note Another example using PCA for dimensionality reduction while maintaining an amount of variance can be found at [opencv_source_code/samples/cpp/pca.cpp](https://github.com/opencv/opencv/tree/4.x/samples/cpp/pca.cpp)
Explanation
-----------
@@ -106,7 +106,7 @@ Source Code
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp
@@ -114,7 +114,7 @@ Source Code
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ml/introduction_to_svm/IntroductionToSVMDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/ml/introduction_to_svm/IntroductionToSVMDemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/ml/introduction_to_svm/IntroductionToSVMDemo.java
@@ -122,7 +122,7 @@ Source Code
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/introduction_to_svm/introduction_to_svm.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/ml/introduction_to_svm/introduction_to_svm.py)
- **Code at glance:**
@include samples/python/tutorial_code/ml/introduction_to_svm/introduction_to_svm.py
+7 -7
View File
@@ -48,7 +48,7 @@ low light, low light values are discarded using **cv.inRange()** function.
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/video/meanshift/meanshift.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/video/meanshift/meanshift.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/video/meanshift/meanshift.cpp
@@ -56,7 +56,7 @@ low light, low light values are discarded using **cv.inRange()** function.
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/video/meanshift/meanshift.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/video/meanshift/meanshift.py)
- **Code at glance:**
@include samples/python/tutorial_code/video/meanshift/meanshift.py
@@ -64,7 +64,7 @@ low light, low light values are discarded using **cv.inRange()** function.
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/video/meanshift/MeanshiftDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/video/meanshift/MeanshiftDemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/video/meanshift/MeanshiftDemo.java
@@ -97,7 +97,7 @@ parameters (used to be passed as search window in next iteration). See the code
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/video/meanshift/camshift.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/video/meanshift/camshift.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/video/meanshift/camshift.cpp
@@ -105,7 +105,7 @@ parameters (used to be passed as search window in next iteration). See the code
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/video/meanshift/camshift.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/video/meanshift/camshift.py)
- **Code at glance:**
@include samples/python/tutorial_code/video/meanshift/camshift.py
@@ -113,7 +113,7 @@ parameters (used to be passed as search window in next iteration). See the code
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/video/meanshift/CamshiftDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/video/meanshift/CamshiftDemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/video/meanshift/CamshiftDemo.java
@@ -135,5 +135,5 @@ Additional Resources
Exercises
---------
-# OpenCV comes with a Python [sample](https://github.com/opencv/opencv/blob/master/samples/python/camshift.py) for an interactive demo of camshift. Use it, hack it, understand
-# OpenCV comes with a Python [sample](https://github.com/opencv/opencv/blob/4.x/samples/python/camshift.py) for an interactive demo of camshift. Use it, hack it, understand
it.
@@ -97,11 +97,11 @@ Source Code
-----------
You may also find the source code in `samples/cpp/tutorial_code/ml/non_linear_svms` folder of the OpenCV source library or
[download it from here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp).
[download it from here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp).
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp
@@ -109,7 +109,7 @@ You may also find the source code in `samples/cpp/tutorial_code/ml/non_linear_sv
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ml/non_linear_svms/NonLinearSVMsDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/ml/non_linear_svms/NonLinearSVMsDemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/ml/non_linear_svms/NonLinearSVMsDemo.java
@@ -117,7 +117,7 @@ You may also find the source code in `samples/cpp/tutorial_code/ml/non_linear_sv
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/non_linear_svms/non_linear_svms.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/ml/non_linear_svms/non_linear_svms.py)
- **Code at glance:**
@include samples/python/tutorial_code/ml/non_linear_svms/non_linear_svms.py
+6 -6
View File
@@ -100,7 +100,7 @@ below:
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/video/optical_flow/optical_flow.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/video/optical_flow/optical_flow.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/video/optical_flow/optical_flow.cpp
@@ -108,7 +108,7 @@ below:
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/video/optical_flow/optical_flow.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/video/optical_flow/optical_flow.py)
- **Code at glance:**
@include samples/python/tutorial_code/video/optical_flow/optical_flow.py
@@ -117,7 +117,7 @@ below:
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/video/optical_flow/OpticalFlowDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/video/optical_flow/OpticalFlowDemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/video/optical_flow/OpticalFlowDemo.java
@@ -150,7 +150,7 @@ corresponds to Value plane. See the code below:
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/video/optical_flow/optical_flow_dense.cpp)
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/video/optical_flow/optical_flow_dense.cpp)
- **Code at glance:**
@include samples/cpp/tutorial_code/video/optical_flow/optical_flow_dense.cpp
@@ -158,7 +158,7 @@ corresponds to Value plane. See the code below:
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/video/optical_flow/optical_flow_dense.py)
[here](https://github.com/opencv/opencv/tree/4.x/samples/python/tutorial_code/video/optical_flow/optical_flow_dense.py)
- **Code at glance:**
@include samples/python/tutorial_code/video/optical_flow/optical_flow_dense.py
@@ -167,7 +167,7 @@ corresponds to Value plane. See the code below:
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/video/optical_flow/OpticalFlowDenseDemo.java)
[here](https://github.com/opencv/opencv/tree/4.x/samples/java/tutorial_code/video/optical_flow/OpticalFlowDenseDemo.java)
- **Code at glance:**
@include samples/java/tutorial_code/video/optical_flow/OpticalFlowDenseDemo.java
+4 -4
View File
@@ -25,7 +25,7 @@ Code
----
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/stitching.cpp).
[here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/stitching.cpp).
@include samples/cpp/stitching.cpp
@@ -114,11 +114,11 @@ configuration you can use stitching_detailed source code available in C++ or pyt
<H4>stitching_detailed</H4>
@add_toggle_cpp
[stitching_detailed.cpp](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/stitching_detailed.cpp)
[stitching_detailed.cpp](https://raw.githubusercontent.com/opencv/opencv/4.x/samples/cpp/stitching_detailed.cpp)
@end_toggle
@add_toggle_python
[stitching_detailed.py](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/stitching_detailed.py)
[stitching_detailed.py](https://raw.githubusercontent.com/opencv/opencv/4.x/samples/python/stitching_detailed.py)
@end_toggle
stitching_detailed program uses command line to get stitching parameter. Many parameters exists. Above examples shows some command line parameters possible :
@@ -165,4 +165,4 @@ newspaper1.jpg newspaper2.jpg --work_megapix 0.6 --features surf --matcher affin
![](images/affinepano.jpg)
You can find all images in https://github.com/opencv/opencv_extra/tree/master/testdata/stitching
You can find all images in https://github.com/opencv/opencv_extra/tree/4.x/testdata/stitching
+1 -1
View File
@@ -11,7 +11,7 @@ Introduction
Working with a boosted cascade of weak classifiers includes two major stages: the training and the detection stage. The detection stage using either HAAR or LBP based models, is described in the @ref tutorial_cascade_classifier "object detection tutorial". This documentation gives an overview of the functionality needed to train your own boosted cascade of weak classifiers. The current guide will walk through all the different stages: collecting training data, preparation of the training data and executing the actual model training.
To support this tutorial, several official OpenCV applications will be used: [opencv_createsamples](https://github.com/opencv/opencv/tree/master/apps/createsamples), [opencv_annotation](https://github.com/opencv/opencv/tree/master/apps/annotation), [opencv_traincascade](https://github.com/opencv/opencv/tree/master/apps/traincascade) and [opencv_visualisation](https://github.com/opencv/opencv/tree/master/apps/visualisation).
To support this tutorial, several official OpenCV applications will be used: [opencv_createsamples](https://github.com/opencv/opencv/tree/4.x/apps/createsamples), [opencv_annotation](https://github.com/opencv/opencv/tree/4.x/apps/annotation), [opencv_traincascade](https://github.com/opencv/opencv/tree/4.x/apps/traincascade) and [opencv_visualisation](https://github.com/opencv/opencv/tree/4.x/apps/visualisation).
@note Createsamples and traincascade are disabled since OpenCV 4.0. Consider using these apps for training from 3.4 branch for Cascade Classifier. Model format is the same between 3.4 and 4.x.