From 5967acc9ca4ebb4d09dcbf4bc6a5f46178e5db32 Mon Sep 17 00:00:00 2001 From: shioko Date: Sun, 17 Jan 2021 18:59:20 +0000 Subject: [PATCH 1/6] fix typo of the word storage --- modules/highgui/src/window_w32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index b19f73668047..b61284dc96c7 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -236,7 +236,7 @@ CV_IMPL int cvInitSystem( int, char** ) // check initialization status if( !wasInitialized ) { - // Initialize the stogare + // Initialize the storage hg_windows = 0; // Register the class From 212815a10d1a8d9e14cd2a6372a2d4be0fd7769f Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 15 Jan 2021 17:58:57 +0000 Subject: [PATCH 2/6] core(ocl): fix lifetime handling of Image kernel args --- modules/core/src/ocl.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index bfdd3bba6deb..54192efd3aa5 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -2802,16 +2802,24 @@ struct Kernel::Impl haveTempSrcUMats = true; // UMat is created on RAW memory (without proper lifetime management, even from Mat) } - void addImage(const Image2D& image) + /// Preserve image lifetime (while it is specified as Kernel argument) + void registerImageArgument(int arg, const Image2D& image) { - images.push_back(image); + CV_CheckGE(arg, 0, ""); + CV_CheckLT(arg, (int)MAX_ARRS, ""); + if (arg < (int)shadow_images.size() && shadow_images[arg].ptr() != image.ptr()) // TODO future: replace ptr => impl (more strong check) + { + CV_Check(arg, !isInProgress, "ocl::Kernel: clearing of pending Image2D arguments is not allowed"); + } + shadow_images.reserve(MAX_ARRS); + shadow_images.resize(std::max(shadow_images.size(), (size_t)arg + 1)); + shadow_images[arg] = image; } void finit(cl_event e) { CV_UNUSED(e); cleanupUMats(); - images.clear(); isInProgress = false; release(); } @@ -2836,7 +2844,7 @@ struct Kernel::Impl bool isInProgress; bool isAsyncRun; // true if kernel was scheduled in async mode int nu; - std::list images; + std::vector shadow_images; bool haveTempDstUMats; bool haveTempSrcUMats; }; @@ -2978,9 +2986,11 @@ int Kernel::set(int i, const void* value, size_t sz) int Kernel::set(int i, const Image2D& image2D) { - p->addImage(image2D); cl_mem h = (cl_mem)image2D.ptr(); - return set(i, &h, sizeof(h)); + int res = set(i, &h, sizeof(h)); + if (res >= 0) + p->registerImageArgument(i, image2D); + return res; } int Kernel::set(int i, const UMat& m) From 321f26f450980d2cd2f417bca686cecad299ab52 Mon Sep 17 00:00:00 2001 From: kyshel <11898075+kyshel@users.noreply.github.com> Date: Sat, 16 Jan 2021 23:40:02 +0800 Subject: [PATCH 3/6] update xrange() to range() update xrange() to range() as Python 2 has been deprecate, more info: 1. Python 2 has been no longer supported officially since January 1, 2020. Check https://www.python.org/doc/sunset-python-2/ 2. xrange() was renamed to range() in Python 3. Check https://stackoverflow.com/questions/17192158/nameerror-global-name-xrange-is-not-defined-in-python-3/17192181#17192181 update xrange() to range() Update py_fourier_transform.markdown update xrange() to range() --- .../py_imgproc/py_pyramids/py_pyramids.markdown | 10 +++++----- .../py_thresholding/py_thresholding.markdown | 8 ++++---- .../py_fourier_transform/py_fourier_transform.markdown | 2 +- .../py_non_local_means/py_non_local_means.markdown | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/py_tutorials/py_imgproc/py_pyramids/py_pyramids.markdown b/doc/py_tutorials/py_imgproc/py_pyramids/py_pyramids.markdown index bb31bab107ba..63fde0a130bf 100644 --- a/doc/py_tutorials/py_imgproc/py_pyramids/py_pyramids.markdown +++ b/doc/py_tutorials/py_imgproc/py_pyramids/py_pyramids.markdown @@ -88,27 +88,27 @@ B = cv.imread('orange.jpg') # generate Gaussian pyramid for A G = A.copy() gpA = [G] -for i in xrange(6): +for i in range(6): G = cv.pyrDown(G) gpA.append(G) # generate Gaussian pyramid for B G = B.copy() gpB = [G] -for i in xrange(6): +for i in range(6): G = cv.pyrDown(G) gpB.append(G) # generate Laplacian Pyramid for A lpA = [gpA[5]] -for i in xrange(5,0,-1): +for i in range(5,0,-1): GE = cv.pyrUp(gpA[i]) L = cv.subtract(gpA[i-1],GE) lpA.append(L) # generate Laplacian Pyramid for B lpB = [gpB[5]] -for i in xrange(5,0,-1): +for i in range(5,0,-1): GE = cv.pyrUp(gpB[i]) L = cv.subtract(gpB[i-1],GE) lpB.append(L) @@ -122,7 +122,7 @@ for la,lb in zip(lpA,lpB): # now reconstruct ls_ = LS[0] -for i in xrange(1,6): +for i in range(1,6): ls_ = cv.pyrUp(ls_) ls_ = cv.add(ls_, LS[i]) diff --git a/doc/py_tutorials/py_imgproc/py_thresholding/py_thresholding.markdown b/doc/py_tutorials/py_imgproc/py_thresholding/py_thresholding.markdown index 05400988506e..f52e9c5db6a9 100644 --- a/doc/py_tutorials/py_imgproc/py_thresholding/py_thresholding.markdown +++ b/doc/py_tutorials/py_imgproc/py_thresholding/py_thresholding.markdown @@ -47,7 +47,7 @@ ret,thresh5 = cv.threshold(img,127,255,cv.THRESH_TOZERO_INV) titles = ['Original Image','BINARY','BINARY_INV','TRUNC','TOZERO','TOZERO_INV'] images = [img, thresh1, thresh2, thresh3, thresh4, thresh5] -for i in xrange(6): +for i in range(6): plt.subplot(2,3,i+1),plt.imshow(images[i],'gray',vmin=0,vmax=255) plt.title(titles[i]) plt.xticks([]),plt.yticks([]) @@ -98,7 +98,7 @@ titles = ['Original Image', 'Global Thresholding (v = 127)', 'Adaptive Mean Thresholding', 'Adaptive Gaussian Thresholding'] images = [img, th1, th2, th3] -for i in xrange(4): +for i in range(4): plt.subplot(2,2,i+1),plt.imshow(images[i],'gray') plt.title(titles[i]) plt.xticks([]),plt.yticks([]) @@ -153,7 +153,7 @@ titles = ['Original Noisy Image','Histogram','Global Thresholding (v=127)', 'Original Noisy Image','Histogram',"Otsu's Thresholding", 'Gaussian filtered Image','Histogram',"Otsu's Thresholding"] -for i in xrange(3): +for i in range(3): plt.subplot(3,3,i*3+1),plt.imshow(images[i*3],'gray') plt.title(titles[i*3]), plt.xticks([]), plt.yticks([]) plt.subplot(3,3,i*3+2),plt.hist(images[i*3].ravel(),256) @@ -196,7 +196,7 @@ bins = np.arange(256) fn_min = np.inf thresh = -1 -for i in xrange(1,256): +for i in range(1,256): p1,p2 = np.hsplit(hist_norm,[i]) # probabilities q1,q2 = Q[i],Q[255]-Q[i] # cum sum of classes if q1 < 1.e-6 or q2 < 1.e-6: diff --git a/doc/py_tutorials/py_imgproc/py_transforms/py_fourier_transform/py_fourier_transform.markdown b/doc/py_tutorials/py_imgproc/py_transforms/py_fourier_transform/py_fourier_transform.markdown index 44b08d53ab66..6c4533a1b0d9 100644 --- a/doc/py_tutorials/py_imgproc/py_transforms/py_fourier_transform/py_fourier_transform.markdown +++ b/doc/py_tutorials/py_imgproc/py_transforms/py_fourier_transform/py_fourier_transform.markdown @@ -268,7 +268,7 @@ fft_filters = [np.fft.fft2(x) for x in filters] fft_shift = [np.fft.fftshift(y) for y in fft_filters] mag_spectrum = [np.log(np.abs(z)+1) for z in fft_shift] -for i in xrange(6): +for i in range(6): plt.subplot(2,3,i+1),plt.imshow(mag_spectrum[i],cmap = 'gray') plt.title(filter_name[i]), plt.xticks([]), plt.yticks([]) diff --git a/doc/py_tutorials/py_photo/py_non_local_means/py_non_local_means.markdown b/doc/py_tutorials/py_photo/py_non_local_means/py_non_local_means.markdown index 3f56a4841b83..94e57d4d6e41 100644 --- a/doc/py_tutorials/py_photo/py_non_local_means/py_non_local_means.markdown +++ b/doc/py_tutorials/py_photo/py_non_local_means/py_non_local_means.markdown @@ -108,7 +108,7 @@ from matplotlib import pyplot as plt cap = cv.VideoCapture('vtest.avi') # create a list of first 5 frames -img = [cap.read()[1] for i in xrange(5)] +img = [cap.read()[1] for i in range(5)] # convert all to grayscale gray = [cv.cvtColor(i, cv.COLOR_BGR2GRAY) for i in img] From a0bdb78a996bb6fa090ab1d42a623f7ea862f7dc Mon Sep 17 00:00:00 2001 From: Vadim Levin Date: Tue, 12 Jan 2021 17:50:07 +0300 Subject: [PATCH 4/6] feat: add overload resolution exception for Python bindings --- .../include/opencv2/core/bindings_utils.hpp | 14 +++ modules/python/src2/cv2.cpp | 114 ++++++++++++++++++ modules/python/src2/gen2.py | 16 ++- modules/python/test/test_misc.py | 38 ++++++ 4 files changed, 180 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/bindings_utils.hpp b/modules/core/include/opencv2/core/bindings_utils.hpp index 92f27f0e8746..5c8df7a52ba8 100644 --- a/modules/core/include/opencv2/core/bindings_utils.hpp +++ b/modules/core/include/opencv2/core/bindings_utils.hpp @@ -64,6 +64,20 @@ String dumpString(const String& argument) return cv::format("String: %s", argument.c_str()); } +CV_WRAP static inline +String testOverloadResolution(int value, const Point& point = Point(42, 24)) +{ + return format("overload (int=%d, point=(x=%d, y=%d))", value, point.x, + point.y); +} + +CV_WRAP static inline +String testOverloadResolution(const Rect& rect) +{ + return format("overload (rect=(x=%d, y=%d, w=%d, h=%d))", rect.x, rect.y, + rect.width, rect.height); +} + CV_WRAP static inline AsyncArray testAsyncArray(InputArray argument) { diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index d5ecd0e20a98..0a986c1a44b5 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -33,6 +33,7 @@ #include "opencv2/core/utils/configuration.private.hpp" #include "opencv2/core/utils/logger.hpp" +#include "opencv2/core/utils/tls.hpp" #include "pyopencv_generated_include.h" #include "opencv2/core/types_c.h" @@ -138,6 +139,51 @@ class PyEnsureGIL PyGILState_STATE _state; }; +/** + * Light weight RAII wrapper for `PyObject*` owning references. + * In comparisson to C++11 `std::unique_ptr` with custom deleter, it provides + * implicit conversion functions that might be useful to initialize it with + * Python functions those returns owning references through the `PyObject**` + * e.g. `PyErr_Fetch` or directly pass it to functions those want to borrow + * reference to object (doesn't extend object lifetime) e.g. `PyObject_Str`. + */ +class PySafeObject +{ +public: + PySafeObject() : obj_(NULL) {} + + explicit PySafeObject(PyObject* obj) : obj_(obj) {} + + ~PySafeObject() + { + Py_CLEAR(obj_); + } + + operator PyObject*() + { + return obj_; + } + + operator PyObject**() + { + return &obj_; + } + + PyObject* release() + { + PyObject* obj = obj_; + obj_ = NULL; + return obj; + } + +private: + PyObject* obj_; + + // Explicitly disable copy operations + PySafeObject(const PySafeObject*); // = delete + PySafeObject& operator=(const PySafeObject&); // = delete +}; + static void pyRaiseCVException(const cv::Exception &e) { PyObject_SetAttrString(opencv_error, "file", PyString_FromString(e.file.c_str())); @@ -290,6 +336,74 @@ bool parseNumpyScalar(PyObject* obj, T& value) return false; } +TLSData > conversionErrorsTLS; + +inline void pyPrepareArgumentConversionErrorsStorage(std::size_t size) +{ + std::vector& conversionErrors = conversionErrorsTLS.getRef(); + conversionErrors.clear(); + conversionErrors.reserve(size); +} + +void pyRaiseCVOverloadException(const std::string& functionName) +{ + const std::vector& conversionErrors = conversionErrorsTLS.getRef(); + const std::size_t conversionErrorsCount = conversionErrors.size(); + if (conversionErrorsCount > 0) + { + // In modern std libraries small string optimization is used = no dynamic memory allocations, + // but it can be applied only for string with length < 18 symbols (in GCC) + const std::string bullet = "\n - "; + + // Estimate required buffer size - save dynamic memory allocations = faster + std::size_t requiredBufferSize = bullet.size() * conversionErrorsCount; + for (std::size_t i = 0; i < conversionErrorsCount; ++i) + { + requiredBufferSize += conversionErrors[i].size(); + } + + // Only string concatenation is required so std::string is way faster than + // std::ostringstream + std::string errorMessage("Overload resolution failed:"); + errorMessage.reserve(errorMessage.size() + requiredBufferSize); + for (std::size_t i = 0; i < conversionErrorsCount; ++i) + { + errorMessage += bullet; + errorMessage += conversionErrors[i]; + } + cv::Exception exception(CV_StsBadArg, errorMessage, functionName, "", -1); + pyRaiseCVException(exception); + } + else + { + cv::Exception exception(CV_StsInternal, "Overload resolution failed, but no errors reported", + functionName, "", -1); + pyRaiseCVException(exception); + } +} + +void pyPopulateArgumentConversionErrors() +{ + if (PyErr_Occurred()) + { + PySafeObject exception_type; + PySafeObject exception_value; + PySafeObject exception_traceback; + PyErr_Fetch(exception_type, exception_value, exception_traceback); + PyErr_NormalizeException(exception_type, exception_value, + exception_traceback); + + PySafeObject exception_message(PyObject_Str(exception_value)); + std::string message; + getUnicodeString(exception_message, message); +#ifdef CV_CXX11 + conversionErrorsTLS.getRef().push_back(std::move(message)); +#else + conversionErrorsTLS.getRef().push_back(message); +#endif + } +} + } // namespace typedef std::vector vector_uchar; diff --git a/modules/python/src2/gen2.py b/modules/python/src2/gen2.py index d3c8ec39cf37..4acca07ada30 100755 --- a/modules/python/src2/gen2.py +++ b/modules/python/src2/gen2.py @@ -174,6 +174,14 @@ gen_template_rw_prop_init = Template(""" {(char*)"${member}", (getter)pyopencv_${name}_get_${member}, (setter)pyopencv_${name}_set_${member}, (char*)"${member}", NULL},""") +gen_template_overloaded_function_call = Template(""" + { +${variant} + + pyPopulateArgumentConversionErrors(); + } +""") + class FormatStrings: string = 's' unsigned_char = 'b' @@ -768,8 +776,12 @@ def gen_code(self, codegen): # if the function/method has only 1 signature, then just put it code += all_code_variants[0] else: - # try to execute each signature - code += " PyErr_Clear();\n\n".join([" {\n" + v + " }\n" for v in all_code_variants]) + # try to execute each signature, add an interlude between function + # calls to collect error from all conversions + code += ' pyPrepareArgumentConversionErrorsStorage({});\n'.format(len(all_code_variants)) + code += ' \n'.join(gen_template_overloaded_function_call.substitute(variant=v) + for v in all_code_variants) + code += ' pyRaiseCVOverloadException("{}");\n'.format(self.name) def_ret = "NULL" if self.isconstructor: diff --git a/modules/python/test/test_misc.py b/modules/python/test/test_misc.py index 9ab85be46cfd..50761e7f4658 100644 --- a/modules/python/test/test_misc.py +++ b/modules/python/test/test_misc.py @@ -73,6 +73,44 @@ def test_error_handler(status, func_name, err_msg, file_name, line): except cv.error as _e: pass + def test_overload_resolution_can_choose_correct_overload(self): + val = 123 + point = (51, 165) + self.assertEqual(cv.utils.testOverloadResolution(val, point), + 'overload (int={}, point=(x={}, y={}))'.format(val, *point), + "Can't select first overload if all arguments are provided as positional") + + self.assertEqual(cv.utils.testOverloadResolution(val, point=point), + 'overload (int={}, point=(x={}, y={}))'.format(val, *point), + "Can't select first overload if one of the arguments are provided as keyword") + + self.assertEqual(cv.utils.testOverloadResolution(val), + 'overload (int={}, point=(x=42, y=24))'.format(val), + "Can't select first overload if one of the arguments has default value") + + rect = (1, 5, 10, 23) + self.assertEqual(cv.utils.testOverloadResolution(rect), + 'overload (rect=(x={}, y={}, w={}, h={}))'.format(*rect), + "Can't select second overload if all arguments are provided") + + def test_overload_resolution_fails(self): + def test_overload_resolution(msg, *args, **kwargs): + no_exception_msg = 'Overload resolution failed without any exception for: "{}"'.format(msg) + wrong_exception_msg = 'Overload resolution failed with wrong exception type for: "{}"'.format(msg) + with self.assertRaises((cv.error, Exception), msg=no_exception_msg) as cm: + cv.utils.testOverloadResolution(*args, **kwargs) + self.assertEqual(type(cm.exception), cv.error, wrong_exception_msg) + + test_overload_resolution('wrong second arg type (keyword arg)', 5, point=(1, 2, 3)) + test_overload_resolution('wrong second arg type', 5, 2) + test_overload_resolution('wrong first arg', 3.4, (12, 21)) + test_overload_resolution('wrong first arg, no second arg', 4.5) + test_overload_resolution('wrong args number for first overload', 3, (12, 21), 123) + test_overload_resolution('wrong args number for second overload', (3, 12, 12, 1), (12, 21)) + # One of the common problems + test_overload_resolution('rect with float coordinates', (4.5, 4, 2, 1)) + test_overload_resolution('rect with wrong number of coordinates', (4, 4, 1)) + class Arguments(NewOpenCVTests): From f65d75f5c852384c9563dcf458be07a0b3c17e28 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Tue, 19 Jan 2021 21:54:05 +0300 Subject: [PATCH 5/6] Updated more links to forum.opencv.org --- .github/ISSUE_TEMPLATE.md | 4 ++-- doc/py_tutorials/py_setup/py_intro/py_intro.markdown | 2 +- .../introduction/android_binary_package/O4A_SDK.markdown | 2 +- .../android_binary_package/android_dev_intro.markdown | 2 +- .../android_binary_package/dev_with_OCV_on_Android.markdown | 2 +- .../introduction/windows_install/windows_install.markdown | 4 ++-- modules/videoio/src/cap_libv4l.cpp | 3 --- modules/videoio/src/cap_v4l.cpp | 3 --- samples/cpp/stereo_calib.cpp | 1 - 9 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e72c70d8c3dc..a585095d33dc 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,5 +1,5 @@ \ No newline at end of file +--> diff --git a/doc/py_tutorials/py_setup/py_intro/py_intro.markdown b/doc/py_tutorials/py_setup/py_intro/py_intro.markdown index 487ba72ee79a..b013ef014eda 100644 --- a/doc/py_tutorials/py_setup/py_intro/py_intro.markdown +++ b/doc/py_tutorials/py_setup/py_intro/py_intro.markdown @@ -83,4 +83,4 @@ Additional Resources 2. [NumPy Quickstart tutorial](https://numpy.org/devdocs/user/quickstart.html) 3. [NumPy Reference](https://numpy.org/devdocs/reference/index.html#reference) 4. [OpenCV Documentation](http://docs.opencv.org/) -5. [OpenCV Forum](http://answers.opencv.org/questions/) +5. [OpenCV Forum](https://forum.opencv.org/) diff --git a/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown b/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown index d386d1877d3f..383a0991fb34 100644 --- a/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown +++ b/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown @@ -21,7 +21,7 @@ If you need help with anything of the above, you may refer to our @ref tutorial_ If you encounter any error after thoroughly following these steps, feel free to contact us via [OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A -forum](http://answers.opencv.org). We'll do our best to help you out. +forum](https://forum.opencv.org). We'll do our best to help you out. Tegra Android Development Pack users ------------------------------------ diff --git a/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown b/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown index dc153d3c9565..9832f9cd4a90 100644 --- a/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown +++ b/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown @@ -11,7 +11,7 @@ working environment quickly. It was written with Windows 7 in mind, though it wo If you encounter any error after thoroughly following these steps, feel free to contact us via [OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A -forum](http://answers.opencv.org). We'll do our best to help you out. +forum](https://forum.opencv.org). We'll do our best to help you out. Preface ------- diff --git a/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.markdown b/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.markdown index 6f9e6bdb9085..5256fc0923ff 100644 --- a/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.markdown +++ b/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.markdown @@ -25,7 +25,7 @@ may consult our @ref tutorial_O4A_SDK tutorial. If you encounter any error after thoroughly following these steps, feel free to contact us via [OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A -forum](http://answers.opencv.org) . We'll do our best to help you out. +forum](https://forum.opencv.org) . We'll do our best to help you out. Using OpenCV Library Within Your Android Project ------------------------------------------------ diff --git a/doc/tutorials/introduction/windows_install/windows_install.markdown b/doc/tutorials/introduction/windows_install/windows_install.markdown index f001bf2ae555..b02a85c23cba 100644 --- a/doc/tutorials/introduction/windows_install/windows_install.markdown +++ b/doc/tutorials/introduction/windows_install/windows_install.markdown @@ -7,7 +7,7 @@ Installation in Windows {#tutorial_windows_install} The description here was tested on Windows 7 SP1. Nevertheless, it should also work on any other relatively modern version of Windows OS. If you encounter errors after following the steps described -below, feel free to contact us via our [OpenCV Q&A forum](http://answers.opencv.org). We'll do our +below, feel free to contact us via our [OpenCV Q&A forum](https://forum.opencv.org). We'll do our best to help you out. @note To use the OpenCV library you have two options: @ref tutorial_windows_install_prebuilt or @@ -345,7 +345,7 @@ libraries). If you do not need the support for some of these, you can just freel To test your build just go into the `Build/bin/Debug` or `Build/bin/Release` directory and start a couple of applications like the *contours.exe*. If they run, you are done. Otherwise, - something definitely went awfully wrong. In this case you should contact us at our [Q&A forum](http://answers.opencv.org/). + something definitely went awfully wrong. In this case you should contact us at our [Q&A forum](https://forum.opencv.org/). If everything is okay, the *contours.exe* output should resemble the following image (if built with Qt support): diff --git a/modules/videoio/src/cap_libv4l.cpp b/modules/videoio/src/cap_libv4l.cpp index bfc68fef22ad..ba2b7985a30b 100644 --- a/modules/videoio/src/cap_libv4l.cpp +++ b/modules/videoio/src/cap_libv4l.cpp @@ -14,9 +14,6 @@ It has been tested with the motempl sample program First Patch: August 24, 2004 Travis Wood TravisOCV@tkwood.com For Release: OpenCV-Linux Beta4 opencv-0.9.6 Tested On: LMLBT44 with 8 video inputs -Problems? Post your questions at answers.opencv.org, - Report bugs at code.opencv.org, - Submit your fixes at https://github.com/opencv/opencv/ Patched Comments: TW: The cv cam utils that came with the initial release of OpenCV for LINUX Beta4 diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp index 555af5a1a28a..2740c62e299a 100644 --- a/modules/videoio/src/cap_v4l.cpp +++ b/modules/videoio/src/cap_v4l.cpp @@ -14,9 +14,6 @@ It has been tested with the motempl sample program First Patch: August 24, 2004 Travis Wood TravisOCV@tkwood.com For Release: OpenCV-Linux Beta4 opencv-0.9.6 Tested On: LMLBT44 with 8 video inputs -Problems? Post your questions at answers.opencv.org, - Report bugs at code.opencv.org, - Submit your fixes at https://github.com/opencv/opencv/ Patched Comments: TW: The cv cam utils that came with the initial release of OpenCV for LINUX Beta4 diff --git a/samples/cpp/stereo_calib.cpp b/samples/cpp/stereo_calib.cpp index 5c1471e4c2cf..9f5aa56ed60d 100644 --- a/samples/cpp/stereo_calib.cpp +++ b/samples/cpp/stereo_calib.cpp @@ -17,7 +17,6 @@ OPENCV WEBSITES: Homepage: http://opencv.org Online docs: http://docs.opencv.org - Q&A forum: http://answers.opencv.org GitHub: https://github.com/opencv/opencv/ ************************************************** */ From d5447d859f32439b307b753957019b8c828d8012 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 22 Jan 2021 19:50:25 +0000 Subject: [PATCH 6/6] js(doc): fix path --- doc/js_tutorials/js_setup/js_setup/js_setup.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/js_tutorials/js_setup/js_setup/js_setup.markdown b/doc/js_tutorials/js_setup/js_setup/js_setup.markdown index 1a9ac763ed39..7fd7fe05c349 100644 --- a/doc/js_tutorials/js_setup/js_setup/js_setup.markdown +++ b/doc/js_tutorials/js_setup/js_setup/js_setup.markdown @@ -287,20 +287,20 @@ So, make sure [docker](https://www.docker.com/) is installed in your system and @code{.bash} git clone https://github.com/opencv/opencv.git cd opencv -docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emcmake python3 ./dev/platforms/js/build_js.py build_js +docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emcmake python3 ./platforms/js/build_js.py build_js @endcode In Windows use the following PowerShell command: @code{.bash} -docker run --rm --workdir /src -v "$(get-location):/src" "emscripten/emsdk" emcmake python3 ./dev/platforms/js/build_js.py build_js +docker run --rm --workdir /src -v "$(get-location):/src" "emscripten/emsdk" emcmake python3 ./platforms/js/build_js.py build_js @endcode @warning The example uses latest version of emscripten. If the build fails you should try a version that is known to work fine which is `2.0.10` using the following command: @code{.bash} -docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk:2.0.10 emcmake python3 ./dev/platforms/js/build_js.py build_js +docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk:2.0.10 emcmake python3 ./platforms/js/build_js.py build_js @endcode ### Building the documentation with Docker @@ -324,5 +324,5 @@ docker build . -t opencv-js-doc Now run the build command again, this time using the new image and passing `--build_doc`: @code{.bash} -docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) "opencv-js-doc" emcmake python3 ./dev/platforms/js/build_js.py build_js --build_doc +docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) "opencv-js-doc" emcmake python3 ./platforms/js/build_js.py build_js --build_doc @endcode