Need to find the angle at the corner of the skeleton



I need to find out the approximate angle at the corners in this image.Classified%20image-1

Just like this in the example photo

Please suggest me.


If you want to get helpful feedback. you should put as much effort and time in your question as you expect others to invest in the answer. So here are a few follow-up questions:

  • How would you define the “corners” of the skeleton? In your first image, the lines have some smoothness of the curvature even at the concave regions. Do you just take the points with most concavity? Do you need to extrapolate to an intersection point?
  • How was the example photo (the second image in your post) generated?
  • Is there any literature that describes your method? Any published method to follow?



although I’m not sure as well I could imagine that the goal is to join the nearest corners that show most similar angles. Maybe this works, maybe not …

Let’s wait for more details from the OP’s side.




This image is a boundary line of tungsten heavy alloy.

I used ImageJ to create skeleton around it.
The second figure was taken from the Wolfram community page link
they attempted to solve with mathematica.
But I am sure pretty sure it can be solved in imageJ.
Literature:- This angle is called dihedral angle in liquid phase sintering.


Thanks for the details.

From my point of view your sample contour image is spatially not well-resolved, i.e. the corners are round not acute. This makes it extremely difficult to determine the desired angle.

Furthermore, I’ve no good idea of how to automatically detect the corners first.




You might want to take the pixels of the skeleton, have them as a ROI and reduce the number of vertices by this algorithm. Once you have done that, go and look among the remaining points for points where the ROI has a curvature of >270 degrees in point n-1, n, n+1. These points of maximal curvature are your ‘corners’.

Fly in the ointment is the occasional 3-neighbour skeleton point you have.



I would go a Fourier shape analysis that can compute the local curvature along a closed curve. It can help for identifying the entrant corners (negative curvature values), and possibly, you may find an approximate correspondance between the curvature and the local angle. You just have to be carefull when considering the number of descriptors, and, as Herbie said, the higher image resolution, the better (and no JPEG).
Good luck!



Good day Nicholas,

AFAIK Fourier descriptors require a (single) closed curve which is not present in the sample image posted by the OP.

At least one would need heavy preprocessing …




Hello Herbie,

I agree, but there may be a workaround with the image borders that can be used to artifically close the curves. Then the results at the borders should “just” get discarded…

have a good day,