cuda::integral available types

asked 2017-12-11 15:56:33 -0500

Rado gravatar image

updated 2017-12-11 20:03:30 -0500

Currently, the cuda::integral function only accepts CV_8UC1, it seems.

From opencv/modules/cudaarithm/src/cuda/integral.cu: CV_Assert( src.type() == CV_8UC1 );

What's the reason for this?

I would love to be able to use other types, particularly all CV_32FCx variants. Would it be a simple matter of me customising the assertion in integral.cu and compiling my own custom build, or are there more fundamental reasons behind the limitation to CV_8UC1?

edit retag flag offensive close merge delete

Comments

So, I tried expanding the assertion as I posed in my original question... but it obviously didn't work.

After a bit of digging, I followed the series of function calls to opencv/modules/cudev/include/opencv2/cudev/grid/detail/integral.hpp and found that these functions are written for a single channel only, it seems. Not to mention what looks like uint implementations, but nothing for floats.

I way don't know enough to be able to make any code edits/additions to this. Anyone got any suggestions?

Rado gravatar imageRado ( 2017-12-14 02:21:30 -0500 )edit