Human detection from the image or video library - matlab

I want to recognize the human from the image or video. I have used OPENCVSharp for Face detection it works fine with front face and low accuracy for side face. what i want is human detection (face detection wont work b'z face might be opposite to camera).
Can any one suggest any library or reference link for human detection from either image or video ? Also is it possible to identify the gender out of it ? is there any way we can track human from the video ?

First you need to investigate either Haar or HoG detection and decide which best suits your problem. You will then need to follow the same steps that you have conducted for face recognition but with a dataset that includes people instead.
Use this link which has a long list of free to use (non commercial) datasets which you can find one to use
then use opencv_traincascades to get your cascade.xml file

Related

Stereo Vision for Obstacle Detection

I'm working on stereo vision project with Halcon/NET. My project is to scanning the surface of a metal plate. Is it possible to detect small hole(1-3mm) on it with stereo vision?
If you are somewhat familiar with epipolar geometry and MRF optimization, you can have a look at this classic paper on 'Depth Estimation from Video'.
http://www.cad.zju.edu.cn/home/bao/pub/Consistent_Depth_Maps_Recovery_from_a_Video_Sequence.pdf
For camera calibration, you can use their ACTS software from here -
http://www.zjucvg.net/acts/acts.html
It accepts a video sequence and generates camera parameters and depth maps.
I hope it helps!
Yes, it is definitely possible to detect it - but I doubt you need stereo vision for it. Stereo vision is only useful when you want to recover 3D information (depth) from a scene.
Detection and classification can be achieved through deep learning methods too, it will also be probably more intuitive that way - but it depends on how unique your 'hole' is compared to the background of your scene. A problem of similar novelty has been discussed in this paper.
The same problem persists for stereo-vision, if the background of your scene has similar features to what you are trying to 'detect' it will create problems during stereo-matching.
Even if you use a simple 'edge' detector using a monocular vision system, it will still cause a problem.

How to detect a bending person using Matlab

I'm facing a problem while using a computer vision system toolbox (Matlab)
vision.PeopleDetector System object to detect the person when it is bending. Since this tool is to only detect upright person, it failed when the bending posture is not upright.
I did try using regionprops that worked with segmented silhouette of the bending figure but since I'm using Gaussian mixture model to segment, the results are bad as well.
Anyone has good suggestion on detecting a bending person? Thank you very much.
Just to clarify, are you working with a video? Is your camera stationary? In that case, you should be able to use vision.ForegroundDetector to detect anything that moves, and then use regionprops to select the blobs of the right size. If regionprops does not work for you, you may want to try using morphology (imclose and imopen) to close small gaps and to filter out noise.
Also, if you are working with a video, then you can use vision.KalmanFilter to track the people. Then you would not necessarily have to detect each person in every frame. If a person bends down, you may still be able to recover the track when he straightens back up.
Another possibility is to try the upper body detection with vision.CascadeObjectDetector. If you rotate the image 90 degrees, you should be able to detect the upper body of a bending person.
Yet another possibility is to train your own "bending person detector" using the trainCascadeObjectDetector function.

How to find contours of soccer player in dynamic background

My project is a designation for a system which analyze soccer videos. In a part of this project I need to detect contours of players and everybody in the play field. For all players which don’t have occlusion with the advertisement billboards, I have used the color of play field (green) to detect contours and extract players. But I have problem with the situation that players or referee have occlusion with the advertisement billboards. Suppose a situation that advertisements on the billboards are dynamic (LED billboards). As you know in this situation finding the contours is more difficult because there is no static background color or texture. You can see two example of this condition in the following images.
NOTE: in order to find the position of occlusion, I use the region between the field line and advertisement billboards, because this region has the color of the field (green). This region is shown by a red rectangular in the following image.
I expect the result be similar to the following image.
Could anyone suggest an algorithm to detect these contours?
You can try several things.
Use vision.PeopleDetector object to detect people on the field. You can also track the detected people using vision.KalmanFilter, as in the Tracking Pedestrians from a Moving Car example.
Use vision.OpticalFlow object in the Computer Vision System Toolbox to compute optical flow. You can then analyze the resulting flow field to separate camera motion from the player motion.
Use frame differencing to detect moving objects. The good news is that that will give you the contours of the people. The bad news is that it will give you many spurious contours as well.
Optical Flow would work for such problems as it captures motion information. Foreground extraction techniques using HMM or GMM or non-parametric may solve the problem as I have used for motion analysis in surveillance videos to detect anomaly (Background was static). Magnitude and orientation of optical flow seems to be an effective method. I have read papers on segmentation using optical flow. I hope this may help you.

recognize the face & distort it

We have to create an application which can take a photograph and can recognize the face and can distort it in a certain way. Below is an example:
http://itunes.apple.com/us/app/fatbooth/id372268904?mt=8
Any ideas? Is it possible using OpenCV library only?
Yes you can ado that using OpenCV. First you need to detect the face. There is Haar cascade based face detector in OpencCV. After that you can detect the facial landmark points using the same interface. But you need to train the landmark detectors like eye corners, eye center, mouth, chin etc. Once you get those points you can do different kind of warps by displacing the points.
Updating for iOS5: If you are targeting iOS5+, you don't need openCV - in iOS5 you can do simple face detection using the Apple provided methods.

MATLAB Eye Recognition

Is it possible to detect eye in the video mode in MATLAB? I am trying to detect the eye and make some predictions based on the movement of the eye. But am not sure on how to do that. Can someone help me in how to start about that? Thanks in advance.
You could take a look at this set of functions on The MathWorks File Exchange: Fast Eyetracking by Peter Aldrian.
Quoting from the description of the post (to give a little more detail here):
This project handles with the question
how to extract fixed feature points
from a given face in a real time
environment. It is based on the idea,
that a face is given by Viola Jones
Algorithm for face detection and
processed to track pupil movement in
relation to the face without using
infrared light.
My MATLAB is incredibly rusty, but this site appears to have some scripts to help track eye movement.
eye detection will be possible with MATLAB and you can come up with that. But there is a difference between recognition and detection that you need to consider carefully. Detection is checking if an object is available in the image whereas recognition is determining what the different objects in the image are.
I hope it'll increase someone's knowledge.