Ask Your Question

Micka's profile - activity

2019-11-06 15:30:59 -0600 received badge  Famous Question (source)
2019-01-04 12:39:22 -0600 received badge  Popular Question (source)
2018-06-15 23:38:38 -0600 received badge  Notable Question (source)
2018-01-22 02:53:16 -0600 asked a question cuDNN in OpenCV DNN module?

cuDNN in OpenCV DNN module? Anyone knows whether there are any plans for including cuDNN in opencv's DNN module? I know

2017-11-29 11:32:21 -0600 received badge  Popular Question (source)
2017-08-22 06:13:54 -0600 received badge  Nice Question (source)
2017-08-03 06:14:58 -0600 received badge  Teacher (source)
2017-06-09 11:39:16 -0600 commented answer DefaultPeopleDetector: true pedestrian height

Additinal Information: The HoG Descriptor window included some amount background during training, so the pedestrian you want to detect (in single scale detection step) should be around 112 pixels height, while the other 16 pixels should contain background..

2016-11-28 03:17:28 -0600 commented answer Enable Multithreading with TBB during cascade training

Hello @MariaDimashova , is it right that during negative-stillPos-sample-search the bottleneck is HDD bandwidth while during actual training process the bottleneck is CPU and memory bandwidth? Atm I'm training haar (mode ALL) with about 45k positive samples and the training part is very slow even on the first stages. Looks like the problem is CPU load for me, while only about 30% of the CPU is used. Are there any plans to multi-thread the feature-selection part?

2016-11-21 08:57:30 -0600 commented question TW6864 support for opencv?

I don't know TW6864. so no idea about that. But in general I would prefer an SDK over openCVs VideoCapture class. I described the bug in VideoInput library at https://github.com/ofTheo/videoInput/...

2016-11-21 08:53:53 -0600 commented question [OpenCV2.14.13]Can't open the second camera

same usb controller?

2016-11-18 03:33:24 -0600 commented question Bad Camera Calibration

can you add all the images (maybe a link to zipped images)?

2016-11-18 03:29:02 -0600 commented question TW6864 support for opencv?

windows or linux? On Windows, all DirectShow compatible devices should be accessible. However there is a Bug in VideoInput Library (which is used by openCV), that some capturing modes aren't used, which caused problems for my usb analog2digital grabber (had to fix that bug myself).

2016-11-18 03:18:35 -0600 asked a question Windows: VideoWriter compression dialog and codec number x264vfw

I want to encode some videos with h264 on windows using cv::VideoWriter in version 2.4.11

I downloaded and installed x264vfw https://sourceforge.net/projects/x264... and I can select x264vfw in the compression dialog if I choose VideoWriter(filename, -1, parameters...)

Is it possible to select the same codec by choosing the right fourcc integer parameter and/or by choosing the right CV_FOURCC(a,b,c,d) characters a,b,c and d? Or is the compression dialog independent from those codes?

using CV_FOURCC('X', '2', '6', '4') gives me Could not find encoder for id 28: Encoder not found same for CV_FOURCC('H', '2', '6', '4') (and h264 / x264)

So how to find the right integer value or fourcc code?

Another possibility for me would be to open the compression dialog only once and later on release and open the VideoWriter again multiple times using the same parameters (or at least the same codec), but as far as I see, I always have to choose each parameter on .open() so I would have to click through the compression dialog again and again?

Any other advice?

2016-06-30 07:29:50 -0600 received badge  Self-Learner (source)
2016-06-23 07:52:53 -0600 commented question objecttracking methods, best solution?

afaik openCV 3 has a TLD implementation, but I can't tell you the function names.

2016-06-22 05:44:56 -0600 commented answer How to use CascadeClassifier with a mask

if the mask regions are small compared to the whole image, you could run the classifier on subimages? This will not give benefits in each situation where a mask could be applied, but whenever you have isolated ROIs as candidates, you can run the classifier on them (maybe add some additional border) instead of on the whole image!

2016-06-22 05:16:34 -0600 received badge  Scholar (source)
2016-06-22 05:09:34 -0600 answered a question CascadeClassifier Training - pressing "Return" Key continues computation.

I located the problem:

Windows 10 command prompt has some kind of "selection mode". If you click with your mouse inside the command prompt, you'll enter the selection mode. In selection mode it looks like the application is paused (or at least paused if it wants to print new content to terminal - not certain). To leave that selection mode you'll have to press return/enter, that's why my training needed ages (in pause) until I pressed enter (resumed)

maybe this will help someone else :)

:-/

Here's someone else with the same problem in another application... http://stackoverflow.com/questions/33...

2016-06-17 12:28:23 -0600 commented question CascadeClassifier Training - pressing "Return" Key continues computation.

I'll create and share a dataset on monday. The behaviour doesn't always occur, but often.

2016-06-17 12:12:58 -0600 commented question CascadeClassifier Training - pressing "Return" Key continues computation.

Windows 10; OpenCV 2.4.11 - 32 bit precompiled binaries. I'm mostly using negative samples that fit the training window size perfectly...

2016-06-17 07:41:07 -0600 asked a question CascadeClassifier Training - pressing "Return" Key continues computation.

Hello,

I've seen problems for the application opencv_traincascade.exe being stuck in finding enough negatives samples, so that the application stops on terminal output NEG current samples: x. I could collect more negative samples or reduce numNeg parameter, but I've observed some strange behaviour instead:

If the program is stuck in this way and I press the return-key on my keyboard, most of the time the program immediately continues with some higher "NEG current samples"-value (and often additional increases occur fast).

Can anyone explain what is happening on that keypress? Is it a bug or a feature? Is it ok to do so? Am I destroying my classifier-result or lowering its performance?

2016-06-11 11:25:17 -0600 received badge  Nice Question (source)
2015-09-16 03:27:24 -0600 asked a question LUT must have 1 channel or the number of channels of the input image?!?

Can someone explain me why there is the need of the LUT to have the same number of channels as the input image?

I don't even understand, which elements will be chosen...

For example if I have a BGR input image and a 1D LUT with 256 elements (each element is a cv::Vec3b).

Now for each pixel i of the input image: Output(i) = LUT(Input(i)).

But Input(i) is a cv::Vec3b element. So what will Output(i) be? LUT(Input(i)[0])??

In my opinion, LUT could have any number of channels, except if there are any algorithmic needs for optimization (I know that LUT is highly optimized).

Initially I wanted to create a Color image from Grayscale image with a single LUT call, but I had to use CV_GRAY2BGR in the beginning...

Here's some sample code:

cv::Mat input = cv::Mat(512,512,CV_8UC1, cv::Scalar(0));

for(int j=0; j<input.rows; ++j)
    for(int i=0; i<input.cols; ++i)
    {
        input.at<unsigned char>(j,i) = i/2;
    }


// unfortunately, we have to convert to grayscale, because OpenCV doesnt allow LUT from single channel to 3 channel directly. (LUT must have same number of channels as input)
cv::Mat input_3channels;
cv::cvtColor(input, input_3channels, CV_GRAY2BGR);

// create replacement look-up-table:
// 1. basic => gray values of given intensity
cv::Mat lookUpTable(1, 256, CV_8UC3);

for( int i = 0; i < 256; ++i)
    lookUpTable.at<cv::Vec3b>(0,i) = cv::Vec3b(i,i,i);

// 2. replace whatever you want:
lookUpTable.at<cv::Vec3b>(0,25) = cv::Vec3b(25,0,0);

lookUpTable.at<cv::Vec3b>(0,100) = cv::Vec3b(0,255,0);
lookUpTable.at<cv::Vec3b>(0,115) = cv::Vec3b(255,0,0);
lookUpTable.at<cv::Vec3b>(0,200) = cv::Vec3b(0,100,255);

// LUT will fail if used this way: cv::LUT(input, lookUpTable, output); - with assertion failed: (lutcn == cn || lutcn == 1) because LUT has 3 channels but input only has 1 channel.
cv::Mat output;
cv::LUT(input_3channels, lookUpTable, output);

cv::imshow("output", output);
cv::imshow("input", input);

cv::waitKey(0);
2015-03-25 11:17:00 -0600 commented question Performance of OpenCV GPU BruteForceMatcher

are you using OpenCV with IPP or without IPP? IPP uses GPU internally! If not, try measuring without the overhead of loading images from/to gpu. and call the gpu function once before time measurement (first call might be slow).

2015-03-25 11:14:28 -0600 answered a question cv::gpu::remap comparatively slow

We've had a very strange behaviour where even computational intensive processing like HoG Descriptor Detector were slower than openCV gpu (cuda) functionality, even if overhead was removed from time measurement.

It turned out that OpenCV was using IPP and IPP itself can use GPU nowadays.

just in case someone else googles for "opencv gpu slower" and didnt know about the IPP GPU support ;)

2015-03-10 10:50:50 -0600 commented question cascade classifier memory

did you find a solution within the openCV code? I've got a very similar problem. My current hint is that TBB influences the "memory leak", but that's not certain yet. Using TBB and a couple of cascadeClassifier (Haar + LBP), my program runs with constant memory for some time (5-15 minutes) and doubles up memory consumption fast later and continues rising. Using OpenCV 2.4.x and TBB 4.3

2015-03-10 10:42:40 -0600 received badge  Enthusiast
2015-03-09 07:09:25 -0600 commented question Detection/segmentation of people wearing uniform.

I would say this is a very hard task in general.

2015-02-25 09:47:08 -0600 received badge  Self-Learner (source)
2015-02-25 09:39:16 -0600 answered a question read analog video signal - supported grabber

Now I tried Hauppauge USB-Live 2 which unfortunately didnt work with cv::VideoCapture out of the box (it is found as a device but doesnt give images).

Successfully accessed it with VLC (DSHOW - use configuration dialog given by the driver) and with DirectShow GraphstudioNext, but one thing has to be taken care of: 1. Create the Crossbar object and route the pins correcly. 2. CONNECT the Crossbar Video Decoder Out to the Analog Video In of the Video Capture Filter.

Since it worked with Graphstudio, I hoped it to work with VideoInput Library, too (later seen that OpenCV uses VideoInput itself), but same as OpenCVs VideoCapture, the device is found but doesnt provide any images. Finally I found out, that VideoInput Library creates the crossbar and routes the PINs, but it doesn't insert the crossbar in the filter graph! I guess that's because in many/most/some drivers/devices, the crossbar isn't connect to the filter at all. But some Filters really need the Crossbar to be connected (like my Hauppauge USB capture dongle)!

My next steps will be to change code in OpenCVs cap_dshow.cpp file to connect the crossbar if possible/necessary.


EDIT: I found that it wasnt related to connecting the crossbar but that there is a line in VideoInput: hr = VD->pCaptureGraph->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, VD->pVideoInputFilter, VD->pGrabberF, VD->pDestFilter); which doesnt work for that device. hr = VD->pCaptureGraph->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, VD->pVideoInputFilter, VD->pGrabberF, VD->pDestFilter); works instead!!

or use CAPTURE_MODE instead, which is PIN_CATEGORY_PREVIEW if possible or PIN_CATEGORY_CAPTURE otherwise: pCaptureGraph->RenderStream(&CAPTURE_MODE, ...);

2015-02-23 07:18:15 -0600 commented question findHomography RANSAC should check chosen Points for collinearity?

@Doombot I've had a look at the code and it looked like it's just random sample drawing and checking that no points are drawn multiple times, but no check for colinearity. But didn't analyze the code completely, so maybe I missed something.

2015-02-17 04:19:59 -0600 received badge  Supporter (source)
2015-02-17 03:56:25 -0600 received badge  Editor (source)
2015-02-17 03:52:09 -0600 asked a question read analog video signal - supported grabber

I would like to read analog video signal images, if possible directly from OpenCV VideoCapture object from Windows (7/8).

After testing a cheap usb video grabber (maybe stk-1160 chip) without any success (didnt even work with DirectShow Graphstudio) I would like to know two things:

  1. Are there any usb analog video grabber known to work with OpenCV.

  2. What properties must be fulfilled for a device to be readable from a OpenCV VideoCapture element (e.g. if OpenCV was compiled with DirectShow support)? Is it enough that the device uses a WDM Video Capture driver? So that I don't have to buy 100 different devices and test each one ;)

If none of the questions can be answered: How can I grab a analog video signal to use it in my own code (asking for both: hardware and SDKs/libraries/etc)?

edit: will definitely need PAL signal support and maybe NTSC too

2015-02-05 08:43:20 -0600 received badge  Student (source)
2015-02-05 08:42:49 -0600 asked a question findHomography RANSAC should check chosen Points for collinearity?

I wonder if it is by concept or a bug, that RANSAC within findHomography does not check the chosen random points for collinearity.

From my understanding it should do it, because afaik homography can't be computed (correctly) if some of the 4 points (either scene- or objectpoints) are collinear.

Should this be placed as a request or to bug tracker or something?

findFundamentalMat does perform a collinear check, btw.

2014-01-16 03:54:34 -0600 commented answer Calc eucliadian distance between two single point ?

that solution seems to work, but seems to be quite slow?!? Looping computation of cv::norm(a) adding the result to a variable and updating variable a (by adding another point) takes on my computer about 5 times longer (for 9000 < #loops < 1000000000) than computation of sqrt(a.x*a.x + a.y*a.y + a.z*a.z) and doing the same other stuff (in c++ code, didnt check assembler code). Can anyone confirm that and/or explain it (I didnt check cv code either)?