OpenCV Video module tutorials - c++

As you know there is no opencv official tutorial for video module. That tutorial section is empty. I googled but couldn't find anything good. Any of you know a good OpenCV video module tutorial in c++?
Actually, I need to capture humans, then identify the colour of their T-Shirts

you just want to capture video stream or apply some algo on it or what?
check this
http://www.cc.gatech.edu/~daleshin/OpenCV_Tutorial.pdf

Here is a small example on opencv docs to capture from cam.
http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html

Maybe this help you to detect peoples
http://docs.opencv.org/modules/gpu/doc/object_detection.html

These books from opencv.org may be useful for you
http://opencv.org/books.html

You can do this by using haarcascade xml already provided in opencv.
Then you can check the color of t-shirt by applying simple opencv filters to extract color.
Haarcascade xmls are available of full human body, upper half, lower half etc.

Related

DJI M210 calibrate front stereo cameras for depth perception

I'm trying to get the calibration values to put in the m210_stereo_param.yaml, like it's suggested in the official developer website (OnboardSDK for Linux). The objective is to have good values to test the depth perception sample. The website suggest different approach for the calibration, and I chose the OpenCV one.
I found an example of calibration on this Github repository: Opencv - stereo_calibrate_rc (some explanations are given on this link: Stereo Camera Calibration in Opencv 3)
The problem is that after getting the final Matrix (in the intrinsics.yaml and extrinsics.yaml), I modified the values in the m210_stereo_param.yaml, and tried to run the sample. I got this result (which is not correct, even the default values of the m210_stereo_param.yaml had a better result).
Do you have any idea of what is going wrong with the calibration ? It's quite complicated to found a clear approach to get values to put in the yaml.
Solve, the problem was that the xml file containing the list of images need to looks like this :
"data/left01.jpg"
"data/right01.jpg"
"data/left02.jpg"
"data/right02.jpg"
"data/left03.jpg"
...
And mine xml file was more like this :
"data/left01.jpg"
"data/left02.jpg"
"data/left03.jpg"
...
"data/right01.jpg"
"data/right02.jpg"
So, if you use this example, check if your xml file alternate left-right pictures.
I asked the the tech support of DJI and he told me that the M210 does not support the calibration. In this case, you should not have these problems. Just use the original one.

Capture a specific location of an image using OpenCV

I am trying to organize my trading card collection digitally and am working on building a scanner using ocr to detect the names of my collection.
I need to use a webcam to snap a single image of each card in question. Snapping the image doesn't seem to be to difficult, but I need help determining how to get OpenCV to capture only a specific part of that image for OCR to work with. I'm trying to capture just the text portion of the image so that the artwork on the cards doesn't interfere with the OCR.
If my card will be placed in the same physical location each time, is there a way to get OpenCV to take an image and focus on just the area of the image that I'm interested in.
Thank You
Sour Jack
I am not sure I understand the problem. Do you want to use your OCR algorithm always on the same portion of the snapshot? If so, you can try something like:
roi = img[y:y+height, x:x+width]
There is more information here: http://answers.opencv.org/question/29260/how-to-save-a-rectangular-roi/

Scene Text Detection in Opencv

In the new release of OpenCV (3.0), there is a module to detect texts in a camera image as shown in this page. However, the link to the demonstration codes to illustrate this module (https://github.com/Itseez/opencv/blob/master/samples/cpp/textdetection.cpp)is broken. Any idea on how to use this module? Thanks.
You can google "blob/master/samples/cpp/textdetection.cpp" and you'll find some forks. Example.
EDIT:
They have moved the whole text detection / recognition thing here! :)
http://github.com/Itseez/opencv_contrib/tree/master/modules/text

OpenCV 2.3 C++ basic image processing

What is the best way to open an image, manually manipulate the pixels as floats, normalize the pixels back to 8bit int values (0-255) and save the new image.
I found deferment codes use different variable types and commands, should i use Iplimage or mat, imread, and so on...
i would really appreciate a code example
Thanks!
You may want to look at the tutorial section provided in the OpenCV docs: OpenCV Tutorials. Especially "Introduction to OpenCV" and "core module. The Core Functionality" are the chapters you should be most interested in.
Refer here. This gives the basic code sample.

Using DirectShow to capture frames and OpenCV to Process

I have made two different solutions for Video-to-Image Capturing and was wondering if I could intertwine the best of both worlds. I am currently using DirectShow to load in an AVI file and capture images. However, DirectShow's lack of image processing capabilities and the need to make additional filters have stopped me dead in my tracks.
I then turned to OpenCV.
It has all the image processing functions I need, but it has trouble loading in the videos that the DirectShow solution was able to retrieve. Are there any tutorials online about this process or anything close to it? Thanks for any advice.
Yes, here is a link to an article: http://opencv.willowgarage.com/wiki/DirectShow