Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@asmorkalov
Copy link
Contributor

Contrib: opencv/opencv_contrib#3716
Extra: opencv/opencv_extra#1169

#25146 from mshabunin:cpp-contours
#25195 from MaximSmolskiy:use-initial-quads-corners-in-ChessBoardDetector-findQuadNeighbors
#25287 from catree:feat_V4L2_PIX_FMT_SGRBG8_use_cvtColor
#25312 from dkurt:dnn_hotfix_tflite
#25319 from fengyuentau:gold_yolo
#25322 from sepperliu:patch-1
#25325 from asmorkalov:as/tiff_flags
#25327 from dkurt:uninit_jump_qrcode
#25333 from asmorkalov:as/dump_v4l2_test_frame
#25342 from asmorkalov:as/HAL_transpose
#25353 from LaurentBerger:typotutoenvref
#25356 from Kumataro:fix25345
#25357 from cabelo:yolov8m
#25361 from hanliutong:rvv-f32
#25364 from mshabunin:fix-unaligned-filter
#25368 from UnaNancyOwen:fix_double
#25371 from alexlyulkov:al/adaptive-threshold-tests
#25372 from CNOCycle:tflite/ShapeChecker
#25375 from asmorkalov:as/win32_arm_warning
#25380 from mshabunin:fix-calib-tests
#25381 from gmatheu:v4.x_js_markdown_typo

Previous "Merge 4.x": #25305

MaximSmolskiy and others added 30 commits March 10, 2024 17:49
…corners-in-ChessBoardDetector-findQuadNeighbors

Use initial quads corners in ChessBoardDetector::findQuadNeighbors
Ownership check in TFLite importer opencv#25312

### Pull Request Readiness Checklist

resolves opencv#25310

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
toBufferedImage
Modifying the original array copying method here can double the speed.
…_SRGGB8, V4L2_PIX_FMT_SBGGR8, V4L2_PIX_FMT_SGBRG8, V4L2_PIX_FMT_SGRBG8 options. Update modules/videoio/test/test_v4l2.cpp test file.
[BugFix] dnn (ONNX): Foce dropping constant inputs in parseClip if they are shared opencv#25319

Resolves opencv#25278
Merge with opencv/opencv_extra#1165

In Gold-YOLO ,`Div` has a constant input `B=6` which is then parsed into a `Const` layer in the ONNX importer, but `Clip` also has the shared constant input `max=6` which is already a `Const` layer and then connected to `Elementwise` layer. This should not happen because in the `forward()` of `Elementwise` layer, the legacy code goes through and apply activation to each input. More details on opencv#25278 (comment).

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
Resolve valgrind issue at QRCode detector
Export TIFF compression options as API and git rid of tiff.h.
…use_cvtColor

Use cvtColor() for Bayer image color demosaicing with V4L2_PIX_FMT_SGRBG8
Added option to dump v4l2 test frame from virtual camera
Remove unnecessary floating point literal
core: doc: add note for countNonZero, hasNonZero and findNonZero opencv#25356

Close opencv#25345 

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
Reworked findContours to reduce C-API usage opencv#25146

What is done:
* rewritten `findContours` and `icvApproximateChainTC89` using C++ data structures
* extracted LINK_RUNS mode to separate new public functions - `findContoursLinkRuns` (it uses completely different algorithm)
* ~added new public `cv::approximateChainTC89`~ - **:x: decided to hide it**
* enabled chain code output (method = 0, no public enum value for this in C++ yet)
* kept old function as `findContours_old` (exported, but not exposed to user)
* added more tests for findContours (`test_contours_new.cpp`), some tests compare results of old function with new one. Following tests have been added:
  * contours of random rectangle
  * contours of many small (1-2px) blobs
  * contours of random noise
  * backport of old accuracy test
  * separate test for LINK RUNS variant

What is left to be done (can be done now or later):
* improve tests: 
  * some tests have limited verification (e.g. only verify contour sizes)
  * perhaps reference data can be collected and stored
  * maybe more test variants can be added (?)
* add enum value for chain code output and a method of returning starting points (e.g. first 8 elements of returned `vector<uchar>` can represent 2 int point coordinates)
* add documentation for new functions - **:heavy_check_mark: DONE**
* check and improve performance (my experiment showed 0.7x-1.1x some time ago)
* remove old functions completely (?)
* change contour return order (BFS) or allow to select it (?)
* return result tree as-is (?) (new data structures should be exposed, bindings should adapt)
…d-tests

Added tests for adaptiveThreshold and sepFilter2D
Further optimize fastDepthwiseConv for RISC-V Vector.
Added and tested yolov8m model. opencv#25357

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [X] I agree to contribute to the project under Apache 2 License.
- [X] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [X] The PR is proposed to the proper branch
- [X] There is a reference to the original bug report and related work
- [X] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [X] The feature is well documented and sample code can be built with the project CMake

Below is evidence of the test:
![yolov8m](https://github.com/opencv/opencv/assets/675645/f9bfe2c6-fe4a-42fc-93a6-17e4da5c9bb5)
mshabunin and others added 6 commits April 9, 2024 17:44
imgproc: fix unaligned memory access in filters and Gaussian blur opencv#25364

* filter/SIMD: removed parts which casted 8u pointers to int causing unaligned memory access on RISC-V platform.
* GaussianBlur/fixed_point: replaced casts from s16 to u32 with union operations

Performance comparison:
- [x] check performance on x86_64 - (4 threads, `-DCPU_BASELINE=AVX2`, GCC 11.4, Ubuntu 22) - [report_imgproc_x86_64.ods](https://github.com/opencv/opencv/files/14904702/report_x86_64.ods)
- [x] check performance on AArch64 - (4 cores of RK3588, GCC 11.4 aarch64, Raspbian) - [report_imgproc_aarch64.ods](https://github.com/opencv/opencv/files/14908437/report_aarch64.ods)

Note: for some reason my performance results are quite unstable, unaffected functions show speedups and slowdowns in many cases. Filter2D and GaussianBlur seem to be OK.

Slightly related PR: opencv/ci-gha-workflow#165
js_image_display markdown
calib3d: increased AP3P test threshold for RISC-V platform
Fixing code example on js image display documentation
@asmorkalov asmorkalov merged commit 282c762 into opencv:5.x Apr 10, 2024
@asmorkalov asmorkalov mentioned this pull request Apr 16, 2024
@dkurt dkurt added this to the 5.0 milestone May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.