Edge Tracking a beam between two images

6 views (last 30 days)
Hi, I am looking into tracking the edge of a beam which slightly moves between two images. I currently have been given a code which uses 'phase singularity tracking' which works but was wondering if there was a code which can simply track the edges of the beam in these images? I am pretty new to Matlab and have currently tried to use intensity of white to black across a line of pixels to try and pick up the beam edge and I require another technique (I have seen edge detection examples but can they be applied for tracking?).
Many Thanks, Graham

Accepted Answer

Sean de Wolski
Sean de Wolski on 22 Feb 2011
An edge filter should work just fine on this.
doc edge
or you do a simple threshold:
Imask = I<50;
the_edges = bwperim(Imask);
  2 Comments
Graham Boag
Graham Boag on 22 Feb 2011
Thank you - however If I show the image of your code it seems most of the beam is missing and I can't detect the whole thing (even if I change the I<x)
I can get a pretty good edge detection from the code
BW2 = edge(I,'canny');
but was wondering if there was a way of measuring the edge when it moves from one image to another? ( I have tried superimposing the images together after edge detection then editing it in paint to see how many pixels apart the edges are...but it doesnt seem like an accurate method!)
Thanks, Graham
Sean de Wolski
Sean de Wolski on 22 Feb 2011
Well you could use bwboundaries to get the pixels on each edge and compare them directly.
Or you could stack all of your slices together in a 3D image volume, edge it, and figure out the change in the edge using a gradient or other technique.

Sign in to comment.

More Answers (2)

Sean de Wolski
Sean de Wolski on 22 Feb 2011
doc edge
? Show us an image!

Graham Boag
Graham Boag on 22 Feb 2011
http://oi55.tinypic.com/2mfbrjk.jpg http://i54.tinypic.com/33ypdsg_th.jpg
Hopefully this link works - Its a small translation... I also have a closer image I would like to work with that might work better...
http://i53.tinypic.com/rkn6lx_th.jpg http://i52.tinypic.com/fvzn4_th.jpg
Thanks, Graham

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!