Ask Your Question

cv::cuda::meanStdDev for CV_32FC1

asked 2016-11-10 13:12:55 -0500

mescarra gravatar image

Hello everyone!

I was wondering whether cv::cuda::meanStdDev function will be implemented for the CV_32FC1 type in the near future or if it's not in the priority list at all.

I know I can download the image and use the host function (that's exactly my workaround now) but this is very slow and involves a download operation. I'm barely achieiving real-time.

Thanks a lot.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-11-10 18:05:45 -0500

Tetragramm gravatar image

If you are willing to re-compile, it's not that hard to add it. The npp function is there, you just need to add it to the table. And a couple of if statements.

edit flag offensive delete link more


Wait, line 142 asserts matrix type should be CV_8UC1. And nppiMeanStdDev8uC1RGetBufferHostSize or nppiMeanStdDevGetBufferHostSize_8u_C1R, don't really know what they do, but they both seem to be specific to the CV_8UC1 type.

mescarra gravatar imagemescarra ( 2016-11-11 19:13:11 -0500 )edit

Yep, you need to change some lines, add an if statement or two. The 32F_C1R functions exist, you just need to tell it to use them.

Tetragramm gravatar imageTetragramm ( 2016-11-12 00:06:59 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-11-10 13:12:55 -0500

Seen: 37 times

Last updated: Nov 10 '16