Ask Your Question

Ikarus79's profile - activity

2019-02-14 03:00:21 -0600 commented question Steal data ptr from Mat or GpuMat

The cv::Mat documentation states clearly: Once the array is created, it is automatically managed via a reference-counti

2019-02-13 12:13:43 -0600 commented question Steal data ptr from Mat or GpuMat

Your question is quite unclear. Are you asking for CV::Mat or CV::GpuMat? One quick look in docu gives you this: uchar*

2019-02-13 09:42:55 -0600 commented question How to get videoWriter working with directShow

@berak I switched now to MSMF and it works like charm. I have noticed that H264 is the default codec used by this api. I

2019-02-13 08:28:54 -0600 commented question How to get videoWriter working with directShow

@berak, thanks for verification. I didn't dive too deep in the implementation if the videoWriter yet. Is there a chance

2019-02-13 07:16:56 -0600 asked a question How to get videoWriter working with directShow

How to get videoWriter working with directShow Hi, The documentation of videoWriter in openCV >= 4.0.0 stats clearly

2017-10-24 04:57:49 -0600 received badge  Notable Question (source)
2017-01-11 14:53:40 -0600 received badge  Popular Question (source)
2016-02-08 00:02:26 -0600 received badge  Notable Question (source)
2014-10-24 15:51:30 -0600 received badge  Popular Question (source)
2013-11-21 10:58:19 -0600 commented question How to compile OpenCV 2.4.7 with Qt and ffmpeg support using VS 2010 (x86)

I'm getting more and more disappointed with the changes regarding VideoWriter and VideoCapture. I tried everything to get OpenCV 2.4.7 work for me. I'm able to reproduce three strange behaviours:

  1. Build OpenCV 2.4.7 without VfW -> VideoWriter.open () returns always false!
  2. Build OpenCV 2.4.7 with VfW -> VideoWriter.open () returns true for the time, calling a release() and an open() on the same object returns always a false.
  3. With or without ffmpeg -> An VideoCapture.open () gives a error message asking for libiconv-2dll!

does someone has the same problems?

best Greg

2013-11-20 10:54:34 -0600 commented question Qt entry point not found (MinGW64 build)

Hi, while building OpenCV 2.4.7 cmake was asking explicit for Qt5 DLL's. That's why I used the Qt5.1.1 the latest version while building OpenCV 2.4.7. Don't know if this going to be satisfying for you. cheers

2013-11-20 10:46:24 -0600 commented answer Reading Video From File With Dropped Frames

Sorry, I have no clue. Actually I would address the problem while writing the video file, but I guess you can't do it.

Best

2013-11-20 07:17:23 -0600 answered a question Reading Video From File With Dropped Frames

Hi,

spontaneously I would try to use VideoCapture::get(CV_CAP_PROP_POS_FRAMES). If the return value differs more than one to he previous one, you can suggest this amount of missing frames at this position in the file. In your case, before grabbing the 14th image get should return 14, but before grabbing the 15 image get should return 16.

However, this is just a suggestion, I don't know what VideoCapture::get(CV_CAP_PROP_POS_FRAMES) returns in case. Give it a try. cheers greg

2013-11-20 06:13:31 -0600 asked a question How to compile OpenCV 2.4.7 with Qt and ffmpeg support using VS 2010 (x86)

Hello gents,

I'm struggling a lot trying to get OpenCV 2.4.7 work for me. My motivation for the new setup is the fact that I run into problems using the Videowriter for uncompressed grayscale videos (http://answers.opencv.org/question/3603/videowriter-videocapture-and-uncompressed-avi/). In https://github.com/Itseez/opencv/pull/1516 "akarsakov" is recommending to build OpenCV without vfw support and open uncompressed video through ffmpeg. That's what I tried to do. I followed basically the instructions mentioned in this video: http://docs.opencv.org/trunk/doc/tutorials/introduction/windows_install/windows_install.html

  1. Qt 5.1.1 comes with an installer, so I skipped the configuration of QT mentioned in the video.

    • I set the directories for Qt5Core and equivalent Cmake is asking for to .../5.1.1/msvc2010_opengl/lib/cmake/...
    • since I using the build including OpenGL I had to change add the following line to Qt5GuiConfigExtras.cmake - file: set(CMAKE_LIBRARY_PATH "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0a\\Lib") because of the cmake error Failed to find "glu32" in "".
  2. I downloaded the newest ffmpeg build from http://ffmpeg.zeranoe.com/builds/

    • I generated the vs2010 project disabling VfW and enabling ffmpeg instead:

    Video I/O:

    Video for Windows:           NO
    DC1394 1.x:                  NO
    DC1394 2.x:                  NO
    FFMPEG:                      YES (prebuilt binaries)
      codec:                     YES (ver 55.18.102)
      format:                    YES (ver 55.12.100)
      util:                      YES (ver 52.38.100)
      swscale:                   YES (ver 2.3.100)
      gentoo-style:              YES
      OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    DirectShow:                  YES
    Media Foundation:            NO
    XIMEA:                       NO
    
    • I added the include directories and libs for ffmpeg to the huigui module.

Finally I was able to build OpenCV.

However, trying to open Videowriter, the function returns "false" always, even with -1 for FOUCC-code to open the dialog (no dialog is appearing). No exception is fired.

I guess I made something wrong during my build procedure. Any suggestion where the mistake is?

Thank you in advance. Best Greg

2013-03-05 04:34:43 -0600 commented question How access GpuMat in a kernel

Hi Vladislav,

tnx for the comment. I though so already, there is no direct way to pass GpuMat to a kernel, just via the light-weighted wrapper or via the the pointer directly. Ok, thanks a lot. I will have to rewrite my struct.

cheers greg

2013-03-04 10:26:03 -0600 asked a question How access GpuMat in a kernel

Hello,

I'm quite new in cuda programming, and I need to write my own kernel. However, most of the things are clear to me, except one. The folloing sentence is written in the docu: The GpuMat class is convertible to gpu::DevMem2D_ and gpu::PtrStep_ so it can be passed directly to the kernel. I'm asking now myself how to access the buffers within a kernel, specially if I would like to use a struct to store my buffers. Here some PsydoCode:

struct GpuBuffer{
    GpuMat InBuffer1;
    GpuMat InBuffer2;
    GpuMat InBuffer3;
    GpuMat OutBuffer;
};

int main (void)
{
    GpuBuffer d_buffer;
    InitGPUBuffer (d_buffer);
    callKernel(d_buffer);
    return 0;
}

void InitGPUBuffer(GpuBuffer &d_buffer)
{
    Mat QuadFloatArr = Mat.zeros(Size(640, 480), CV_32FC4);
    d_buffer.InBuffer1.upload(QuadFloatArr);
    d_buffer.InBuffer2.upload(QuadFloatArr);
    d_buffer.InBuffer3.upload(QuadFloatArr);
    d_buffer.OutBuffer.upload(QuadFloatArr);
}

void callKernel(GpuBuffer& d_buffer)
{
    Cuda_KernelCall(d_buffer);
}

//cu-file
extern "C" bool Cuda_KernelCall(GpuBuffer& Buffer)
{
    dim3 threads(16,16);    
    dim3 grid((Buffer.InBuffer1.cols/2)/(threads.x), (Buffer.InBuffer1.rows/2)/(threads.y));  

    Kernel<<<treads, grid>>>(Buffer);

    return true;
}

__global__ void Kernel( GpuBuffer Buffer )
{
  int x = (blockIdx.x * blockDim.x) + threadIdx.x;
  int y = (blockIdx.y * blockDim.y) + threadIdx.y;

    // how to access the several buffer that are stored in the struct?
}

Thank you very much in advance.

cheers greg

2013-02-06 04:51:14 -0600 answered a question how to use page-locked memory, the CudaMem class

tnx anyhow,

for everyone how has the same difficulties I had: http://projects.developer.nokia.com/opencv/browser/opencv/opencv-2.3.1/modules/gpu/test/test_matop.cpp

cheers greg

2013-01-31 04:50:13 -0600 asked a question how to use page-locked memory, the CudaMem class

Hello guys,

I'm quite new in Cuda programming as well. For me it's still quite unclear how to use the CudaMem class. for example how I can do following using page_locked or even zero_copy memory:

Mat srcCpu3ChImg;
Mat outCpu4ChImg;

GpuMat srcGpu3ChImg;
GpuMat outGpu4ChImg;

// load srcCpu3ChImg

srcGpu3ChImg.upload(srcCpu3ChImg);
cv::gpu::cvtColor(srcGpu3ChImg, outGpu4ChImg, CV_BGR2BGRA);
outGpu4ChImg.download(outCpu4ChImg);

thank you a lot in advance cheers greg

2013-01-30 11:05:58 -0600 received badge  Editor (source)
2013-01-30 11:04:51 -0600 answered a question cudaMem in CPU functions

Hello guys,

I'm quite new in Cuda programming as well. For me it's still quite unclear how to use the CudaMem class. for example how I can do following using page_locked or even zero_copy memory:

Mat srcCpu3ChImg;
Mat outCpu4ChImg;

GpuMat srcGpu3ChImg;
GpuMat outGpu4ChImg;

// load srcCpu3ChImg

srcGpu3ChImg.upload(srcCpu3ChImg);
cv::gpu::cvtColor(srcGpu3ChImg, outGpu4ChImg, CV_BGR2BGRA);
outGpu4ChImg.download(outCpu4ChImg);

thank you a lot in advance cheers greg