OpenCV Sample Code in python - opencv

I'm trying to get a start on using opencv in python to do some object detection. Are there any example code projects out there?
I've seen some examples that are specific to face detection but they seem to use preprocessed data that I don't know how to generate.
Thanks!

There are a lot of examples, but I would suggest in any case to give a look at the following sources:
http://opencv-python-tutroals.readthedocs.org/en/latest/
http://www.pyimagesearch.com/

Related

theory behing open cv functions

I have used OpenCV library to for Stereo Camera Calibration and disparity map estimation. I used the tutorials available in OpenCV 3.3.1 documentation. For example, for disparity I have used the code from the following link:
https://docs.opencv.org/3.3.1/d3/d14/tutorial_ximgproc_disparity_filtering.html
It is working but I can't find detils of what is happenning in the functions used in the code such as left_matcher->computer or createdisparityWLSfilter. I want to read the theory behind these fucntion. So here I am looking for a good link or suggestion for that. I came across the following book:
http://shop.oreilly.com/product/0636920044765.do
But I am not sure if this is the correct resource to read about details of opencv function.
Any help is appreciated.

Face Expression Change

I have seen numerous examples and sample code for detecting emotions from a human face. I am in desperate need of some algorithm to change expressions. I am a new OpenCV learner. I am also confused if this image manipulation can be done using opencv ? Can functions such as warpaffine() be used for this ? If shall be grateful if someone can guide me in steps how to perform this eg. input a neutral face emotion and convert it to smile ?
Try using FaceAPI, it is free to use for non-commercial purposes and works brilliantly. It is well documented and easy to use.

Feature extraction using wavelets and curvelets

I am involved in a project regarding image processing where I need to extract features of a given image. I am supposed to do that using wavelets and curvelets. But I cannot find any source where I can fully understand them. I have downloaded several journals and publications but couldn't figure out exactly how features are extracted using them.
Can someone explain how its done. Any tutorial that easily explains them is also welcome.
Thanks in advance.
If you are interested in image processing, you musst know the existance of the library OpenCV. This is the most usefull library for image processing.
In This library there is an implementation of Haar Wavelet transform, maybe that could interest you.
For all this kine of algorithms there is another powerfull source of data. That is Matworks File Exchange. This web page is a matlab open source platform. If you don't use matlab, you can see source codes provided on this web site to understand how does wavelet and curvelet works.
For example, this project may interest you :
http://www.mathworks.com/matlabcentral/fileexchange/33146-feature-extraction-using-multisignal-wavelet-packet-decomposition

How do I create a custom haar classifier?

I am struggling to create a custom haar classifier. I have found a couple tutorials on the web, but they do not specify which version of opencv they are using. What I need is a very concise and simplified example of the steps that are required, along with a simple dataset of images. I also need to know the opencv version and the OS platform so I can get it running. I have tried a matrix of opencv versions on both windows and linux and I have run into memory error after memory error. I would like to start with a known good set of data and simple commands before expanding it to fit my problem.
Thanks for your help,
Chris
OpenCV provides two utility commands createsamples.exe and haartraining.exe, which can generate xml files used by Haar Classifiers. That is, with the xml file outputted from haartraining.exe, you can directly use the face detection sample with your xml file to detect any customized objects.
About the detailed procedures to use the commands, you may consult Page 513-516 in the book "Learning OpenCV", or this tutorial.
About the internal mechanism of how the classifier works, you may consult the paper "Rapid Object Detection using a Boosted Cascade of Simple
Features", which has been cited 5500+ times.

How to use Opencv for Document Recognition with OCR?

I´m a beginner on computer vision, but I know how to use some functions on opencv. I´m tryng to use Opencv for Document Recognition, I want a help to find the steps for it.
I´m thinking to use opencv example find_obj.cpp , but the documents, for example passport, has some variables, name, birthdate, pictures. So, I need a help to define the steps for it, and if is possible how function I have to use on the steps.
I'm not asking a whole code, but if anyone has any example link or you can just type a walkthrough, it is of great help.
There are two very different steps involved here. One is detecting your object, and the other is analyzing it.
For object detection, you're just trying to figure out whether the object is in the frame, and approximately where it's located. The OpenCv features framework is great for this. For some tutorials and comprehensive sample code, see the OpenCv features2d tutorials and especially the feature matching tutorial.
For analysis, you need to dig into optical character recognition (OCR). OpenCv does not include OCR libraries, but I recommend checking out tesseract-ocr, which is a great OCR library. If your documents have a fixed structured (consistent layout of text fields) then tesseract-ocr is all you need. For more advanced analysis checking out ocropus, which uses tesseract-ocr but adds layout analysis.

Resources