File Exchange

image thumbnail

January 2013 "Computer Vision with MATLAB" webinar demo files

version 1.0.0.1 (413 KB) by

MATLAB code used in the computer vision webinar held on January 29, 2013.

87 Downloads

Updated

View License

The demos were presented in this order:
1. MatchCard.m - Showed how to recognize specific objects in a scene using SURF features.
2. FacePeopleDetection.m - Showed object detectors available in Computer Vision System Toolbox (vision.CascadeObjectDetector and vision.PeopleDetector).
3. visionfacetrackingKLT - Showed vision.PointTracker, which uses the Kanade-Lucas-Tomasi (KLT) algorithm.
4. ForegroundDetection.m - Showed vision.ForegroundDetector, configureKalmanFilter, and vision.KalmanFilter.

In the webinar, I also showed the demo "multiObjectTracking", which ships with Computer Vision System Toolbox

Comments and Ratings (42)

Bruce Tannenbaum

Hi all,
Unfortunately, the playControl function used in ForegroundDetection.m does not work properly. Until I get this fixed, I suggest you remove it from the code and replace it with some other mechanism to pause the video.

Hello Bruce,
I'm using 2015a version.

Bruce Tannenbaum

Hi Jubaer,
What version of MATLAB are you using? I haven't tested this code in a few years.

Hi, Bruce. In ForegroundDetection section, playControl function does not seem to work. When any deployable vedio player starts, it does not show play and pause option. It keeps playing. Can you help me in this regard?

toosky

toosky (view profile)

mina daowud

Terrill Yang

Bruce Tannenbaum

Ahmed - Try adjusting the 'MetricThreshold' parameter to detect weaker features. Another option would be to try another feature type: BRISK, FAST, MSER, Harris, LBP, etc.

ahmed SHAH

hi all .. i need to detect object in the image .. i am using surf features using caltech dataset but its not working fine ..any idea how to detect objects using surf or might my image dataset is not good any idea or tutorial on images

Hi all,

I need to separate the background from the foreground in a video using Kalman filter. Can somebody give me some resources or examples to follow.

Thanks.

thanks

Hasan Basik

thanks

Bruce Tannenbaum

Hi Arun,

Check out this doc page:
http://www.mathworks.com/help/vision/ref/configurekalmanfilter.html

Thanks,
Bruce

Arun

Arun (view profile)

Hi Bruce,
Thanks for the webinar. Can you give some pointers towards how to choose values for InitialEstimateError, MotionNoise and MeasurementNoise in configureKalmanFilter?
Thanks

Mario Svarc

Hi Bruce,
regarding MatchCard.m. If I have more variations of same reference Object in one image (more Queen of diamond cards - scaled, rotated...) and "matchFeatures" found for each of those objects a few matching pairs. Is there a way, using "estimateGeometricTransform", not to inlier only one cards matched points and overlay with patch/box but to keep all the "groups" of matched points and overlay patch/box over each of the cards. Or which function should I use.
Thank You,
Mario

Bruce Tannenbaum

Nadeem,

Stereo vision gives you a depth value at every x,y location in the scene.

Thanks,
Bruce

Nadeem

Nadeem (view profile)

Thanks Bruce for your kind perusal. But, stereo vision would give me one dimension that is depth (if I am correct). What about the other dimension(other axis), that I need at the same time. My purpose is to get position of the boat in Cartesian coordinates (x,y) from the camera on ground.
Thanks

Bruce Tannenbaum

Nadeem - Optical flow and stereo vision are two very different things. Optical flow is a class of algorithms that estimate motion, while stereo vision is the extraction of 3D information from a pair of cameras. If your cameras are on stable ground (not another boat) then you could use optical flow to find the boat and stereo vision to determine its distance from the cameras. If your cameras are on a boat, then you need an algorithm that is invariant to camera motion.

Andrei - I don't imagine Kalman filtering being particularly useful in smoke detection, which is a particularly hard challenge. You might want to keep blob detection, but use color or some other attribute as the basis for segmentation. Maybe vision.ForegroundDetector would work better along with moving data to the HSV color space and finding the color plane that shows the greatest difference between smoke and non-smoke.

Hi Bruse. I'm a student of Saratov State Technical University. I develop program detection smoke by video. Based on program tracking cars, i can detect motion using optical flow, method Lucas Canade. But, i can't to difference between smoke and non smoke. I try to use blob analysis, but also don't get results. So, my question to you, using KalmanFilter in object tracking, is it possible to distinguish smoke from human?

Nadeem

Nadeem (view profile)

Hi Bruce,

I watched your video and downloaded the file. Its really a nice work. I have to find the real world x,y position data accurately for a slow moving boat(having a ball on the CG point) in order to incorporate in my research. In your opinion what should I use: the optical flow or stereo vision. I have two Fastcam MC2 cameras. Moreover, I have very little knowledge of Image processing and Computer Vision System. Kindly guide me. Thanks in anticipation.

Nadeem

Bruce Tannenbaum

Hi Nicola,

The technique I used in this demo assumed a camera at a fixed location. For when a car is moving, I suggest looking at this example: http://www.mathworks.com/help/vision/examples/tracking-pedestrians-from-a-moving-car.html

You will need to train an object detector to recognize cars. You can do this with the trainCascadeObjectDetector function and several hundred images of cars as seen from the camera as you expect to mount it.

Hi Bruce. I'm a student of University of Messina, I'd like to use your program to find cars using a dynamic camera mounted on my car. Is it possible? How can I do it? Could you help me?

bill

bill (view profile)

Where can we watch this recorded webinar?

Suhas Yelluru

Suhas Yelluru

Hey Bruce,
what changes are to be made in order to use your face tacking algorithm so that the process is done in real time using the computer's webcamera as videoinput?

Bruce Tannenbaum

Hi Syazana,

I suggest using vision.KalmanFilter and configureKalmanFilter.

Thanks,
Bruce

Hye Bruce Tannenbaum, If i had make a detection of people use the vision.peopleDetector and what is the best way to track people by using that toolbox?

Bruce Tannenbaum

Hi Syazana,

Thanks for your question!

vision.ForegroundDetector provides a binary mask of "pixels" in the foreground of a video.

vision.PeopleDetector requires at least grayscale images, if not color, to detect upright standing people. It wasn't designed to be used in combination. Rather, it is a replacement.

If the camera is stationary, then vision.ForegroundDetector is much faster at detecting moving objects, including people. If the camera is moving, then that algorithm fails to detect people, but vision.PeopleDetector will still work.

Hope this helps!

- Bruce

Hye Bruce Tannenbaum, I have try use the foreground for vision.PeopleDetector but it seem not support that function. Is it when we use peopleDetector we can not add the function of foreground? Because the example you give for foreground is by using the blobAnalysis. Thank you.

Eric Nunes

Hi Bruce,
I am trying to run the demo in 13b. But I am getting the error :
Undefined variable "vision" or function "vision.PeopleDetector".

Error in FacePeopleDetection (line 7)
peopleDetector = vision.PeopleDetector;

How do i get around it.

Eric

Bruce Tannenbaum

Hi John,

This code requires release 12b or later. The function "vision.PeopleDetector" was new in release 12b, so I would expect you to get that error if you ran the code in 12a.

Thanks,
Bruce

Lukas John

Hi Bruce,
i have 12a but this code i doesn't work.
It write error:
Undefined variable "vision" or function "vision.PeopleDetector".
Try help me please.

i have use matlab 13a is this code work for it

Bruce Tannenbaum

Hi Hassan,

I’ve checked the code for release 13b and everything seems functional. Can you answer two questions so that I can try to figure out what’s not working for you?

1. What release of MATLAB are you using (12b, 13a, ?) If you are using 11b or earlier, this code won't work right.
2. Which file in my entry is giving you the problem?

Thanks, Bruce

Hassan Javaid

I'm also having the same error:

Scalar structure required for this assignment.

Error in SURFPoints/subsref (line 462)
locS.subs{2} = 1:2;

Error in MatchCard (line 21)
scale = ref_pts(i).Scale;

Please help me with this error.

ISRAA

ISRAA (view profile)

Perfect code.

Abhijit

I got the following error message
Scalar structure required for this assignment.
Error in SURFPoints/subsref (line 462)
locS.subs{2} = 1:2;

Error in MatchCard (line 21)
scale = ref_pts(i).Scale;
Could you please help? I tried your version from 2012. They also have same error
Thanks,
Abhijit

James

James (view profile)

Thank You

fath yhia

thank you

Updates

1.0.0.1

Updated license

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video