Posts

Showing posts from April, 2019

Good friend penguinV

Two birds with one "Pull"     As previously said, I was working on OpenCV bug (you can find some details here ). The bug was not something to spend more than 2-3 days on, but the problem that was there - compilation time. OpenCV project is a set of C/C++ files (and CUDA ;-) ), which is supposed to be compiled with "cmake" to generate library(ies), containing compiled code. Everything sounded pretty decent, until the moment when I realized that I would need to compile the entire folder with a bit more than a lot of different modules of different shapes and colours to make any changes to the existing code and test it. And just because the modules with reference one-another, creating a web of dependencies, I would need to compile the whole thing every time, not some of the modules independently ("video" module, "java", "core" etc.). It'd be okay if not the fact that every compilation would take 20 minutes. Not nice. So, I switched

Two Different Frames of Same VidioCapture

Image
OpenCV Challenge     I believe, this bug is going to be one of the most challenging I have worked on. Not because of complexity of the work, not because of the scale involved, but because the part of the code is brand new to me. STDMETHODIMP SourceReaderCB::OnReadSample(HRESULT hrStatus, DWORD dwStreamIndex, DWORD dwStreamFlags, LONGLONG llTimestamp, IMFSample *pSample) {     CV_UNUSED(llTimestamp);     HRESULT hr = 0;     cv::AutoLock lock(m_mutex);     if (SUCCEEDED(hrStatus))     {         if (pSample)                     CV_LOG_DEBUG(NULL, "videoio(MSMF): got frame at " << llTimestamp);             IMFSample* prev = m_lastSample.Get();             if (prev)             {                 CV_LOG_DEBUG(NULL, "videoio(MSMF): drop frame (not processed)");             }             m_lastSample = pSample;         }     }     else     {         CV_LOG_WARNING(NULL, "videoio(MSMF): OnReadSample() is called with error status: "