Which algorithm can I use for quadrilater/cube detection? - c++

For a project, I have to detect a cube with a webcam. I think that OpenCV could be a good solution to find out where is it (real-time).
I'm new in the computer vision domain, and I wonder which algo can I use ? Hough ?
I've seen this video (quite impressive!): http://www.youtube.com/watch?v=ytvO2dijZ7A
Do you know how he was able to do it ?
Thank you a lot for your help

To get the result as in the video, you have given, you can use squares.cpp that comes with OpenCV samples. (It is for images. Hope you can do it for videos.)
Other useful SO on this topic are:
1) OpenCV C++/Obj-C: Detecting a sheet of paper / Square Detection
2) Square detection doesn't find squares

Related

Stitching images can't detect common feature points

I wish to stitch two or more images using OpenCV and C++. The images have regions of overlap but they are not being detected. I tried using homography detector. Can someone please suggest as to what other methods I should use. Also, I wish to use the ORB algorithm, and not SIFT or SURF.
The images can be found at-
https://drive.google.com/open?id=133Nbo46bgwt7Q4IT2RDuPVR67TX9xG6F
This a very common problem. Because images like this, they actually do not have much in common. The overlap region is not rich in feature. What you can do is dig into opencv stitcher code and there they use confidence factor for feature matching, you can play with that confidence factor to get matches in this case. But this will only work if your feature detector is able to detect some features in overlapping resion.
You can also look at this post:
Related Question
It might be helpful for you.
"OpenCV stitching code"
This is full pipleline of OPencv Stitching code. You can see that there are lot of parameters you can change to make your code give some good stitching result. Also I would suggest using a small image (640 X480) for the feature detection step. Using small images is better than using very large images

Opencv Face morphing

I'm looking for a solution in order to perform a morph of a given face into another.
My deal is to match their features space perfectly in order to perform a better face recognition.
SIFT/SURF did't help me, and I've tried a thin-plate spline processing from landmarks, but the resulting face is too deformed (maybe I need more points).
I'd like to obtain something like this solution, does anybody know a way to obtain those points?
I recently wrote an article on Face Morphing using OpenCV ( C++ and Python )
http://www.learnopencv.com/face-morph-using-opencv-cpp-python/
I hope you find it useful. It uses dlib for facial feature detection, followed by delaunay triangulation, and finally morphing.

Real time Object detection: where to learn?

I am working with opencv these days and I am capable of doing 99% of stuff explained in opencv official tutorials. And I managed to do motion tracking manually with background substraction, where some users claimed as impossible.
However, right now I am working with object detection, where I need to track the hand and want to find whether the hand is moved to left or right. Can this be done by following steps? (used in motion detection)
Get camera 2 instances of camera video (real time)
blur it to reduce noise
theresold it to find hand (or leave it if blur is enough)
find the absolute deference between 2 images
Get PSR
find pixel position of motion
However, it seems like it is not 100% same as motion detection, because I read some stuff about Kalman Filter, Block-matching, etc which I did not use in motion detection. However, I found this tutorial
http://homepages.cae.wisc.edu/~ece734/project/s06/lintangwuReport.pdf
But, I really need your advice. Is there any tutorial which teach me how to do this? I am interested in learning core theory with opencv explanation (c++).
Since I am not good at maths( I am working on it - I didnt go to the university , they found me and invited me to join the final year for free because of my programming skills, so I missed math) , full of math stuff will not work.
Please help. Thank you.

Best algorithm for feature detection in urban environment - OpenCV

I'm using OpenCV library (C++) to extract detectors from 2 images coming from a video stream taker from an aerial camera in order to, afterwards, find the matching points in successive images. i'm wondering which is the best algorithm to find robust detectors of a urban environment??
Ps. Actually I'm using SURF but when the images changes a little (because the camera is translating very slowly) the matchings between these descriptors become very few!
If you want to try different aproaches give a try to RoboRealm , they have a trial version, you just put the algoritms and seems the results, for testing purposes even if you will use OpenCV its ok.

CalcOpticalFlowLK camera motion c++

this time i would know how can i calculate for each frame the camera motion in term of x and y pixel coordinates, i've googled and i've found that CalcOpticalFlowLK can do this.
I'm not expert in opencv and i'm asking your help!
Thank you all!
Yes OpenCV can do this. You should follow the tutorials on the site below to start and then attempt the CalcOpticalFlowLK implementation yourself. If you get stuck post your specific problem here (with a code sample) and I'd be glad to help.
http://opencv-srf.blogspot.ie/2010/09/opencv-basics.html
Then Look at
OpenCV tracking using optical flow