2016-03-13 11:17:20 -0600 | answered a question | How to get FPS in OpenCV live capture Try this link. It helped me out. |
2016-03-13 10:37:40 -0600 | answered a question | Detecting Blue Color in this image Have you tried using the RGB colour space? If you have the image in RGB then only look at channel 3 of the image. Then you would say, if the blue component is greater than a certain threshold then we have detected a blue colour. Anything less than the threshold and its probably a mix of colours. mask = cv2.inRange(img, lower_magnitude_threshold, 255); Hope this helps! |
2016-03-11 22:41:00 -0600 | answered a question | How to capture in GRAYSCALE directly from source It's actually not possible to read in directly grayscale from a webcam. Most webcams will read in by default either YUV or YCrCb. As berak mentioned, 'CV_CAP_PROP_CONVERT_RGB' allows you to set whether or not you want this to be converted to RGB right away. So to get grayscale from a webcam, you'll have to use the 'cvtColor' function like so: cvtColor(original, gray, CV_BGR2GRAY); You'll have to do this for every incoming frame. Hope this helps! |
2016-03-03 22:59:15 -0600 | asked a question | Error with CUDA Cascade Classifier? Hi, I have in my code the line. fn_frontFace is a string with the location of the XML Haar classifier. Ptr<cuda::cascadeclassifier> cascade_gpu = cuda::CascadeClassifier::create(fn_frontFace); I'm trying to enable face detection with CUDA. But its giving me an error: OpenCV Error: GPU API call NCV Assertion failed in anonymous-namespace::NCVDebugOutputHandler file ....\cascadeclassifier.cpp line 156. I've tested out other CUDA enabled functions like: cuda::createBoxFilter() cuda::cvtColor() and they work just fine. Any ideas on how to solve the error? Thanks |