Ask Your Question

nicksoto24's profile - activity

2018-03-29 01:56:20 -0600 marked best answer Resizing an image and applying a Gaussian blur

Hello, This seems a bit trivial, but I'm not sure as to why execution isn't working how I'm expecting it to. I want to resize an image and then apply the Gaussian blur to that image, but only one is being done; whichever comes last.

Am I losing the data from the first operation as it goes to the second?

And how could I also do this is parallel with multiple GPUs if I wanted to use streams? If that's at all possible.

All help is appreciated Thank you!

void resizeWithGauss(std::string inputFile, std::string outFile){
Mat inputHost = imread(inputFile, CV_LOAD_IMAGE_COLOR);
cuda::GpuMat inputDevice(inputHost);
cuda::GpuMat outputDevice;
const int ksize = 21;
const int type = CV_64F;
Timer timer;
timer.Start();
cuda::resize(inputDevice, outputDevice, Size(), 2.0, 2.0, CV_INTER_CUBIC);
cv::Ptr<cuda::Filter> gauss = cv::cuda::createGaussianFilter(inputDevice.type(), outputDevice.type(), Size(ksize, ksize), 6.0, 6.0);
gauss->apply(inputDevice, outputDevice);
timer.Stop();
printf("OpenCV GPU code ran in: %f msecs. \n", timer.ElapsedTime());
Mat outputHost;
outputDevice.download(outputHost);
imwrite(outputFile, outputHost);
inputHost.release();
outputDevice.release();}
2018-03-29 01:46:31 -0600 commented question Resizing an image and applying a Gaussian blur

awesome, that worked! Thank you very much :)

2018-03-29 01:21:39 -0600 received badge  Enthusiast
2018-03-27 23:37:24 -0600 commented question Resizing an image and applying a Gaussian blur

i added it at as text. My apologies.

2018-03-27 23:37:10 -0600 edited question Resizing an image and applying a Gaussian blur

Resizing an image and applying a Gaussian blur Hello, This seems a bit trivial, but I'm not sure as to why execution is

2018-03-27 23:33:47 -0600 edited question Resizing an image and applying a Gaussian blur

Resizing an image and applying a Gaussian blur Hello, This seems a bit trivial, but I'm not sure as to why execution is

2018-03-27 22:49:54 -0600 edited question Resizing an image and applying a Gaussian blur

Resizing an image and applying a Gaussian blur Hello, This seems a bit trivial, but I'm not sure as to why execution is

2018-03-27 22:49:18 -0600 asked a question Resizing an image and applying a Gaussian blur

Resizing an image and applying a Gaussian blur Hello, This seems a bit trivial, but I'm not sure as to why execution is

2018-03-27 21:32:30 -0600 asked a question Using Multiple GPUs to apply different filters in image processing

Using Multiple GPUs to apply different filters in image processing Hello, I am trying to use multiple gpus for the CUDA

2018-03-11 01:17:28 -0600 commented answer Using the cuda::createMedianFilter

OpenCV(3.4.1-dev) Error: Assertion failed (srcType == (((0) & ((1 << 3) - 1)) + (((1)-1) << 3))) in `ano

2018-03-11 01:16:02 -0600 edited question Using the cuda::createMedianFilter

Using the cuda::createMedianFilter Hey guys, so I've used the median blur for the CPU and I wanted to see how long it ta

2018-03-08 19:01:38 -0600 asked a question Using the cuda::createMedianFilter

Using the cuda::createMedianFilter Hey guys, so I've used the median blur for the CPU and I wanted to see how long it ta

2018-03-04 21:28:54 -0600 commented question Using CUDA after building with CMake

I added it with support for CUDA. I can't share the text files/log files because the post only allows picture extensions

2018-03-04 21:23:52 -0600 edited question Using CUDA after building with CMake

Using CUDA after building with CMake Hello guys, I've just finished using CMake to download all the files including the

2018-03-04 17:31:29 -0600 commented question Using CUDA after building with CMake

I'm not sure what you mean by my output. The #include functions for cuda aren't showing up. Is there something that I sh

2018-03-04 13:29:47 -0600 received badge  Editor (source)
2018-03-04 13:29:47 -0600 edited question Using CUDA after building with CMake

Using CUDA after building with CMake Hello guys, I've just finished using CMake to download all the files including the

2018-03-04 13:09:05 -0600 commented question Using CUDA after building with CMake

Oh, okay. So it's just an older module then. Thank you for the answer!

2018-03-04 03:50:44 -0600 commented question Using CUDA after building with CMake

Sorry that my question wasn't very clear. I'm trying to do image processing and in the documentation there's the gpu mod

2018-03-04 03:43:27 -0600 commented question Using CUDA after building with CMake

Sorry that my question wasn't very clear. I'm trying to do image processing and in the documentation there's the gpu tag

2018-03-04 00:14:49 -0600 asked a question Using CUDA after building with CMake

Using CUDA after building with CMake Hello guys, I've just finished using CMake to download all the files including the