opencv/modules/imgproc
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
..
doc Add conventional Bayer naming. 2021-11-02 20:17:57 +01:00
include/opencv2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-02-11 17:32:37 +00:00
misc Merge pull request #19423 from LaurentBerger:houg_acc 2021-02-01 21:22:10 +00:00
perf Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-08 11:23:24 +00:00
src Merge pull request #21645 from chacha21:applyColorMap_8UC1_optimized 2022-03-01 19:55:00 +03:00
test Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-02-19 21:04:35 +00:00
CMakeLists.txt Merge pull request #17165 from komakai:objc-binding 2020-06-08 18:32:53 +00:00