From c78a8dfd2db92b3acd37afeed3eca635fcd12fe6 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 22 Dec 2021 13:01:26 +0000 Subject: [PATCH] fix 4.x links --- README.md | 2 +- .../opencv_stitching/blender.py | 4 ++-- .../opencv_stitching/camera_adjuster.py | 2 +- .../opencv_stitching/camera_wave_corrector.py | 2 +- .../exposure_error_compensator.py | 4 ++-- .../opencv_stitching/feature_matcher.py | 6 +++--- .../opencv_stitching/seam_finder.py | 4 ++-- .../test/SAMPLE_IMAGES_TO_DOWNLOAD.txt | 2 +- .../test/stitching_detailed.py | 2 +- .../opencv_stitching/timelapser.py | 2 +- .../opencv_stitching/warper.py | 2 +- .../js_assets/js_image_classification.html | 2 +- .../js_image_classification_model_info.json | 10 +++++----- ...js_image_classification_webnn_polyfill.html | 2 +- .../js_image_classification_with_camera.html | 2 +- .../js_assets/js_object_detection.html | 2 +- .../js_object_detection_model_info.json | 6 +++--- .../js_object_detection_with_camera.html | 2 +- ...js_image_classification_webnn_electron.html | 2 +- .../js_setup/js_nodejs/js_nodejs.markdown | 2 +- .../js_setup/js_usage/js_usage.markdown | 4 +++- .../py_svm_opencv/py_svm_opencv.markdown | 2 +- doc/tutorials/app/intelperc.markdown | 2 +- doc/tutorials/app/kinect_openni.markdown | 2 +- doc/tutorials/app/orbbec_astra.markdown | 2 +- doc/tutorials/app/trackbar.markdown | 6 +++--- .../app/video_input_psnr_ssim.markdown | 4 ++-- doc/tutorials/app/video_write.markdown | 2 +- .../camera_calibration.markdown | 6 +++--- .../camera_calibration_pattern.markdown | 6 +++--- .../interactive_calibration.markdown | 2 +- .../core/adding_images/adding_images.markdown | 8 ++++---- .../basic_linear_transform.markdown | 12 ++++++------ .../discrete_fourier_transform.markdown | 8 ++++---- .../file_input_output_with_xml_yml.markdown | 4 ++-- .../how_to_scan_images.markdown | 2 +- .../how_to_use_OpenCV_parallel_for_.markdown | 4 ++-- .../mat_mask_operations.markdown | 6 +++--- .../mat_the_basic_image_container.markdown | 2 +- .../core/univ_intrin/univ_intrin.markdown | 2 +- doc/tutorials/dnn/dnn_OCR/dnn_OCR.markdown | 2 +- .../dnn/dnn_custom_layers/dnn_custom_layers.md | 2 +- doc/tutorials/dnn/dnn_face/dnn_face.markdown | 4 ++-- .../dnn/dnn_googlenet/dnn_googlenet.markdown | 6 +++--- .../dnn_halide_scheduling.markdown | 2 +- .../pytorch_cls_model_conversion_c_tutorial.md | 4 ++-- .../pytorch_cls_model_conversion_tutorial.md | 10 +++++----- .../tf_cls_model_conversion_tutorial.md | 8 ++++---- .../tf_det_model_conversion_tutorial.md | 6 +++--- ...torch_sem_segm_model_conversion_tutorial.md | 4 ++-- .../tf_sem_segm_model_conversion_tutorial.md | 4 ++-- .../dnn_text_spotting.markdown | 10 +++++----- doc/tutorials/dnn/dnn_yolo/dnn_yolo.markdown | 4 ++-- .../akaze_matching/akaze_matching.markdown | 6 +++--- .../feature_description.markdown | 6 +++--- .../feature_detection.markdown | 6 +++--- .../feature_flann_matcher.markdown | 6 +++--- .../feature_homography.markdown | 6 +++--- .../features2d/homography/homography.markdown | 8 ++++---- .../corner_subpixels/corner_subpixels.markdown | 6 +++--- .../generic_corner_detector.markdown | 6 +++--- .../good_features_to_track.markdown | 6 +++--- .../harris_detector/harris_detector.markdown | 6 +++--- .../gpu_basics_similarity.markdown | 2 +- .../basic_geometric_drawing.markdown | 6 +++--- .../erosion_dilatation.markdown | 8 ++++---- ...usian_median_blur_bilateral_filter.markdown | 8 ++++---- .../back_projection/back_projection.markdown | 18 +++++++++--------- .../histogram_calculation.markdown | 6 +++--- .../histogram_comparison.markdown | 6 +++--- .../histogram_equalization.markdown | 6 +++--- .../template_matching.markdown | 6 +++--- .../imgproc/hitOrMiss/hitOrMiss.markdown | 6 +++--- .../canny_detector/canny_detector.markdown | 6 +++--- .../copyMakeBorder/copyMakeBorder.markdown | 6 +++--- .../distance_transform.markdown | 6 +++--- .../imgtrans/filter_2d/filter_2d.markdown | 6 +++--- .../hough_circle/hough_circle.markdown | 10 +++++----- .../imgtrans/hough_lines/hough_lines.markdown | 10 +++++----- .../laplace_operator/laplace_operator.markdown | 6 +++--- .../imgproc/imgtrans/remap/remap.markdown | 6 +++--- .../sobel_derivatives.markdown | 6 +++--- .../imgtrans/warp_affine/warp_affine.markdown | 6 +++--- .../morph_lines_detection.md | 8 ++++---- .../opening_closing_hats.markdown | 6 +++--- .../imgproc/pyramids/pyramids.markdown | 8 ++++---- .../random_generator_and_text.markdown | 2 +- .../bounding_rects_circles.markdown | 6 +++--- .../bounding_rotated_ellipses.markdown | 6 +++--- .../find_contours/find_contours.markdown | 6 +++--- .../shapedescriptors/hull/hull.markdown | 6 +++--- .../shapedescriptors/moments/moments.markdown | 6 +++--- .../point_polygon_test.markdown | 6 +++--- .../imgproc/threshold/threshold.markdown | 6 +++--- .../threshold_inRange.markdown | 6 +++--- .../android_binary_package/O4A_SDK.markdown | 2 +- .../android_ocl_intro.markdown | 4 ++-- .../clojure_dev_intro.markdown | 2 +- .../config_reference/config_reference.markdown | 2 +- .../display_image/display_image.markdown | 4 ++-- .../windows_visual_studio_opencv.markdown | 4 ++-- .../others/background_subtraction.markdown | 6 +++--- .../others/cascade_classifier.markdown | 8 ++++---- doc/tutorials/others/hdr_imaging.markdown | 8 ++++---- .../others/introduction_to_pca.markdown | 8 ++++---- .../others/introduction_to_svm.markdown | 6 +++--- doc/tutorials/others/meanshift.markdown | 14 +++++++------- doc/tutorials/others/non_linear_svms.markdown | 8 ++++---- doc/tutorials/others/optical_flow.markdown | 12 ++++++------ doc/tutorials/others/stitcher.markdown | 8 ++++---- doc/tutorials/others/traincascade.markdown | 2 +- modules/core/doc/cuda.markdown | 2 +- .../include/opencv2/core/simd_intrinsics.hpp | 2 +- modules/dnn/misc/quantize_face_detector.py | 2 +- .../dnn/test/imagenet_cls_test_inception.py | 2 +- modules/dnn/test/pascal_semsegm_test_fcn.py | 4 ++-- .../objdetect/include/opencv2/objdetect.hpp | 2 +- modules/python/test/tests_common.py | 2 +- platforms/readme.txt | 2 +- .../CameraCalibrationActivity.java | 4 ++-- samples/cpp/detect_blob.cpp | 2 +- samples/cpp/facial_features.cpp | 4 ++-- samples/cpp/mask_tmpl.cpp | 2 +- samples/cpp/matchmethod_orb_akaze_brisk.cpp | 10 +++++----- samples/dnn/README.md | 12 ++++++------ samples/dnn/js_face_recognition.html | 2 +- samples/dnn/openpose.cpp | 4 ++-- samples/install/linux_install_a.sh | 4 ++-- samples/install/linux_install_b.sh | 2 +- samples/install/linux_quick_install.sh | 4 ++-- samples/install/linux_quick_install_contrib.sh | 6 +++--- samples/python/stitching_detailed.py | 2 +- samples/semihosting/histogram/histogram.cpp | 2 +- samples/semihosting/norm/norm.cpp | 2 +- 134 files changed, 334 insertions(+), 332 deletions(-) diff --git a/README.md b/README.md index b9897205ba..c6263728aa 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ * Homepage: * Courses: -* Docs: +* Docs: * Q&A forum: * previous forum (read only): * Issue tracking: diff --git a/apps/opencv_stitching_tool/opencv_stitching/blender.py b/apps/opencv_stitching_tool/opencv_stitching/blender.py index 04e6efe528..886aef67ef 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/blender.py +++ b/apps/opencv_stitching_tool/opencv_stitching/blender.py @@ -36,11 +36,11 @@ class Blender: self.blender.prepare(dst_sz) def feed(self, img, mask, corner): - """https://docs.opencv.org/master/d6/d4a/classcv_1_1detail_1_1Blender.html#a64837308bcf4e414a6219beff6cbe37a""" # noqa + """https://docs.opencv.org/4.x/d6/d4a/classcv_1_1detail_1_1Blender.html#a64837308bcf4e414a6219beff6cbe37a""" # noqa self.blender.feed(cv.UMat(img.astype(np.int16)), mask, corner) def blend(self): - """https://docs.opencv.org/master/d6/d4a/classcv_1_1detail_1_1Blender.html#aa0a91ce0d6046d3a63e0123cbb1b5c00""" # noqa + """https://docs.opencv.org/4.x/d6/d4a/classcv_1_1detail_1_1Blender.html#aa0a91ce0d6046d3a63e0123cbb1b5c00""" # noqa result = None result_mask = None result, result_mask = self.blender.blend(result, result_mask) diff --git a/apps/opencv_stitching_tool/opencv_stitching/camera_adjuster.py b/apps/opencv_stitching_tool/opencv_stitching/camera_adjuster.py index 03aa834d31..684fd3d4fa 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/camera_adjuster.py +++ b/apps/opencv_stitching_tool/opencv_stitching/camera_adjuster.py @@ -6,7 +6,7 @@ from .stitching_error import StitchingError class CameraAdjuster: - """https://docs.opencv.org/master/d5/d56/classcv_1_1detail_1_1BundleAdjusterBase.html""" # noqa + """https://docs.opencv.org/4.x/d5/d56/classcv_1_1detail_1_1BundleAdjusterBase.html""" # noqa CAMERA_ADJUSTER_CHOICES = OrderedDict() CAMERA_ADJUSTER_CHOICES['ray'] = cv.detail_BundleAdjusterRay diff --git a/apps/opencv_stitching_tool/opencv_stitching/camera_wave_corrector.py b/apps/opencv_stitching_tool/opencv_stitching/camera_wave_corrector.py index 6a9142d7f5..97b821b955 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/camera_wave_corrector.py +++ b/apps/opencv_stitching_tool/opencv_stitching/camera_wave_corrector.py @@ -4,7 +4,7 @@ import numpy as np class WaveCorrector: - """https://docs.opencv.org/master/d7/d74/group__stitching__rotation.html#ga83b24d4c3e93584986a56d9e43b9cf7f""" # noqa + """https://docs.opencv.org/4.x/d7/d74/group__stitching__rotation.html#ga83b24d4c3e93584986a56d9e43b9cf7f""" # noqa WAVE_CORRECT_CHOICES = OrderedDict() WAVE_CORRECT_CHOICES['horiz'] = cv.detail.WAVE_CORRECT_HORIZ WAVE_CORRECT_CHOICES['vert'] = cv.detail.WAVE_CORRECT_VERT diff --git a/apps/opencv_stitching_tool/opencv_stitching/exposure_error_compensator.py b/apps/opencv_stitching_tool/opencv_stitching/exposure_error_compensator.py index 36e0292091..f28fd83f14 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/exposure_error_compensator.py +++ b/apps/opencv_stitching_tool/opencv_stitching/exposure_error_compensator.py @@ -32,9 +32,9 @@ class ExposureErrorCompensator: ) def feed(self, *args): - """https://docs.opencv.org/master/d2/d37/classcv_1_1detail_1_1ExposureCompensator.html#ae6b0cc69a7bc53818ddea53eddb6bdba""" # noqa + """https://docs.opencv.org/4.x/d2/d37/classcv_1_1detail_1_1ExposureCompensator.html#ae6b0cc69a7bc53818ddea53eddb6bdba""" # noqa self.compensator.feed(*args) def apply(self, *args): - """https://docs.opencv.org/master/d2/d37/classcv_1_1detail_1_1ExposureCompensator.html#a473eaf1e585804c08d77c91e004f93aa""" # noqa + """https://docs.opencv.org/4.x/d2/d37/classcv_1_1detail_1_1ExposureCompensator.html#a473eaf1e585804c08d77c91e004f93aa""" # noqa return self.compensator.apply(*args) diff --git a/apps/opencv_stitching_tool/opencv_stitching/feature_matcher.py b/apps/opencv_stitching_tool/opencv_stitching/feature_matcher.py index 8c1d384b7b..f2c7183e25 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/feature_matcher.py +++ b/apps/opencv_stitching_tool/opencv_stitching/feature_matcher.py @@ -15,13 +15,13 @@ class FeatureMatcher: **kwargs): if matcher_type == "affine": - """https://docs.opencv.org/master/d3/dda/classcv_1_1detail_1_1AffineBestOf2NearestMatcher.html""" # noqa + """https://docs.opencv.org/4.x/d3/dda/classcv_1_1detail_1_1AffineBestOf2NearestMatcher.html""" # noqa self.matcher = cv.detail_AffineBestOf2NearestMatcher(**kwargs) elif range_width == -1: - """https://docs.opencv.org/master/d4/d26/classcv_1_1detail_1_1BestOf2NearestMatcher.html""" # noqa + """https://docs.opencv.org/4.x/d4/d26/classcv_1_1detail_1_1BestOf2NearestMatcher.html""" # noqa self.matcher = cv.detail.BestOf2NearestMatcher_create(**kwargs) else: - """https://docs.opencv.org/master/d8/d72/classcv_1_1detail_1_1BestOf2NearestRangeMatcher.html""" # noqa + """https://docs.opencv.org/4.x/d8/d72/classcv_1_1detail_1_1BestOf2NearestRangeMatcher.html""" # noqa self.matcher = cv.detail.BestOf2NearestRangeMatcher_create( range_width, **kwargs ) diff --git a/apps/opencv_stitching_tool/opencv_stitching/seam_finder.py b/apps/opencv_stitching_tool/opencv_stitching/seam_finder.py index 675f266d02..edf1ed6624 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/seam_finder.py +++ b/apps/opencv_stitching_tool/opencv_stitching/seam_finder.py @@ -6,7 +6,7 @@ from .blender import Blender class SeamFinder: - """https://docs.opencv.org/master/d7/d09/classcv_1_1detail_1_1SeamFinder.html""" # noqa + """https://docs.opencv.org/4.x/d7/d09/classcv_1_1detail_1_1SeamFinder.html""" # noqa SEAM_FINDER_CHOICES = OrderedDict() SEAM_FINDER_CHOICES['dp_color'] = cv.detail_DpSeamFinder('COLOR') SEAM_FINDER_CHOICES['dp_colorgrad'] = cv.detail_DpSeamFinder('COLOR_GRAD') @@ -19,7 +19,7 @@ class SeamFinder: self.finder = SeamFinder.SEAM_FINDER_CHOICES[finder] def find(self, imgs, corners, masks): - """https://docs.opencv.org/master/d0/dd5/classcv_1_1detail_1_1DpSeamFinder.html#a7914624907986f7a94dd424209a8a609""" # noqa + """https://docs.opencv.org/4.x/d0/dd5/classcv_1_1detail_1_1DpSeamFinder.html#a7914624907986f7a94dd424209a8a609""" # noqa imgs_float = [img.astype(np.float32) for img in imgs] return self.finder.find(imgs_float, corners, masks) diff --git a/apps/opencv_stitching_tool/opencv_stitching/test/SAMPLE_IMAGES_TO_DOWNLOAD.txt b/apps/opencv_stitching_tool/opencv_stitching/test/SAMPLE_IMAGES_TO_DOWNLOAD.txt index cecf3b8ba7..236d3607de 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/test/SAMPLE_IMAGES_TO_DOWNLOAD.txt +++ b/apps/opencv_stitching_tool/opencv_stitching/test/SAMPLE_IMAGES_TO_DOWNLOAD.txt @@ -1,4 +1,4 @@ -https://github.com/opencv/opencv_extra/tree/master/testdata/stitching +https://github.com/opencv/opencv_extra/tree/4.x/testdata/stitching s1.jpg s2.jpg boat1.jpg boat2.jpg boat3.jpg boat4.jpg boat5.jpg boat6.jpg diff --git a/apps/opencv_stitching_tool/opencv_stitching/test/stitching_detailed.py b/apps/opencv_stitching_tool/opencv_stitching/test/stitching_detailed.py index b12210de66..ef9d78fe73 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/test/stitching_detailed.py +++ b/apps/opencv_stitching_tool/opencv_stitching/test/stitching_detailed.py @@ -317,7 +317,7 @@ def main(): sizes = [] blender = None timelapser = None - # https://github.com/opencv/opencv/blob/master/samples/cpp/stitching_detailed.cpp#L725 ? + # https://github.com/opencv/opencv/blob/4.x/samples/cpp/stitching_detailed.cpp#L725 ? for idx, name in enumerate(img_names): full_img = cv.imread(name) if not is_compose_scale_set: diff --git a/apps/opencv_stitching_tool/opencv_stitching/timelapser.py b/apps/opencv_stitching_tool/opencv_stitching/timelapser.py index 4085f473fa..894294bd42 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/timelapser.py +++ b/apps/opencv_stitching_tool/opencv_stitching/timelapser.py @@ -26,7 +26,7 @@ class Timelapser: ) def initialize(self, *args): - """https://docs.opencv.org/master/dd/dac/classcv_1_1detail_1_1Timelapser.html#aaf0f7c4128009f02473332a0c41f6345""" # noqa + """https://docs.opencv.org/4.x/dd/dac/classcv_1_1detail_1_1Timelapser.html#aaf0f7c4128009f02473332a0c41f6345""" # noqa self.timelapser.initialize(*args) def process_and_save_frame(self, img_name, img, corner): diff --git a/apps/opencv_stitching_tool/opencv_stitching/warper.py b/apps/opencv_stitching_tool/opencv_stitching/warper.py index c31a8648c0..e21521d109 100644 --- a/apps/opencv_stitching_tool/opencv_stitching/warper.py +++ b/apps/opencv_stitching_tool/opencv_stitching/warper.py @@ -55,7 +55,7 @@ class Warper: def update_scale(self, scale): if scale is not None and scale != self.scale: - self.warper = cv.PyRotationWarper(self.warper_type, scale) # setScale not working: https://docs.opencv.org/master/d5/d76/classcv_1_1PyRotationWarper.html#a90b000bb75f95294f9b0b6ec9859eb55 + self.warper = cv.PyRotationWarper(self.warper_type, scale) # setScale not working: https://docs.opencv.org/4.x/d5/d76/classcv_1_1PyRotationWarper.html#a90b000bb75f95294f9b0b6ec9859eb55 self.scale = scale @staticmethod diff --git a/doc/js_tutorials/js_assets/js_image_classification.html b/doc/js_tutorials/js_assets/js_image_classification.html index 656f2720b6..c345a9e4c4 100644 --- a/doc/js_tutorials/js_assets/js_image_classification.html +++ b/doc/js_tutorials/js_assets/js_image_classification.html @@ -116,7 +116,7 @@ swapRB = false; needSoftmax = false; // url for label file, can from local or Internet -labelsUrl = "https://raw.githubusercontent.com/opencv/opencv/master/samples/data/dnn/classification_classes_ILSVRC2012.txt"; +labelsUrl = "https://raw.githubusercontent.com/opencv/opencv/4.x/samples/data/dnn/classification_classes_ILSVRC2012.txt";