Video Processing. Do I use impixel or improfile functions?
2 views (last 30 days)
Show older comments
Hi all,
My task is to develop a MATLAB code that will analyse a video of waves wunning up and down a beach. What I want to find is the maximum height the water propagates up the beach after each wave. Having converted each frame to an image, I was wondering what might be the best way to go about measuring this.
What I was thinking was to use the improfile function for a line along the foreshore. I could plot the pixel intensity along the line, to then see where the large change in intensity is (indicating the wavefront). I would have to do this for each frame/image - or produce a code that gives the distance value at which the large change in intensity is found for each image. Roughly speaking.
I would be grateful for all thoughts and advice. Many thanks!
2 Comments
Accepted Answer
Ryan G
on 17 Aug 2012
There is built-in edge detection as part of the Computer Vision Toolbox, which can be used directly on video.
4 Comments
K E
on 17 Aug 2012
Edited: K E
on 17 Aug 2012
If you do not have these toolboxes, there are several edge detections algorithms in the File Exchange which turn up with this search,
site:http://www.mathworks.com/matlabcentral/fileexchange "edge detection"
This is because there is a pretty developed literature on the subject (and also your application, for example here; might be worth further literature review on how others are doing this). Your initial approach sounds reasonable and a more complicated approach may not be required; compare your automatically detected location to what you see in the image and decide if you like the results. If they are noisy but you are taking a lot of video, you may be able to average out the noise in some way, for example by fitting a tidal cycle to runup distance vs. time. Sounds like a fun project, good luck!
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!