Identify crossing lines in image

2 vues (au cours des 30 derniers jours)
Vangelis Vladimirov
Vangelis Vladimirov le 22 Mar 2022
Commenté : Image Analyst le 31 Mar 2022
I am trying to read images of magnetograms (Original image) by binarising the image and using bwboundaries, with the signal curves of interest being divided into segments. I would like to avoid burning connecting lines into the image as suggested here, so I am searching for adjacent boundaries and changing their labels to be the same (simplified script with simplified example image). In non-quiet days, like in the example, some signal curves cross the baselines (straight lines) or other curves, causing them to be marked as one boundary - is there a way of detecting cross-overs in bwboundaries() and separating the boundary into parts? It does not necessarily have to be using bwboundaries(), it is just the function I started with.

Réponse acceptée

Image Analyst
Image Analyst le 22 Mar 2022
mask = bwskel(mask);
crossingPoints = bwmorph(mask, 'branchpoints');
  6 commentaires
Vangelis Vladimirov
Vangelis Vladimirov le 31 Mar 2022
Modifié(e) : Vangelis Vladimirov le 31 Mar 2022
The figure being processed in my previous comment is only an exagerrated example of what I want to do (initial image is label_and_crossing.png). I also attach a minimal working script which generates and shows the binary and skeletonised images of the example figure and the Original_image.jpg I want to process. Line 6 is supposed to look like the baseline curves in Original_image.jpg, which are used to calculate the recorded fields, field = baseline + the distance of the recorded curve to that baseline times the scale (field/mm).
Image Analyst
Image Analyst le 31 Mar 2022
I'd suggest you get rid of the axes right away by summing the image horizontally
verticalProfile = sum(grayImage, 2);
and then erasing peaks that fall into the certain, known zones where the axes lie. Then maybe some morphology to thicken the line, like imopen() or imerode(). Then perhaps edge linking. Then scan the image column by column looking for dark places.
There are several graph digitizing apps in the File Exchange if you don't want to build one yourself.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by