Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Pev fixes and clean#17642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Pev fixes and clean#17642
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Either we don't want this method to be used in the future for any other nodethan the root node, and so we replace indices_length by size_ and remove it asargument, or we want to be able to use it potentially for other nodes, andso using size_ instead of indices_length would have lead to a bug.
…om Adil IbragimovAvoids trying to compute log(ratio) with ratio = 0
… entering the loop body
…" from Richard McPherson
…table.h" from hypevr
pemmanuelviel commentedJun 23, 2020
Asides from some fixes I've made parsing the code, I've also ported some from the original FLANN repo from Marius Muja. |
| std::cerr <<"LSH is not implemented for that type" << std::endl; | ||
| assert(0); | ||
| return1; | ||
| returnstatic_cast<size_t>(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure that this is reliable for 32bit OS - the values are different comparing to 64bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Errors return -1 and not 1 in FLANN. As the return type is an unsigned integer, value needed to be casted.
However, as an error value for a key, 0 should do the work to help the user to figure out what is going on.
alalek left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for contribution!
| std::cerr <<"LSH is not implemented for that type" << std::endl; | ||
| assert(0); | ||
| return1; | ||
| return0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please useCV_Assert(0 && "LSH is not implemented for that type"); which triggers an exception (need to check for possible memory leaks in caller code or properly use RAII).
BTW, C-likeassert() is not allowed and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hi Alexander,
Thanks for your feedback. Well, this is not the only C-like stuff we should get rid of, like the old style casts.
In a general way, I try to stick to the coding style of the code I'm bringing changes to in order not to be too intrusive. For FLANN it's a mater of where to put the cursor.
So, in another branch, I'm going to parse FLANN for replacing all the assert() that are there, it can't harm. Just to let you know, just in core you already have more than a hundred of them.
For the context my intend was first to disclose quickly some work I did some years ago in order to bring also a new feature. Seeing several bugs while parsing the code I have however decided to fix them first, to the extent I can afford...
author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613098 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613095 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613092 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613089 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613087 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613083 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613078 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613075 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613073 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613069 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613067 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613063 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613061 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613055 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613053 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613051 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613049 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613045 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613042 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613039 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613037 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613035 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613032 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613029 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613021 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613006 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600613002 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612998 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612994 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612991 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612989 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612985 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612982 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612980 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612972 +0800parentb083c20author Boubacar <boubacar.diallo1@macaulay.cuny.edu> 1590059814 -0400committer NALLEIN <nigelts@sjtu.edu.cn> 1600612951 +0800group contour articles togetherchk divide 0Generate constructor with smart pointer, if it's expected.Merge pull requestopencv#17403 from wangmengHB:masterFix Test Case: in latest version, window.cv is a promise instance that makes most test case failed.* Fix Browser Test Case: In latest version, window.cv is a promise instanceIn latest version of opencv.js, window.cv is promise instance.So that most of the test cases is run failed.This commit is to fix browser test case.* Add comment for backward compatibleAdd comments for backward compatibleFixed cascadedetect convert from old cascade to newdnn(test): file 'dnn/efficientdet-d0.pb' is optionaldnn: add a human parsing cpp sampleMerge pull requestopencv#17417 from vpisarev:fix_fitellipse* improved fitEllipse and fitEllipseDirect accuracy in singular or close-to-singular cases (see issueopencv#9923)* scale points using double precision* added normalization to fitEllipseAMS as well; fixed Java test case by raising the tolerance (it's unclear what is the correct result in this case).* improved point perturbation a bit. make the code a little bit more clear* trying to fix Java fitEllipseTest by slightly raising the tolerance threshold* synchronized C++ version of Java's fitEllipse test* removed trailing whitespacescore: fix builds with eigen helper headerdnn(ie): fix layers extractionvideoio(ffmpeg): fix handling of AVERROR_EOFdecoder should be properly flushed after thatAdd instructions for how to use findEssentialMat() when camera matrices are differentAdded countNonZero test for big arrays and disable IPP for some casesFixed virtual try on samplebuild: winpack_dldt with dldt 2020.3.0https://github.com/openvinotoolkit/openvino/releases/tag/2020.3.0Add handling for Android "NDK (Side by side)"Merge pull requestopencv#17431 from mshabunin:support-vtk9* Added VTK 9 supportSkip some GAPI tests if VideoCapture is not capable to playback video.Fix '--help' of stitching_detailed.py sampleFixes the help for `--features`, previously listed all possible values as default value.Also adds the default value to the help for two other argumentsAdd WebGPU-Dawn support for dnn moduleAdd testBuild with -g4Add testAdd console for test temporarilyAdd testFix build issueAdd asyncForwardWrapper by using AsyncifyDelete outputsAdd test for dnn webgpu backendRemove pre-build files and add README.md to provide compilation referenceUpdate dawnAdd layer testvideoio: fix plugins buildMerge pull requestopencv#17165 from komakai:objc-bindingObjc binding* Initial work on Objective-C wrapper* Objective-C generator script; update manually generated wrappers* Add Mat tests* Core Tests* Imgproc wrapper generation and tests* Fixes for Imgcodecs wrapper* Miscellaneous fixes. Swift build support* Objective-C wrapper build/install* Add Swift wrappers for videoio/objdetect/feature2d* Framework build;iOS support* Fix toArray functions;Use enum types whenever possible* Use enum types where possible;prepare test build* Update test* Add test runner scripts for iOS and macOS* Add test scripts and samples* Build fixes* Fix build (cmake 3.17.x compatibility)* Fix warnings* Fix enum name conflicting handling* Add support for document generation with Jazzy* Swift/Native fast accessor functions* Add Objective-C wrapper for calib3d, dnn, ml, photo and video modules* Remove IntOut/FloatOut/DoubleOut classes* Fix iOS default test platform value* Fix samples* Revert default framework name to opencv2* Add converter util functions* Fix failing test* Fix whitespace* Add handling for deprecated methods;fix warnings;define __OPENCV_BUILD* Suppress cmake warnings* Reduce severity of "jazzy not found" log message* Fix incorrect #include of compatibility header in ios.h* Use explicit returns in subscript/get implementation* Reduce minimum required cmake version to 3.15 for Objective-C/Swift binding3rdparty: update TBB 2020.1 => 2020.2https://github.com/oneapi-src/oneTBB/releases/tag/v2020.2pre: OpenCV 4.4.0 (version++)ffmpeg/4.4: update FFmpeg wrapper- FFmpeg 4.2.3dnn/NGraph: added nullptr checksQRDetectMulti: refactored checkPoints methoduse C++11 static variables as memory barrierallow multiple inputs to resize, fix testsMerge pull requestopencv#16955 from themechanicalcoder:text_recognition* add text recognition sample* fix pylint warning* made changes according to the c++ example* fix errors* add text recognition sample* update text detection sampleMerge pull requestopencv#17368 from themightyoarfish:cv2eigen-doc* Add documentation about usage of cv2eigen functions in eigen.hpp* Fixed Doxygen syntax.Co-authored-by: Alexander Smorkalov <smorkalov.a.m@gmail.com>dnn/NGraph: added nullptr checksAdded information to OpenCV documentation [MacOS]Added and Edited specific information to the "Installation in MacOS" OpenCV documentation.Closesopencv#17340improve the mkl search procedurednn: use OpenVINO 2020.3 definesRemoved error lisneter usageimprove mish performance and accuracyRemoved plugin dispatcherMerge pull requestopencv#16772 from aDanPin:dp/performance_render_testsAdded g-api render performance tests* Add render performance tests for BGROCV* Add render NV12 performance tests* Review response* Review response* Review response* Review response* Review response* Review response* Just a small fix* Final review response I hope)* Review response* Review response* Review response* Review response* Review response* Review responseplatforms/android: fix --no_samples_build flag not workingFix framework_name option in build scriptFix testFitEllipse testUse cv::Ptr instead of raw pointersCleanup unneeded raw pointer handling codeMerge pull requestopencv#17534 from YashasSamaga:cuda4dnn-remove-unused-funcscuda4dnn: reduce CUDA version requirements to at least CUDA 9.2* remove half2 specializations* do not remove atomicAdd for half in CUDA 10 and below* remove fp16.hppFix typoThis typo just made me lose my mind on the conan package update. please merge.core: fix handling of ND-arrays in dumpInputArray() helpersRemoved plugin dispatcherbackport of commit7411373Changed StridedSlice to VariadicSplit in Region layerMerge pull requestopencv#17468 from liqi-c:sharedlib_build_problemTEngine installation rules fix for static build* Modify cmake config error for -DBUILD_SHARED_LIBS=OFF* Modify for not install tengine include directory* Update compile error.* move install command to tengine/CMakeLists.txt* rm include dir when make install,only build static lib will install libtengine.aMerge pull requestopencv#17573 from alexcohn:fix/android_windows_build* fixingopencv#17572opencv#17572 Build for Android failed: "can't concat str to bytes"on Windows 10 64bit with python 3.6.6* similar to changes in platforms/winpack_dldt/build_package.pyFix the build of imgproc using MinGW (variables with the same name as symbols defined in MinGW headers)fix VS Windows build with eigen.opencv#17548core(logger): complete initialization of logger structures- for using of logging functions from global destructorsFix the detection of the XIMEA library (since its location may be different when the version of the ximea software is updated)Conditional compilation for network readerRemove deprecated Inference Engine CPU extensionsuse fp32 mish for fp16 mishdocs: linkfix in bibliographyThe [current link](https://arxiv.org/pdf/1808.01752) goes to arandom unrelated paper.Disabling dafault NMS in yolo layerRemove deprecated Inference Engine CPU extensionsConditional compilation for network readerorigibal commit:63e92ccOptimize Mish for CPU backendAdd implementation in case plaidml isn't foundEnable state initialization params via compile_argsConditional compilation for IR v7 supportMerge pull requestopencv#17020 from dbudniko:dbudniko/serialization_backendG-API Serialization routines* Serialization backend in tests, initial version* S11N/00: A Great Rename- "Serialization" is too long and too error-prone to type, so now it is renamed to "s11n" everywhere;- Same applies to "SRLZ";- Tests also renamed to start with 'S11N.*' (easier to run);- Also updated copyright years in new files to 2020.* S11N/01: Some basic interface segregation- Moved some details (low-level functions) out of serialization.hpp;- Introduced I::IStream and I::OStream interfaces;- Implemented those via the existing [De]SerializationStream classes;- Moved all operators to use interfaces instead of classes;- Moved the htonl/ntohl handling out of operators (to the classes).The implementation didn't change much, it is a subject to the furtherrefactoring* S11N/02: Basic operator reorg, basic tests, vector support- Reorganized operators on atomic types to follow >>/<< model (put them closer in the code for the respective types);- Introduce more operators for basic (scalar) types;- Drop all vector s11n overloads -- replace with a generic (template-based) one;- Introduced a new test suite where low-level s11n functionality is tested (for the basic types).* S11N/03: Operators reorganization- Sorted the Opaque types enum by complexity;- Reorganized the existing operators for basic types, also ordered by complexity;- Organized operators in three groups (Basics, OpenCV, G-API);- Added a generic serialization for variant<>;- Reimplemented some of the existing operators (for OpenCV and G-API data structures);- Introduced new operators for cv::gimpl data types. These operators (and so, the data structures) are not yet used in the graph dump/reconstruction routine, it will be done as a next step.* S11N/04: The Great Clean-up- Drop the duplicates of GModel data structures from the serialization, serialize the GModel data structures themselve instead (hand-written code replaced with operators).- Also removed usuned code for printing, etc.* S11N/05: Internal API Clean-up- Minimize the serialization API to just Streams and Operators;- Refactor and fix the graph serialization (deconstruction and reconstruction) routines, fix data addressing problems there;- Move the serialization.[ch]pp files to the core G-API library* S11N/06: Top-level API introduction- !!!This is likely the most invasive commit in the series!!!- Introduced a top-level API to serialize and deserialize a GComputation- Extended the compiler to support both forms of a GComputation: an expession based and a deserialized one. This has led to changes in the cv::GComputation::Priv and in its dependent components (even the transformation tests);- Had to extend the kernel API (GKernel) with extra information on operations (mainly `outMeta`) which was only available for expression based graphs. Now the `outMeta` can be taken from kernels too (and for the deserialized graphs it is the only way);- Revisited the internal serialization API, had to expose previously hidden entities (like `GSerialized`);- Extended the serialized graph info with new details (object counter, protocol). Added unordered_map generic serialization for that;- Reworked the very first pipeline test to be "proper"; GREEN now, the rest is to be reworked in the next iteration.* S11N/07: Tests reworked- Moved the sample pipeline tests w/serialization to test the public API (`cv::gapi::serialize`, then followed by `cv::gapi::deserialize<>`). All GREEN.- As a consequence, dropped the "Serialization" test backend as no longer necessary.* S11N/08: Final touches- Exposed the C++ native data types at Streams level;- Switched the ByteMemoryIn/OutStreams to store data in `char` internally (2x less memory for sample pipelines);- Fixed and refactored Mat dumping to the stream;- Renamed S11N pipeline tests to their new meaning.* linux build fix* fix RcDesc and int uint warnings* more Linux build fix* white space and virtual android error fix (attempt)* more warnings to be fixed* android warnings fix attempt* one more attempt for android build fix* android warnings one more fix* return back override* avoid size_t* static deserialize* and how do you like this, elon? anonymous namespace to fix android warning.* static inline* trying to fix standalone build* mat dims fix* fix mat r/w for standaloneCo-authored-by: Dmitry Matveev <dmitry.matveev@intel.com>Dynamic build for Objective-C/Swift wrapperMerge pull requestopencv#17499 from cyyever:fix_CUDA11Fix cuda11* use cudnn_version.h to detect version when it is available* remove nppi from CUDA11* use ocv_list_filterout* dnn(cuda): temporary disable CUDNN 8.0cmake(cuda): update handling of -std=c++11/14 flagscmake(gapi): fix opencv_world build for winpackmin max fix for standalone3rdparty: libjpeg 9dhttp://www.ijg.org/files/jpegsrc.v9d.tar.gz3rdparty: libjpeg-turbo 2.0.4 => 2.0.5https://github.com/libjpeg-turbo/libjpeg-turbo/releases/tag/2.0.5Fix: error in the dimension used for computeMinMaxInstead of using the current dimension for which we just got a big span,we were computing Min and Max for the previous dimension stored in cutfeat(and using 0 instead of the dimension indice for the very first dimensionwith "span > (1-eps)max_span")Conditional compilation for IR v7 supportbackported commit8690575Optim: test that could be done once has been extracted from the loopMerge pull requestopencv#17642 from pemmanuelviel:pev--fixes-and-clean* Clean: make the use of the indices array length consistentEither we don't want this method to be used in the future for any other nodethan the root node, and so we replace indices_length by size_ and remove it asargument, or we want to be able to use it potentially for other nodes, andso using size_ instead of indices_length would have lead to a bug.* Fix: b was not an address* Fix: transpose the Flann repo commit "Fixes in accum_dist methods" from Adil IbragimovAvoids trying to compute log(ratio) with ratio = 0* Fix: transpose the Flann repo commit "result_set bugfix" from Jack Rae* Fix Jack Rae commit as the initial i - 1 index was decremented before entering the loop body* Clean: transpose the Flann repo commit "Updated comments in lsh_index" from Richard McPherson* Fix: Transpose the Flann repo commit "Fixing unreachable code in lsh_table.h" from hypevr* Fix warning the same way it was done in flann standalone repo* Change the return value in case of unsupported typeIncreased portability of CV_Funcadd if block for indexed color imagesFix the 'cvflann::anyimpl::bad_any_cast' error using LshAdd test checking we don't throw when creating GenericIndex with LshIndexParams()Restored compatibility with CMake older than 3.7.Type consistency for all xxxIndexParams integer arguments as well as with miniflann's LshIndexParamsMerge pull requestopencv#17454 from creinders:masterfix instable fisheye undistortPoints* remove artefacts when (un)distorting fisheye images with large distortion coefficient values* fix fisheye undistortion when theta is close to zero* add fisheye image undistort and distort test* Fixed type conversion warnings* fixed trailing whitespaceMerge pull requestopencv#17756 from ilyachur:feature/ichuraev/fix_ngraph_headers* Fixed header paths for some nGraph ops* Added dependency on IE versionavoid kernel compile error on Arm SBCsreduce slice, concat to copy; enable more concat fusionsadd cuDNN 8 supportRemove duplicate lineMerge pull requestopencv#17708 from shirriff:patch-1Clarify component statistics documentation* Change ConnectedComponentsTypes documentationChange from "algorithm output formats" to "statistics" because it specifies types of statistics, not formats.* Documentation: clarify component statisticsExplain that ConnectedComponentTypes selects a statistic.Fix arguments list in loadindex for histogram intersectionPrecompute the divisor to ensure that no kind of compiler would process it on the fly at each call.Merge pull requestopencv#17733 from l-bat:tiny_yolov4* Supported yolov4-tiny* Added commentscmake: fix ENABLE_PROFILINGFix genericity of computeNodeStatistics that couldn't compute stats properly on sub-nodesMerge pull requestopencv#17722 from pemmanuelviel:pev--replace-asserts* Clean: replace C style asserts by CV_Assert and CV_DbgAssert* Try fixing warning on Windows compilation* Another way trying to fix warnings on Win* Fixing warnings with some compilers:Some compilers warn on systematic exit preventing to execute the code that follows.This is why assert(0) that exits only in debug was working, but not CV_Assert or CV_Errorthat exit both in release and debug, even if with different behavior.In addition, other compilers complain when return 0 is removed from getKey(),even if before we have a statement leading to systematic exit.* Disable "unreachable code" warnings for Win compilers so we can use proper CV_ErrorMix of 32 and 64bits vector types prevents vectorisation for distance computation.Argument "a" is of type ElementType* that is either int* or float*, while b was double*.Mixing types prevents the possibility to use SSE or AVX instructions.On implementation without SIMD instructions, this doesn't show any impact on performance.forget to look in sub folder of include/openblasimgcodecs: fix test build with disabled JPEG and PNG libsdnn(test): add YOLOv4-tiny testsdnn(slice): disable buggy OCV/OCL implementationMerge pull requestopencv#17699 from alalek:build_core_cuda* core(cuda): fix build- MSVS 19.25.28612.0- CUDA release 11.0, V11.0.167* cmake(cuda): backport workaround for CUDA 11* cmake(cuda): call CUDA_BUILD_CLEAN_TARGET() on finalize* cmake(cuda): use CMAKE_SUPPRESS_REGENERATION with MSVSUpdate documentation of imwrite()build: winpack_dldt with dldt 2020.4.0imgproc(test): test bitExact cases in OCL/sepFilter2Duse universal SIMD intrinsics for SIFTFix trees parsing behavior in hierarchical_clustering_index:Before, when maxCheck was reached in the first descent of a tree, time was still wasted parsingthe next trees till their best leaves whose points were not used at all.Merge pull requestopencv#17363 from YashasSamaga:cuda4dnn-eltwise-fusion2cuda4dnn(conv): fuse eltwise with convolutions* fuse eltwise with convolutions* manually rebase to avoid bad git mergeAdded a script to measure & report privacy masking camera performance in different configurationsG-API: Change the default FD model in the privacy-masking-cameraFix typoMerge pull requestopencv#17694 from dbudniko:dbudniko/serialization_args2G-API args serialization* args serialization* GRunArgP draft* UMat added* bind added* DmitryM's review addressed. Code clean up required.* fix android build* bind test added* more comments addressed* try to fix Mac build* clean up* header-based generic implementation (GRunArg)* clang again* one more attempt for clang* more clean up* More Dmitry's comments addressed.* monostate removed* Top level functions and some other comments addressed.* fix warnings* disable warningFixed checkMasks in DescriptorMatcher with train descs in UMatsAdded test for checkMasks with UMat train descsUse“ moms” replace "contourArea"double area = moms.m00;is same asdouble area = contourArea(contours[contourIdx]);Not to mention"moms" already calculated here,"contourArea" should not applyuse bufferarea for allocating buffercore: use lazy on-demand initialization for param_traceEnableMerge pull requestopencv#17770 from jasonKercher:3.4_triggered3.4 Allow first capture to return false* fix first capture timeout* fix first capture timeoutMerge pull requestopencv#17639 from pemmanuelviel:pev--binary-kmeansPev binary kmeans* Ongoing work transposing kmeans clustering method for bitfields: the computeClustering methodOngoing work transposing kmeans clustering method for bitfields: interface computeBitfieldClusteringFix genericity of computeNodeStatisticsOngoing work transposing kmeans clustering method for bitfields: adapt computeNodeStatistics()Ongoing work transposing kmeans clustering method for bitfields: adapt findNN() methodOngoing work transposing kmeans clustering method for bitfields: allow kmeans with Hamming distanceOngoing work transposing kmeans clustering method for bitfields: adapt distances codeOngoing work transposing kmeans clustering method for bitfields: adapt load/save codeOngoing work transposing kmeans clustering method for bitfields: adapt kmeans hierarchicalClustring()PivotType -> CentersType RenamingFix type casting for ARM SIMD implementation of HammingFix warnings with Win32 compilationFix warnings with Win64 compilationFix wrong parenthesis position on rounding* Ensure proper rounding when CentersType is integraldnn(ie): enable KEY_CPU_THREADS_NUM for Windowsfeatures2d: v_fma => v_muladd for integersMerge pull requestopencv#17502 from dmatveev:dm/infer2* G-API: Introduce a new gapi::infer2 overload + gaze estimation sample* G-API/infer2: Introduced static type checking for infer2- Also added extra tests on the type check routine* G-API/infer2: Addressed self-review comments in the sample app- Also fix build on Linux;* G-API/infer2: Remove incorrect SetLayout(HWC) + dead code- Also fixed comments in the backend* G-API/infer2: Continue with self-review- Fix warnings/compile errors in gaze estimation- Dropped the use of RTTI (VectorRef::holds()) from the giebackend- Replaced it with a trait-based enums for GArray<T> and std::vector<T>- The enums and traits are temporary and need to be unified with the S11N when it comes* G-API/infer2: Final self-review items- Refactored ROIList test to cover 70% for infer<> and infer2<>;- Fixed the model data discovery routine to be compatible with new OpenVINO;- Hopefully fixed the final issues (warnings) with the sample.* G-API/infer2: address review problems- Fixed typo in comments;- Fixed public (Doxygen) comment on GArray<GMat> input case for infer2;- Made model lookup more flexible to allow new & old OMZ dir layouts.* G-API/infer2: Change the model paths again* G-API/infer2: Change the lookup path for test data* G-API/infer2: use randu instead of imread. CI war is overGAPI: fix warnings in own::Mat default generated constructors/assign operror if cuda4dnn depends are not resolvedMerge pull requestopencv#17741 from aDanPin:dp/add_dinamic_graph_feature[G-API] Allow building graphs with a dynamic number of inputs and outputs* Add dinamic graph feature and tests* Remove unnecessary file* Review response* Add implementation of operator += for GRunArgsAnd test for that case* Tests refactoring* Add doxygenReview response* Fix docs* A small documentation fix* Review response* Add tests for more entities* Add typed tests* Another typed tests* Doc fix* Documentation fix* Build fix* Commit for rebuild* The last oneMerge pull requestopencv#17818 from komakai:documentation-improvementsDocumentation fixes/improvements* Documentation fixes/improvements* Remove HASH_UTILS definesGAPI: GAPI_LOG_DEBUG facilityMerge pull requestopencv#17668 from OrestChura:oc/giebackend_migration_to_coreGAPI: Migration to IE Core API* Migration to IE Core API - both versions are maintained - checked building with all the OpenVINO versions (2019.R1, R2, R3, 2020.4 (newest))* commit to awake builders* Addressing comments - migrated to Core API in 'gapi_ie_infer_test.cpp' - made Core a singleton object - dropped redundant steps* Addressing comments - modified Mutex locking* Update* Addressing comments - remove getInitMutex() - reduce amount of #ifdef by abstracting into functions* return to single IE::Core* Divide functions readNet and loadNet to avoid warnings on GCC* Fix deprecated code warnings* Fix deprecated code warnings on CMake level* Functions wrapped - All the functions depended on IE version wrapped into a cv::gapi::ie::wrap namesapace - All this contained to a new "giebackend/gieapi.hpp" header - The header shared with G-API infer tests to avoid code duplications* Addressing comments - Renamed `gieapi.hpp` -> `giewrapper.hpp`, `cv::gapi::ie::wrap` -> `cv::gimpl::ie::wrap` - Created new `giewrapper.cpp` source file to avoid potential "multiple definition" problems - removed unnecessary step SetLayout() in tests* Enabling two NN infer teest* Two-NN infer test change for CI - deleted additional network - inference of two identical NN used instead* Fix CI fileNotFound* Disable MYRIAD test not to fail Custom CI runsFix TensorFlow->ONNX importsdnn: fix OpenCL implementation of Slice layerdnn: use OpenVINO 2020.4 definesoriginal commit:2813aa7winpack_dldt: switch defaults to OpenVINO 2020.4dnn: eliminate IE deprecation warningMerge pull requestopencv#17841 from vpisarev:fixed_fs_dtor* fixed issueopencv#17412* Update test_io.cppdnn(test): adjust tests for OpenVINO 2020.4 (4.x branch)G-API: Try to fix infer2 problem with VS2017imgproc: add missing check into cvtColorTwoPlane()core(persistence): fix "use after free" bug- do not store user-controlled "FileStorage" pointer- store FileStorage::Impl pointer insteadrelease: OpenCV 4.4.0Fixed removing is_parameter, is_constant, is_outputRevert "Fixed removing is_parameter, is_constant, is_output"Fixed removing is_parameter, is_constant, is_outputReplaced copy_with_new_args to clone_with_new_inputsMerge pull requestopencv#17896 from OrestChura:oc/fix_kw_videotests* - fix numeric overflow due to incorrect type casting - remove unnecessary default constructor* Drop the castMerge pull requestopencv#17871 from OrestChura:oc/typed_GArray_GMat* Added overload for `GArray<GMat>` ProtoParam in `gtyped.hpp`* Tests+compile_args - added tests for GArray<GMat> as an input and an output of GComputationT - added possibility to give the compile_args to GComputationT.apply()* Fix win errorsSupport Gather for variable inputsAdded reference to Original Wu's articte about SAUF connected components search method.Update samplesUpdate train_HOG.cppmish_functor_updateMerge pull requestopencv#17493 from TolyaTalamanov:at/python-bindings-gapi* Implement G-API python bindings* Fix hdr_parser* Drop initlization with brackets using regexp* Handle bracket initilization another way* Add test for core operations* Declaration and definition of View constructor now in different files* Refactor tests* Remove combine decorator from tests* Fix comment to review* Fix test* Fix comments to review* Remove GCompilerArgs implementation from pythonCo-authored-by: Pinaev <danil.pinaev@intel.com>Merge pull requestopencv#17816 from vpisarev:essential_2cameras* add findEssentialMat for two different cameras* added smoke test for the newly added variant of findEssentialMatrixCo-authored-by: tompollok <tom.pollok@gmail.com>add DetectionOutputOpMerge pull requestopencv#17858 from vpisarev:dnn_depthwise_conv* added depth-wise convolution; gives ~20-30% performance improvement in MobileSSD networks* hopefully, eliminated compile warnings, errors, as well as failure in one test* * fixed a few typos* decreased buffer size in some cases* added more optimal im2row branch in the case of 1x1 convolutions* tuned fastConv to reduce the number of passes over arraysAdd Objective-C/Swift wrappers for opencv_contrib modulesMerge pull requestopencv#17735 from pemmanuelviel:pev-fix-trees-descent* Fix trees parsing behavior in hierarchical_clustering_index:Before, when maxCheck was reached in the first descent of a tree, time was still wasted parsingthe next trees till their best leaf, just to skip the points stored there.Now we can choose either to keep this behavior, and so we skip parsing other trees after reachingmaxCheck, or we choose to do one descent in each tree, even if in one tree we reach maxCheck.* Apply the same change to kdtree.As each leaf contains only 1 point (unlike hierarchical_clustering), difference is visible if trees > maxCheck* Add the new explore_all_trees parameters to miniflann* Adapt the FlannBasedMatcher read_write test to the additional search parameter* Adapt java tests to the additional parameter in SearchParams* Fix the ABI dumps failure on SearchParams interface change* Support of ctor calling another ctor of the class is only fully supported from C+11add MVNOpvideoio: fix compilation with Aravis enabledAdded cmake toolchain for RISC-V with clang.- Added cross compile cmake file for target riscv64-clang- Extended cmake for RISC-V and added instruction checks- Created intrin_rvv.hpp with C++ version universal intrinsicsUpdate README.mdI think there should be something under ### Resources for example:* Additional OpenCV functionality: <https://github.com/opencv/opencv_contrib>Updated the OpenCV logoMerge pull requestopencv#17977 from paroj:hervec* calib3d: calibrateHandEye - allow using Rodrigues vectors for rotation* calib3d: calibrateHandEye - test rvec representationFix build of grfmt_jpeg2000.cpplibjasper has recently changed `jas_matrix_get` from a macro to an inline function(389951d071 inhttps://github.com/jasper-software/jasper), causing the build to fail.Fix Carotene compilation with XCodeMerge pull requestopencv#17907 from Yosshi999:gsoc_asift-py2cpp* Implement ASIFT in C++* '>>' should be '> >' within a nested template* add a sample for asift usage* bugfix empty keypoints cause crash* simpler initialization for mask* suppress the number of lines* correct tex document* type casting* add descriptorsize for asift* smaller testdata for asift* more smaller test data* add OpenCV short license headerMerge pull requestopencv#17885 from alalek:dnn_ocl_slice_updateDNN: OpenCL/slice update* dnn(ocl/slice): make slice kernel VTune friendly- more unique names- inline code of copy functions* dnn(ocl/slice): prefer to spawn more work groups- even in case with 1D copy- perf improvement up to 2x of kernel time (due to changed configuration 128x1x1 => 128x32x1)* dnn(ocl/slice): cache kernel exec infoAdding comment from source code to documentation.Updated comment.Corrected Comment as requested by reviewer.Do not use size_t for nGraph layersUpdate warpPerspective_demo.cppCleaner code for hierarchical_clusteringMerge pull requestopencv#18019 from pemmanuelviel:pev--multiple-kmeans-trees* Possibility to set more than one tree for the hierarchical KMeans (default is still 1 tree).This particularly improves NN retrieval results with binary vectors, allowing better qualitycompared to LSH for similar processing time when speed is the criterium.* Add explanations on the FLANN's hierarchical KMeans for binary data.Document PatchNANs input typeadd relu as activation option in darknetadd relu optionadd relu as activation option in darknetsimplify the setParams if-else ladderadd relu as activation option in darknetcorrect activation_param typeformatformatadd relu as activation option in darknetspacingspacingadd relu as activation option in darknetFixed removing is_parameter, is_constant, is_outputReplaced copy_with_new_args to clone_with_new_inputs* added depth-wise convolution; gives ~20-30% performance improvement in MobileSSD networks* hopefully, eliminated compile warnings, errors, as well as failure in one test* * fixed a few typos* decreased buffer size in some cases* added more optimal im2row branch in the case of 1x1 convolutions* tuned fastConv to reduce the number of passes over arraysbackport of commit77b01deAdd support for using new ffmpeg encoding API when writing a video.Removed get_output_as_single_output_node methodFix Objective-C declaration of Mat_to_vector_Point2dMerge the two KMeansIndexParams ctor on masterObj-C/Swift docs improvementsFix bug in ONNX Gather opUse "src" not "*this" for source GpuMatMerge pull requestopencv#17643 from pemmanuelviel:pev--new-flann-demo* Add a FLANN example showing how to search a query image in a dataset* Clean: remove warning* Replace dependency to boost::filesystem by calls to core/utils/filesystem* Wait for escape key to exit* Add an example of binary descriptors support* Add program options for saving and loading the flann structure* Fix warnings on Win64* Fix warnings on 3.4 branch still relying on C++03* Add ctor to img_info structure* Comments modification* * Demo file of FLANN moved and renamed* Fix distances type when using binary vectors in the FLANN example* Rename FLANN example file* Remove dependency of the flann example to opencv_contrib's SURF.* Remove mention of FLANN and other descriptors that aimed at giving hint on the other options* Cleaner program options management* Make waitKey usage minimal in FLANN example* Fix the conditions order* Use cv::PtrMerge pull requestopencv#18033 from ieliz:dasiamrpnImproving DaSiamRPN tracker sample* changed layerBlobs in dnn.cpp and added DaSiamRPN tracker* Improving DaSiamRPN tracker sample* Docs fix* Removed outdated changes* Trying to reinitialize tracker without reloading models. Worked with LaSOT-based benchmark with reinit rate=250 frames* Trying to reverse changes* Moving the model in the constructor* Fixing some issues with names* Variable name changed* Reverse parser arguments changesRefactoring to prepare for other vector types while mutualizing some methodsFix MatMul and Add axesMerge pull requestopencv#18096 from l-bat:update_onnx_importer* Added ReduceSum to ONNX importer* Fix comments* Fix Mulcore(ocl): fix ocl::Image2d::isFormatSupported()in case of OPENCV_OPENCL_DEVICE=disabledMerge pull requestopencv#18080 from nhlsm:improve-mat-operator-assign-scalar* improve Mat::operator=(Scalar)* touch* remove trailing whitespace* TEST: check if old code pass test or not* remove CV_Error* remove warning* fix: is -> Scalar* 1) Mat *mat -> Mat &mat 2) return bool, add output param* add commentMerge pull requestopencv#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 warningshighgui: don't terminate if we can't initialize GTK backend- allow Users to handle such case- exception will be thrown insteadMerge pull requestopencv#18073 from vpisarev:apache2_licensechanged OpenCV license from BSD to Apache 2 license* as discussed and announced earlier, changed OpenCV license from BSD to Apache 2. Many files still contain old-style copyrights though* changed wording a bit; preserve the original OpenCV BSD license[IE][VPU]: Refactor vpu configsAdd arm64-build-checks github actionfix CV_Check warningsfix build error on odroid-n2-plusAdded reference to paper.Improve initialization performance of BriskreformattingImprove initialization performance of Briskfix formattingImprove initialization performance of BriskformattingImprove initialization performance of Briskmake a lookup table for ringuse cosine/sine lookup table for theta in brisk and utilize trig identityfix ring lookup tableuse cosine/sine lookup table for theta in brisk and utilize trig identityformattinguse cosine/sine lookup table for theta in brisk and utilize trig identitymove scale radius product to ring loop to ensure it's not recomputed for each rotrevert changemove scale radius product to ring loop to ensure it's not recomputed for each rotremove rings lookup tablemove scale radius product to ring loop to ensure it's not recomputed for each rotfix formatting of for loopmove scale radius product to ring loop to ensure it's not recomputed for each rotuse sine/cosine approximations for brisk lookup table.add documentation for sine/cosine lookup tablesImprove initialization performance of BRISKUpdate the stereo sample:* add the HH4 mode* option to display disparity with a color map* display current settings in the title bar* don't close app when wanting to take screenshotsAdd debug assert to check in FLANN the vectors size is multiple of the architecture word sizeDNA mode: add the distance computationsAdded a note about OpenCV logocore(trace): lazy quering for OPENCV_TRACE_LOCATION- fixes proper initialization of non-trivial variableadd OpenCV sample for digit and text recongnition, and provide multiple OCR models.Merge pull requestopencv#18148 from OrestChura:oc/fluid_core_perf[G-API]: Fluid Core kernels performance tests* Add performance tests for a list of Fluid Core kernels* Update gapi_core_perf_tests_fluid.cppAddressing a commentMerge pull requestopencv#17163 from AsyaPronina:gcompound_kernel_gmatp_coop* Fixed cooperation of Compound kernel and GMatP type* Added test for GCompound kernel + GMatP type cooperationMerge pull requestopencv#18083 from IanMaquignaz:fix_gen_pattern_centering* Fixed centering issue with make_cicle_pattern and make_acircle_pattern()* Fixed issue where asymmetric circles were not at 45 degree angles. Also fixed support for inch measurement by converting parsing to usage of floating points for page size* Fixed copy-paste error from experimental workspaceSupported ONNX Pow opfix: libavcodec version check for AV_CODEC_FLAG_GLOBAL_HEADERfix: libavcodec version check for AVDISCARD_NONINTRA - AVDISCARD_NONINTRA flag is supported only for FFMPEG libraries packFix cubic root computation to be able to handle negative values. Improve doc. Add regression test.Use camera intrinsic matrix everywhere. Add cameramatrix, distcoeffs and distcoeffsfisheye macros to avoid copy/paste errors.Merge pull requestopencv#17647 from jinyup100:add-siamrpnpp[GSoC] Add siamrpnpp.py* Updated base branch with siamrpnpp.py* Addition of Parsers* Merged to using few ONNX files, Changes to Parsers, Links to Repo* Deleted whitespace* Adjusting flake8 error* Fixes according to review* Fix according to review* Addition of OpenVINO backends and Computation target devices* Fix on backend after review* Fixes after review* Remove extra white space* Removed Repeated VaraiblesMerge pull requestopencv#17978 from sl-sergei:fix_17516_17531* Fix ONNX loading in issuesopencv#17516,opencv#17531* Add tests for Linear and Matmul layers* Disable tests for IE versions lower than 20.4* Skip unstable tests with OpenCL FP16 on Intel GPU* Add correct test filtering for OpenCL FP16 testssupport flownet2 with arbitary input sizerevise default proto to match the filename in documentationsfix a bugbeautify python codesfix bugbeautify codesadd test samples with larger/smaller sizeremove unless codeusing bytearray without creating tmp fileremove useless codesAdd Robot-World/Hand-Eye calibration function.feat: change OpenJPEG encoder to lossy with default parametersFix build issueFix build issueFix CI issueModify testBypass upstream issueAdd -build_webgpu optionAvoid buildbot failureFix mat constructor conflictModify test caseMade some changes as requestedRename some files to avoid conflictsrestore new-line in EOFModify cmake and reademeModify cmakeUpdate README.mdUpdate cmake and README
Uh oh!
There was an error while loading.Please reload this page.
closes#17612
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.