Repository navigation
Allow using more types with LUT, findNonZero, and PSNR. - #11364
Tetragramm wants to merge 31 commits into
Conversation
…in the cmp_ call for the case of NE and EQ.
… the SSE2 code from cmp_16u to cmp_smid<ushort>
# Conflicts: # modules/core/src/arithm.cpp # modules/hal/src/stat.cpp
…oing 90 degree rotations.
# Conflicts: # modules/core/src/mathfuncs_core.cpp
# Conflicts: # modules/core/include/opencv2/core.hpp # modules/core/src/copy.cpp # modules/imgproc/src/clahe.cpp
# Conflicts: # modules/flann/include/opencv2/flann/logger.h
Fix comment error in Rotate.
alalek
left a comment
There was a problem hiding this comment.
-
Missing tests.
-
LUT32s_32s requires 16Gb for LUT table.
-
Compare impact on size of OpenCV binaries.
-
Check performance, including changes in OpenCL code for LUT code.
Fixed the precommit hook, so the whitespace error should go away too.
|
Added tests. Performance tests coming. Hmm, the pre-commit hook didn't catch the error, although it did catch some others. Am I using it wrong, or is that just outside it's patterns? |
Fix whitespace error in lut.cpp, I think.
|
Performance Tests. Only OCL changed, so only those are shown. Test Old New |
|
that's a serious code expansion. Do we really need all this functionality? Can we make it more compact by taking into account the fact that for some of the types the code will actually be the same (e.g. findNonZero for 8u and 8s). Then, speaking of findNonZero, why not just use findNonZero(myarray != 0., nz_locs_array) where |
|
It depends on whether you are worried about binary size or lines of code. It would prevent the creation of two template specializations, but only 4 lines of code. Even then, the template function isn't very large. As to using != 0, that allocates and deallocates a Mat, and all the extra comparisons, reads, and writes. I intend on continuing the expansion of data type support (particularly CV_16U) in other modules, and for that, having all the basic functions (LUT specifically) compatible is important. |
|
@Tetragramm, we are now working on integrating some "mini" version of Halide into OpenCV, with intention to 1) reduce the OpenCV binary size by factor of 2 or so and 2) give user ability to build relatively simple custom pipelines that will run very efficiently w/o introducing many manually written functions or function flavors. I think, it would be much better way of solving the problem of missing datatype support in certain functions |
|
Well, I've got to more or less rewrite several of the algorithms anyway. I
could learn halide. Are things far enough along for examples integrated
with opencv?
…On Wed, Jun 6, 2018, 10:26 Vadim Pisarevsky ***@***.***> wrote:
@Tetragramm <https://github.com/Tetragramm>, we are now working on
integrating some "mini" version of Halide <http://halide-lang.org/> into
OpenCV, with intention to 1) reduce the OpenCV binary size by factor of 2
or so and 2) give user ability to build relatively simple custom pipelines
that will run very efficiently w/o introducing many manually written
functions or function flavors. I think, it would be much better way of
solving the problem of missing datatype support in certain functions
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11364 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJXFTSOYQj0Czpfsowsvnq1uZp35t80jks5t5-ajgaJpZM4TeQjS>
.
|
…ero & PSNR to support more types, not just 8u.
|
superseded by #11837; for LUTs, I think, we need some better solutions, like LUT with interpolation (e.g. pass the grid and the value range (e.g. 0 to 65535 range and 16x16x16 grid for 16-bit RGB to 16-bit RGB 3D transformation)). In fact, we already have something like that internally for some of our color conversion functions |
* a part of #11364 by Tetragramm. Rewritten and extended findNonZero & PSNR to support more types, not just 8u. * fixed compile & doxygen warnings * fixed small bug in findNonZero test
* a part of opencv#11364 by Tetragramm. Rewritten and extended findNonZero & PSNR to support more types, not just 8u. * fixed compile & doxygen warnings * fixed small bug in findNonZero test
* a part of opencv#11364 by Tetragramm. Rewritten and extended findNonZero & PSNR to support more types, not just 8u. * fixed compile & doxygen warnings * fixed small bug in findNonZero test
* a part of opencv#11364 by Tetragramm. Rewritten and extended findNonZero & PSNR to support more types, not just 8u. * fixed compile & doxygen warnings * fixed small bug in findNonZero test
Allow using more types with LUT, findNonZero, and PSNR.
Fix comment error in Rotate.
This is the first step in making sure all (or as many as I can get done) functions work with all the datatypes the can possibly accept. This takes the functions in core/operations on arrays and updates them. I believe that this is everything in core that needs to be updated, though if someone finds something else, just let me know.