0

I want to identify the branching points of the lightning in this image:

https://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

https://i.stack.imgur.com/IYNTi.jpg

I used the threshold function in openCV and the resulting image is pretty much bad as the quality is lost, the branches are no longer visible.

Ok, basically I have 2 problems:

  1. How can i properly segment the image such that the lightning part of the image is properly captured.
  2. 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

Kevin Workman
  • 41,537
  • 9
  • 68
  • 107
user854576
  • 113
  • 1
  • 5

1 Answers1

0

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
Shai
  • 111,146
  • 38
  • 238
  • 371