Ask Your Question

Eldar's profile - activity

2017-05-01 14:38:57 -0600 commented question Suddenly unable to use OpenCV

Renaming the exe made no difference.

Interesting thing I found out though, attaching the "CAP_DSHOW" and "CAP_FFMPEG" parameters to the VideoCapture method causes different effects. "CAP_DSHOW" gives a totally grey image. CAP_FFMPEG gives a nonsensically colourful image. I've confirmed FFMPEG is correctly installed though.

2017-05-01 05:28:45 -0600 commented question Suddenly unable to use OpenCV

Thanks for getting back to me!

Yes, I have ffmpeg enabled. A _ffmpeg320.dll is generated. This DLL is also in my exectuables folder.

No webcams work with OpenCV. I've tried 3. They all work in other programs (Skype, default Camera App).

Yes,I can load videos and see their frames. It's just my cameras :(

2017-04-30 15:36:18 -0600 commented question Suddenly unable to use OpenCV

depends.exe only reveals errors with missing "API-MS-WIN-XXXX", "EXT-MS-WIN-XXXX" and"IESHIMS.DLL". From what I understand, this is normal.

2017-04-30 10:39:40 -0600 commented question Suddenly unable to use OpenCV

Thank you for getting back to me!

  1. I have avast antivirus (free). I have essentially disabled it (by disabling all shields) but I get the same result.
  2. I'm not sure what this one means. Googling reveals something happened around January, but I'm not sure how to tackle this to investigate the issue.
  3. Windows update - I've removed 2 security updates. As a result, I've downgraded to 15063.0 (which drops the 250 part). No difference. I cannot remove anymore to revert further.

I've done some investigating since the post; and I'm concerned about Codecs. I did install MPHC since it last working build and now it's failing. I've since removed MPHC, but there's been no progress at all. How can I ensure I have what Codecs I may need?

2017-04-30 06:34:58 -0600 asked a question Suddenly unable to use OpenCV


OpenCV has been working very well for the past few months until 3 days ago. Suddenly, I cannot receive any video feed from my camera's feed. Since re-compiling OpenCV my IDE flags My camera's work fine in other applications (Skype, default camera App).

So far I have: Attempted different camera's - same result Recompiled Opencv 3.2 in CMake, believing a file may have been corrupt Repaired Visual Studio

Environment specs:

  • Opencv 3.2
  • Windows 10 : Build 15063.̶2̶5̶0̶ - I've since reverted to 15063.0
  • Visual Studio 2013

Below is a snippet of my code, all I receive is a grey screen.

cv::VideoCapture cap(0); //Behaves the same when 1 - external cam

if (!cap.isOpened())  // Always succeeds
    std::cout << "Cannot open the video cam" << std::endl;
    return -1;

cv::namedWindow("MyVideo", CV_WINDOW_AUTOSIZE);

while (1)
    cv::Mat frame;

    bool bSuccess =; // read a new frame from video

    if (bSuccess == false) //Always true
        std::cout << "Cannot read a frame from video stream" << std::endl;

    cv::imshow("MyVideo", frame); //Just displays a light grey frame

    cv::waitKey(20); -Wait a few - Common mistake for similar issues
return 0;

The returned frame DOES have data in the Mat object. It just always displays a light grey.

Could anyone offer any insight as to why i'm experiencing my issues?

2017-02-17 11:10:46 -0600 answered a question [Solved] MEXEXT Issues Compiling 3.2 with CUDA

After a few days of trying, the solution was to uninstall MatLab 2016. As soon as it was uninstalled, the compiling went smoothly.

Fortunately, I no longer need MatLab. But if anyone experiences the same, try uninstalling and then compiling. Reinstall upon completion. If you're on 2016, consider an earlier revision.

2017-02-10 04:12:08 -0600 commented question [Solved] MEXEXT Issues Compiling 3.2 with CUDA

Still looking into this. "MEXEXT" seems to be a "Binary MEX file-name extension" from MathWorks. In my case, that could be from MatLab which I have installed.

2017-02-09 08:30:33 -0600 received badge  Editor (source)
2017-02-09 08:30:14 -0600 asked a question [Solved] MEXEXT Issues Compiling 3.2 with CUDA


I'm a student trying to compile OpenCV with CUDA enabled. But I get frequent errors when I compile within Visual Studio 2013.

My environment:
OpenCV 3.2 (from Master branch)
Visual Studio 2013
Windows 10 - 64 bit
Nvidia GeForce 960M
CUDA Toolkit 8.0

My Process:

  1. Download OpenCV source from GitHub
  2. Use CMake to generate the project

    CUDA is enabled by default and I am changing nothing in the parameters

    I generate using the "Visual Studio 12 2013 Win64" generator. No major errors are thrown though "Error: MEXEXT: Unsupported platform." occurs once in the output console. Generation ultimately completes.

  3. Open the "OpenCV.sln" file in the generated output.
  4. Right click "Build All" -> Build
  5. Get the following errors:

This one occurs many times, particularly on cuda projects.

Error 4646 error : MEXEXT: Unsupported platform. D:\Libraries\cuda opencv\Build\modules\cudaarithm\CUSTOMBUILD opencv_cudaarithm

Error 140 error LNK1181: cannot open input file '....\lib\Release\opencv_core320.lib' D:\Libraries\cuda opencv\Build\modules\ml\LINK opencv_ml

Error 171 error LNK1181: cannot open input file '....\lib\Release\opencv_core320.lib' D:\Libraries\cuda opencv\Build\modules\imgproc\LINK opencv_imgproc

Could anyone please let me know if there's anything obviously wrong with my setup or process?

edit: some formatting cleanup

2016-10-01 07:16:53 -0600 commented question Storing frames from large video [Memory issue]

I'd like to manage memory more effectively and learn how this works. I'm sure there can be optimised solutions if once I have the frames, I could distribute them effectively across threads/processes and perhaps CUDA warps. I could recombine them once the work is done.

I am open to any ideas and will certainly keep the "on-the-fly" in mind.

2016-10-01 07:00:46 -0600 asked a question Storing frames from large video [Memory issue]

Hey guys,

I'm investigating how I can process video frames in bulk. Once I have my frames, I intend to just greyscale them and reconstruct the video. But what I'll add more to the process once this is achieved. Below is what I currently have

cv::Mat currentFrame;
std::vector<cv::Mat> frames;
cv::VideoCapture capture("../Clips/myFilm.avi");

int totalFrameCount = capture.get(CV_CAP_PROP_FRAME_COUNT);

for (int i = 0; i < totalFrameCount ; i++)
    capture >> currentFrame;
    frames.push_back(currentFrame.clone()); //Push our frame into a vector

This works when the video is small, but with larger ones I run out of memory. I don't know how to effectively free up memory in this scenario. On one hand, I can scale down the images in size before adding them, but that just pushes the problem further along when extremely high frame counts are involved.

Could anyone recommend me alternative designs that can handle long video files?

Thanks in advance.