Open Source Computer Vision Library
Go to file
Pierre Chatelier ebb6915e58
Merge pull request #21645 from chacha21:applyColorMap_8UC1_optimized
Optimize cv::applyColorMap() for simple case

* Optimize cv::applyColorMap() for simple case

PR for 21640
For regular cv::Mat CV_8UC1 src, applying the colormap is simpler than calling the cv::LUT() mechanism.

* add support for src as CV_8UC3

src as CV_8UC3 is handled with a BGR2GRAY conversion, the same optimized code being used afterwards

* code style

rely on cv::Mat.ptr() to index data

* Move new implementation to ColorMap::operator()

Changes as suggested by reviewer

* style

improvements suggsted by reviewer

* typo

* tune parallel work

* better usage of parallel_for_

use nstripes parameter of parallel_for_
assume _lut is continuous to bring faster pixel indexing
optimize src/dst access by contiguous rows of pixels
do not locally copy the LUT any more, it is no more relevant with the new optimizations
2022-03-01 19:55:00 +03:00
.github Update PULL_REQUEST_TEMPLATE.md and ISSUE_TEMPLATE.md 2022-01-15 13:31:41 +03:00
3rdparty ffmpeg/4.x: update FFmpeg wrapper 2021.12 2021-12-20 16:30:21 +00:00
apps Merge pull request #21420 from lukasalexanderweber:4.x 2022-02-01 16:56:44 +00:00
cmake Merge pull request #21630 from shibayan:arm64-msvc-neon 2022-02-26 17:35:03 +00:00
data fix files permissions 2020-04-13 04:29:55 +00:00
doc Use modern OpenVINO package interface 2022-02-01 16:52:17 +00:00
include exclude opencv_contrib modules 2020-02-26 15:12:45 +03:00
modules Merge pull request #21645 from chacha21:applyColorMap_8UC1_optimized 2022-03-01 19:55:00 +03:00
platforms Update clang toolchain for RVV. 2022-02-16 16:01:38 +08:00
samples Merge pull request #21458 from SinM9:speech_recognition_cpp 2022-02-28 18:23:00 +03:00
.editorconfig add .editorconfig 2018-10-11 17:57:51 +00:00
.gitattributes cmake: generate and install ffmpeg-download.ps1 2018-06-09 13:19:48 +03:00
.gitignore Merge pull request #17165 from komakai:objc-binding 2020-06-08 18:32:53 +00:00
CMakeLists.txt Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-02-06 16:10:43 +00:00
CONTRIBUTING.md migration: github.com/opencv/opencv 2016-07-12 12:51:12 +03:00
COPYRIGHT copyright: 2022 2022-01-04 12:49:15 +00:00
LICENSE copyright: 2021 2021-01-01 13:40:32 +00:00
README.md fix 4.x links 2021-12-22 13:24:30 +00:00
SECURITY.md Added SECURITY.md 2019-11-07 13:10:42 +03:00

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.