Ask Your Question

Vladislav Vinogradov's profile - activity

2020-10-29 14:39:59 -0600 received badge  Nice Answer (source)
2020-06-12 10:04:58 -0600 received badge  Good Answer (source)
2020-06-10 21:03:17 -0600 received badge  Good Answer (source)
2020-06-10 21:01:55 -0600 received badge  Nice Answer (source)
2020-06-01 06:29:16 -0600 received badge  Good Answer (source)
2018-06-24 17:54:30 -0600 received badge  Great Answer (source)
2018-06-24 17:54:30 -0600 received badge  Guru (source)
2017-08-29 15:30:10 -0600 received badge  Civic Duty (source)
2017-04-27 06:07:22 -0600 received badge  Nice Answer (source)
2016-03-10 03:10:01 -0600 received badge  Enthusiast
2016-03-03 13:57:01 -0600 received badge  Nice Answer (source)
2016-03-03 01:15:56 -0600 commented answer background detection tutorial: error using MOG pointers

Yes, it looks like MOG was removed from 3.0.

2016-03-03 01:15:37 -0600 answered a question Passing an array of cv::GpuMat to a cuda kernel?

You need to manually convert array of GpuMat to array of PtrStepSz:

cv::cuda::GpuMat *mats = new cv::cuda::GpuMat[180];
// Initialize eachof the mats

cv::cuda::PtrStepSz<float> h_ptrs = new cv::cuda::PtrStepSz<float>[180];
for (int i = 0; i < 180; ++i)
    h_ptrs[i] = mats[i];

Then you need to copy h_ptrs to GPU memory:

cv::cuda::PtrStepSz<float> *d_ptrs = NULL;
cudaMalloc(&d_ptrs, 180 * sizeof(cv::cuda::PtrStepSz<float>));

cudaMemcpy(d_ptrs, h_ptrs, 180 * sizeof(cv::cuda::PtrStepSz<float>), cudaMemcpyHostToDevice);

Then you can pass d_ptrs to kernel:

 somename<<<...>>>(d_ptrs);
2016-02-15 12:02:03 -0600 received badge  Nice Answer (source)
2016-01-28 05:39:02 -0600 received badge  Nice Answer (source)
2015-12-27 07:52:41 -0600 received badge  Good Answer (source)
2015-11-19 14:53:33 -0600 received badge  Good Answer (source)
2015-10-12 18:16:31 -0600 received badge  Nice Answer (source)
2015-10-10 15:31:08 -0600 received badge  Guru (source)
2015-10-10 15:31:08 -0600 received badge  Great Answer (source)
2015-08-02 15:57:17 -0600 received badge  Good Answer (source)
2015-07-18 18:56:49 -0600 received badge  Good Answer (source)
2015-07-18 03:49:53 -0600 received badge  Nice Answer (source)
2015-07-08 20:59:18 -0600 received badge  Good Answer (source)
2015-01-29 10:46:15 -0600 received badge  Good Answer (source)
2015-01-12 06:27:26 -0600 received badge  Nice Answer (source)
2014-10-31 12:56:58 -0600 received badge  Nice Answer (source)
2014-10-24 14:47:50 -0600 received badge  Good Answer (source)
2014-08-16 20:09:48 -0600 received badge  Nice Answer (source)
2014-08-04 03:15:33 -0600 commented question Building current 3.0 dev branch Ubuntu 14.04

I submitted a fix for the issue PR.

2014-05-18 13:52:22 -0600 received badge  Nice Answer (source)
2014-04-14 11:40:33 -0600 commented question Compiling CUDA never enables

Did you install CUDA Toolkit? Try to set CUDA_TOOLKIT_ROOT_DIR CMake variable.

2014-03-18 12:47:26 -0600 answered a question a wierd result of a project with GpuMat and cuda

Use IMREAD_GRAYSCALE and IMREAD_COLOR flags for imread calls:

Mat image = imread("1.jpg", IMREAD_COLOR);
Mat mask  = imread("mask.jpg", IMREAD_GRAYSCALE);
2014-03-18 12:29:16 -0600 commented answer The function "setTo"about gpumat
cv::gpu::compare(B, cv::Scalar::all(k), A, cv::CMP_GT);
2014-03-16 03:27:00 -0600 answered a question The function "setTo"about gpumat

GpuMat doesn't support expressions like Mask == 0. You have to call plain functions like cv::gpu::bitwise_not:

cv::gpu::bitwise_not(mask, mask);
img.setTo(Scalar::all(0), mask);
2014-03-14 13:40:54 -0600 commented question Problem compiling Opencv 2.4.8 - cudaarithm.a linking

You are building master branch (3.0 version) of OpenCV, not 2.4.8.

2014-03-10 03:14:48 -0600 commented question i have one problem using cuda+opencv+nsight eclipse

Please add more information about your issue. Do you see any error message?

2014-03-03 15:05:42 -0600 received badge  Nice Answer (source)
2014-03-02 00:32:40 -0600 answered a question Direct access to pixel by oclMat.

You can't access oclMat data from CPU code. The oclMat data is located on GPU memory. You can only upload/download from/to CPU Mat or run custom OpenCL kernel.

2014-02-28 02:09:20 -0600 received badge  Nice Answer (source)
2014-02-27 11:23:23 -0600 answered a question SurfFeatureDetector cannot use data of CV_16S ?

Yes, SurfFeatureDetector supports only CV_8U depth. Also it will convert color image into grayscale.

2014-02-13 13:16:15 -0600 received badge  Nice Answer (source)
2014-02-13 11:06:50 -0600 answered a question why the result of filter2D function is correct on cpu and wrong on gpu??

GPU filters don't work in-place. Use different GpuMat objects for input and output parameters:

cv::gpu::GpuMat gpuinput=...;
cv::gpu::GpuMat gpuoutput;
cv::gpu::filter2D(gpuinput,gpuoutput,gpuinput.depth(),ker);
2014-02-11 10:37:43 -0600 answered a question SuperResolution parameters
  • temporalAreaRadius - the number of images used in the super-resolution.
  • iterations - the number of iterations in steepest descent solution for super-resolution minimization problem.
2014-02-10 05:57:09 -0600 commented question [compile error] in building calcOpticalFlowFarneback example

How did you build this example? Did you build it as a part of OpenCV project or you added farneback_optical_flow.cpp to your project? Did you modify this source? opencv2\gpu\device\saturate_cast.hpp header can be used only in CUDA code that compiles with NVCC, but farneback_optical_flow.cpp doesn't include this header.

2014-02-06 12:03:02 -0600 commented question cv::gpu::blur returns zero Mat when Mat is processed in place

GPU filters doesn't work in-place.

2014-02-06 04:34:02 -0600 received badge  Nice Answer (source)
2014-01-28 00:18:10 -0600 answered a question New Super resolution module for use in iOS

Currently, super resolution module is disabled for iOS, because it wasn't tested on the system. You can modify CMake script of the super resolution module (opencv/modules/superres/CMakeLists.txt) and removed the first three lines:

if(ANDROID OR IOS)
  ocv_module_disable(superres)
endif()

This will allow you to build superres module for iOS.

2014-01-27 04:38:32 -0600 received badge  Good Answer (source)
2014-01-24 09:34:34 -0600 received badge  Nice Answer (source)