Motion tracking for research
Show older comments
Hi All,
First, thanks for any help in advance. I appreciate it. Alright, so I am looking for a way to plot the displacement of the larynx as someone is speaking over time. I have a high-speed camera where I am recording someone speak (their neck/larynx) at 300 FPS. I've imported the video into MATLAB, converted the frames to BW with nice thresholding so that I have just the edge of the neck including the larynx and nothing else, but am stuck at finding a way to identify the peak of the larynx and then tracking this displacement from frame to frame. Again, any help is greatly appreciated.

4 Comments
Walter Roberson
on 30 Aug 2011
Could you post a few images? If the point if interest is not obvious, please indicate it in each case.
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
Chris Garry
on 31 Aug 2011
David Young
on 1 Sep 2011
The image posted looks like a synthetic image, not the real thing. It's very likely that techniques developed using it will fail on the real images from the video - a version of the "toy-worlds" problem familiar to AI researchers. I think it would be better to post an example (or several) from the actual data.
Chris Garry
on 9 Sep 2011
Accepted Answer
More Answers (1)
Ashish Uthama
on 31 Aug 2011
Here is one attempt using something Walter suggested. You might be able to modify this to generalize it enough for your application.
im = imread('l.png');
% assume its logical (since you mentioned a threshold)
bw = im(:,:,1)<1;
numRows = size(bw,1);
% Compute the 'length' from the left to the neck
lengths = zeros(numRows,1);
for rowInd = 1: numRows
lengths(rowInd) = find(bw(rowInd,:),1,'first');
end
% You ought to see the bump as the local minima:
figure;plot(lengths);
% You might be able to code something logically to get the bump from
% the above (what Walter alludes to as 'fairly simple logic test'
% Since I am having fun, I am just gonna try something fancy. Try to fit a smooth polynomial to the curve, the bump would turn up as a
% residual.
p = polyfit(1:numRows,lengths',3);
fittedCurve = polyval(p, 1:numRows);
figure; plot(fittedCurve);
% see the differences
residuals = fittedCurve - lengths';
figure; plot(residuals);
% The chin is messing things up...find a way to discount it:
chinOffset = 50;
[junk bumpInd] = max(residuals(chinOffset:end));
bumpInd = bumpInd+chinOffset;
%Show on the image
imagesc(bw);colormap gray;hold on;
plot(lengths(bumpInd), bumpInd, 'R*','markerSize',10);
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!