I want to identify the branching points of the lightning in this image:
http://i.stack.imgur.com/PXujf.jpg
What I did first was threshold the image such that I get the lighning part of the image and discard the backround. This is the result
http://i.stack.imgur.com/IYNTi.jpg
I used the threshold function in openCV and the result开发者_开发技巧ing image is pretty much bad as the quality is lost, the branches are no longer visible.
Ok, basically I have 2 problems:
- How can i properly segment the image such that the lightning part of the image is properly captured.
- How can I then, identify the branching points? For every branch point i want to draw a red circle over it.
Thanking you in advance
Segmentation / thresholding:
I would give this a try.
They also had a NIPS2012 workshop (DISCML) paper on image segmentation that seems to handle quite elegantly thin elongated objects (like the lightnings in the picture).
Branching points:
Once you have a good mask you can use morphological operations to extract the branching points (Matlab code):
bw = myGoodSegmentation( img ); % replace with whatever segmentation/thresholding that works best for you.
tbw = bwmorph( bw, 'skel', inf );
[y x] = find( bwmorph( tbw, 'branchpoints' ) ); % get x,y coordinates of branch points
精彩评论