Azzera filtri
Azzera filtri

How to separate connected image objects

1 visualizzazione (ultimi 30 giorni)
Dimitrios Simopoulos
Dimitrios Simopoulos il 25 Lug 2018
Risposto: Magdy Saleh il 25 Lug 2018
I would like to separate the two connected image objects that represent a music notehead. I wouldn't mind if the line above the notehead would be deleted/lost as I am calculating the centroid of the notehead to recognise the type of the note.
Thank you.

Risposte (1)

Magdy Saleh
Magdy Saleh il 25 Lug 2018
There are two approaches you can take here, either you write a script that changes the pixel values for the line given you know the coordinates of the line, which might take a long time. The other (slightly more hacky) approach is to you a some software like MS paint or paintbrush on mac to color over the line you don't want, then you can re-import that image back into Matlab, threshold it again to make a binary image and do all the processing you would like.

Community Treasure Hunt

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

Start Hunting!

Translated by